# 2.11BSD#431 - /usr/src/games/trek/damaged.c

##### Functions

    damaged           X

       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[] = "@(#)damaged.c	5.1 (Berkeley) 5/30/85";
       9: #endif not lint
      10:
      11: # include   "trek.h"
      12:
      13: /*  DAMAGED -- check for device damaged
      14: **
      15: **	This is a boolean function which returns non-zero if the
      16: **	specified device is broken.  It does this by checking the
      17: **	event list for a "device fix" action on that device.
      18: */
      19:
      20: damaged(dev)
      21: int dev;
      22: {
      23:     register int        d;
      24:     register struct event   *e;
      25:     register int        i;
      26:
      27:     d = dev;
      28:
      29:     for (i = 0; i < MAXEVENTS; i++)
      30:     {
      31:         e = &Event[i];
      32:         if (e->evcode != E_FIXDV)
      33:             continue;
      34:         if (e->systemname == d)
      35:             return (1);
      36:     }
      37:
      38:     /* device fix not in event list -- device must not be broken */
      39:     return (0);
      40: }

#### Defined functions

damaged defined in line 20; used 35 times

- in /usr/src/games/trek/abandon.c line 49-54(2)
- in /usr/src/games/trek/attack.c line 106, 132
- in /usr/src/games/trek/capture.c line 40
- in /usr/src/games/trek/check_out.c line 32
- in /usr/src/games/trek/damage.c line 45
- in /usr/src/games/trek/destruct.c line 39
- in /usr/src/games/trek/events.c line 196, 258, 285, 432
- in /usr/src/games/trek/help.c line 48
- in /usr/src/games/trek/impulse.c line 27
- in /usr/src/games/trek/initquad.c line 54
- in /usr/src/games/trek/kill.c line 79, 101
- in /usr/src/games/trek/klmove.c line 107, 147
- in /usr/src/games/trek/move.c line 73, 154, 167
- in /usr/src/games/trek/phaser.c line 81, 96, 102, 116, 324
- in /usr/src/games/trek/ram.c line 51
- in /usr/src/games/trek/shield.c line 49, 71
- in /usr/src/games/trek/snova.c line 99
- in /usr/src/games/trek/srscan.c line 118, 131
- in /usr/src/games/trek/torped.c line 175
- in /usr/src/games/trek/warp.c line 45

#### Defined variables

sccsid defined in line 8; never used

Last modified: 1985-05-30 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 447 |