Annotation of researchv10no/games/trek/main.c, revision 1.1

1.1     ! root        1: # include      "trek.h"
        !             2: 
        !             3: /**
        !             4:  **            S T A R   T R E K
        !             5:  **
        !             6:  **    C version by Eric P. Allman 5/76 (U.C. Berkeley) with help
        !             7:  **            from Jeff Poskanzer and Pete Rubinstein.
        !             8:  **
        !             9:  **    Please send comments, questions, and suggestions about this
        !            10:  **            game to:
        !            11:  **                    Eric P. Allman
        !            12:  **                    Project INGRES
        !            13:  **                    Electronics Research Laboratory
        !            14:  **                    Cory Hall
        !            15:  **                    University of California
        !            16:  **                    Berkeley, California  94720
        !            17:  **
        !            18:  **    FORTRASH version by Kay R. Fisher (DEC) "and countless others".
        !            19:  **    That was adapted from the "original BASIC program" (ha!) by
        !            20:  **            Mike Mayfield (Centerline Engineering).
        !            21:  **
        !            22:  **    Additional inspiration taken from FORTRAN version by
        !            23:  **            David Matuszek and Paul Reynolds which runs on the CDC
        !            24:  **            7600 at Lawrence Berkeley Lab, maintained there by
        !            25:  **            Andy Davidson.  This version is also available at LLL
        !            26:  **            and at LMSC.  In all fairness, this version was the
        !            27:  **            major inspiration for this version of the game (trans-
        !            28:  **            lation:  I ripped off a whole lot of code).
        !            29:  **
        !            30:  **    Minor other input from the "Battelle Version 7A" by Joe Miller
        !            31:  **            (Graphics Systems Group, Battelle-Columbus Labs) and
        !            32:  **            Ross Pavlac (Systems Programmer, Battelle Memorial
        !            33:  **            Institute).  That version was written in December '74
        !            34:  **            and extensively modified June '75.  It was adapted
        !            35:  **            from the FTN version by Ron Williams of CDC Sunnyvale,
        !            36:  **            which was adapted from the Basic version distributed
        !            37:  **            by DEC.  It also had "neat stuff swiped" from T. T.
        !            38:  **            Terry and Jim Korp (University of Texas), Hicks (Penn
        !            39:  **            U.), and Rick Maus (Georgia Tech).  Unfortunately, it
        !            40:  **            was not as readable as it could have been and so the
        !            41:  **            translation effort was severely hampered.  None the
        !            42:  **            less, I got the idea of inhabited starsystems from this
        !            43:  **            version.
        !            44:  **
        !            45:  **    Permission is given for use, copying, and modification of
        !            46:  **            all or part of this program and related documentation,
        !            47:  **            provided that all reference to the authors are maintained.
        !            48:  **/
        !            49: 
        !            50: fault()
        !            51: {
        !            52:        signal(SIGINT,fault);
        !            53:        mkfault=1;
        !            54: }
        !            55: 
        !            56: CVNTAB Ngtab[]
        !            57: {
        !            58:        "n",    "o",
        !            59:        "y",    "es",
        !            60:        "pm",   "",
        !            61:        "r",    "epeat",
        !            62:        0
        !            63: };
        !            64: 
        !            65: int    repflg; /*Set when repeat games wanted*/
        !            66: main(argc, argv)
        !            67: int    argc;
        !            68: char   **argv;
        !            69: {
        !            70:        int                     two;
        !            71: 
        !            72:        time(&inittime);
        !            73:        printf("\n   * * *   S T A R   T R E K   * * *\n\n");
        !            74:        /* %%% begin */
        !            75: 
        !            76:        two=0;
        !            77:        setjmp(errjmp);
        !            78:        signal(2,0);
        !            79:        if(two) {
        !            80:                switch(getcodpar("Another game", Ngtab)) {
        !            81:                    default:
        !            82:                        exit(0);
        !            83:                    case 3:
        !            84:                        repflg++;
        !            85:                        break;
        !            86:                    case 2:
        !            87:                        eventpr();
        !            88:                        scanall(1);
        !            89:                    case 1:
        !            90:                        break;
        !            91:                }
        !            92:        }
        !            93:        signal(SIGINT, fault);
        !            94:        while(setup(two++) && play());
        !            95:        printf("\n");
        !            96:        exit(0);
        !            97: }

unix.superglobalmegacorp.com

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