1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)dumpmat.c	5.1 (Berkeley) 4/30/85";
   9: #endif not lint
  10: 
  11: #include "bit.h"
  12: 
  13: #ifdef TRACE
  14: /*
  15:  * dumpmat: debugging dumpmat of a window or other bit matrix.
  16:  * msg is a handy label, m is the matrix, rows, cols is the size of the matrix.
  17:  */
  18: dumpmat(msg, m, rows, cols)
  19: char *msg;
  20: bitmat m;
  21: int rows, cols;
  22: {
  23:     register int r, c;
  24:     int r1, r2, c1, c2;
  25: 
  26:     if (trace == NULL)
  27:         return;
  28:     fprintf(trace, "\ndumpmat %s, m=%x, rows=%d, cols=%d\n", msg, m, rows, cols);
  29:     minmax(m, rows, cols, &r1, &c1, &r2, &c2);
  30:     fprintf(trace, "r1=%d, r2=%d, c1=%d, c2=%d\n", r1, r2, c1, c2);
  31:     for (r=r1; r<=r2; r++) {
  32:         fprintf(trace, "%2d ", r);
  33:         for (c=c1; c<=c2; c++)
  34:             fprintf(trace, "%c", mat(m, rows, cols, r, c, 5) ? 'X' : '.');
  35:         fprintf(trace, "\n");
  36:     }
  37:     fprintf(trace, "\n");
  38: }
  39: #endif

Defined functions

dumpmat defined in line 18; used 5 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-04-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 856
Valid CSS Valid XHTML 1.0 Strict