|
|
1.1 ! root 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[] = "@(#)mat.c 5.1 (Berkeley) 4/30/85"; ! 9: #endif not lint ! 10: ! 11: /* ! 12: * mat: retrieve the value in m[r, c]. ! 13: * rows and cols are the size of the matrix in all these routines. ! 14: */ ! 15: ! 16: #include "bit.h" ! 17: ! 18: int ! 19: mat(m, rows, cols, r, c) ! 20: register bitmat m; ! 21: register int c; ! 22: int rows, cols, r; ! 23: { ! 24: register int thisbyte; ! 25: ! 26: thisbyte = m[r*((cols+7)>>3) + (c>>3)] & 0xff; ! 27: thisbyte &= 0x80 >> (c&7); ! 28: return (thisbyte != 0); ! 29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.