1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-15 15:57:13 +00:00

402 Commits

Author SHA1 Message Date
Bruce Mitchener
33369268c1
Include termios as <termios.h>, not <sys/...>. (#118)
termios is available via `<termios.h>` on all supported platforms,
so variants of `<sys/termio.h>` and `<sys/termios.h>` are no
longer needed.
2020-12-22 22:56:54 -08:00
Larry Masinter
973db49422 Add a simple test.vm that runs opcode tests (fails on pi) 2020-12-22 12:39:17 -08:00
Bruce Mitchener
3c3a4a6292
Remove unused INTRCHECK def. (#117)
This was only defined for Solaris and wasn't used anywhere.
2020-12-22 17:34:10 +00:00
Bruce Mitchener
d3cb239091
Remove #ifdef DEMO. (#116) 2020-12-22 17:27:59 +00:00
Bruce Mitchener
254550d111
Remove empty, unreferenced bbt386i.h. (#115) 2020-12-21 22:25:26 -08:00
Bruce Mitchener
3246af571e
Remove dead entries from makefile-tail. (#114) 2020-12-21 22:17:46 -08:00
Bruce Mitchener
9a21f5339a
Remove XV11R4 and related defines. (#113)
We no longer have anything predicated upon the version of X11 that
we're using (and these versions are all ancient anyway).
2020-12-21 22:11:39 -08:00
Bruce Mitchener
37c410eb31
X*.h headers weren't cleaned up after renaming and merging. (#112)
* Check.h, Stipple.h, XCursors.h, XWaitCur.h, Xcursdef.h,
  Xdefcur.h, and Xicon.h were combined into xbitmaps.h.
* Xdisplay.h is not used and the contents are in MyWindow.h, which
  is used.
* XVersion.h and Xdeflt.h became xdefs.h. Remove 2 stragglers
  that were still including XVersion.h.
2020-12-21 19:13:30 -08:00
Nick Briggs
b901038367
Fix typo #ifdef RESWAPPEDDCODESTREAM -- should be RESWAPPEDCODESTREAM (#106) 2020-12-22 01:53:47 +00:00
Bruce Mitchener
bed68c8dda
Remove unused retfun function. (#111) 2020-12-21 18:09:14 +00:00
Bruce Mitchener
5835dbd9f6
Remove display name handling block ifdef'd for X11R1. (#110)
X11R1 was released in 1987 and superseded by X11R2 in 1988.

We should be able to safely remove this code. We set the
preprocessor variable on all platforms to indicate that we're
on X11R4 (or later, I guess).
2020-12-21 18:04:28 +00:00
Nick Briggs
ce7eb99b05
Remove unused CursorImage code and related pixmaps (#109) 2020-12-21 17:55:27 +00:00
Nick Briggs
fc0ae89fcf
Update FreeBSD makefile to use clang and new standard for configuring options (#105) 2020-12-20 17:06:59 -08:00
Bruce Mitchener
41d28e01b5
Fix timer.c compilation on non-x86_64 GNU/Linux. (#104)
`timer.c` uses `F_SETSIG` which is a GNU extension. As such, it
needs `_GNU_SOURCE` to be defined, but this was only done for
x86_64, not the other Linux platforms that we have build system
support for.

Closes interlisp/medley#97.
2020-12-20 17:42:37 +00:00
Bruce Mitchener
810e33125b
Update how we configure gcc / clang command lines. (#103)
* Move clang/gcc options into makefile-header.

This puts all of the shared options into a single place so that
we can easily update it.

* Add -fwrapv to the clang/gcc command lines.

This is a step along the way to fixing interlisp/medley#90.

Enabling `-fwrapv` will let overflow checks that rely upon undefined
behavior to work correctly. Without this, with modern versions of
clang and gcc, the overflow checks in the C code are eliminated
by the compiler, resulting in incorrect behavior on the part of
Maiko.

See the linked bug for details and discussion.

Hopefully, this usage of `-fwrapv` will go away once we're using
the correct compiler builtins to detect and handle overflow
correctly.
2020-12-19 20:16:31 -08:00
Bruce Mitchener
942b22886e
Remove CLX support. (#90)
CLX is a Common Lisp implementation of the X client library.

It has some code in C, which was present here as `src/socket.c`
and `src/socdvr.c`, exposed via opcodes in `src/subr.c`. This code
had been removed (with prejudice apparently) by commenting out
the code in `src/subr.c` with `#if NEVER`.

This code would've been used by the Medley system images, but
that code doesn't appear to be present. (There may or may not
be something related in `XMAS` in the Medley repository.)
2020-12-19 19:59:41 -08:00
Javier Olaechea
ecaf50c015
Replace calls to putenv with setenv (#99)
* Use setenv instead of putenv

* Replace sprintf with snprintf

* unixfork.c: Stack allocate tempstring
2020-12-19 19:51:41 -08:00
Nick Briggs
6fb4b9a189
Remove sccs id lines (#98)
* Remove static char *id = from all source files.

The same information is included in a comment in each source file.

* Remove unused template file 'id'
2020-12-19 19:08:52 -08:00
Bruce Mitchener
d5ff4011a9
Clean up extern int errno and errno.h inclusions. (#102)
Closes interlisp/medley#86.
2020-12-20 03:07:23 +00:00
Nick Briggs
ade0e7d4a6
Revert "integer multiply overflow wasn't catching all cases (#100)" (#101)
This reverts commit 761ab8cac6fd4e64f3ad6897c17e375acf5d75e5.
2020-12-19 10:00:57 -08:00
Larry Masinter
761ab8cac6
integer multiply overflow wasn't catching all cases (#100) 2020-12-19 05:29:18 +00:00
Bruce Mitchener
d4f72d96e1
Remove FSERROR define as it is always on. (#96)
The FSERROR define is on all the time now. It was not controlling
all of the functionality, with many places setting Lisp_errnno
outside of the code controlled by the define.
2020-12-17 09:33:20 -08:00
Bruce Mitchener
53acd3f2b1
Remove src/colorbltfns.c (#95)
This was renamed into `src/rawcolor.c` when the renaming for DOS
happened.
2020-12-17 09:27:43 -08:00
Bruce Mitchener
9416aa7c40
Remove call-c.c (#94)
This incompletely defines a function `call_c_fn`. This is actually
defined in `src/foreign.c` (and called from `src/subr.c`).
2020-12-17 08:38:02 -08:00
Bruce Mitchener
674c9c56cf
Remove extra arg to open when loading sysout. (#93)
The `open()` call can take a third argument (for when the mode
is `O_CREAT`). However, it is not needed here as we aren't
using `O_CREAT`. (And if we needed an extra arg, it wouldn't
have been `NULL`.)
2020-12-17 08:36:46 -08:00
Bruce Mitchener
9b9c7b0283
Missing return type for make_kbd_instance(). (#92)
We don't fill in other missing types here as the code relies
upon missing types for the arguments to the various callbacks.
2020-12-17 08:35:28 -08:00
Nick Briggs
26e67a513e
fix warning: result of the left shift is undefined because the left operand is negative (#91)
There is no functional difference between the old and new code, but we avoid
complaints from code analysis tools such as clang-tidy
2020-12-17 16:25:27 +00:00
Nick Briggs
fe0f9fff2c
FD_ISSET requires that the fd being tested is >= 0 (#78)
* FD_ISSET requires that the fd being tested is >= 0, so unset fd -1 causes trouble.

* Remove code to enable X I/O signal generation from xinit.c

If the I/O signals are enabled before the signal handler has
been set up, the default action on receipt of a SIGPOLL or SIGIO
will be that the program exits.  For now, turn the signals off,
as they aren't necessary and may not even be an improvement.

* Ensure fds are declared as signed and initialized (to -1)

The global fds may be accessed from the signal handler before any
particular device has been opened.  Ensure that the fds are initialized
statically and that the value is distinguishable from all valid descriptors.

	modified:   initdsp.c
	modified:   initkbd.c
	modified:   keyevent.c
	modified:   osmsg.c
	modified:   rs232c.c
	modified:   timer.c
	modified:   tty.c
2020-12-16 22:09:18 -08:00
Bruce Mitchener
0d4d9a5368
asmbbt: Fix signature for bitblt. (#89)
This was an error in the conversion from K&R C prototypes.
2020-12-16 11:11:50 -08:00
Bruce Mitchener
ff778f6044
timer.c: Remove _BSD_SOURCE. (#88)
This isn't needed to build, so let's not have it.
2020-12-16 11:10:48 -08:00
Bruce Mitchener
be88851eaf
Remove USE_UTIME. (#87)
This wasn't enabled and the corresponding code wouldn't have
compiled. The `utime()` function is also deprecated in POSIX.

This used to be enabled for HPUX and RISCOS.
2020-12-16 11:06:14 -08:00
Bruce Mitchener
7a1abc9cc6
Remove commented out directives for SunOS4 dispatch loop hacks. (#84)
On SunOS4, we build `xc.c` by jumping through a lot of hoops to
perform a particular set of operations. We don't do that on other
platforms and this will help clean up the Linux and FreeBSD makefiles.

These directives were already not present in the macOS makefiles.
2020-12-16 11:03:40 -08:00
Bruce Mitchener
6539dc287d
medleyfp.h includes (#82)
* Add missing <math.h> for FPTEST on Linux.

* Consolidate medleyfp.h DOS includes.
2020-12-16 10:57:10 -08:00
Bruce Mitchener
0a57ca5142
Remove asmbitblt.c, duplicate of asmbbt.c. (#85)
When things were renamed for DOS, `asmbitblt.c` became `asmbbt.c`,
but the old file got left around. It was never converted fully
from K&R prototypes, but apart from that, is the same as `asmbbt.c`.
2020-12-16 10:54:23 -08:00
Bruce Mitchener
c728571c5f
Remove commented out CLXFLAGS from non-SunOS makefiles. (#83)
CLX was an alternate client library for X11, isn't really supported
by Maiko, and is unlikely to be in the future on these platforms.
2020-12-16 10:53:38 -08:00
Bruce Mitchener
5dd1b1bdac
SunOS5/SPARC and init.sparc now define FSERROR. (#86)
All other targets that we build were defining `FSERROR` except
these two.
2020-12-16 10:47:28 -08:00
Bruce Mitchener
2050ae69a6
Cleanup mkvdate.c includes. (#81)
All platforms need `<time.h>` for `time` / `ctime`.
All non-DOS platforms need `<sys/time.h>` for `gettimeofday()`.
2020-12-16 07:04:28 +00:00
Bruce Mitchener
6b590edafc
Update old makefiles for renaming of byteswapfns.c (#80)
This was renamed long ago for the DOS port, but not all of
the makefiles were updated.
2020-12-16 07:02:16 +00:00
Bruce Mitchener
847af10c0a
main.c has no dependency upon unixfork.h. (#79)
This avoids a bit of confusion, since unixfork.c isn't built into
the same executable as main.c. (It is part of `lde` instead.)
2020-12-16 05:52:42 +00:00
Bruce Mitchener
ab7329d602
unixfork: read() returns ssize_t. (#77)
We should do this more widely, but this will let us see if we
have any problems across platforms from making this change.
2020-12-15 18:46:20 -08:00
Nick Briggs
a97b2a3501
Fixup xdefs.h (#76)
Update guard name to match file name and protect entire file
Only declare extern lock variables when doing locking
Include system headers that locking macros depend on
Convert code block  macros to do { } while (0) statement style
2020-12-15 18:33:44 -08:00
Bruce Mitchener
7a1569a5ba
Remove unused sccsid files. (#75) 2020-12-15 18:33:10 -08:00
Bruce Mitchener
d5965b64de
Remove final instances of index/rindex defines. (#74) 2020-12-15 18:31:46 -08:00
Nick Briggs
6a336a186e
macOS installation of XQuartz when SIP is enabled does not link /usr/X11 to /opt/X11 (#73) 2020-12-15 13:07:18 -08:00
Nick Briggs
525bda44c8
index/rindex are deprecated in favor of strchr/strrchr so use them directly (#71) 2020-12-15 12:55:30 -08:00
Nick Briggs
8e66ec841f Add missing -DNEW_STORAGE to makefile-sunos5.sparc-x configuration. 2020-12-15 13:22:52 -05:00
Bruce Mitchener
c196393879
Remove unused BSD_COMP define from SunOS5 config. (#70) 2020-12-15 10:17:11 -08:00
Bruce Mitchener
022b3b2721
Clean up unixfork.c includes. (#69)
This also removes some platform ifdef-ery.
2020-12-15 10:14:12 -08:00
Bruce Mitchener
8c617452f7
Remove __USE_BSD define that was copied from Linux. (#68)
This isn't / wasn't needed on FreeBSD.
2020-12-15 10:09:39 -08:00
Bruce Mitchener
4862e8bbb6
Remove -D__USE_BSD from Linux builds. (#67)
This is an internal macro to GNU libc and wasn't meant to be
defined like this. Well, it was. It was deprecated and removed
some years ago, so it isn't doing anything at all here now.
2020-12-15 10:06:15 -08:00