# 2.11BSD#431 - /usr/src/games/trek/trek.h

##### Variables

    Device            X
    Event             X
    Quad              X
    Sect              X
    Trace             X

##### Macros

    BASE              X
    CLOAK             X
    COMPUTER          X
    DOCKED            X
    EMPTY             X
    ENTERPRISE        X
    E_ATTACK          X
    E_ENSLV           X
    E_EVENT           X
    E_FIXDV           X
    E_GHOST           X
    E_HIDDEN          X
    E_ISSUE           X
    E_KATSB           X
    E_KDESB           X
    E_LRTB            X
    E_REPRO           X
    E_SNAP            X
    E_SNOVA           X
    GREEN             X
    HOLE              X
    IMPULSE           X
    INHABIT           X
    KLINGON           X
    KM_EA             X
    KM_EB             X
    KM_LA             X
    KM_LB             X
    KM_OA             X
    KM_OB             X
    LIFESUP           X
    LRSCAN            X
    L_CAPTURED        X
    L_DSTRCT          X
    L_DSTRYD          X
    L_NEGENB          X
    L_NOCREW          X
    L_NOENGY          X
    L_NOHELP          X
    L_NOLIFE          X
    L_NOTIME          X
    L_SNOVA           X
    L_STAR            X
    L_SUICID          X
    L_TOOFAST         X
    MAXBASES          X
    MAXDISTR          X
    MAXEVENTS         X
    MAXKLQUAD         X
    NBANKS            X
    NDEV              X
    NEVENTS           X
    NINHAB            X
    NQUADS            X
    NSECTS            X
    PHASER            X
    QUEENE            X
    Q_DISTRESSED      X
    Q_SYSTEM          X
    RED               X
    SHIELD            X
    SHUTTLE           X
    SINS              X
    SRSCAN            X
    SSRADIO           X
    STAR              X
    TORPED            X
    WARP              X
    XPORTER           X
    YELLOW            X
    xTRACE            X

