date and time created 83/03/09 16:22:37 by ralph
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 10 Mar 1983 08:22:37 +0000 (00:22 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 10 Mar 1983 08:22:37 +0000 (00:22 -0800)
SCCS-vsn: old/lib2648/emptyrow.c 4.1

usr/src/old/lib2648/emptyrow.c [new file with mode: 0644]

diff --git a/usr/src/old/lib2648/emptyrow.c b/usr/src/old/lib2648/emptyrow.c
new file mode 100644 (file)
index 0000000..817bad1
--- /dev/null
@@ -0,0 +1,23 @@
+/*     emptyrow.c      4.1     83/03/09        */
+/*
+ * emptyrow: returns true if row r of m is all zeros.
+ *
+ * Note that we assume the garbage at the end of the
+ * row is all zeros.
+ */
+
+#include "bit.h"
+
+emptyrow(m, rows, cols, r)
+bitmat m;
+int rows, cols, r;
+{
+       char *top, *bot;
+
+       bot = &m[r*((cols+7)>>3)];
+       top = bot + ((cols-1) >> 3);
+       while (bot <= top)
+               if (*bot++)
+                       return(0);
+       return (1);
+}