ack/util/ego/share/put.h
George Koehler 9037d137f5 Add prototypes, void in util/ego/share
This uncovers a problem in il/il_aux.c: it passes 3 arguments to
getlines(), but the function expects 4 arguments.  I add FALSE as the
4th argument.  TRUE would fill in the list of mesregs.  IL uses
mesregs during phase 1, but this call to getlines() is in phase 2.
TRUE would leak memory unless I added a call to Ldeleteset(mesregs).
So I pass FALSE.

Functions passed to go() now have a `void *` parameter because
no_action() now takes a `void *`.
2017-11-15 17:19:56 -05:00

51 lines
1.4 KiB
C

/* $Id$ */
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* O U T P U T R O U T I N E S */
extern FILE *curoutp; /* current output file */
#define outbyte(b) putc(b,curoutp)
void outshort(short i); /*
* Write a short to curoutp
*/
void outoff(offset off); /*
* Write an offset to curoutp
*/
void outproc(proc_p p); /*
* Write a procid to curoutp
*/
void putdtable(dblock_p head, FILE *df);
/*
* Write the data block table to file df,
* preceded by its length.
*/
void putptable(proc_p head, FILE *pf, bool all);
/*
* Write the proc table to file pf,
* preceded by its length. If all=false,
* the fields computed by CF will not be
* written (used by the IC phase).
*/
void putunit(short kind, proc_p p, line_p l, FILE *gf, FILE *lf);
/*
* If kind = LTEXT, then write
* the control flow graph to file gf,
* preceded by its length (#basic blocks);
* write the EM code of every basic block
* in the graph to file lf, preceded by
* the number of instructions in the block.
* Else, (kind = LDATA) just write the
* list of instructions (data declarations)
* to lf.
*/
short putlines(line_p l, FILE *lf);
/*
* Output the list of em instructions
* headed by l. Return the number of
* instructions written.
*/