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[] = "@(#)emptyrow.c	5.1 (Berkeley) 4/30/85";
   9: #endif not lint
  10: 
  11: /*
  12:  * emptyrow: returns true if row r of m is all zeros.
  13:  *
  14:  * Note that we assume the garbage at the end of the
  15:  * row is all zeros.
  16:  */
  17: 
  18: #include "bit.h"
  19: 
  20: emptyrow(m, rows, cols, r)
  21: bitmat m;
  22: int rows, cols, r;
  23: {
  24:     char *top, *bot;
  25: 
  26:     bot = &m[r*((cols+7)>>3)];
  27:     top = bot + ((cols-1) >> 3);
  28:     while (bot <= top)
  29:         if (*bot++)
  30:             return(0);
  31:     return (1);
  32: }

Defined functions

emptyrow defined in line 20; used 3 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1987-02-22
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2014
Valid CSS Valid XHTML 1.0 Strict