ack/util/ego/ic/ic_aux.h
George Koehler 17bc9cdef7 More void, fewer clang warnings in util/ego
Most warnings are for functions implicitly returning int.  Change most
of these functions to return void.  (Traditional K&R C had no void
type, but C89 has it.)

Add prototypes to most function declarations in headers.  This is
easy, because ego declares most of its extern functions, and the
comments listed most parameters.  There were a few outdated or missing
declarations, and a few .c files that failed to include an .h with the
declarations.

Add prototypes to a few function definitions in .c files.  Most
functions still have traditional K&R definitions.  Most STATIC
functions still don't have prototypes, because they have no earlier
declaration where I would have added the prototype.

Change some prototypes in util/ego/share/alloc.h.  Functions newmap()
and oldmap() handle an array of pointers to something; change the
array's type from `short **` to `void **`.  Callers use casts to go
between `void **` and the correct type, like `line_p *`.  Function
oldtable() takes a `short *`, not a `short **`; I added the wrong type
in 5bbbaf4.

Make a few other changes to silence warnings.  There are a few places
where clang wants extra parentheses in the code.

Edit util/ego/ra/build.lua to add the missing dependency on ra*.h; I
needed this to prevent crashes from ra.
2019-11-01 15:27:16 -04:00

48 lines
1.3 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".
*/
/* I N T E R M E D I A T E C O D E
*
* A U X I L I A R Y R O U T I N E S
*/
offset opr_size(short instr); /*
* size of operand of given instruction.
* The operand is an object , so the
* instruction can be loe, zre etc..
*/
void dblockdef(dblock_p db, int n, line_p lnp);
/*
* Fill in d_pseudo, d_size and
* d_values fields of db.
*/
void combine(dblock_p db, line_p l1, line_p l2, byte pseu);
/*
* Combine two successive ROMs or CONs
* (with no data label in between)
* into one ROM or CON.
*/
line_p arglist(int m); /*
* Read a list of m arguments. If m
* is 0, then the list is of
* undetermined length; it is
* then terminated by a cend symbol.
*/
bool is_datalabel(line_p l); /*
* TRUE if l is a data label defining
* occurrence (i.e. its l_instr
* field is ps_sym).
*/
dblock_p block_of_lab(char *ident); /*
* Find the datablock with
* the given name.
*/
obj_p object(char *ident, offset off, offset size);
/*
* Create an object struct.
*/