Commit graph

15 commits

Author SHA1 Message Date
George Koehler f09f14cd4d Switch from long to size_t when allocating memory.
Also move the declarations of `incore` and `core_alloc` to "memory.h".
Also correct SYMDEBUG to SYMDBUG.  (I don't know if SYMDBUG works
because our build system never defines it.)

ind_t becomes an alias of size_t.  ind_t becomes unsigned, so I edit
some code that was using negative ind_t.  Some casts disappear, like
(long)sizeof(...) because the size is already a size_t.  There are
changes to overflow checks.  Callers with a size too big for size_t
must check it before calling the memory allocator.  An overflow check
of BASE + incr in memory.c sbreak() now happens on all platforms, not
only when a pointer is smaller than a long.

My build shows no changes in share/ack/examples (except hilo_bas.*
changing with every build).
2018-11-14 12:33:25 -05:00
David Given 4cb4bdc85f There are two places where names are added to the global symbol table; one via
the -U command line option, and one via file scanning. Turns out only the
second would increment the number of global names, so adding names with -U
would cause names found via scanning to fall off the end of the list! This
wouldn't cause linker errors because fixups don't use the list, but would cause
the generated symbol table in the output to be incorrect.
2018-03-11 12:37:23 +01:00
George Koehler ca4bd38206 Delete old "assert.h" files; use libc <assert.h>.
Edit build.lua for programs losing their private assert.h, so they
depend on a list of .h files excluding assert.h.

Remove modules/src/assert; it would be a dependency of cpp.ansi but we
didn't build it, so cpp.ansi uses the libc assert.

I hope that libc <assert.h> can better report failed assertions.  Some
old "assert.h" files didn't report the expression.  Some reported a
literal "x", because traditional C expanded the macro parameter x in
"x", but ANSI C89 doesn't expand macro parameters in string literals.
2017-11-09 22:22:13 -05:00
David Given d5a83fd73e Clean up the led includes. 2017-01-18 19:55:56 +01:00
dtrg f232b4dc29 Rationalised use of #includes to be more standards-compliant. 2006-07-22 17:58:49 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel df1ed9426d Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:28:58 +00:00
ceriel 218b982231 open and close output file in one place 1990-01-29 12:40:43 +00:00
ceriel c9e52b65d4 some minor fixes, and one important 2/4 one in the sbreak function 1987-09-02 18:42:21 +00:00
ceriel 0177bf59ff Bug fixes and made faster on PDP-11 1987-04-08 17:15:30 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
ceriel baf5b74da2 A new version, that no longer tries to move all null parts to the end
of a segment. It also uses the "object" library to read and write ACK-
object files and libraries.
1986-10-20 10:17:57 +00:00
keie 44ccf469d9 Changed to get led working under amoeba.
Author: K.S. Mullender.
1985-06-10 10:48:49 +00:00
keie b391be598b Now using arch.h, out.h and ranlib.h from ../../h 1985-04-18 15:21:16 +00:00
duk d7fb9edfe2 Maybe some minor changes. 1985-01-10 13:35:39 +00:00