1 /* $Id: get.h,v 1.7 1994/06/24 10:29:56 ceriel Exp $ */
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".
6 /* I N P U T R O U T I N E S */
8 extern FILE *curinp; /* current input file */
9 extern block_id lastbid; /* block identifying number */
10 extern lab_id lastlabid; /* last label identifier */
12 #define getbyte() getc(curinp)
13 extern short getshort(); /* ()
14 * Read a short from curinp
16 extern offset getoff(); /* ()
17 * Read an offset from curinp
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.
26 extern line_p getlines(); /* ( FILE *lf; int n; proc_p *p_out;
28 * Read n lines of EM text and doubly
29 * link them. Also process messages
33 extern bblock_p freshblock(); /* ()
34 * Allocate a bblock struct and assign
35 * it a brand new block_id.
37 extern lab_id freshlabel(); /* ()
38 * Get a brand new lab_id.
40 extern dblock_p getdtable(); /* (char *dname)
41 * Read the data block table from
42 * the file with the given name.
44 extern proc_p getptable(); /* (char *pname)
45 * Read the proc table from
46 * the file with the given name.
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.
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
65 * If so, add it to the mesregs set.)