We no longer build a separate `maiko` library that gets linked
into `ldex`. It was the only thing linking it, so now we just
build those files as part of `ldex`.
We only build `ldex` when X11 is requested (which it is by default).
If we add a new display implementation, this structure will support
that by adding a new `ldewhatever` and it will build a new binary
that the `lde` launcher can be updated to support.
We no longer need to run a separate peephole optimization pass over the
compiler generated or hand-coded assembler for SunOS3 and SunOS4 on 68K or SPARC
We remove the preprocessor symbols and code controlled by them
SUN4_OS4_IL
SUN3_OS3_IL
SUN3_OS4_IL
and SUN3_OS3_OR_OS4_IL
This removes a bit of the debug info printing, but other than
that, is pretty close to what it was before.
We also now build it in both the make and cmake build systems.
This code has not worked for a long time. Most systems now maintain
the password entries so that a password is not accessible through the
getpwent() interface. The SUBR that calls this interface may be
removed at a future time.
In the old code (prior to b234064d), this was:
```
LispReadFds &= ~(1 << LispWindowFd);
```
This was inadvertently converted to `FD_SET`, but should have
been `FD_CLR`.
* Correct signedness of 2nd parameter of lispcmp().
* Be clear that comparison of characters in bytecmp is unsigned since GETBYTE returns unsigned char.
* Make bytecmp() and lispcmp() helper functions static and removed from mkatomdefs.h.
* If no BYTESWAP we need to include <string.h> for memcmp()
* Use (uint8_t) rather than (unsigned char) in bytecmp when comparing to GETBYTE()
We need to build `.o` files for the executables separately from
their link step. This lets us have the `CFLAGS` only get used
by the compilation step and not the link step (which uses
`LDFLAGS` or a variant).
This is a prerequisite for doing automatic dependency tracking.
Previously, we had a global `optable`, an alias to it, `table`,
and code to initialize it within `dispatch()`. This code would
initialize the whole thing to either `op_ufn` or `native_check`
and then fill in the entries for the individual opcodes.
Now, we have a function-static `optable` which is statically
initialized and placed (by the compiler) into read-only storage.
This eliminates having generated code within `dispatch()` that
initializes it.
Additionally, it was previously 512 elements long with the second
half of it being all `native_check` entries. We index it with a
byte though, so we only need 256 entries, and we can lose the
`native_check` stuff.
Without those, it wasn't including `devif.h`, which is where
we define `min` and `max`. I make an assumption here that any
new display would be using the current display device support
code.
This was checking that neither `DOS` nor `XWINDOW` were defined,
but this needs a more specific flag for this feature so that it
doesn't get enabled when `!DOS && !XWINDOW`.
Convert ERROR_EXIT, TIMER_EXIT, and WARN to "do {} while (0)" style and
fix a few usage points that were missing trailing semi-colons.
Remove unused typedef for CFuncPtr.
This code is all currently set up to be used if `COLOR` is
defined.
If we were to start supporting color under X11, this would
have to change, but so would much of the rest of the file.
This was making sure that the overflow in some our opcode
implementations was visible to the C code so that overflow
detection would work in gcc and clang.
This is now handled on those compilers by using some built-ins
that detect overflow.
The `-fwrapv` should no longer be needed.
ClosesInterlisp/medley#90.
This no longer had anything to do with profiling and was
only doing some defines for the switch case block addresses,
which we no longer need since there's no longer optional
asm generated for them.
This feature was controlled by the compilation flag `OPDISP`
which would enable some bits of assembler on the x86 (ISC or DOS)
or some other specialized code on SPARC. On SPARC hardware, there
was a special compilation process that would preprocess the code
and generate dispatch tables.
We do this now when this feature is enabled using gcc's computed
gotos feature. This is available in clang and some other compilers.
Notably, it isn't present in Visual Studio.
This doesn't decrease our portability at all as this feature is
optional and it replaces specialized assembler code with C using
compiler extensions (making it cross-platform).
In doing this, we've removed a bunch of related code, however,
it is likely that other pieces yet remain and will be removed
in subsequent commits as we clean things up and refine them.
This feature remains disabled by default for now.
In the old build system, `ldeether` is built as follows:
```
$(OSARCHDIR)ldeether : $(SRCDIR)ldeether.c $(DLPIFILES)
$(CC) $(CFLAGS) -I$(INCDIR) $(SRCDIR)ldeether.c $(DLPIFILES) $(LDEETHERLDFLAGS) -o $(OSARCHDIR)ldeether
```
Instead of linking all of Maiko, it just links in the `src/dlpi.c`
object file.