Commit Graph

11 Commits

Author SHA1 Message Date
Lassi Kortela c76379e6f5 Brace try/except in main() for Watcom 2019-08-21 22:08:21 +03:00
Lassi Kortela 3dc58baa4a Include <sys/types.h> to get off_t
This header is even shipped by Windows compilers. The iostream stuff
uses off_t.
2019-08-18 00:09:43 +03:00
Lassi Kortela a6ecac95e1 Rename fs*.c -> os*.c
I planned to put just the file system routines into these files, but
there are starting to be so many of them that I don't want to
duplicate the same set for networking, subprocesses etc.
2019-08-14 01:15:29 +03:00
Lassi Kortela 5ced8d91f6 Store boot image inside main executable
Previously the boot image was kept in the separate file "flisp.boot".
This caused all kinds of problems, as bootstrapping is wont to do. The
biggest problem was finding a portable and convenient pathname for it.

Instead of dealing with all that stuff about how to find the file,
just store the image in a huge C string constant that goes into the
main executable. This necessitates adding a C-string hex dumper into
the Lisp system, and making build.sh slightly more complicated, but
that's a small price to pay for not having to carry a separate file
everywhere we go. Also, flmain.c is a lot simpler now and we don't
have to play around with symlinks.
2019-08-13 23:07:44 +03:00
Lassi Kortela 71098dd01b Fix some "long double" nonsense
Apparently in addition to "float", "double" and "long double" there
are now standard types in <math.h> called "float_t" and "double_t".
Those types don't need to be equivalent to "float" and "double". Gah!
2019-08-13 18:28:19 +03:00
Lassi Kortela a28aff6892 Add missing stdint.h includes 2019-08-09 23:25:20 +03:00
Lassi Kortela 1d96278313 Break down dirpath.c into fs_*.c by OS
I much prefer this to using ifdefs. Requires a little help from the build
system but I find it worth it.
2019-08-09 23:12:19 +03:00
Lassi Kortela b7b4269455 Replace strcpy() and strcat() with safer functions 2019-08-09 20:14:42 +03:00
Lassi Kortela b5946dea77 Remove unused INITFILE config option 2019-08-09 20:11:02 +03:00
Lassi Kortela 79d44c0780 Get rid of almost all recursive includes
Simple rule: include files should never include include files.

"Notes on Programming in C", Rob Pike, February 21, 1989
<https://www.lysator.liu.se/c/pikestyle.html>
2019-08-09 19:00:17 +03:00
Lassi Kortela d6f54bc13c Consolidate all C files into a "c" subdirectory 2019-08-09 15:02:58 +03:00