1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 static char sccsid[] = "@(#)PCSTART.c 1.4 03/07/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 #ifdef VAX 17 char *_minptr = (char *)0x7fffffff; 18 #else 19 char *_minptr = (char *)0xffff; 20 #endif VAX 21 char *_maxptr = (char *)0; 22 struct errentry _entry[MAXERRS]; 23 24 /* 25 * file record variables 26 */ 27 long _filefre = PREDEF; 28 struct iorechd _fchain = { 29 0, 0, 0, 0, /* only use fchain field */ 30 INPUT /* fchain */ 31 }; 32 struct iorec *_actfile[MAXFILES] = { 33 INPUT, 34 OUTPUT, 35 ERR 36 }; 37 38 /* 39 * standard files 40 */ 41 char _inwin, _outwin, _errwin; 42 struct iorechd input = { 43 &_inwin, /* fileptr */ 44 0, /* lcount */ 45 0x7fffffff, /* llimit */ 46 &_iob[0], /* fbuf */ 47 OUTPUT, /* fchain */ 48 STDLVL, /* flev */ 49 "standard input", /* pfname */ 50 FTEXT | FREAD | SYNC, /* funit */ 51 0, /* fblk */ 52 1 /* fsize */ 53 }; 54 struct iorechd output = { 55 &_outwin, /* fileptr */ 56 0, /* lcount */ 57 0x7fffffff, /* llimit */ 58 &_iob[1], /* fbuf */ 59 ERR, /* fchain */ 60 STDLVL, /* flev */ 61 "standard output", /* pfname */ 62 FTEXT | FWRITE | EOFF, /* funit */ 63 1, /* fblk */ 64 1 /* fsize */ 65 }; 66 struct iorechd _err = { 67 &_errwin, /* fileptr */ 68 0, /* lcount */ 69 0x7fffffff, /* llimit */ 70 &_iob[2], /* fbuf */ 71 FILNIL, /* fchain */ 72 STDLVL, /* flev */ 73 "Message file", /* pfname */ 74 FTEXT | FWRITE | EOFF, /* funit */ 75 2, /* fblk */ 76 1 /* fsize */ 77 }; 78 79 PCSTART() 80 { 81 /* 82 * necessary only on systems which do not initialize 83 * memory to zero 84 */ 85 86 struct iorec **ip; 87 88 for (ip = &_actfile[3]; ip < &_actfile[MAXFILES]; *ip++ = FILNIL); 89 } 90