new copyright; att/bsd/shared
[unix-history] / usr / src / usr.bin / struct / struct / 3.main.c
CommitLineData
0fc6e47b
KB
1/*-
2 * %sccs.include.proprietary.c%
3 */
4
b90512c3 5#ifndef lint
0fc6e47b
KB
6static char sccsid[] = "@(#)3.main.c 4.2 (Berkeley) %G%";
7#endif /* not lint */
b90512c3
RH
8
9#include <stdio.h>
10#include "def.h"
11
12structure()
13 {
14 VERT v, *head;
15
16 if (progress)
17 fprintf(stderr," getreach:\n");
18 getreach();
19 if (routerr) return;
20 if (progress)
21 fprintf(stderr," getflow:\n");
22 getflow();
23 if (progress)
24 fprintf(stderr," getthen:\n");
25 getthen(START);
26 head = challoc(nodenum * sizeof(*head));
27 for (v = 0; v < nodenum; ++v)
28 head[v] = UNDEFINED;
29 for (v = START; DEFINED(v); v = RSIB(v))
30 fixhd(v,UNDEFINED,head);
31 /* fixhd must be called before getloop so that
32 it gets applied to IFVX which becomes NXT(w) for UNTVX w */
33 if (progress)
34 fprintf(stderr," getloop:\n");
35 getloop();
36 if (progress)
37 fprintf(stderr," getbranch:\n");
38 getbranch(head);
39 chfree(head,nodenum * sizeof(*head));
40 head = 0;
41 }