Commit graph

14 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 5bae29a00c ego now builds and is used.
This needed lots of refactoring to ego --- not all platforms have ego descr
files, and ego will just crash if you invoke it without one. I think originally
it was never intended that these platforms would be used at -O2 or above.

Plats now only specify the ego descr file if they have one.
2016-08-21 22:01:19 +02:00
David Given 3584ddb6e9 Push through clang-format. 2016-08-21 19:34:54 +02:00
dtrg f371b251d2 Rationalised use of #includes to be more standards-compliant. 2006-07-22 00:46:16 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel e264b45120 Changed #include's 1991-03-05 12:16:17 +00:00
ceriel 50c8fe71c3 changed lint flags, changed macro name, deleted unused macro 1990-12-17 13:09:57 +00:00
ceriel 82b0ef795d fix: IL sometimes removed procedures that could be called indirectly 1990-05-30 11:31:32 +00:00
ceriel 1ac5d9c95a Handle GTO, LOR/STR 0 also use local base 1987-10-02 12:43: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 156775643e Include files and declaration of em_flag added. 1985-02-11 09:51:02 +00:00
bal f3e35f5432 routine getbblocks (plus its auxiliary routines) moved from get.c
to this file; core allocation macros newcfbx() and oldcfbx() added.
1984-11-29 10:51:16 +00:00
bal 7b798175ad Initial revision 1984-11-26 13:43:22 +00:00