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.
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.
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!
MINIX libc headers define the ctype.h toupper() etc. functions as
preprocessor macros that don't cast their argument to int! So a char
argument causes clang to say "warning: array subscript is of type
'char'".
R7RS syntax is: (import (library name here))
We translate this into the internal path "library/name/here". This will allow
us to easily load libraries from files later on by appending the ".sld" file
name extension.
This implies that OS names have changed. Unix-like OS names are now
capitalized. "macos" is now "Darwin". Windows is now all-lowecase "windows".
"win32" is gone. "win64" was not used in the original code despite a reference
to it.
MacOS doesn't have memrchr() so there was an ifdef with a custom
implementation for it. Get rid of the ifdef by always using the custom
implementation.
Nowadays compilers have good optimizers that know when to inline static
functions depending on the user's chosen optimization level (and speed vs size
optimization). We don't need to annotate functions manually.