Commit graph

16 commits

Author SHA1 Message Date
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
David Given 9e2d45b301 Rename all files called 'aux.*' to something else; Windows can't handle them. 2019-02-09 00:02:41 +01:00
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
David Given fd91851005 Add enough return types to the K&R C that the ACK builds (on Linux) using clang
now.
2016-11-10 22:04:18 +01:00
David Given e9233b4712 Build ego.
--HG--
branch : dtrg-buildsystem
rename : util/arch/build.mk => util/ego/build.mk
2013-05-15 21:14:06 +01:00
dtrg 86e20aa483 Added a concrete definition of nrglobals, because this was not always happening
otherwise.
2006-07-22 00:44:52 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 0c60f4c22f Fixed several lint complaints 1993-11-16 11:35:23 +00:00
ceriel 2b7aae3b44 Added support for volatile 1991-10-02 13:03:31 +00:00
ceriel 27d53b0d33 Changed #include's 1991-03-05 12:44:05 +00:00
ceriel 79ac11bd40 Made to compile with DEBUG off 1988-09-02 13:55:54 +00:00
ceriel 6eaf182cee Added Rcs Id 1987-03-10 11:49:39 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
bal 8a15a3f597 macros newlocal() and oldlocal() moved to alloc.h 1984-11-29 14:40:31 +00:00
bal c17a52c09d stdio.h included (required by new get.h interface),
macros's newlocal() and oldlocal() added, replacing routines in
alloc.c with same name.
1984-11-29 10:25:21 +00:00
bal 6d481ce4d6 Initial revision 1984-11-26 15:04:22 +00:00