Commit graph

12 commits

Author SHA1 Message Date
David Given
9519588f59 Convert all the things to Unix format. 2022-07-16 00:02:46 +02:00
George Koehler
0576641cae Reduce clang warnings from top
Also add `static` and remove `register` in mach/proto/top/top.c.  A
static function is only in one file, so its function declaration may
go in that file, instead of a header file.
2019-10-30 18:36:55 -04:00
George Koehler
51e34acab1 Add a syntax to declare functions in a top table
Use the new syntax in the mips, pdp, powerpc tables to declare
functions before calling them.  These declarations prevent compiler
warnings about implicitly declaring functions.  They also provide
prototypes of the function parameters.

Also fix a warning in the powerpc table: use `bsearch(...) != NULL` to
avoid converting the pointer from bsearch() to an int.

The syntax for topgen is a block `{...}` among the parameters in the
top table.  It looks like the syntax of LLgen, but topgen doesn't
allow nested blocks, so declarations like `struct whatever {...};`
don't work.  The token OPEN_BRACKET that begins a declaration_block
doesn't conflict with the LETTER that begins a parameter_line or the
'%' that begins a separator.

Because a block writes a #line command to gen.h, a parameter line now
also writes a #line command to gen.h, so it doesn't get a wrong line
number from a previous block.
2019-10-30 18:36:55 -04:00
carl
d825e962ed Better ANSI C compatibility and portability:
+ Addition of function prototypes and include files.
+ Change function definitions to ANSI C style.
+ Initial support for CMake
2019-02-19 00:54:24 +08:00
dtrg
fdcdaadcb8 Rationalised use of #includes to be more standards-compliant. 2006-07-22 12:28:20 +00:00
ceriel
5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel
4e19ece566 another fix for an illegal initialisation struct 1987-03-26 16:16:21 +00:00
ceriel
a0897e2ed3 Generated illegal initialization constants. 1987-03-25 07:53:57 +00:00
ceriel
053564d9e9 Added Rcs Id 1987-03-10 11:58:22 +00:00
ceriel
7270bbb7f0 Added copyright notice 1987-03-09 22:11:47 +00:00
ceriel
00a2314999 make to work with newer version of LLgen. 1986-11-24 21:24:42 +00:00
ceriel
3b2d51a96b Initial revision 1986-11-24 20:42:13 +00:00