Annotation of 43BSD/games/trek/check_out.c, revision 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[] = "@(#)check_out.c        5.1 (Berkeley) 5/30/85";
        !             9: #endif not lint
        !            10: 
        !            11: # include      "trek.h"
        !            12: 
        !            13: /*
        !            14: **  CHECK IF A DEVICE IS OUT
        !            15: **
        !            16: **     The indicated device is checked to see if it is disabled.  If
        !            17: **     it is, an attempt is made to use the starbase device.  If both
        !            18: **     of these fails, it returns non-zero (device is REALLY out),
        !            19: **     otherwise it returns zero (I can get to it somehow).
        !            20: **
        !            21: **     It prints appropriate messages too.
        !            22: */
        !            23: 
        !            24: check_out(device)
        !            25: int    device;
        !            26: {
        !            27:        register int    dev;
        !            28: 
        !            29:        dev = device;
        !            30: 
        !            31:        /* check for device ok */
        !            32:        if (!damaged(dev))
        !            33:                return (0);
        !            34: 
        !            35:        /* report it as being dead */
        !            36:        out(dev);
        !            37: 
        !            38:        /* but if we are docked, we can go ahead anyhow */
        !            39:        if (Ship.cond != DOCKED)
        !            40:                return (1);
        !            41:        printf("  Using starbase %s\n", Device[dev].name);
        !            42:        return (0);
        !            43: }

unix.superglobalmegacorp.com

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