xref: /csrg-svn/usr.bin/struct/struct/1.init.c (revision 62274)
148123Sbostic /*-
248123Sbostic  * %sccs.include.proprietary.c%
348123Sbostic  */
448123Sbostic 
510954Srrh #ifndef lint
6*62274Sbostic static char sccsid[] = "@(#)1.init.c	8.1 (Berkeley) 06/06/93";
748123Sbostic #endif /* not lint */
810954Srrh 
910954Srrh #include <stdio.h>
1010954Srrh #include "1.defs.h"
1110954Srrh #include  "1.incl.h"
1210954Srrh #include "def.h"
1310954Srrh 
1410954Srrh 
prog_init()1510954Srrh prog_init()
1610954Srrh 	{
1710954Srrh 	endline = endcom = 0;	endchar = -1;
1810954Srrh 	comchar = -1;
1910954Srrh 	graph = challoc(sizeof(*graph) * maxnode);
2010954Srrh 	}
2110954Srrh 
routinit()2210954Srrh routinit()
2310954Srrh 	{
2410954Srrh 	graf_init();
2510954Srrh 	progtype = !sub;
2610954Srrh 	routbeg = endline + 1;
2710954Srrh 	rtnbeg = endchar + 1;
2810954Srrh 	nameline = 0;
2910954Srrh 	stflag = UNDEFINED;
3010954Srrh 	}
line_init()3110954Srrh line_init()
3210954Srrh 	{
3310954Srrh 	struct lablist *makelab();
3410954Srrh 	freelabs();
3510954Srrh 	newlab = linelabs = makelab(0L);
3610954Srrh 	flag = counter = nlabs = lswnum = swptr = p1 = 0;
3710954Srrh 	p3 = 5;
3810954Srrh 	endcom = endline;
3910954Srrh 	comchar = endchar;
4010954Srrh 	begline = endline + 1;	begchar = endchar + 1;
4110954Srrh 	reflab = endlab = errlab = 0;
4210954Srrh 	r1 = r2 = 0;
4310954Srrh 	}
graf_init()4410954Srrh graf_init()
4510954Srrh 	{
4610954Srrh 	int arctype[3];  long arclab[3];
4710954Srrh 	nodenum = 0;
4810954Srrh 	doptr = UNDEFINED;
4910954Srrh 	retvert = stopvert = UNDEFINED;
5010954Srrh 	ENTLST = FMTLST = 0;
5110954Srrh 
5210954Srrh 
5310954Srrh 	arctype[0] = -2;  arclab[0] = implicit;
5410954Srrh 	START = makenode(DUMVX,FALSE,FALSE,implicit,1,arctype,arclab);
5510954Srrh 	}
5610954Srrh 
57