# 2.11BSD#431 - /usr/src/games/battlestar/misc.c

##### Functions

    card              X
    ucard             X

       1: /*
       2:  * Copyright (c) 1983 Regents of the University of California,
       3:  * All rights reserved.  Redistribution permitted subject to
       4:  * the terms of the Berkeley Software License Agreement.
       5:  */
       6:
       7: #if !defined(lint) && !defined(pdp11)
       8: static char sccsid[] = "@(#)misc.c	1.2 4/24/85";
       9: #endif
      10:
      11: #include "externs.h"
      12:
      13: card(array, size)       /* for beenthere, injuries */
      14:     register char *array;
      15:     int size;
      16: {
      17:     register char *end = array + size;
      18:     register int i = 0;
      19:
      20:     while (array < end)
      21:         if (*array++)
      22:             i++;
      23:     return (i);
      24: }
      25:
      26: ucard(array)
      27:     register unsigned *array;
      28: {
      29:     register int j = 0, n;
      30:
      31:     for (n = 0; n < NUMOFOBJECTS; n++)
      32:         if (testbit(array, n))
      33:                 j++;
      34:     return (j);
      35: }

#### Defined functions

card defined in line 13; used 7 times

- in /usr/src/games/battlestar/com5.c line 65
- in /usr/src/games/battlestar/com7.c line 43-47(3)
- in /usr/src/games/battlestar/cypher.c line 224, 301(2)

ucard defined in line 26; used 4 times

- in /usr/src/games/battlestar/com5.c line 122
- in /usr/src/games/battlestar/com7.c line 43
- in /usr/src/games/battlestar/cypher.c line 205, 216

#### Defined variables

sccsid defined in line 8; never used

Last modified: 1987-07-31 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 834 |