|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)damaged.c 4.1 (Berkeley) 3/23/83"; ! 3: #endif not lint ! 4: ! 5: # include "trek.h" ! 6: ! 7: /* DAMAGED -- check for device damaged ! 8: ** ! 9: ** This is a boolean function which returns non-zero if the ! 10: ** specified device is broken. It does this by checking the ! 11: ** event list for a "device fix" action on that device. ! 12: */ ! 13: ! 14: damaged(dev) ! 15: int dev; ! 16: { ! 17: register int d; ! 18: register struct event *e; ! 19: register int i; ! 20: ! 21: d = dev; ! 22: ! 23: for (i = 0; i < MAXEVENTS; i++) ! 24: { ! 25: e = &Event[i]; ! 26: if (e->evcode != E_FIXDV) ! 27: continue; ! 28: if (e->systemname == d) ! 29: return (1); ! 30: } ! 31: ! 32: /* device fix not in event list -- device must not be broken */ ! 33: return (0); ! 34: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.