Commit graph

80 commits

Author SHA1 Message Date
David Given 511c3e99ee Fix a whole bunch of warnings. 2022-08-01 22:08:23 +02:00
David Given 205a50d8ee Add more binary mode flags. 2022-07-18 19:36:44 +02:00
David Given 25b6712e63 Rework all the ackbuilder scripts not to use wildcards, because we can't expand
them without luaposix, which isn't available (easily) on OSX or Windows.
2022-07-14 23:57:54 +02:00
David Given 8b0a3ac473 Attempt to make work on OSX, and update the build matrix. 2022-06-20 00:18:16 +02:00
George Koehler 777d0abb00 Add util/int/switch.h to declare do_instr() and Do???()
Use switch.h to reduce warnings from clang about implicit declarations
of functions.  I used `grep ... do_*.c | sed ... | sort`, and some
manual editing, to make the big list of Do???() functions.
2019-10-30 18:36:55 -04:00
George Koehler 36f16b0cb8 Cut down some clang warnings
Edit C code to reduce warnings from clang.  Most warnings are for
implicit declarations of functions, but some warnings want me to add
parentheses or curly braces, or to cast arguments for printf().

Make a few other changes, like declaring float_cst() in h/con_float to
be static, and using C99 bool in ego/ra/makeitems.c and
ego/share/makecldef.c.  Such changes don't silence warnings; I make
such changes while I silence warnings in the same file.  In
float_cst(), rename parameter `str` to `float_str`, so it doesn't
share a name with the global variable `str`.

Remove `const` from `newmodule(const char *)` in mach/proto/as to
silence a warning.  I wrongly added the `const` in d347207.

For warnings about implicit declarations of functions, the fix is to
declare the function before calling it.  For example, my OpenBSD
system needs <sys/wait.h> to declare wait().

In util/int, add "whatever.h" to declare more functions.  Remove old
declarations from "mem.h", to prefer the newer declarations of the
same functions in "data.h" and "stack.h".
2019-10-30 18:36:38 -04:00
carl 0223069d29 Cleanup of modified code fixing several overflow checking issues. 2019-06-16 01:27:49 +08:00
carl ef246bd8e2 Closes #193 (signed integer shift left does not correctly check overflow in the interpreter when shifting by 0 bits), Closes #192 (integer division overflow is not handled in the interpreter and crashes it) and closes #194 (lar instruction does not accept negative bounds in interpreter when doing array index checking). 2019-06-16 01:03:01 +08:00
carl 16f89747b1 ANSI C conversion. 2019-05-11 01:14:54 +08:00
George Koehler bec236c108 Include more headers to declare functions.
This causes clang to give fewer warnings of implicit declarations of
functions.

In mach/pdp/cv/cv.c, rename wr_int2() to cv_int2() because it
conflicts with wr_int2() in <object.h>.

In util/ack, rename F_OK to F_TRANSFORM because it conflicts with F_OK
for access() in <unistd.h>.
2019-03-22 15:59:35 -04:00
carl 8b525f59c3 + ANSI C conversion 2019-03-17 22:46:32 +08:00
carl 3ac4504a5a + ANSI C conversion 2019-03-17 22:46:32 +08:00
carl 5a18b85b3f + ANSI C conversion 2019-03-17 22:46:32 +08:00
David Given 813595358c More common symbol removal. 2019-02-10 14:09:52 +01:00
David Given 58698bed19 Removed a whole bunch of old strcpy() prototypes in favour of <string.h>. 2019-02-10 13:20:04 +01:00
George Koehler df855248a0 Move int to $(INSDIR)/bin/int
If $(INSDIR)/bin is in PATH, then the user can run both ack(1) and
int(1), like

    $ ack -mem22 -o prog prog.c
    $ int prog
2018-11-05 15:14:29 -05:00
David Given 5f83fd85dc Don't try to use acct() on cygwin (which doesn't support it). Fixes: #111 2018-09-01 10:41:31 +02:00
George Koehler a000c62808 Get moncalls.c to compile on OpenBSD.
Remove some declarations (not all correct) and #include <errno.h>,
<time.h>, and <unistd.h> to get the correct declarations.

