Commit graph

6 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 60e7d06d82 Ansification and warning fixes. 2017-08-06 11:58:36 +02:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 168634cd0b Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:49:18 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
duk d7fb9edfe2 Maybe some minor changes. 1985-01-10 13:35:39 +00:00