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