Disable mount(2), umount(2), and stime(2) because BSD (around
4.3BSD-Reno) lost compatibility with these Unix v7 functions.
2018-06-10 19:05:42 -04:00
David Given e7124f3e3f File cleanup. 2018-06-09 21:21:28 +09:00
David Given 59b383afd0 Make the em interpreter build --- again, lots of warnings, so it probably won't
work on clang. I have no idea whether it runs or not as building a e.out
program is quite hard and needs a special platform.
2018-06-09 21:13:31 +09:00
David Given d1cbb9cf60 Crudely bounds check some naked fscanf("%s") parsing. Fixes #79, mostly. 2018-06-02 20:51:41 +02:00
David Given f67c98e239 Distributions are a pain --- let's not bother any more. Instead, we just tag
the repository and download a complete snapshot, old and ancient stuff and all.
2016-09-02 23:00:38 +02:00
George Koehler 7ef9b79c11 Merge deletion of many undead files. 2012-09-23 15:31:16 -04:00
George Koehler 0131ca4d46 Delete 689 undead files.
These files "magically reappeared" after the conversion from CVS to
Mercurial.  The old CVS repository deleted these files but did not
record *when* it deleted these files.  The conversion resurrected these
files because they have no history of deletion.  These files were
probably deleted before year 1995.  The CVS repository begins to record
deletions around 1995.

These files may still appear in older revisions of this Mercurial
repository, when they should already be deleted.  There is no way to fix
this, because the CVS repository provides no dates of deletion.

See http://sourceforge.net/mailarchive/message.php?msg_id=29823032
2012-09-20 22:26:32 -04:00
Ceriel Jacobs 2483e5723d Fixed CFU 2011-06-15 10:56:58 +02:00
dtrg f2046954e6 Cleaned up the struct sgtty workaround and made it more generic. 2005-06-24 22:11:27 +00:00
dtrg 70ef6fe52e Applied interim patches to make the interpreter compile on Linux. (Linux doesn't support struct sgtty; all this code should probably be rewritten to use termios instead, if I've understood it correctly.) 2005-06-24 21:42:11 +00:00
ceriel c3855160fb use stdarg when compiling with ANSI C compiler 1995-08-17 14:36:05 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 67c750a70c Improved CSA some more 1993-11-24 12:39:19 +00:00
ceriel cc61337a9f signal, second arg is void function 1993-11-16 12:03:22 +00:00
ceriel 8c849f20f7 Fix: CSA was not quite right 1993-11-10 13:00:01 +00:00
ceriel 8ab530baef Fixed bug in UCFLAGS 1992-07-13 10:28:08 +00:00
ceriel d58d691472 Fixed V7 and SYS_V utime problem 1992-07-10 15:22:01 +00:00
ceriel 45d0d9f68f Removed # in commands 1992-06-26 12:54:57 +00:00
ceriel 646bd0e51f small fix for compatibility with different make's 1992-01-22 11:25:52 +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 df1ed9426d Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:28:58 +00:00
ceriel b0e631d402 Fixed comment 1991-12-12 13:01:00 +00:00
ceriel a93813c1f6 Made acceptable for our ANSI C compiler 1991-12-03 11:03:58 +00:00
ceriel 2b6f5b9b8d Avoid use of 'you' 1991-11-22 13:18:57 +00:00
ceriel 4e99d889ff Changed manual page installation mechanism 1991-11-05 15:31:14 +00:00
ceriel 49a64df069 do not depend on sys/wait.h, it does not always exist 1991-10-25 11:18:29 +00:00
ceriel 0c8514a9ed NSIG is not always defined 1991-10-22 09:07:31 +00:00
ceriel 33ec8e07ed improved installation mechanism 1991-10-14 09:38:04 +00:00
ceriel a28c551213 ip_spec.h is moved 1991-10-01 17:37:21 +00:00
ceriel 7551b8e83a Changes to manual page 1991-10-01 12:18:39 +00:00
ceriel 717cfbd921 improved test entries 1991-09-18 19:39:02 +00:00
ceriel c2bcab0685 Fixed proto.make 1991-09-16 11:09:10 +00:00
ceriel 9e2e9cc6f7 Fixed 1991-09-16 09:38:58 +00:00