##### struct's

    device            X
    event             X
    kling             X
    quad              X
    xy                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:  *	@(#)trek.h	5.1 (Berkeley) 1/29/86
       7:  */
       8:
       9: #
      10: /*
      11: **  Global Declarations
      12: **
      13: **	Virtually all non-local variable declarations are made in this
      14: **	file.  Exceptions are those things which are initialized, which
      15: **	are defined in "externs.c", and things which are local to one
      16: **	program file.
      17: **
      18: **	So far as I know, nothing in here must be preinitialized to
      19: **	zero.
      20: **
      21: **	You may have problems from the loader if you move this to a
      22: **	different machine.  These things actually get allocated in each
      23: **	source file, which UNIX allows; however, you may (on other
      24: **	systems) have to change everything in here to be "extern" and
      25: **	actually allocate stuff in "externs.c"
      26: */
      27:
      28: /* external function definitions */
      29: extern double   franf();    /* floating random number function */
      30: extern double   sqrt();     /* square root */
      31: extern double   sin(), cos();   /* trig functions */
      32: extern double   atan2();    /* fancy arc tangent function */
      33: extern double   log();      /* log base e */
      34: extern double   pow();      /* power function */
      35: extern double   fabs();     /* absolute value function */
      36: extern double   exp();      /* exponential function */
      37:
      38: /*********************  GALAXY  **************************/
      39:
      40: /* galactic parameters */
      41: # define    NSECTS      10  /* dimensions of quadrant in sectors */
      42: # define    NQUADS      8   /* dimension of galazy in quadrants */
      43: # define    NINHAB      32  /* number of quadrants which are inhabited */
      44:
      45: struct quad     /* definition for each quadrant */
      46: {
      47:     char    bases;      /* number of bases in this quadrant */
      48:     char    klings;     /* number of Klingons in this quadrant */
      49:     char    holes;      /* number of black holes in this quadrant */
      50:     int scanned;    /* star chart entry (see below) */
      51:     char    stars;      /* number of stars in this quadrant */
      52:     char    qsystemname;    /* starsystem name (see below) */
      53: };
      54:
      55: # define    Q_DISTRESSED    0200
      56: # define    Q_SYSTEM    077
      57:
      58: /*  systemname conventions:
      59:  *	1 -> NINHAB	index into Systemname table for live system.
      60:  *	+ Q_DISTRESSED	distressed starsystem -- systemname & Q_SYSTEM
      61:  *			is the index into the Event table which will
      62:  *			have the system name
      63:  *	0		dead or nonexistent starsystem
      64:  *
      65:  *  starchart ("scanned") conventions:
      66:  *	0 -> 999	taken as is
      67:  *	-1		not yet scanned ("...")
      68:  *	1000		supernova ("///")
      69:  *	1001		starbase + ??? (".1.")
      70: */
      71:
      72: /* ascii names of systems */
      73: extern char *Systemname[NINHAB];
      74:
      75: /* quadrant definition */
      76: struct quad Quad[NQUADS][NQUADS];
      77:
      78: /* defines for sector map  (below) */
      79: # define    EMPTY       '.'
      80: # define    STAR        '*'
      81: # define    BASE        '#'
      82: # define    ENTERPRISE  'E'
      83: # define    QUEENE      'Q'
      84: # define    KLINGON     'K'
      85: # define    INHABIT     '@'
      86: # define    HOLE        ' '
      87:
      88: /* current sector map */
      89: char    Sect[NSECTS][NSECTS];
      90:
      91:
      92: /************************ DEVICES ******************************/
      93:
      94: # define    NDEV        16  /* max number of devices */
      95:
      96: /* device tokens */
      97: # define    WARP        0   /* warp engines */
      98: # define    SRSCAN      1   /* short range scanners */
      99: # define    LRSCAN      2   /* long range scanners */
     100: # define    PHASER      3   /* phaser control */
     101: # define    TORPED      4   /* photon torpedo control */
     102: # define    IMPULSE     5   /* impulse engines */
     103: # define    SHIELD      6   /* shield control */
     104: # define    COMPUTER    7   /* on board computer */
     105: # define    SSRADIO     8   /* subspace radio */
     106: # define    LIFESUP     9   /* life support systems */
     107: # define    SINS        10  /* Space Inertial Navigation System */
     108: # define    CLOAK       11  /* cloaking device */
     109: # define    XPORTER     12  /* transporter */
     110: # define    SHUTTLE     13  /* shuttlecraft */
     111:
     112: /* device names */
     113: struct device
     114: {
     115:     char    *name;      /* device name */
     116:     char    *person;    /* the person who fixes it */
     117: };
     118:
     119: struct device   Device[NDEV];
     120:
     121: /***************************  EVENTS  ****************************/
     122:
     123: # define    NEVENTS     12  /* number of different event types */
     124:
     125: # define    E_LRTB      1   /* long range tractor beam */
     126: # define    E_KATSB     2   /* Klingon attacks starbase */
     127: # define    E_KDESB     3   /* Klingon destroys starbase */
     128: # define    E_ISSUE     4   /* distress call is issued */
     129: # define    E_ENSLV     5   /* Klingons enslave a quadrant */
     130: # define    E_REPRO     6   /* a Klingon is reproduced */
     131: # define    E_FIXDV     7   /* fix a device */
     132: # define    E_ATTACK    8   /* Klingon attack during rest period */
     133: # define    E_SNAP      9   /* take a snapshot for time warp */
     134: # define    E_SNOVA     10  /* supernova occurs */
     135:
     136: # define    E_GHOST     0100    /* ghost of a distress call if ssradio out */
     137: # define    E_HIDDEN    0200    /* event that is unreportable because ssradio out */
     138: # define    E_EVENT     077 /* mask to get event code */
     139:
     140: struct event
     141: {
     142:     char    x, y;           /* coordinates */
     143:     double  date;           /* trap stardate */
     144:     char    evcode;         /* event type */
     145:     char    systemname;     /* starsystem name */
     146: };
     147: /* systemname conventions:
     148:  *	1 -> NINHAB	index into Systemname table for reported distress calls
     149:  *
     150:  * evcode conventions:
     151:  *	1 -> NEVENTS-1	event type
     152:  *	+ E_HIDDEN	unreported (SSradio out)
     153:  *	+ E_GHOST	actually already expired
     154:  *	0		unallocated
     155:  */
     156:
     157: # define    MAXEVENTS   25  /* max number of concurrently pending events */
     158:
     159: struct event    Event[MAXEVENTS];   /* dynamic event list; one entry per pending event */
     160:
     161: /*****************************  KLINGONS  *******************************/
     162:
     163: struct kling
     164: {
     165:     char    x, y;       /* coordinates */
     166:     int power;      /* power left */
     167:     double  dist;       /* distance to Enterprise */
     168:     double  avgdist;    /* average over this move */
     169:     char    srndreq;    /* set if surrender has been requested */
     170: };
     171:
     172: # define    MAXKLQUAD   9   /* maximum klingons per quadrant */
     173:
     174: /********************** MISCELLANEOUS ***************************/
     175:
     176: /* condition codes */
     177: # define    GREEN       0
     178: # define    DOCKED      1
     179: # define    YELLOW      2
     180: # define    RED     3
     181:
     182: /* starbase coordinates */
     183: # define    MAXBASES    9   /* maximum number of starbases in galaxy */
     184:
     185: /*  distress calls  */
     186: # define    MAXDISTR    5   /* maximum concurrent distress calls */
     187:
     188: /* phaser banks */
     189: # define    NBANKS      6   /* number of phaser banks */
     190:
     191: struct xy
     192: {
     193:     char    x, y;       /* coordinates */
     194: };
     195:
     196:
     197: /*
     198:  *	note that much of the stuff in the following structs CAN NOT
     199:  *	be moved around!!!!
     200:  */
     201:
     202:
     203: /* information regarding the state of the starship */
     204: struct
     205: {
     206:     double  warp;       /* warp factor */
     207:     double  warp2;      /* warp factor squared */
     208:     double  warp3;      /* warp factor cubed */
     209:     char    shldup;     /* shield up flag */
     210:     char    cloaked;    /* set if cloaking device on */
     211:     int energy;     /* starship's energy */
     212:     int shield;     /* energy in shields */
     213:     double  reserves;   /* life support reserves */
     214:     int crew;       /* ship's complement */
     215:     int brigfree;   /* space left in brig */
     216:     char    torped;     /* torpedoes */
     217:     char    cloakgood;  /* set if we have moved */
     218:     int quadx;      /* quadrant x coord */
     219:     int quady;      /* quadrant y coord */
     220:     int sectx;      /* sector x coord */
     221:     int secty;      /* sector y coord */
     222:     char    cond;       /* condition code */
     223:     char    sinsbad;    /* Space Inertial Navigation System condition */
     224:     char    *shipname;  /* name of current starship */
     225:     char    ship;       /* current starship */
     226:     int distressed  /* number of distress calls */
     227: }   Ship;
     228:
     229: /* sinsbad is set if SINS is working but not calibrated */
     230:
     231: /* game related information, mostly scoring */
     232: struct
     233: {
     234:     int killk;      /* number of klingons killed */
     235:     int deaths;     /* number of deaths onboard Enterprise */
     236:     char    negenbar;   /* number of hits on negative energy barrier */
     237:     char    killb;      /* number of starbases killed */
     238:     int kills;      /* number of stars killed */
     239:     char    skill;      /* skill rating of player */
     240:     char    length;     /* length of game */
     241:     char    killed;     /* set if you were killed */
     242:     char    killinhab;  /* number of inhabited starsystems killed */
     243:     char    tourn;      /* set if a tournament game */
     244:     char    passwd[15]; /* game password */
     245:     char    snap;       /* set if snapshot taken */
     246:     char    helps;      /* number of help calls */
     247:     int captives;   /* total number of captives taken */
     248: }   Game;
     249:
     250: /* per move information */
     251: struct
     252: {
     253:     char    free;       /* set if a move is free */
     254:     char    endgame;    /* end of game flag */
     255:     char    shldchg;    /* set if shields changed this move */
     256:     char    newquad;    /* set if just entered this quadrant */
     257:     char    resting;    /* set if this move is a rest */
     258:     double  time;       /* time used this move */
     259: }   Move;
     260:
     261: /* parametric information */
     262: struct
     263: {
     264:     char    bases;      /* number of starbases */
     265:     char    klings;     /* number of klingons */
     266:     double  date;       /* stardate */
     267:     double  time;       /* time left */
     268:     double  resource;   /* Federation resources */
     269:     int energy;     /* starship's energy */
     270:     int shield;     /* energy in shields */
     271:     double  reserves;   /* life support reserves */
     272:     int crew;       /* size of ship's complement */
     273:     int brigfree;   /* max possible number of captives */
     274:     char    torped;     /* photon torpedos */
     275:     double  damfac[NDEV];   /* damage factor */
     276:     double  dockfac;    /* docked repair time factor */
     277:     double  regenfac;   /* regeneration factor */
     278:     int stopengy;   /* energy to do emergency stop */
     279:     int shupengy;   /* energy to put up shields */
     280:     int klingpwr;   /* Klingon initial power */
     281:     int warptime;   /* time chewer multiplier */
     282:     double  phasfac;    /* Klingon phaser power eater factor */
     283:     char    moveprob[6];    /* probability that a Klingon moves */
     284:     double  movefac[6]; /* Klingon move distance multiplier */
     285:     double  eventdly[NEVENTS];  /* event time multipliers */
     286:     double  navigcrud[2];   /* navigation crudup factor */
     287:     int cloakenergy;    /* cloaking device energy per stardate */
     288:     double  damprob[NDEV];  /* damage probability */
     289:     double  hitfac;     /* Klingon attack factor */
     290:     int klingcrew;  /* number of Klingons in a crew */
     291:     double  srndrprob;  /* surrender probability */
     292:     int energylow;  /* low energy mark (cond YELLOW) */
     293: }   Param;
     294:
     295: /* Sum of damage probabilities must add to 1000 */
     296:
     297: /* other information kept in a snapshot */
     298: struct
     299: {
     300:     char    bases;      /* number of starbases */
     301:     char    klings;     /* number of klingons */
     302:     double  date;       /* stardate */
     303:     double  time;       /* time left */
     304:     double  resource;   /* Federation resources */
     305:     char    distressed; /* number of currently distressed quadrants */
     306:     struct event    *eventptr[NEVENTS]; /* pointer to event structs */
     307:     struct xy   base[MAXBASES];     /* locations of starbases */
     308: }   Now;
     309:
     310: /* Other stuff, not dumped in a snapshot */
     311: struct
     312: {
     313:     struct kling    klingon[MAXKLQUAD]; /* sorted Klingon list */
     314:     char        nkling;         /* number of Klingons in this sector */
     315:                         /* < 0 means automatic override mode */
     316:     char        fast;           /* set if speed > 300 baud */
     317:     struct xy   starbase;   /* starbase in current quadrant */
     318:     char        snapshot[sizeof Quad + sizeof Event + sizeof Now];  /* snapshot for time warp */
     319:     char        statreport;     /* set to get a status report on a srscan */
     320: }   Etc;
     321:
     322: /*
     323:  *	eventptr is a pointer to the event[] entry of the last
     324:  *	scheduled event of each type.  Zero if no such event scheduled.
     325:  */
     326:
     327: /* Klingon move indicies */
     328: # define    KM_OB       0   /* Old quadrant, Before attack */
     329: # define    KM_OA       1   /* Old quadrant, After attack */
     330: # define    KM_EB       2   /* Enter quadrant, Before attack */
     331: # define    KM_EA       3   /* Enter quadrant, After attack */
     332: # define    KM_LB       4   /* Leave quadrant, Before attack */
     333: # define    KM_LA       5   /* Leave quadrant, After attack */
     334:
     335: /* you lose codes */
     336: # define    L_NOTIME    1   /* ran out of time */
     337: # define    L_NOENGY    2   /* ran out of energy */
     338: # define    L_DSTRYD    3   /* destroyed by a Klingon */
     339: # define    L_NEGENB    4   /* ran into the negative energy barrier */
     340: # define    L_SUICID    5   /* destroyed in a nova */
     341: # define    L_SNOVA     6   /* destroyed in a supernova */
     342: # define    L_NOLIFE    7   /* life support died (so did you) */
     343: # define    L_NOHELP    8   /* you could not be rematerialized */
     344: # define    L_TOOFAST   9   /* pretty stupid going at warp 10 */
     345: # define    L_STAR      10  /* ran into a star */
     346: # define    L_DSTRCT    11  /* self destructed */
     347: # define    L_CAPTURED  12  /* captured by Klingons */
     348: # define    L_NOCREW    13  /* you ran out of crew */
     349:
     350: /******************  COMPILE OPTIONS  ***********************/
     351:
     352: /* Trace info */
     353: # define    xTRACE      1
     354: int Trace;

#### Defined variables

Device defined in line 119; used 9 times

- in /usr/src/games/trek/check_out.c line 41
- in /usr/src/games/trek/damage.c line 39
- in /usr/src/games/trek/dcrept.c line 64
- in /usr/src/games/trek/events.c line 382(2)
- in /usr/src/games/trek/out.c line 22
- in /usr/src/games/trek/phaser.c line 98, 104
- in /usr/src/games/trek/setup.c line 113

Event defined in line 159; used 30 times

- in line 318
- in /usr/src/games/trek/abandon.c line 85
- in /usr/src/games/trek/computer.c line 230
- in /usr/src/games/trek/damage.c line 56
- in /usr/src/games/trek/damaged.c line 31
- in /usr/src/games/trek/dcrept.c line 49
- in /usr/src/games/trek/dock.c line 79, 111
- in /usr/src/games/trek/dumpgame.c line 33(2)
- in /usr/src/games/trek/dumpme.c line 52
- in /usr/src/games/trek/dumpssradio.c line 26
- in /usr/src/games/trek/events.c line 66, 172, 255, 361(2)
- in /usr/src/games/trek/kill.c line 146, 171
- in /usr/src/games/trek/schedule.c line 36
- in /usr/src/games/trek/setup.c line 177
- in /usr/src/games/trek/systemname.c line 34
- in /usr/src/games/trek/warp.c line 127-129(2), 138-144(6)

Quad defined in line 76; used 48 times

- in line 318
- in /usr/src/games/trek/abandon.c line 53
- in /usr/src/games/trek/attack.c line 55
- in /usr/src/games/trek/checkcond.c line 53-55(2)
- in /usr/src/games/trek/computer.c line 113
- in /usr/src/games/trek/dumpgame.c line 31(2)
- in /usr/src/games/trek/events.c line 125, 165, 211, 238, 272, 298, 322, 360(2)
- in /usr/src/games/trek/help.c line 58
- in /usr/src/games/trek/initquad.c line 39
- in /usr/src/games/trek/kill.c line 39-41(2), 75, 128, 141, 168
- in /usr/src/games/trek/klmove.c line 105(2), 111-122(6)
- in /usr/src/games/trek/lrscan.c line 66
- in /usr/src/games/trek/nova.c line 33, 49-51(2)
- in /usr/src/games/trek/setup.c line 201, 216, 228, 255
- in /usr/src/games/trek/snova.c line 53, 79
- in /usr/src/games/trek/srscan.c line 70
- in /usr/src/games/trek/torped.c line 175
- in /usr/src/games/trek/warp.c line 137-138(3)

Sect defined in line 89; used 46 times

- in /usr/src/games/trek/abandon.c line 112, 121-123(2)
- in /usr/src/games/trek/dock.c line 46
- in /usr/src/games/trek/dumpgame.c line 30(2)
- in /usr/src/games/trek/events.c line 344
- in /usr/src/games/trek/help.c line 88, 108, 118
- in /usr/src/games/trek/initquad.c line 61-64(2), 70, 82, 91, 99, 106, 121
- in /usr/src/games/trek/kill.c line 38, 94, 129
- in /usr/src/games/trek/klmove.c line 118, 126-135(3), 150-151(2)
- in /usr/src/games/trek/move.c line 107, 164, 177, 200
- in /usr/src/games/trek/nova.c line 33, 45-48(2), 61, 108
- in /usr/src/games/trek/ram.c line 31
- in /usr/src/games/trek/snova.c line 64(2)
- in /usr/src/games/trek/srscan.c line 86
- in /usr/src/games/trek/torped.c line 129, 169-170(2)
- in /usr/src/games/trek/visual.c line 54, 62, 70

Trace defined in line 354; used 14 times

- in /usr/src/games/trek/capture.c line 62
- in /usr/src/games/trek/events.c line 93
- in /usr/src/games/trek/klmove.c line 51
- in /usr/src/games/trek/main.c line 167
- in /usr/src/games/trek/move.c line 66, 91, 113, 123, 140
- in /usr/src/games/trek/phaser.c line 206, 247
- in /usr/src/games/trek/schedule.c line 41, 76, 98

#### Defined struct's

device defined in line 113; used 6 times

- in line 119(2)
- in /usr/src/games/trek/externs.c line 17(2)
- in /usr/src/games/trek/out.c line 20(2)

event defined in line 140; used 50 times

- in line 159(2), 306(2)
- in /usr/src/games/trek/abandon.c line 43(2)
- in /usr/src/games/trek/computer.c line 86(2)
- in /usr/src/games/trek/damage.c line 30(2)
- in /usr/src/games/trek/damaged.c line 24(2)
- in /usr/src/games/trek/dcrept.c line 30(2)
- in /usr/src/games/trek/dock.c line 32(2), 97(2)
- in /usr/src/games/trek/dumpme.c line 30(2)
- in /usr/src/games/trek/dumpssradio.c line 19(2)
- in /usr/src/games/trek/events.c line 31-34(4)
- in /usr/src/games/trek/kill.c line 121(2), 164(2)
- in /usr/src/games/trek/schedule.c line 23(2), 29(2), 65-69(4), 91-93(4), 116(2), 136-141(4)
- in /usr/src/games/trek/setup.c line 55(2)

kling defined in line 163; used 16 times

- in line 313(2)
- in /usr/src/games/trek/capture.c line 30-32(4), 92(2)
- in /usr/src/games/trek/compkl.c line 68(2)
- in /usr/src/games/trek/events.c line 27(2)
- in /usr/src/games/trek/klmove.c line 40(2)
- in /usr/src/games/trek/phaser.c line 67(2)

quad defined in line 45; used 28 times

- in line 76(2)
- in /usr/src/games/trek/abandon.c line 40(2)
- in /usr/src/games/trek/computer.c line 85(2)
- in /usr/src/games/trek/events.c line 33(2)
- in /usr/src/games/trek/initquad.c line 36(2)
- in /usr/src/games/trek/kill.c line 72(2), 120(2), 166(2)
- in /usr/src/games/trek/lrscan.c line 28(2)
- in /usr/src/games/trek/setup.c line 54(2)
- in /usr/src/games/trek/snova.c line 42(2)
- in /usr/src/games/trek/srscan.c line 44(2)
- in /usr/src/games/trek/systemname.c line 25-27(4)

xy defined in line 191; used 10 times

- in line 307(2), 317(2)
- in /usr/src/games/trek/kill.c line 73(2)
- in /usr/src/games/trek/visual.c line 23(2), 42(2)

#### Defined macros

BASE defined in line 81; used 2 times

- in /usr/src/games/trek/dock.c line 46
- in /usr/src/games/trek/initquad.c line 82

CLOAK defined in line 108; used 4 times

- in /usr/src/games/trek/abandon.c line 91-92(2)
- in /usr/src/games/trek/setup.c line 129
- in /usr/src/games/trek/shield.c line 58

COMPUTER defined in line 104; used 10 times

- in /usr/src/games/trek/computer.c line 88
- in /usr/src/games/trek/destruct.c line 39-40(2)
- in /usr/src/games/trek/initquad.c line 54
- in /usr/src/games/trek/move.c line 154, 167
- in /usr/src/games/trek/phaser.c line 96-98(2), 116
- in /usr/src/games/trek/setup.c line 125

DOCKED defined in line 178; used 22 times

- in /usr/src/games/trek/abandon.c line 47
- in /usr/src/games/trek/attack.c line 61
- in /usr/src/games/trek/check_out.c line 39
- in /usr/src/games/trek/checkcond.c line 62
- in /usr/src/games/trek/damage.c line 42
- in /usr/src/games/trek/dcrept.c line 33
- in /usr/src/games/trek/dock.c line 34, 67, 100
- in /usr/src/games/trek/events.c line 117, 393, 432
- in /usr/src/games/trek/help.c line 44
- in /usr/src/games/trek/impulse.c line 25
- in /usr/src/games/trek/kill.c line 95
- in /usr/src/games/trek/phaser.c line 79
- in /usr/src/games/trek/rest.c line 49
- in /usr/src/games/trek/shield.c line 77
- in /usr/src/games/trek/torped.c line 113, 211-215(2)
- in /usr/src/games/trek/warp.c line 43

EMPTY defined in line 79; used 19 times

- in /usr/src/games/trek/abandon.c line 112, 121
- in /usr/src/games/trek/help.c line 88, 108
- in /usr/src/games/trek/initquad.c line 61, 121
- in /usr/src/games/trek/kill.c line 38, 94, 129
- in /usr/src/games/trek/klmove.c line 118, 126-135(3), 150
- in /usr/src/games/trek/move.c line 107, 164
- in /usr/src/games/trek/nova.c line 45, 108
- in /usr/src/games/trek/torped.c line 170

ENTERPRISE defined in line 82; used 3 times

- in /usr/src/games/trek/score.c line 64
- in /usr/src/games/trek/setup.c line 95
- in /usr/src/games/trek/win.c line 45

E_ATTACK defined in line 132; used 2 times

- in /usr/src/games/trek/events.c line 53, 417

E_ENSLV defined in line 129; used 2 times

- in /usr/src/games/trek/events.c line 254
- in /usr/src/games/trek/setup.c line 169

E_EVENT defined in line 138; used 4 times

- in /usr/src/games/trek/computer.c line 234
- in /usr/src/games/trek/events.c line 103, 173
- in /usr/src/games/trek/schedule.c line 102

E_FIXDV defined in line 131; used 10 times

- in /usr/src/games/trek/abandon.c line 86
- in /usr/src/games/trek/damage.c line 49, 57
- in /usr/src/games/trek/damaged.c line 32
- in /usr/src/games/trek/dcrept.c line 50
- in /usr/src/games/trek/dock.c line 80, 112
- in /usr/src/games/trek/dumpme.c line 53
- in /usr/src/games/trek/warp.c line 128, 143

E_GHOST defined in line 136; used 4 times

- in /usr/src/games/trek/dumpssradio.c line 30
- in /usr/src/games/trek/events.c line 67
- in /usr/src/games/trek/kill.c line 107, 196

E_HIDDEN defined in line 137; used 5 times

- in /usr/src/games/trek/computer.c line 232
- in /usr/src/games/trek/dumpssradio.c line 28
- in /usr/src/games/trek/events.c line 206, 266, 293

E_ISSUE defined in line 128; used 3 times

- in /usr/src/games/trek/events.c line 229
- in /usr/src/games/trek/setup.c line 167, 184

E_KATSB defined in line 126; used 4 times

- in /usr/src/games/trek/events.c line 192
- in /usr/src/games/trek/kill.c line 107
- in /usr/src/games/trek/setup.c line 165, 183

E_KDESB defined in line 127; used 3 times

- in /usr/src/games/trek/events.c line 173, 193
- in /usr/src/games/trek/setup.c line 166

E_LRTB defined in line 125; used 9 times

- in /usr/src/games/trek/events.c line 115
- in /usr/src/games/trek/move.c line 89-94(4)
- in /usr/src/games/trek/rest.c line 48
- in /usr/src/games/trek/setup.c line 164, 182
- in /usr/src/games/trek/warp.c line 128

E_REPRO defined in line 130; used 4 times

- in /usr/src/games/trek/events.c line 282(2), 305
- in /usr/src/games/trek/setup.c line 170

E_SNAP defined in line 133; used 3 times

- in /usr/src/games/trek/events.c line 358
- in /usr/src/games/trek/setup.c line 168, 185

E_SNOVA defined in line 134; used 3 times

- in /usr/src/games/trek/events.c line 110
- in /usr/src/games/trek/setup.c line 163, 181

GREEN defined in line 177; used 4 times

- in /usr/src/games/trek/abandon.c line 81
- in /usr/src/games/trek/checkcond.c line 75
- in /usr/src/games/trek/dock.c line 105
- in /usr/src/games/trek/setup.c line 103

HOLE defined in line 86; used 3 times

- in /usr/src/games/trek/initquad.c line 99
- in /usr/src/games/trek/move.c line 177
- in /usr/src/games/trek/nova.c line 48

IMPULSE defined in line 102; used 3 times

- in /usr/src/games/trek/impulse.c line 27-28(2)
- in /usr/src/games/trek/setup.c line 123

INHABIT defined in line 85; used 2 times

- in /usr/src/games/trek/initquad.c line 91
- in /usr/src/games/trek/snova.c line 64

KLINGON defined in line 84; used 3 times

- in /usr/src/games/trek/events.c line 344
- in /usr/src/games/trek/initquad.c line 70
- in /usr/src/games/trek/klmove.c line 151

KM_EA defined in line 331; used 2 times

- in /usr/src/games/trek/setup.c line 157-158(2)

KM_EB defined in line 330; used 2 times

- in /usr/src/games/trek/setup.c line 155-156(2)

KM_LA defined in line 333; used 2 times

- in /usr/src/games/trek/setup.c line 161-162(2)

KM_LB defined in line 332; used 2 times

- in /usr/src/games/trek/setup.c line 159-160(2)

KM_OA defined in line 329; used 2 times

- in /usr/src/games/trek/setup.c line 153-154(2)

KM_OB defined in line 328; used 2 times

- in /usr/src/games/trek/setup.c line 151-152(2)

LIFESUP defined in line 106; used 3 times

- in /usr/src/games/trek/events.c line 432
- in /usr/src/games/trek/setup.c line 127
- in /usr/src/games/trek/srscan.c line 131

LRSCAN defined in line 99; used 2 times

- in /usr/src/games/trek/lrscan.c line 30
- in /usr/src/games/trek/setup.c line 120

L_CAPTURED defined in line 347; used 1 times

- in /usr/src/games/trek/abandon.c line 67

L_DSTRCT defined in line 346; used 1 times

- in /usr/src/games/trek/destruct.c line 82

L_DSTRYD defined in line 338; used 1 times

- in /usr/src/games/trek/attack.c line 141

L_NEGENB defined in line 339; used 1 times

- in /usr/src/games/trek/move.c line 159

L_NOCREW defined in line 348; used 1 times

- in /usr/src/games/trek/checkcond.c line 48

L_NOENGY defined in line 337; used 1 times

- in /usr/src/games/trek/checkcond.c line 46

L_NOHELP defined in line 343; used 1 times

- in /usr/src/games/trek/help.c line 129

L_NOLIFE defined in line 342; used 1 times

- in /usr/src/games/trek/checkcond.c line 44

L_NOTIME defined in line 336; used 1 times

- in /usr/src/games/trek/events.c line 91

L_SNOVA defined in line 341; used 2 times

- in /usr/src/games/trek/checkcond.c line 56
- in /usr/src/games/trek/snova.c line 93

L_STAR defined in line 345; used 1 times

- in /usr/src/games/trek/ram.c line 45

L_SUICID defined in line 340; used 1 times

- in /usr/src/games/trek/nova.c line 102

L_TOOFAST defined in line 344; used 1 times

- in /usr/src/games/trek/warp.c line 150

MAXBASES defined in line 183; used 1 times

- in line 307

MAXDISTR defined in line 186; used 1 times

- in /usr/src/games/trek/events.c line 231

MAXEVENTS defined in line 157; used 18 times

- in line 159
- in /usr/src/games/trek/abandon.c line 83
- in /usr/src/games/trek/computer.c line 228
- in /usr/src/games/trek/damage.c line 54
- in /usr/src/games/trek/damaged.c line 29
- in /usr/src/games/trek/dcrept.c line 47
- in /usr/src/games/trek/dock.c line 77, 109
- in /usr/src/games/trek/dumpme.c line 50
- in /usr/src/games/trek/dumpssradio.c line 24
- in /usr/src/games/trek/events.c line 64, 170, 178
- in /usr/src/games/trek/kill.c line 169
- in /usr/src/games/trek/schedule.c line 34
- in /usr/src/games/trek/setup.c line 175
- in /usr/src/games/trek/warp.c line 125, 142

MAXKLQUAD defined in line 172; used 5 times

- in line 313
- in /usr/src/games/trek/events.c line 311, 324
- in /usr/src/games/trek/klmove.c line 105
- in /usr/src/games/trek/setup.c line 256

NBANKS defined in line 189; used 9 times

- in /usr/src/games/trek/phaser.c line 75-76(2), 125, 135, 187-188(2), 249, 263, 338

NDEV defined in line 94; used 9 times

- in line 119, 275, 288
- in /usr/src/games/trek/abandon.c line 94
- in /usr/src/games/trek/externs.c line 17
- in /usr/src/games/trek/ram.c line 65
- in /usr/src/games/trek/setup.c line 112, 132
- in /usr/src/games/trek/warp.c line 152

NEVENTS defined in line 123; used 2 times

- in line 285, 306

NINHAB defined in line 43; used 3 times

- in line 73
- in /usr/src/games/trek/externs.c line 37
- in /usr/src/games/trek/setup.c line 210

NQUADS defined in line 42; used 31 times

- in line 76(2)
- in /usr/src/games/trek/computer.c line 100-106(3), 130
- in /usr/src/games/trek/dumpme.c line 34-35(2)
- in /usr/src/games/trek/events.c line 121-123(2), 236-237(2), 316-320(2)
- in /usr/src/games/trek/klmove.c line 104(2)
- in /usr/src/games/trek/lrscan.c line 39, 49, 60
- in /usr/src/games/trek/move.c line 153(2)
- in /usr/src/games/trek/setup.c line 198-199(2), 214-215(2), 226-227(2), 253-254(2)
- in /usr/src/games/trek/snova.c line 51-52(2)

NSECTS defined in line 41; used 53 times

- in line 89(2)
- in /usr/src/games/trek/abandon.c line 116-119(2)
- in /usr/src/games/trek/computer.c line 163-166(2), 172-175(2), 294
- in /usr/src/games/trek/dock.c line 40-44(2)
- in /usr/src/games/trek/dumpme.c line 36-37(2)
- in /usr/src/games/trek/events.c line 143-144(2)
- in /usr/src/games/trek/help.c line 105-108(2)
- in /usr/src/games/trek/initquad.c line 59-60(2), 119-120(2)
- in /usr/src/games/trek/klmove.c line 89(2), 97-102(2), 129, 135
- in /usr/src/games/trek/move.c line 70, 110, 129-130(2), 149-152(4), 193
- in /usr/src/games/trek/nova.c line 55-59(2)
- in /usr/src/games/trek/setup.c line 186-187(2)
- in /usr/src/games/trek/snova.c line 61-63(2)
- in /usr/src/games/trek/srscan.c line 73, 80-85(2), 155
- in /usr/src/games/trek/torped.c line 91
- in /usr/src/games/trek/visual.c line 51(2), 59(2), 67(2)

PHASER defined in line 100; used 3 times

- in /usr/src/games/trek/phaser.c line 81-82(2)
- in /usr/src/games/trek/setup.c line 121

QUEENE defined in line 83; used 4 times

- in /usr/src/games/trek/abandon.c line 45, 71, 123
- in /usr/src/games/trek/shield.c line 54

Q_DISTRESSED defined in line 55; used 5 times

- in /usr/src/games/trek/events.c line 244, 255
- in /usr/src/games/trek/kill.c line 143
- in /usr/src/games/trek/srscan.c line 159
- in /usr/src/games/trek/systemname.c line 33

Q_SYSTEM defined in line 56; used 4 times

- in /usr/src/games/trek/events.c line 245
- in /usr/src/games/trek/kill.c line 146
- in /usr/src/games/trek/systemname.c line 34-36(2)

RED defined in line 180; used 3 times

- in /usr/src/games/trek/autover.c line 47
- in /usr/src/games/trek/checkcond.c line 67
- in /usr/src/games/trek/initquad.c line 53

SHIELD defined in line 103; used 4 times

- in /usr/src/games/trek/attack.c line 132
- in /usr/src/games/trek/setup.c line 124
- in /usr/src/games/trek/shield.c line 68
- in /usr/src/games/trek/srscan.c line 118

SHUTTLE defined in line 110; used 4 times

- in /usr/src/games/trek/abandon.c line 49-50(2), 91-92(2)

SINS defined in line 107; used 3 times

- in /usr/src/games/trek/move.c line 73
- in /usr/src/games/trek/ram.c line 51
- in /usr/src/games/trek/setup.c line 128

SRSCAN defined in line 98; used 10 times

- in /usr/src/games/trek/attack.c line 106
- in /usr/src/games/trek/computer.c line 136
- in /usr/src/games/trek/klmove.c line 107, 147
- in /usr/src/games/trek/phaser.c line 102-104(2), 324
- in /usr/src/games/trek/setup.c line 119
- in /usr/src/games/trek/shield.c line 49
- in /usr/src/games/trek/srscan.c line 49

SSRADIO defined in line 105; used 11 times

- in /usr/src/games/trek/capture.c line 40-41(2)
- in /usr/src/games/trek/events.c line 196, 258, 285
- in /usr/src/games/trek/help.c line 48-49(2)
- in /usr/src/games/trek/kill.c line 79, 101
- in /usr/src/games/trek/setup.c line 126
- in /usr/src/games/trek/snova.c line 99

STAR defined in line 80; used 3 times

- in /usr/src/games/trek/initquad.c line 106
- in /usr/src/games/trek/nova.c line 33
- in /usr/src/games/trek/snova.c line 64

TORPED defined in line 101; used 4 times

- in /usr/src/games/trek/setup.c line 122
- in /usr/src/games/trek/torped.c line 50, 175, 207

WARP defined in line 97; used 4 times

- in /usr/src/games/trek/setup.c line 118
- in /usr/src/games/trek/warp.c line 45-47(2), 89

XPORTER defined in line 109; used 2 times

- in /usr/src/games/trek/abandon.c line 54
- in /usr/src/games/trek/setup.c line 130

YELLOW defined in line 179; used 1 times

- in /usr/src/games/trek/checkcond.c line 72

xTRACE defined in line 353; used 14 times

- in /usr/src/games/trek/capture.c line 61
- in /usr/src/games/trek/events.c line 92
- in /usr/src/games/trek/klmove.c line 50
- in /usr/src/games/trek/main.c line 163
- in /usr/src/games/trek/move.c line 65, 90, 112, 122, 139
- in /usr/src/games/trek/phaser.c line 205, 246
- in /usr/src/games/trek/schedule.c line 40, 75, 97

#### Usage of this include

trek.h used 45 times

- in /usr/src/games/trek/abandon.c line 11
- in /usr/src/games/trek/attack.c line 11
- in /usr/src/games/trek/autover.c line 11
- in /usr/src/games/trek/capture.c line 11
- in /usr/src/games/trek/check_out.c line 11
- in /usr/src/games/trek/checkcond.c line 11
- in /usr/src/games/trek/compkl.c line 11
- in /usr/src/games/trek/computer.c line 11
- in /usr/src/games/trek/damage.c line 11
- in /usr/src/games/trek/damaged.c line 11
- in /usr/src/games/trek/dcrept.c line 11
- in /usr/src/games/trek/destruct.c line 11
- in /usr/src/games/trek/dock.c line 11
- in /usr/src/games/trek/dumpgame.c line 11
- in /usr/src/games/trek/dumpme.c line 11
- in /usr/src/games/trek/dumpssradio.c line 11
- in /usr/src/games/trek/events.c line 11
- in /usr/src/games/trek/externs.c line 11
- in /usr/src/games/trek/help.c line 11
- in /usr/src/games/trek/impulse.c line 11
- in /usr/src/games/trek/initquad.c line 11
- in /usr/src/games/trek/kill.c line 11
- in /usr/src/games/trek/klmove.c line 11
- in /usr/src/games/trek/lose.c line 11
- in /usr/src/games/trek/lrscan.c line 11
- in /usr/src/games/trek/main.c line 15
- in /usr/src/games/trek/move.c line 11
- in /usr/src/games/trek/nova.c line 11
- in /usr/src/games/trek/out.c line 11
- in /usr/src/games/trek/phaser.c line 11
- in /usr/src/games/trek/play.c line 11
- in /usr/src/games/trek/ram.c line 11
- in /usr/src/games/trek/rest.c line 11
- in /usr/src/games/trek/schedule.c line 11
- in /usr/src/games/trek/score.c line 11
- in /usr/src/games/trek/setup.c line 11
- in /usr/src/games/trek/setwarp.c line 11
- in /usr/src/games/trek/shield.c line 11
- in /usr/src/games/trek/snova.c line 11
- in /usr/src/games/trek/srscan.c line 11
- in /usr/src/games/trek/systemname.c line 11
- in /usr/src/games/trek/torped.c line 12
- in /usr/src/games/trek/visual.c line 11
- in /usr/src/games/trek/warp.c line 11
- in /usr/src/games/trek/win.c line 11

Last modified: 1986-02-01 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1398 |