GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-cf81aadc39
matprt.c
Go to the documentation of this file.
1 /* matprt.c CCMATH mathematics library source code.
2  *
3  * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
4  * This code may be redistributed under the terms of the GNU library
5  * public license (LGPL). ( See the lgpl.license file for details.)
6  * ------------------------------------------------------------------------
7  */
8 
9 #include <stdio.h>
10 
11 void matprt(double *a, int n, int m, char *fmt)
12 {
13  int i, j;
14 
15  double *p;
16 
17  for (i = 0, p = a; i < n; ++i) {
18  for (j = 0; j < m; ++j)
19  printf(fmt, *p++);
20  printf("\n");
21  }
22 }
23 
24 void fmatprt(FILE *fp, double *a, int n, int m, char *fmt)
25 {
26  int i, j;
27 
28  double *p;
29 
30  for (i = 0, p = a; i < n; ++i) {
31  for (j = 0; j < m; ++j)
32  fprintf(fp, fmt, *p++);
33  fprintf(fp, "\n");
34  }
35 }
void matprt(double *a, int n, int m, char *fmt)
Definition: matprt.c:11
void fmatprt(FILE *fp, double *a, int n, int m, char *fmt)
Definition: matprt.c:24