Commit graph

554 commits

Author SHA1 Message Date
dg
0fe814b530 Merge from master. 2023-01-08 10:35:47 +00:00
dg
baff578256 Fix some build issues when using the make build backend. 2022-12-30 18:50:16 +00:00
David Given
03420ef4ad Fix warnings caused by bad prototypes. 2022-08-03 21:13:12 +02:00
David Given
511c3e99ee Fix a whole bunch of warnings. 2022-08-01 22:08:23 +02:00
David Given
6a3c94a9d0 Better string escaping, but it's still not good enough to support paths
with spaces.
2022-07-20 00:24:20 +02:00
David Given
8d51f476b2 Typo fix. 2022-07-18 22:30:23 +02:00
David Given
6cd0c8c958 Properly declare close(). 2022-07-18 22:24:41 +02:00
David Given
64c62439cd Fix a bunch of issues with the new temp file generation. 2022-07-18 22:18:08 +02:00
David Given
0cd26b1d0c Get fed up with trying to make mkstemp work and wrote my own function
which does what I want.
2022-07-18 21:42:52 +02:00
David Given
279de30935 More binary mode flag setting. 2022-07-18 19:29:53 +02:00
David Given
739b9af662 Make ego put its temporary files in the right place. 2022-07-17 21:09:18 +02:00
David Given
28d4480f62 It turns out that you can't use freopen() to set binary mode of
stdin/stdout on Windows; so add a new system function called
sys_setbinarymode which does it instead. Then find lots more binary mode
flags which need setting.
2022-07-17 20:47:53 +02:00
David Given
acd2fe1351 More binary flags; and, remember to truncate existing files when trying
to create new ones.
2022-07-17 20:11:21 +02:00
David Given
f8bf333bd4 Replace the dodgy code generation shell scripts with Lua scripts. 2022-07-17 14:31:37 +02:00
David Given
1fa8f40beb Only Windows has O_BINARY. 2022-07-17 13:17:24 +02:00
David Given
5c2f190c29 Lots of binary mode flags. 2022-07-17 12:58:48 +02:00
David Given
cb37502a23 Make work, mostly, on Windows --- temporary files are now created in the
right place, creat() isn't used because it doesn't work, partial file
read/writes work, etc.
2022-07-17 01:58:16 +02:00
David Given
bd5ead8122 Forgot to add this to the build file... 2022-07-17 00:55:06 +02:00
David Given
92b3dfb42c Apparently Windows doesn't have strndup or index. 2022-07-17 00:47:49 +02:00
David Given
b40f4e33fb Fix warnings. 2022-07-17 00:44:23 +02:00
David Given
2abcd7d3bd Fix CRLF issues on Windows. 2022-07-16 23:47:31 +02:00
David Given
bb0236cbf7 ego uses fork/exec too, so factor out the new system() code from ack and use it
there.
2022-07-16 23:14:39 +02:00
David Given
81d706ff38 Warning fix. 2022-07-16 17:58:15 +02:00
David Given
0eae0d5d71 Replace the terrible ed script in em_code with our new Lua script. 2022-07-16 13:37:13 +02:00
David Given
7298be8964 Move the em_table_lib.lua helper file elsewhere because we're going to need it. 2022-07-16 13:25:13 +02:00
David Given
1ceaf6ea0f Remove the terrible and problematic shell script with cleaner Lua scripts for generating the em_table stuff. 2022-07-16 13:12:52 +02:00
David Given
6443647c8c Typo fix. 2022-07-16 11:54:17 +02:00
David Given
e564ec311a I hate CRLF files. 2022-07-16 01:07:55 +02:00
David Given
0900dcc6c9 Typo fix. 2022-07-16 01:02:56 +02:00
David Given
5c7566044a Begin to get an idea of why this keeps failing. 2022-07-16 00:59:20 +02:00
David Given
6568ea4549 Adjust debugging. 2022-07-16 00:47:24 +02:00
David Given
eb0175591c Adjust debugging. 2022-07-16 00:38:58 +02:00
David Given
057aad7f44 Add debugging. 2022-07-16 00:11:08 +02:00
David Given
9519588f59 Convert all the things to Unix format. 2022-07-16 00:02:46 +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
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
b1f6d5d827 ANSI C compilation fixes 2019-05-14 23:22:38 +08:00
carl
ccfd8a3e18 rename rd_long/wr_long to rd_int4/wr_int4 for consistency. Align declaration and definition name of parameters and adapt man page accordingly. 2019-05-11 01:03:36 +08:00
carl
bb6540c5f4 Adapt man page with correct prototype information. 2019-05-11 01:01:52 +08:00
carl
3466e84f46 ANSI C conversion of code, adapt man pages accordingly. Some autodocs added. 2019-05-11 01:01:21 +08:00
carl
8b290cf68a ANSI C conversion of code, rename some parameters to better names and adapt man page accordingly. 2019-05-11 00:57:58 +08:00
carl
add131b6f9 ANSI C conversion of code, rename some parameters to better names and adapt man page accordingly. 2019-05-11 00:56:13 +08:00
carl
dc269e57d8 ANSI C conversion of code and adapt man page accordingly. 2019-05-11 00:53:52 +08:00
carl
5bb20bdb9e Add init/free functions and rename parameters. 2019-05-11 00:52:40 +08:00
carl
7cb2b3de7f Fix syntax mistake in man page. 2019-05-11 00:51:42 +08:00
carl
7973e87b2f Additional check with NULL or empty string (now same behaviour as POSIX version) 2019-03-26 00:58:14 +08:00
carl
78899705d5 Bug of fseek and wrong setting of position. 2019-03-25 02:20:50 +08:00
carl
8457ec6791 Object module now uses ANSI C I/O 2019-03-25 00:07:12 +08:00
carl
56e64a1fd0 Merge remote-tracking branch 'upstream/default' into carl-ansi-part1
# Conflicts:
#	util/arch/archiver.c
#	util/led/finish.c
#	util/led/output.c
2019-03-24 21:42:56 +08:00
carl
75394c93e1 Better ANSI C portability. 2019-03-24 17:40:27 +08:00