Pristine Ack-5.5
[Ack-5.5.git] / util / ego / share / get.h
1 /* $Id: get.h,v 1.7 1994/06/24 10:29:56 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 /*  I N P U T   R O U T I N E S */
7
8 extern  FILE    *curinp;                /* current input file */
9 extern block_id lastbid;                /* block identifying number */
10 extern lab_id    lastlabid;             /* last label identifier */
11
12 #define getbyte()       getc(curinp)
13 extern short    getshort();             /* ()
14                                          * Read a short from curinp
15                                          */
16 extern offset   getoff();               /* ()
17                                          * Read an offset from curinp
18                                          */
19 extern line_p read_line();              /* ( proc_p *p_out)
20                                          * Read a line of EM code (i.e. one 
21                                          * instruction)  and its arguments 
22                                          * (if any). If the instruction is a
23                                          * 'pro' pseudo, set p_out.
24                                          */
25
26 extern line_p getlines();               /* ( FILE *lf; int n; proc_p *p_out;
27                                          *   bool collect_mes)
28                                          * Read n lines of EM text and doubly
29                                          * link them.  Also process messages
30                                          * if required.
31                                          */
32
33 extern bblock_p freshblock();           /* ()
34                                          * Allocate a bblock struct and assign
35                                          * it a brand new block_id.
36                                          */
37 extern lab_id freshlabel();             /* ()
38                                          * Get a brand new lab_id.
39                                          */
40 extern dblock_p getdtable();            /* (char *dname)
41                                          * Read the data block table from
42                                          * the file with the given name.
43                                          */
44 extern proc_p   getptable();            /* (char *pname)
45                                          * Read the proc table from
46                                          * the file with the given name.
47                                          */
48 extern bool      getunit();             /* (FILE *gf,*lf; short kind_out;
49                                          * bblock_p g_out; line_p l_out;
50                                          * proc_p *p_out; bool collect_mes)
51                                          * Read the control flow graph
52                                          * (from file gf) and the EM text
53                                          * (from lf). If collect_mes is TRUE,
54                                          * all register messages will be
55                                          * collected and put in the global
56                                          * variable 'mesregs'. The proc read
57                                          * is returned in p_out.
58                                          */
59 extern          message();              /* (line_p lnp)
60                                          * See if  lnp is some useful message.
61                                          * (e.g. a message telling that a
62                                          * certain local variable will never be
63                                          * referenced indirectly, so it may be
64                                          * put in a register.
65                                          * If so, add it to the mesregs set.)
66                                          */