1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 07:30:21 +00:00

604 Commits

Author SHA1 Message Date
Bruce Mitchener
ae6c1dbd6a
make: Use builtin macro $(RM) rather than /bin/rm. (#311) 2021-01-28 18:16:23 +00:00
Bruce Mitchener
9cac72771f
Remove various unused externs. (#315)
* `cursor_mask_gc` is removed as it isn't used anywhere.
* `IconPixmap` is made into a static in `xmkicon.c` rather than
  being defined in `xlspwin.c`.
2021-01-28 18:11:46 +00:00
Bruce Mitchener
40d91f0afb
make: Fix LDFLAGS ordering to fix cygwin build. (#313)
Cygwin has a linker that requires the libs to come last.

Closes Interlisp/medley#170.
2021-01-28 06:30:16 +00:00
Bruce Mitchener
db1d7ca5ae
cmake: Always build byteswap.c. (#310)
This is used on all platforms, not just ones where we need
byteswapping.
2021-01-27 18:28:43 -08:00
Nick Briggs
32daec3c7f
clang-format: AllowShortBlocksOnASingleLine only if empty (#309) 2021-01-27 18:27:16 -08:00
Bruce Mitchener
1753dd16a3
cmake: Improve build structure for multiple display implementations. (#308)
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.
2021-01-27 09:48:02 -08:00
Nick Briggs
c054be07ef
Make (another) mask_array const. (#307) 2021-01-27 09:17:47 -08:00
Bruce Mitchener
b6f46cd1f0
cmake: Don't link maiko into setsout, tstsout. (#305)
These only need byteswap utils, not the fully maiko set of
sources. This makes this behave like the old make-based
build system.
2021-01-26 22:22:19 -08:00
Nick Briggs
100248e7a7
Make the table for reversing bits const (#306) 2021-01-26 20:40:15 -08:00
Nick Briggs
f7113d53ee
Remove provision for offline assembler peephole optimizations on SunOS3/4 (#304)
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
2021-01-26 16:44:40 -08:00
Bruce Mitchener
eba664771a
Fix tty.c to compile. (#180)
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.
2021-01-26 17:42:17 +00:00
Nick Briggs
d8257e7659
make makefile-tail cleanup target remove everything (#303) 2021-01-26 16:25:28 +00:00
Bruce Mitchener
8cb1c53e3f
Remove Xbitblt.h (#302)
This unused file contained older, header-only versions of the
code in `xbbt.c`.
2021-01-25 21:55:02 -08:00
Nick Briggs
9ca86a662f
Remove the check_unix_password functionality from uutils.c (#297)
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.
2021-01-25 21:53:36 -08:00
Bruce Mitchener
91ef549b15
Remove some unused DOS defines and variables. (#301) 2021-01-25 21:38:51 -08:00
Bruce Mitchener
f75318cd8c
Move n_mask_array to read-only storage. (#300) 2021-01-25 21:10:04 -08:00
Bruce Mitchener
5b0d3f8cb5
Use FD_CLR when disabling keyboard for SUNDISPLAY. (#299)
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`.
2021-01-25 21:05:42 -08:00
Bruce Mitchener
4a722565ab
Sprinkle some const on char * params. (#298)
This is enough to let us move `il_string` in `loopsops.c`
into read-only storage.
2021-01-25 21:04:36 -08:00
Nick Briggs
364420db88
Fix lispcmp bytecmp (#211)
* 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()
2021-01-25 09:57:55 -08:00
Bruce Mitchener
987c38b465
Build .o files for executables separately. (#296)
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.
2021-01-25 09:52:53 -08:00
Bruce Mitchener
4b4d6a1b94
Move optable into static, read-only storage. (#295)
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.
2021-01-25 09:26:58 -08:00
Bruce Mitchener
07aed60cc7
Remove bbtsub.h, duplicate of bbtsubdefs.h. (#294)
`bbtsubdefs.h` and `bbtsub.h` were close to the same. We only
need one.
2021-01-24 23:22:28 -08:00
Bruce Mitchener
971794a14c
Fix bbtsub.c compilation without XWINDOW or DOS. (#293)
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.
2021-01-24 23:15:05 -08:00
Bruce Mitchener
0bcc8718de
Fix typo. (#292) 2021-01-25 07:02:47 +00:00
Bruce Mitchener
0e9c6ba777
Fix a couple of README typos. (#291) 2021-01-24 21:46:31 -08:00
Bruce Mitchener
19f6767e55
osmsg now uses MAIKO_HANDLE_CONSOLE_MESSAGES (#290)
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`.
2021-01-24 21:44:42 -08:00
Bruce Mitchener
33a648bd2f
Fix mouseif.c compilation, add to cmake build. (#289) 2021-01-24 21:27:03 -08:00
Bruce Mitchener
6428e64d69
Fix missing return value when !SUNDISPLAY, !XWINDOW. (#288) 2021-01-24 21:22:34 -08:00
Bruce Mitchener
d4cbb6c9dc
Don't enable NOPIXRECT when XWINDOW is defined. (#287)
This used to be required, but has been fixed now.
2021-01-24 18:20:13 -08:00
Bruce Mitchener
04b4b64b87
Remove optck (#286)
This was for checking for a bug in old versions of the SunOS
tools and is no longer relevant.
2021-01-24 18:14:11 -08:00
Nick Briggs
b151790c40
Cleanup for ERROR_EXIT/TIMER_EXIT/WARN style, remove unused typedef (#283)
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.
2021-01-24 17:59:31 -08:00
Bruce Mitchener
95e406ba2e
Remove extra DOS build files. (#285)
None of these work and we currently have no path towards
compiling for DOS that would use any of them.
2021-01-24 17:55:30 -08:00
Bruce Mitchener
2e9776edf2
Remove OLD_CURSOR from our builds. (#284)
This is no longer used under X11, which all of our builds are using.

Closes Interlisp/medley#84.
2021-01-24 17:53:06 -08:00
Bruce Mitchener
1d36c73bce
Fix NOPIXRECT in llcolor. (#282)
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.
2021-01-24 17:43:16 -08:00
Nick Briggs
e3b095bdf6
Clean up extraneous semi-colons, break statements, and braces (#281) 2021-01-24 16:58:55 -08:00
Bruce Mitchener
db21b00a9f
Make sure OLD_CURSOR code is only for SUNDISPLAY. (#279)
This is work in progress on Interlisp/medley#84.
2021-01-24 16:58:18 -08:00
Bruce Mitchener
ab28391c18
Remove -fwrapv compiler flag. (#278)
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.

Closes Interlisp/medley#90.
2021-01-24 16:55:51 -08:00
Bruce Mitchener
a45bce3133
Remove OPCODEFAIL, FIXTOS1 (#277)
These had been used on Sun3 in the ancient past, but not after
that in the current code.
2021-01-24 16:41:16 -08:00
Bruce Mitchener
cc060be1c7
Remove assembly fn call optimizations. (#276)
These were for old platforms and not used in recent history.

There's no NOASMFNCALL flag as there's no more asm fn call code.
2021-01-24 16:39:32 -08:00
Nick Briggs
e90b0f734a
Remove unnecessary (and incorrect) include in unixcomm.c (#280) 2021-01-24 16:28:50 -08:00
Bruce Mitchener
23a244a0fa
Remove some unused variables from makefiles. (#275)
Removed are:

* `FPFLAGS`
* `INLINE`
* `INLINEFLAGS`
* `BITBLTFILE`
* `BYTESWAPFILES`

A couple of other minor cleanups were also included.
2021-01-24 04:23:02 +00:00
Bruce Mitchener
0d6fae222f
Remove old setup_table optimizer workarounds. (#274)
These were for old compilers aren't needed any longer with
the new `OPDISP` code arrangement and modern compilers.
2021-01-24 04:14:19 +00:00
Bruce Mitchener
9e9f8c4475
Remove profile.h (#272)
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.
2021-01-23 18:39:55 +00:00
Bruce Mitchener
85e8cb21ec
Remove special rules for building xc.c. (#273)
This also removes the special `DISP*` flags that were used for
building some files, including `xc.c`.
2021-01-23 18:29:37 +00:00
Bruce Mitchener
b7e9529322
Begin to modernize optimized dispatch. (#271)
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.
2021-01-22 12:28:16 -08:00
Bruce Mitchener
61a0c02681
More SUNDISPLAY / NOPIXRECT fixes. (#269)
This fixes most of the remaining issues, apart from llcolor.
2021-01-22 11:59:11 -08:00
Larry Masinter
1b1ff995c3
move Build instructions to wiki (#259)
* move Build instructions to wiki

* added too many links, fixed

* put (new) build instructions

* More tweaks to text
2021-01-22 11:29:53 -08:00
Bruce Mitchener
13370475d4
Fix compilation if !SUNDISPLAY && !XWINDOW && !DOS. (#270)
Some extra braces make this syntax more resilient. Go ahead and
fix a bit of formatting at the same time.
2021-01-22 07:10:35 +00:00
Bruce Mitchener
3b25bc27ee
build: Don't run ls -l when building ldeether. (#268)
Perhaps this was there as a reminder about it needing to be
`setuid`, but it shouldn't be in the default build output.
2021-01-21 13:20:17 -08:00
Bruce Mitchener
a0dec4045e
cmake: ldeether shouldn't link full maiko lib. (#267)
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.
2021-01-21 13:18:57 -08:00