1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 static char sccsid[] = "@(#)PCSTART.c 1.3 01/16/81"; 4 5 #include "h00vars.h" 6 7 /* 8 * program variables 9 */ 10 struct display _disply[MAXLVL]; 11 int _argc; 12 char **_argv; 13 long _stlim = 500000; 14 long _stcnt = 0; 15 long _seed = 1; 16 char *_minptr = (char *)0x7fffffff; 17 char *_maxptr = (char *)0; 18 struct errentry _entry[MAXERRS]; 19 20 /* 21 * file record variables 22 */ 23 long _filefre = PREDEF; 24 struct iorechd _fchain = { 25 0, 0, 0, 0, /* only use fchain field */ 26 INPUT /* fchain */ 27 }; 28 struct iorec *_actfile[MAXFILES] = { 29 INPUT, 30 OUTPUT, 31 ERR 32 }; 33 34 /* 35 * standard files 36 */ 37 char _inwin, _outwin, _errwin; 38 struct iorechd input = { 39 &_inwin, /* fileptr */ 40 0, /* lcount */ 41 0x7fffffff, /* llimit */ 42 &_iob[0], /* fbuf */ 43 OUTPUT, /* fchain */ 44 STDLVL, /* flev */ 45 "standard input", /* pfname */ 46 FTEXT | FREAD | SYNC, /* funit */ 47 0, /* fblk */ 48 1 /* fsize */ 49 }; 50 struct iorechd output = { 51 &_outwin, /* fileptr */ 52 0, /* lcount */ 53 0x7fffffff, /* llimit */ 54 &_iob[1], /* fbuf */ 55 ERR, /* fchain */ 56 STDLVL, /* flev */ 57 "standard output", /* pfname */ 58 FTEXT | FWRITE | EOFF, /* funit */ 59 1, /* fblk */ 60 1 /* fsize */ 61 }; 62 struct iorechd _err = { 63 &_errwin, /* fileptr */ 64 0, /* lcount */ 65 0x7fffffff, /* llimit */ 66 &_iob[2], /* fbuf */ 67 FILNIL, /* fchain */ 68 STDLVL, /* flev */ 69 "Message file", /* pfname */ 70 FTEXT | FWRITE | EOFF, /* funit */ 71 2, /* fblk */ 72 1 /* fsize */ 73 }; 74 75 PCSTART() 76 { 77 /* 78 * necessary only on systems which do not initialize 79 * memory to zero 80 */ 81 82 struct iorec **ip; 83 84 for (ip = &_actfile[3]; ip < &_actfile[MAXFILES]; *ip++ = FILNIL); 85 } 86