GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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 #include <stdio.h>
9 void matprt(double *a, int n, int m, char *fmt)
10 {
11  int i, j;
12 
13  double *p;
14 
15  for (i = 0, p = a; i < n; ++i) {
16  for (j = 0; j < m; ++j)
17  printf(fmt, *p++);
18  printf("\n");
19  }
20 }
21 
22 void fmatprt(FILE * fp, double *a, int n, int m, char *fmt)
23 {
24  int i, j;
25 
26  double *p;
27 
28  for (i = 0, p = a; i < n; ++i) {
29  for (j = 0; j < m; ++j)
30  fprintf(fp, fmt, *p++);
31  fprintf(fp, "\n");
32  }
33 }
void fmatprt(FILE *fp, double *a, int n, int m, char *fmt)
Definition: matprt.c:22
void matprt(double *a, int n, int m, char *fmt)
Definition: matprt.c:9