111478Sralph /*
2*19795Sdist * Copyright (c) 1980 Regents of the University of California.
3*19795Sdist * All rights reserved. The Berkeley software License Agreement
4*19795Sdist * specifies the terms and conditions for redistribution.
5*19795Sdist */
6*19795Sdist
7*19795Sdist #ifndef lint
8*19795Sdist static char sccsid[] = "@(#)mat.c 5.1 (Berkeley) 04/30/85";
9*19795Sdist #endif not lint
10*19795Sdist
11*19795Sdist /*
1211478Sralph * mat: retrieve the value in m[r, c].
1311478Sralph * rows and cols are the size of the matrix in all these routines.
1411478Sralph */
1511478Sralph
1611478Sralph #include "bit.h"
1711478Sralph
1811478Sralph int
mat(m,rows,cols,r,c)1911478Sralph mat(m, rows, cols, r, c)
2011478Sralph register bitmat m;
2111478Sralph register int c;
2211478Sralph int rows, cols, r;
2311478Sralph {
2411478Sralph register int thisbyte;
2511478Sralph
2611478Sralph thisbyte = m[r*((cols+7)>>3) + (c>>3)] & 0xff;
2711478Sralph thisbyte &= 0x80 >> (c&7);
2811478Sralph return (thisbyte != 0);
2911478Sralph }
30