Annotation of 43BSD/games/trek/damaged.c, revision 1.1.1.1

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[] = "@(#)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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.