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

372 Commits

Author SHA1 Message Date
Bruce Mitchener
6f7ec059bc
Remove dead stores. (#240) 2021-01-19 21:23:26 -08:00
Bruce Mitchener
0a057dec6b
Delete code related to NATIVETRAN feature. (#232)
* Delete code related to NATIVETRAN feature.

This was obsolete work that had been done for generating
native code from the bytecode.

Closes Interlisp/medley#89.

* Remove unused SaveD6.
2021-01-19 17:57:53 -08:00
Nick Briggs
26857f3131
Change icon, cursor images and masks to const uint8_t (#239)
The predefined cursors (image and mask) are better represented
as arrays of const uint8_t rather than char.  Likewise for the
window icon.  Track this change in the functions that take the
image and mask as arguments, casting only when we get to the
X library functions that take char*.
2021-01-19 10:16:08 -08:00
Bruce Mitchener
a42189fb8b conspage: Fix uninitialized memory read. (#242)
If `prior` was not set, then `priorpg` would be uninitialized and
was subsequently used in a comparison. It should be initialized
to `NULL`.
2021-01-19 09:28:40 -08:00
Bruce Mitchener
616b526516
No mode_t for open() for opening read-only file. (#241) 2021-01-19 08:40:33 -08:00
Bruce Mitchener
7a24b41fc4
Fix !XWINDOW to be SUNDISPLAY ifdefery. (#234)
Some of the `ifndef XWINDOW` code should have been
`ifdef SUNDISPLAY` instead.
2021-01-18 23:45:59 -08:00
Bruce Mitchener
db6b351397
Remove FORKCOMM define. (#238)
This code path was followed everywhere except DOS, so remove
it from the build system, and adjust the code.
2021-01-18 22:12:41 -08:00
Bruce Mitchener
c4e4c5ec5b
Fix sunwindow include ifdefery on vmemsave.c. (#236)
The cursor management code is `#ifdef` `SUNDISPLAY` and
`OLD_CURSOR`, not `NOPIXRECT`, so do the same for the
header include.
2021-01-18 22:11:42 -08:00
Bruce Mitchener
7549c746eb
Remove old xXWINDOW code. (#233)
This looks like code that was a mix of SUNDISPLAY and XWINDOW.
But it isn't valid any longer...
2021-01-19 04:52:50 +00:00
Bruce Mitchener
c9a72229dd
Bit of cleanup for Lisp_Xinitialized. (#237)
* Bit of cleanup for Lisp_Xinitialized.

* Remove the `extern` from `xcursor.c`, where it was not used.
* Move the definition from `main.c` to `xinit.c` as it is
  the only file using it.
* Use `stdbool.h` for it rather than an `int` with custom `TRUE`
  and `FALSE` values.

* Add some asserts with Lisp_Xinitialized.
2021-01-19 04:46:20 +00:00
Bruce Mitchener
be7f43322e
Remove unnecessary codepaths for ISC. (#230)
ISC support had some extra code paths that were largely
duplicates of what was for non-ISC. They are not needed
any longer.
2021-01-15 21:01:40 -08:00
Nick Briggs
7ce6a55499 ForkUnixShell: cleanup unsafe code 2021-01-15 20:36:37 -08:00
Bruce Mitchener
16093186ee
Remove incorrect SUN3_OS3_OS4_il ifdef. (#228)
The definition of a function was ifdef'd out, making it seem
like perhaps there was an assembly implementation, but there
isn't. That platform support is dead weight also at this point,
so removing this because it isn't something that will come back
is fine.
2021-01-15 19:44:12 -08:00
Bruce Mitchener
4c84412c84
Correct some ifdefs from ISC to RESWAPPEDCODESTREAM. (#227)
`RESWAPPEDCODESTREAM` was only used on ISC, so some `#ifdef`'s were
previously set up incorrectly.
2021-01-15 19:33:39 -08:00
Bruce Mitchener
3480ee9711
Fix typos. (#226) 2021-01-15 16:59:32 +00:00
Nick Briggs
ebc4a24d0b
Fix various spelling, grammatical, and punctuation errors (#222) 2021-01-13 23:08:35 -08:00
Bruce Mitchener
fdcc4017f7
unixfork.c needs to define flushing. (#223)
This shouldn't be an `extern` decl here as `unixfork.c` is built
into `lde` which doesn't get a copy of `main.c` linked in.
2021-01-13 22:55:47 -08:00
Bruce Mitchener
71a04ce117
Remove unused FileIOFlag, TimerFlag. (#221) 2021-01-13 10:58:58 -08:00
Bruce Mitchener
0fbf5e8281
Rename NOETHER to MAIKO_ENABLE_ETHERNET. (#219)
Like the renaming of NOFORN, this gets rid of some double
negatives. It also removes some patterns where we had:

```
    #ifdef NOETHER
    #else
    ...
    #endif
```

and replaces them with:

```
    #ifdef MAIKO_ENABLE_ETHERNET
    ...
    #endif
```
2021-01-13 17:54:54 +00:00
Bruce Mitchener
62a8d400ce
Use sig_atomic_t for FP_error when using FP exceptions. (#220)
`sig_atomic_t` is usually `int`, but is the typedef that one
should use for flags written to from a signal handler.
2021-01-13 17:52:53 +00:00
Bruce Mitchener
d3efbc3441
Remove HAS_GETHOSTID. (#218)
This is only true on DOS now. It was previously true on older
unsupported platforms, but they are gone now.
2021-01-12 20:10:21 -08:00
Bruce Mitchener
7145f0d380
Rename NOFORN to MAIKO_ENABLE_FOREIGN_FUNCTION_INTERFACE. (#217)
This lets us get rid of double-negatives, which are confusing,
and starts a naming scheme that is easier to see when something
is a Maiko flag versus something else.
2021-01-12 20:04:23 -08:00
Bruce Mitchener
7b979dd789
Add maiko/platform.h to detect OS + CPU. (#216)
This also adds a bit to the `-info` output to say which OS and CPU
are being targeted.

This can be used in subsequent commits to drive whether or not
we need `BYTESWAP` and whether or not unaligned memory access
is okay.

We'll be able to remove per-platform defines from all of the
makefiles and cmake.
2021-01-13 03:01:49 +00:00
Bruce Mitchener
414a4ecbbd
Remove #ifdef LINUX max/min definitions. (#215)
These don't appear to be needed.
2021-01-12 17:21:54 -08:00
Bruce Mitchener
19329883d5
Add missing foreigndefs.h, includes to foreign.c. (#214) 2021-01-12 17:14:19 -08:00
Bruce Mitchener
5cb18c0710
Merge hacks.c into foreign.c. (#212)
This code was not really valid ANSI C in the way that it was
used, and it was only used by foreign.c, which is #ifdef'd out.
2021-01-11 22:45:49 -08:00
Bruce Mitchener
ec04803b53
Switch s_char uses to signed char. Remove s_char alias. (#208) 2021-01-11 19:00:33 -08:00
Bruce Mitchener
fa1adadd31
Remove SunOS 4 version of aref_switch. (#205)
When compiling for SunOS4, we would have a macro-ized version
of this function which required a slightly different call-site.

This removes all of that as it isn't used or needed.
2021-01-11 17:11:48 -08:00
Bruce Mitchener
9ba7e78625
MDate: Make time_t, not long. (#206)
MDate, generated into `vdate.c` from `mkvdate.c`, was being
stored as a `long` rather than a `time_t`. This led to some
casts, but also a bit of platform #ifdef'd code.

This makes that go away by storing it as the `time_t` value
that it really is.

Also, update some comments and minor nits.
2021-01-10 18:44:31 -08:00
Bruce Mitchener
2b5f8eae1c
Remove sysatms.h/c (#201)
The C file was empty, and the H file only had unused constants
in it.
2021-01-10 17:23:32 -08:00
Bruce Mitchener
589f7d34a9
Remove an include, make one only for Solaris. (#200)
* unixfork: Remove an include, make one only for Solaris.

* xinit: Only include ioctl on Solaris.
2021-01-10 17:22:23 -08:00
Bruce Mitchener
acc86a4df7
Remove oether.c, oldeether.c. (#199)
These are old files and no longer relevant. Nothing references
them and they're just saved backups of `ether.c` and `ldeether.c`.
2021-01-11 01:01:16 +00:00
Bruce Mitchener
b45e249a08
Remove mention of TRASE. (#197)
This macro no longer exists and one message had it as a typo.
2021-01-09 10:17:03 -08:00
Bruce Mitchener
16c6b8f7c3
Fix typos. (#196) 2021-01-08 21:42:11 -08:00
Bruce Mitchener
0e3d3acd4e
Replace int_timer_on|off with int_(un)block. (#193)
Both were used, but one just called the other, so simplify
the API.
2021-01-08 21:38:54 -08:00
Bruce Mitchener
f3b52564e4
Remove OCR code. (#195)
This is very dated code that assumes there's a `/dev/ocr0`.

I'm not sure what system this was for, but it doesn't appear to
be one that exists currently.

Discussed in interlisp/medley#126.
2021-01-08 21:20:18 -08:00
Bruce Mitchener
2dcdf14334
Migrate to POSIX signals. (#190)
This removes SYSVSIGNALS as we're always and only using POSIX
signals now.

Some platform differences have been papered over. We used to
only ignore SIGPIPE when using BSD signals, but we now ignore
it all the time.

While the SIGFPE code will now compile, it hasn't been updated
to work on modern OSes fully yet as it will need to enable
the correct FP exceptions.
2021-01-09 04:55:39 +00:00
Nick Briggs
c83b4879ab
Fix mismatch between format string and value in uutils.c (#194) 2021-01-07 21:59:07 -08:00
Bruce Mitchener
4e65eb5d9b
Remove old (NEVER) defs for int_timer_on|off. (#191)
These were replaced by other calls that manage more signals
than just the `SIGVTALRM`.
2021-01-07 20:55:20 -08:00
Bruce Mitchener
c83741eb06
ptsname() needs _GNU_SOURCE on glibc. (#192)
glibc needs `_XOPEN_SOURCE` to have a declaration for
`ptsname()`. An easy way to get that without having to
know about particular `_XOPEN_SOURCE` values is to define
`_GNU_SOURCE`.

Closes interlisp/medley#137.
2021-01-07 20:50:15 -08:00
Nick Briggs
69be706a69
Remove redundant #ifndef NOETHER checks (#186)
When the NOETHER checks were simplified, there remained some
redundant #ifndef NOETHER within the #else of an #ifdef NOETHER.
2021-01-07 20:45:03 -08:00
Nick Briggs
ebfa196372
Clean up warnings when compiling with ethernet enabled (#188)
* Clean up warnings when compiling with ethernet enabled

Add a dlpidefs.h header for prototypes of the dlpi.c functions.
Convert from bcopy() to memcpy().
Change some char to u_char as needed.

* Neither ether_addr_equal nor init_uid need to be defined if NOETHER is defined
2021-01-05 23:41:18 -08:00
Nick Briggs
05d062d583
Revert "Don't close a file that hasn't been opened (2)" 2021-01-06 02:35:59 +00:00
Larry Masinter
26dc2e44f5
Merge pull request #170 from blakemcbride/dont-open-unopened-file
Don't close a file that hasn't been opened (2)
2021-01-05 18:34:55 -08:00
Bruce Mitchener
12b431dbd0
Remove I386-only, undefined macro usages: I386Round, I386Reset. (#185)
These macros aren't actually defined anywhere in our code and
aren't used outside of the old support for the Sun I386 hardware.
2021-01-05 10:26:42 -08:00
Bruce Mitchener
cb815c34a1
Remove REGISTER define. (#184)
This was used to indicate that the value was allowed to live
in a register. Compilers are much better now and can handle
this themselves.

This helps get rid of more platform-specific ifdef-ery.
2021-01-05 10:26:22 -08:00
Bruce Mitchener
5b54a8c4eb
Use const more. (#183) 2021-01-05 10:26:02 -08:00
Nick Briggs
8d6009c3d4
Remove unused variables and cast return type correctly (#181) 2021-01-04 21:11:30 -08:00
Blake McBride
dd4596099c
Pointer math correction (#171)
* Pointer math correction
* Change pointer diff size type to size_t
2021-01-04 19:08:58 -08:00
Nick Briggs
96ab979e7a
Change lisp_string_to_c_string length parameter to be size_t (#179)
The argument passed to the length parameter of lisp_string_to_c_string is
always the sizeof an array, and since it is compared to the Lisp unsigned
length of the Lisp string is more appropriately a size_t than an int.
Likewise for the index into a string.
2021-01-05 01:23:11 +00:00