1 #ifndef lint 2 static char sccsid[] = "@(#)misc.c 1.1 11/18/84"; 3 #endif 4 5 #include "externs.h" 6 7 card(array, size) /* for beenthere, injuries */ 8 register char *array; 9 int size; 10 { 11 register char *end = array + size; 12 register int i = 0; 13 14 while (array < end) 15 if (*array++) 16 i++; 17 return (i); 18 } 19 20 ucard(array) 21 register unsigned *array; 22 { 23 register int j = 0, n; 24 25 for (n = 0; n < NUMOFOBJECTS; n++) 26 if (testbit(array, n)) 27 j++; 28 return (j); 29 } 30