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