date and time created 83/08/05 13:34:37 by sam
[unix-history] / usr / src / old / lib2648 / emptyrow.c
CommitLineData
4baffcae
RC
1/* emptyrow.c 4.1 83/03/09 */
2/*
3 * emptyrow: returns true if row r of m is all zeros.
4 *
5 * Note that we assume the garbage at the end of the
6 * row is all zeros.
7 */
8
9#include "bit.h"
10
11emptyrow(m, rows, cols, r)
12bitmat m;
13int rows, cols, r;
14{
15 char *top, *bot;
16
17 bot = &m[r*((cols+7)>>3)];
18 top = bot + ((cols-1) >> 3);
19 while (bot <= top)
20 if (*bot++)
21 return(0);
22 return (1);
23}