Commit graph

13 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 b83173734d More ansification. 2017-08-06 15:57:49 +02: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 df1ed9426d Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:28:58 +00:00
ceriel b3287b2b0f Some fixes: delinted and fixed alignment bug (bloody sizeof strikes again) 1990-12-11 11:10:46 +00:00
ceriel fd4bda4865 made more portable 1988-04-21 18:53:31 +00:00
ceriel a58740c4ee some fixes 1988-01-11 18:24:34 +00:00
ceriel 0300bbf5cb adapted sizes somewhat, made facility to print memory statistics 1987-08-11 14:42:15 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
ceriel db43d1d8a7 Added definitions for "alloc", "hard_alloc". 1986-12-03 13:02:37 +00:00
keie 44ccf469d9 Changed to get led working under amoeba.
Author: K.S. Mullender.
1985-06-10 10:48:49 +00:00
duk d7fb9edfe2 Maybe some minor changes. 1985-01-10 13:35:39 +00:00