1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-15 14:27:19 +00:00

Compare commits

...

1368 Commits

Author SHA1 Message Date
Nick Briggs
06399b0cf8 Declares correct size for scratch version string storage 2025-07-25 14:27:22 -07:00
Nick Briggs
88dea29837 Replaces LispStringToCString macro with static inline procedure 2025-07-25 14:27:22 -07:00
Nick Briggs
feac148fb4 Adds error returns for case where new file version would exceed MAXVERSION 2025-07-25 14:27:22 -07:00
Nick Briggs
a8f968f32d Replaces ConcDirAndName and ConcNameAndVersion macros with static inline procedures.
These are used in many places so code bloat can be reduced by using procedures.
2025-07-25 14:27:22 -07:00
Nick Briggs
5060cae998 Improves parsing of Unix format file names, updates comments
* Adds a (static inline) helper, parse_file_version() to version parsing code.
  - Removes handling of "filename%" as version 0 (version 0 is not valid)
  - Adds handling of Alto/IFS version "filename!nnn"
  - Improves robustness of version parsing (no integer overflow errors)

* Replaces private FNAMETOOLONG error code with ENAMETOOLONG standard error.

* Replaces tests for "magic numbers" with standard ERRNO values
  (ENOENT, EXDEV) in error case for rename() operations.

* Reduces storage requirement for versions from 16 bytes to 10 bytes to
  match the maximum acceptable version number, "999999999".

* Updates various code comments to be correct and clearer.
2025-07-25 14:27:22 -07:00
Nick Briggs
428e7cf1a2 Merge pull request #539 from Interlisp/nhb-gc-cleanup
Minor cleanup of code style in gcfinal.c and additional array free list debugging from URaid
2025-07-25 14:02:13 -07:00
Nick Briggs
01d21b0a44 Revert integerlength() to pure (but more efficient) C as glibc does not provide fls() 2025-07-22 09:43:49 -07:00
Nick Briggs
3569e54524 Uses consistent naming (_np) for native pointer equivalents of Lisp addresses in GC aref1 2025-07-20 10:48:20 -07:00
Nick Briggs
b75e66d91c Renames struct buf to struct buffer to match corresponding Lisp datatype name 2025-07-19 23:19:19 -07:00
Nick Briggs
0e2cda2328 Cleans up releasingvmempage implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 22:44:27 -07:00
Nick Briggs
c58336f813 Cleans up checkarrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Ensures non-zero return value if arrayblock fails check
2025-07-19 18:11:43 -07:00
Nick Briggs
f2bf026b07 Adds URaid F command to print array block free list heads 2025-07-19 17:50:55 -07:00
Nick Briggs
3fad090a6c Cleans up printarrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 17:34:52 -07:00
Nick Briggs
812e296fe8 Cleans up reclaimarrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Adds comments regarding the parameter passed to reclaimarrayblock
2025-07-19 15:41:50 -07:00
Nick Briggs
7c7da4cd0c Cleans up mergeforward implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 13:19:27 -07:00
Nick Briggs
f375519dbc Cleans up mergebackward implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Adds comments with a little explanation of what the code is doing
2025-07-19 12:35:02 -07:00
Nick Briggs
2c46a9473a Cleans up and makes static arrayblockmerger implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 12:29:33 -07:00
Nick Briggs
93b3a709c9 Cleans up makefreearrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Adds comments regarding use of WORDPTR macro to hide BYTESWAP setting
2025-07-19 12:11:11 -07:00
Nick Briggs
31fcfb36ca Cleans up linkblock implementation to increase clarity
Procedure can be static as it is only used within this file
  Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses, and better matches Lisp implementation naming of variables.
  Improve readability by reducing if/else nesting with early outs in
    exceptional cases.  Still equivalent to the original Lisp version.
  Adds comments with a little explanation of what the code is doing.
2025-07-19 11:49:30 -07:00
Nick Briggs
1f18779eb8 Cleans up deleteblock implementation to increase clarity
Procedure can be static void as there was only an unused constant result.
  Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses, and better matches Lisp implementation naming of variables.
  Adds comments with a little explanation of what the code is doing.
2025-07-18 10:09:41 -07:00
Nick Briggs
357336b5f1 Rewrites (and makes static) findptrsbuffer to avoid multiple conversions between Lisp and native pointers 2025-07-18 09:12:43 -07:00
Nick Briggs
1ffd1ba7cb Replaces integerlength(n) implementation with call to fls(n) and makes it static 2025-07-17 18:52:15 -07:00
Nick Briggs
0a6f8ac72b Replaces scaling factor 2 for array length offsets by DLWORDSPER_CELL as that is what it represents. 2025-07-17 18:46:57 -07:00
Nick Briggs
fc90838ad8 Increases number of stack frames that can be displayed by URaid 'l' command (#538) 2025-07-10 18:36:55 -07:00
Frank Halasz
de1fafba7e Merge pull request #536 from Interlisp/fgh_fix-2164-WSL1-try2
To fix Issue#2164, create infrastructure to compile Maiko for Windows System for Linux v1 as a separate OS from Linux

Created makefile-wsl1-* files as well as makefile-init-wsl1-* files.  Modified bin/osversion to detect wsl1 as a special case of linux so that the wsl1 makefiles would be selected appropriately by makeright.

Did not make CMAKE changes for WSL1.

Changed Build Release workflow (via changes to Dockerfile-maiko) to build wsl1 versions of lde, ldex, ldesdl and ldeinit for x86_64 and aarch64.  These are now included in the release tars.
2025-06-16 00:30:06 -07:00
Frank Halasz
6f42b353b2 In Dockerfile_maiko, for wsl1 case called makeright XX clean twice. Eliminated second call, which was deleting first run of makefile x 2025-06-16 00:00:54 -07:00
Frank Halasz
8e17c0747d Fix typo in Dockerfile_maiko 2025-06-15 23:32:27 -07:00
Frank Halasz
6aafbbcb05 Enable using LDEARCH to set wsl1 as the osversion. Set LDEARCH to get a WSL1 compile on a standard Linux system in Dockerfile_maiko (and hence in the workflow buildRelease.yml). 2025-06-15 22:56:36 -07:00
Frank Halasz
5dc9233aef One more typo in Dockerfile_maiko 2025-06-03 23:31:46 -07:00
Frank Halasz
b029b98fca Fix Dockerfile_maiko to set execute permissions on osversion while building wsl1 versions of maiko 2025-06-03 23:25:35 -07:00
Frank Halasz
7dd3c90a77 Fix up various makefile-wsl (and -cygwin) errors pointed out by gemini-code-assist! 2025-06-03 22:40:11 -07:00
Frank Halasz
389ecf7874 Fix Dockerfile_maiko so osversion is restored after building the wsl1 lde executables. 2025-06-03 22:27:16 -07:00
Frank Halasz
5d3639a905 Fix another error is Dockerfile_maiko for wsl1 2025-06-03 19:19:08 -07:00
Frank Halasz
59953c2629 Fix error is Dockerfile_maiko for wsl1 2025-06-03 19:01:14 -07:00
Frank Halasz
6d171bff1d Create/update additional makefiles for building maiko for WSL1. Update buildRelease workflow and assicated Dockerfile to build the WSL1 variants along wih standard linux variants. 2025-06-03 18:54:15 -07:00
Frank Halasz
834a6084c3 WIP. Moving to WSL1 environment 2025-05-28 14:03:13 -07:00
Frank Halasz
9343f58b17 Fix typo in bin/mkvdate that was preventing it from executing correctly (#534) 2025-05-27 22:24:10 -07:00
Matt Heffron
4994982a90 Adds the non-keypad arrow keys to be detected.
With additional Medley calls to KEYACTION (below), they should work in TTYIN (i.e., XCL and Interlisp EXECs).
I didn't try TEDIT.
They are unrecognized in SEDIT. (In any case, their use there probably is pretty restricted by the nature of SEDIT.)

(KEYACTION 'KEYPAD8 '(("Meta,^" 56 NOLOCKSHIFT) . IGNORE))
(KEYACTION 'KEYPAD6 '(("Meta,>" 54 NOLOCKSHIFT) . IGNORE))
(KEYACTION 'KEYPAD4 '(("Meta,<" 52 NOLOCKSHIFT) . IGNORE))
(KEYACTION 'KEYPAD2 '(("Meta,^J" 50 NOLOCKSHIFT) . IGNORE))
2025-02-12 11:22:08 -08:00
Frank Halasz
40d4fca8cc Merge pull request #530 from Interlisp/fgh_use-22.04-build-builder
Specify Ubuntu22.04 instead of Ubuntu-latest in various github action scripts to solve libc version issue crashing online
2025-02-03 12:19:50 -08:00
Nick Briggs
c8dc63d418 Clean up display related variable names differing only in case (#529)
Unify the LispDisplayRequested... and lispDisplayRequested...
variables from the SDL and X11 display modules.

Move the storage definitions for LispDisplayRequested... to main.c
leaving external references in the modules that utilize them.
2025-02-02 16:31:43 -08:00
Frank Halasz
7fe0f70640 In buildRelease.yml moving to ubuntu-22.04 instead of latest to see if it fixes these random linux arm64 build failures - crashes inside gcc compiler! 2025-02-01 19:10:38 -08:00
Frank Halasz
55e20ea993 In buildRelease.yml added apt update to emscriptem build since it was failing to find some of the packages called for by apt-get install sdl2 2025-02-01 18:48:38 -08:00
Frank Halasz
7d85a59e6f Change ubuntu version from latest to 22.04 in Dockerfile_builder to handle issue where the Medley-online docker image was failing to find the lastest versions of libc and libm when loading maiko 2025-02-01 17:53:01 -08:00
Nick Briggs
511a1b523e Eliminate extra gotos in common branch tail code (#528)
The implementation of various JUMP opcodes tried to use a common tail
that did a POP and branched to the next opcode. While the extra gotos
probably aren't harmful, neither are they beneficial to code size or speed.
2025-01-30 11:07:29 -08:00
Frank Halasz
04f9905ca0 Fix MacOS SDL build in buildRelease github workflow (#527)
* Update buildRelease workflow to use sdl2-2.30.11 on MacOS

* In buildRelease workflow, update Macos build for SDL to use  -DMAIKO_DISPLAY_SDL=2 instead of =ON
2025-01-29 08:51:47 -08:00
Nick Briggs
e61d0f2e6c Correct {DSK} versioned file cache failures (#526)
A missing check for the applicability of a versioned file cache
caused loadups to fail in the case where the modification timestamp
of a directory and its parent were identical, and the file being
looked up had the same name (when lowercased) as the directory it was
contained within. E.g., looking up TEDIT in library/tedit/ where
the modification times of library and library/tedit were identical.

The inode number of the directory containing the file must be the
same as the inode number of the directory the cache was built from.
2025-01-26 18:38:25 -08:00
Nick Briggs
3c4d9f5393 Modifies LISPFINISH subr to use 2nd argument, if present, for exit status (#525)
Redesign of exit status handling, instead of overloading the FAST flag
of (LOGOUT fast), add an optional 2nd argument, EXITSTATUS.

Retains compatability, with behavior unchanged, between new emulator
and older sysouts which do not pass the second argument to LISPFINISH.

Newer sysouts, which pass the 2nd argument, will continue to work with
older emulators though will not get the exit status set.
2025-01-20 12:24:44 -08:00
Nick Briggs
31bb14b9d7 Modifies Lisp exit subr to permit passing an exit status code (#524)
These changes add (LOGOUT <number>) to the traditional
(LOGOUT) and (LOGOUT T) calls.  If an integer <number> is provided
it will be used as the exit status code, while NIL and T result
in an EXIT_SUCCESS.

If the argument passed is none of NIL, T, or a number, the exit
status code will be a generic EXIT_FAILURE (typically 1).

(LOGOUT) and (LOGOUT T) virtual memory behavior is unaffected.
When a <number> is passed Lisp will exit without saving the
virtual memory state, as is the case for (LOGOUT T), although
this behavior is determined by Lisp rather than the Maiko emulator.
2025-01-16 09:57:01 -08:00
Nick Briggs
f23a43f1a0 Merge pull request #522 from Interlisp/nhb-dspbout-and-showdisplay
Improves behavior of display subrs DSPBOUT and SHOWDISPLAY
2024-12-22 14:10:37 -08:00
Nick Briggs
e251f26816 Improves behavior of display subrs DSPBOUT and SHOWDISPLAY
DSPBOUT is called to output a single character to the "BCPL display",
which is the system text output rather than the bitmapped display.
Under maiko, this is mapped to "stdout". Interlisp-D uses CR as the EOL
character, but that is not appropriate for output to standard output
so CR is translated to LF here.  Standard output is buffered, but there
is no indication of when the output should be flushed, so flush on every
character, since this is a low frequency operation.

SHOWDISPLAY is called to switch between the "BCPL display" and the
bitmapped display.  The current display subsystems are not hooked up
to this subr, but this is a potential place to hook display size changes
in the future, so the code is updated to indicate the parameters passed
in and to set/reset the display initialization state variable.
2024-12-18 12:40:29 -08:00
Nick Briggs
51045b402f Merge pull request #521 from Interlisp/nhb-print-maiko-git-version
Adds MaikoGitVersion to information printed with -info option
2024-12-17 11:22:43 -08:00
Nick Briggs
e6c972a62a Merge pull request #520 from Interlisp/nhb-shadowed-timer-option
Replaces shadowed "-t <interval>" with "-timer <interval>"
2024-12-17 11:22:20 -08:00
Nick Briggs
31ad2f2169 Adds MaikoGitVersion to information printed with -info option 2024-12-16 20:13:05 -08:00
Nick Briggs
66721ccc1c Replaces shadowed "-t <interval>" with "-timer <interval>"
At some point option "-t" was introduced as an abbreviation for
"-title" but "-t" was already in use, though undocumented, for overriding
the timer interval.  This commit changes the command line timer option
to "-timer" and adds "timer" to the options that are processed from
the X11 resources.
2024-12-16 19:59:03 -08:00
Nick Briggs
b13a35e16e Merge pull request #519 from Interlisp/nhb-fix-sdl-display-bitmap-flushing
Fix display bitmap flushing on modification when using SDL display subsystem
2024-12-15 09:25:29 -08:00
Nick Briggs
55d8504060 Corrects interaction of BITMAPBIT with buffered display bitmap
Two problems fixed:
  * only in the case of a software cursor is it necessary to check if
  the bit being altered is within the region of the display covered by
  the cursor, and if it is, the cursor must be hidden before operating
  on the screen bitmap
  * SDL as well as X requires modifications to the screen bitmap be
  flushed to the actual display.
2024-12-14 13:22:44 -08:00
Nick Briggs
ecdab720f2 Missing call to flush_display_lineregion() for SDL in PILOTBITBLT
When the target for a PILOTBITBLT operation is the display bitmap,
and the display bitmap is not memory-mapped from the actual display,
the display subsystem needs to be notified to flush the Lisp display
bitmap to the display so that changes are immediately visible.
The mechanism was present for X11 displays but needed to be implemented
for SDL displays.
2024-12-14 12:57:24 -08:00
Nick Briggs
249efce565 Adds comments regarding init_cursor() purpose in initdsp.c 2024-12-03 15:40:37 -08:00
Nick Briggs
1de2e3e954 Update README.md to be slightly more accurate. 2024-12-02 13:57:24 -08:00
Nick Briggs
a2f62159e9 Merge pull request #518 from Interlisp/cmakelists-ldeinit-solaris
Updates CMakeLists.txt to add Solaris specific OS5 define to ldeint build
2024-11-24 08:08:49 -08:00
Nick Briggs
b2a22a8ac8 Updates CMakeLists.txt to add Solaris specific define to ldeint build 2024-11-24 02:45:50 -05:00
Nick Briggs
89b2b4f866 Merge pull request #517 from Interlisp/improve-cmake-vdate-depends
Improve cmake vdate depends
2024-11-20 12:14:09 -08:00
Nick Briggs
96046c01f0 Adds MaikoGitVersion string to vdate.o
The variable MaikoGitVersion will contain a git revision from the head of the source tree
along with an indication if the status was "dirty".  If git is not present on the system
or the directory that the build happened in was not under git control the version will be
"none".
2024-11-20 11:18:41 -08:00
Nick Briggs
578b26547a Updates CMakeLists.txt to avoid recreating vdate.c if nothing has changed
Creating vdate.c/vdate.o should not be done unconditionally.  It is only
necessary to recreate it if one of the input files has changed.
2024-11-19 15:20:44 -08:00
Nick Briggs
13cbc33da3 Merge pull request #516 from Interlisp/include-file-reorganization
Include file reorganization (part 1)
2024-11-11 10:26:05 -08:00
Nick Briggs
baeec1b957 Renames bitblt.h to bbtmacro.h and updates all uses 2024-11-07 12:39:55 -08:00
Nick Briggs
99550aaa7c Renames return.h to retmacro.h and updates all uses 2024-11-06 13:31:46 -08:00
Nick Briggs
99601ede75 Removes incorrect dependency on osmsg.h and renames it to osmsgprint.h 2024-11-05 14:57:00 -08:00
Nick Briggs
4f3cb4d326 Removes ether.h and merges Lisp interface structs into lsptypes.h 2024-11-05 14:24:36 -08:00
Nick Briggs
b98e1612d1 Removes tty.h and merges #defines (all local) and Lisp interface structs into tty.c 2024-11-05 14:07:16 -08:00
Nick Briggs
fe71946f82 Removes vmemsave.h and merges #defines (all local, mostly unused) into vmemsave.c 2024-11-05 14:02:27 -08:00
Nick Briggs
c332c71a3e Removes unreferenced xscroll.h (dup of xscrolldefs.h) 2024-11-05 13:56:08 -08:00
Nick Briggs
cea720feb2 Remove tabs embedded in strings used for formatting output (#515)
Files gcfinal.c and testool.c both contain literal TAB characters embedded
in printf() format strings in an attempt to align output.
The output formatting depends on the user's simulated tab settings and
therefore may not produce the expected results.

The output formatting is rewritten to make tab characters unnecessary.
2024-10-31 13:36:31 -07:00
Nick Briggs
a3f3775c0a Add missing includes and include file if compiling with COLOR defined.
File rawcolordefs.h was completely missing.
Both llcolordefs.h and rawcolordefs.h must be included in subr.c if -DCOLOR
Make newColorizeFont8() local to rawcolor.c
2024-10-22 10:13:00 -07:00
Nick Briggs
d2d4f18ade Correct error message when debug frame extension limit exceeded 2024-10-22 09:56:06 -07:00
Nick Briggs
c3b7d1707d Switch X11 options to use shared windowTitle and cleanup icon title variable name 2024-10-18 16:21:58 -07:00
Nick Briggs
532731b716 Cleanup options variables, spelling errors, declarations
Options for requested width, height, and pixel scaling and window title can
be shared between display subsystems.

Include correct header for local sdl function definitions rather than
manually duplicating a reference for init_SDL().

Correct a typo in comments on build_lisp_map().
2024-10-18 16:07:46 -07:00
Nick Briggs
29e5b374fe Update CMakeLists.txt to suggested syntax for SDL projects. 2024-10-17 14:26:16 -07:00
Nick Briggs
0c7b1cccd4 Merge pull request #514 from Interlisp/cleanup-USHORT-bitfields
Remove USHORT and direct "unsigned short" uses in struct bitfields
2024-10-15 19:27:13 -07:00
Nick Briggs
fae5c4956e Cleanup in the "version array" handling in the {DSK} device (#513)
* Remove useless VersionArray parameter in maintain_version()

The 2nd argument, FileName *varray, is only ever NULL, so
remove it and simplify the code.

* Remove useless and unused VersionArray cache mechanism

* Simplify setting of file times on file close

The futimes(fd, ...) function allows changing the times of a file with
reference to an open file descriptor which allows us to avoid trying to
find a pathname by which utimes(path, ...) would operate on the inode
corresponding to the fd we have just closed.

* Remove unnecessary temporary variable for VersionArray

* In get_version_array() do not mix array and pointer access to VersionArray

* Improve {DSK} device handling of files with many versions

Somewhat dynamically allocate the version array storage, in chunks of
VERSIONARRAYCHUNKLENGTH (currently 200) allowing for up to
VERSIONARRAYMAXLENGTH (currently 2000) entries before reporting an
error. These numbers could be adjusted, or the limit could be removed.

Sorts the version array in descending order of version number to
improve the performance of check_vless_link() which stats every file
in the version array until it finds one linked to the versionless name
(which should be the highest version).  Sorting, and tracking the
number of active entries, also allows for future optimization of other
operations that currently walk through the version array.

* futimens() appears more widely available than futimes() - so use it

* Rework caching of version array for files

While enumerating the entries in a directory is relatively fast,
on some systems (macOS) stat() of a file is slow.
While there is not general agreement on the name in the stat structure
of the timespec field for the modification time, POSIX specifies it
as "st_mtim", and it is possible to #define st_mtim to be the
system-specific name in "version.h" (macOS: st_mtimespec).

* FindHighestVersion can make use of sorted order of filename/version cache

Since the list of filename and versions is maintained in descending order
by version number (see get_version_array) the highest version is trivially
located at index 0 of the filename array.
2024-10-14 14:15:02 -07:00
Nick Briggs
86ba485c3e Replace "unsigned short" use for bit-fields with DLword
Where bit-fields are defined in a structure that represents a Lisp
DLword object the DLword type is now used as the base type instead of
"unsigned short".
2024-10-14 13:17:26 -07:00
Nick Briggs
b88ea87fa8 Remove USHORT definition and replace uses with DLword
USHORT unnecessarily duplicates the DLword type that represents a
single Lisp 16-bit word.
2024-10-14 12:57:02 -07:00
Nick Briggs
91e0cea9d5 Fix #1826 - emulator crash when too many versions of a file in a directory (#512)
* Fix #1826 - emulator crash  when too many versions of a file in a directory

This is a preliminary fix to avoid a system crash (bus error/seg fault) when
operating on a file with too many versions present in the directory.

Initial fix is to report an error (EIO, SIMPLE-DEVICE-ERROR) when doing
an operation that would result in an out-of-bounds access in the emulator.

* Add comment noting that the DOS get_version_array code comes first.
2024-09-16 17:47:48 -07:00
Nick Briggs
4ad14fa832 Allow choice of foreground and background colors for Medley X11/SDL display (#511)
* Allow choice of foreground and background colors for Medley X11 display

lde/ldex Accepts -fg/-foreground <color> and -bg/-background <color>,
or the corresponding X resources ldex*foreground and ldex*background
to specify the colors that will represent the monochrome Medley display
pixels.

* Extend screen foreground/background color selection to SDL display subsystem (ldesdl)
2024-09-09 12:56:18 -07:00
Nick Briggs
aa4df518a1 Release 201 corrections (#510)
* Fix compilation for maiko version 201

Version 201 does not have BIGVM, so SWA_FNHEAD requires swapx
which is defined in byteswapdefs.h

* Fix compilation for maiko version 201

Version 201 did not have NEWCDRCODING, so the implementation of
N_OP_rplcons requires definitions from gcdata.h and address.h

* Set up makeright etc. to allow for easier compilation of alternate versions

The makeright script and the makefile-* slices it depends are modified
to allow easily specifying the RELEASE version number of the Maiko emulator
to be built.  The default version remains 351, but can be changed with e.g.

RELEASE=201 ./makeright x

The object directories and executables are NOT named with the version.

* Remove unnecessary include of gcdata.h from bbtsub.c

* Users of gcdata.h should include gchtfinddefs.h explicitly if they use gcdata.h macros

* Correct modify_big_reference_count entry parameter type to reflect dependence on GCENTRY size differences between releases

* Add MAIKO_RELEASE to CMake options for building
2024-09-01 16:26:30 -07:00
Nick Briggs
5c9b5ef4ec Ignore mouse motion events when the window does not have keyboard focus (#509) 2024-08-21 20:59:37 -07:00
Nick Briggs
3ef7d2d68e Fixing mismatched type declaration avoids cast from DLword* to short* 2024-05-29 16:52:29 -07:00
Nick Briggs
68c74e4e79 Add support for setting cursor color to ldex (X11 display) (#508)
The cursor (foreground) color can be set with the
    -cursorColor x11-color-spec
option to ldex or any front-end that passes the options through to ldex.
For example:
     lde ... -cursorColor red
     lde ... -cursorColor '#A020F0'
     ./run-medley -cursorColor RED -g 1200x700 -sc 1200x700 -noscroll

Alternatively, the color may be specified with the ldex*cursorColor resource
(in ~/.Xresources, or other such X11 resource databases that are loaded by
the X11 server)

The command line option will override the X11 resource option.
2024-05-23 09:52:22 -07:00
Nick Briggs
c765ca5cc8 Update SDL dependent code and makefile segments to prepare for SDL3 (#497)
* Update SDL dependent code and makefile segments to prepare for SDL3

Many APIs have changed between SDL2 and SDL3.  This update adds
preprocessor conditionals to adapt the Maiko SDL code to allow selection of
the SDL major version (2 or 3) from the -DSDL=n define.

The SDL3 implementation is currently available as a preview release, 3.1.0, at
   https://github.com/libsdl-org/SDL/releases/tag/prerelease-3.1.0

* Add updates for makefile-haiku.x86_64-sdl to prepare for SDL3

* Allow makeright to accept sdl3 as display type to ease SDL3 experiments

* Update CMakeLists.txt for SDL3 library

 * Replaces configuration option -DMAIKO_DISPLAY_SDL=ON/OFF with
   -DMAIKO_DISPLAY_SDL=OFF/2/3
 * Replaces PUBLIC definitions with PRIVATE definitions on targets since
   we are not exporting definitions outside this local compilation
 * Update messages to indicate which version of SDL is being configured
 * Add fixup for SDL3.xcframework on macOS to compensate for missing
   RPATH specification (CMake issue 25998)
2024-05-21 12:07:13 -07:00
Nick Briggs
3ac46abc5c Implement the "B hexaddr" command to print array block (#506)
The array block printer was already documented, but not implemented.
Clean up with IncludeWhatYouUse, to document why particular includes
are present.
2024-05-20 15:12:38 -07:00
Nick Briggs
613ffd8aca Update .gitignore to ignore 386-sdl build directory (#507) 2024-05-20 15:10:38 -07:00
Nick Briggs
db5d5a31e7 Add -rpath /Library/Frameworks to accommodate newer macOS releases (#505)
On or before macOS Ventura's release, defaulting the @rpath to
include /Library/Frameworks stopped.  Since we expect the SDL2
framework to be installed there we must add a -rpath option.
This should be backwards compatible with older macOS releases.
(verified on Catalina but nothing older)
2024-05-19 23:39:00 -07:00
Nick Briggs
4becc6ad93 Not all systems define MAP_FAILED for the return value from failing mmap() (#502) 2024-05-13 15:37:53 -07:00
Frank Halasz
40a1a8dcd2 Rationalize the processing of command line args for the sysout. Fixes Issue#1703 (#503)
* Rationalize the processing of command line args for the sysout.  Remove most of the redundancy between what is done for sysout arg processing in xrdopt.c versus main.c.  Move all of the decision making about what sysout_name to use until all args have been processed (both in xrdpopt and main).  This is done in main, where the prioritization and checking is done in one place rather than spread in several places in xrdopt and main.     //  Order of priority:
628   //    1. Value of -sysout command line arg
629   //    2. Value of the first command line arg
630   //    3. Value of LDESRCESYSOUT env variable
631   //    4. Value of LDESOURCESYSOUT env variable
632   //    5. Value as determined by X resource manager, if any
633   //    6. Value of /home/frank/lisp.virtualmem (or lisp.vm for DOS)

* In main.c moved check for sysout as first arg to before the call to read_Xoption.  This will ensure that we always check the 'true' first argument even when read_Xoption modifies argv.
2024-05-13 15:36:33 -07:00
Frank Halasz
fd16058ca7 Merge pull request #504 from Interlisp/fgh_fix-cygwin-github-build
Fix Cygwin github builds:  Issue#1705
2024-05-10 14:31:50 -07:00
Frank Halasz
1426386830 In buildRelease.yml, change site for cygwin download to https:/mirrors.kernel.org since old gatech site is now deprecated. 2024-05-10 14:19:12 -07:00
Nick Briggs
de361e0258 IPv4 host network addresses convert with htonl() not htons() (#501) 2024-05-06 22:57:39 -07:00
Nick Briggs
3979cdd60d Update config.guess, config.sub to current GNU versions (#500) 2024-05-06 22:57:16 -07:00
Frank Halasz
6c6b01f99c Merge pull request #499 from Interlisp/fgh_buildRelease_MacOS_fix
In buildRelease workflow, MacOS job - fix issue with uninstall of casks that have not actually been installed
2024-05-06 16:41:23 -07:00
Frank Halasz
143c0f67cf In buildRelease workflow, MacOS job - fix issue with uninstall of casks that have not actually been installed. result of changes to github runner in MacOS-lastest 2024-05-06 16:12:59 -07:00
Nick Briggs
c391641691 Eliminate warnings for ignored fprintf() result when printing messages to stderr 2024-04-24 11:41:46 -07:00
Nick Briggs
38862ddb08 Ignore snprintf() result where OK to do so, convert sprintf() to snprintf() 2024-04-23 21:49:38 -07:00
Nick Briggs
8d34f0869a Problem with directory caching, #1661, disable until it is solved. 2024-04-13 11:12:10 -07:00
Anarchos
e2e2c7e394 Haiku OS port (#485)
* Haiku OS port
* haiku with X11 backend
* haiku has stpncpy
* Haiku is not Linux.
* X not stable enough on Haiku
* Haiku : settimeofday is a no-op
* Haiku : no need to define settimeofday at all (pointed by nbriggs)

---------

Signed-off-by: Anarchos <sylvain_kerjean@hotmail.com>
2024-04-10 20:14:46 -07:00
Nick Briggs
2e86450fad Improve the file lookup performance for {DSK} files (#498)
The directory caching for file lookup on {DSK} was disabled due to a
bug in SunOS - this is no longer relevant, so the cache can be reenabled.
2024-04-03 21:10:54 -07:00
Nick Briggs
400ccab637 exit with non-zero status if unable to open sysout or... (#496) 2024-03-31 09:55:26 -07:00
Nick Briggs
95f4ac8167 Update UNIX-GETPARM to return values for OSNAME and ARCH (#495)
Calls to UNIX-GETPARM with argument "OSNAME" or "ARCH" now return
values derived from the compile-time settings in inc/maiko/platform.h

The current return values are
OSNAME:
    "macOS"
    "Cygwin"
    "DragonFly BSD"
    "FreeBSD"
    "Linux"
    "NetBSD"
    "OpenBSD"
    "AmigaOS 3"
    "Solaris"
    "Windows"
    "Emscripten"
ARCH:
    "WebAssembly"
    "x86_64"
    "arm"
    "arm64"
    "x86"
    "PowerPC"
    "RISC-V"
    "SPARC"
    "Motorola68K"
2024-03-25 15:26:31 -07:00
Nick Briggs
40f6488ee4 Merge pull request #494 from Interlisp/color-code-cleanup
Color code cleanup
2024-03-19 21:09:44 -07:00
Nick Briggs
3c3fc94246 Clean up rawcolor code so it at least compiles without error 2024-03-19 09:10:29 -07:00
Nick Briggs
559ba779b2 Missing definition for taking_mouse_up() 2024-03-19 09:09:36 -07:00
Nick Briggs
afd6cf4b80 Merge pull request #493 from Interlisp/stack-debug-01
Cleanup of stack-related code
2024-03-18 16:30:06 -07:00
Nick Briggs
68baf6fb30 Use ...FromStackOffset functions where appropriate
Rather than adding/or-ing the STK_OFFSET constant into a stack offset
to convert it to a pointer in general Lisp memory and then converting
from that to a native address... use the functions specifically
present to do those conversions with embedded checks on stack offset
validity.
2024-03-07 10:45:38 -08:00
Nick Briggs
939c23c03b Additional check for bad stack offset calculation
Pointer difference calculations on an inappropriate stack pointer could
result in a negative offset, not just an offset that is too large to fit
in 16 bits.  Complain if either case occurs.
2024-03-07 10:01:19 -08:00
Nick Briggs
55591557b6 Clarify the expected size/packing of bit fields in stack structures
While packing is not guaranteed, and most compilers will combine
adjacent bit fields regardless of the alignment requirements of the
datatype that is being divided, here we can be clearer that we
expect packing into 16-bit fields and we do not require (and must not
have) 32-bit alignment of the collections of bitfields.
2024-03-07 09:30:59 -08:00
Frank Halasz
fb579a2ab5 Merge pull request #491 from Interlisp/fgh_emscripten-vmem_save
Fix Issue#1541: IL:LOGOUT does not work running Medley on emscripten maiko
2024-02-16 12:03:31 -08:00
Frank Halasz
258f70a82b Fix Issue#1541: IL:LOGOUT does not work running Medley on emscripten maiko 2024-02-16 00:03:39 -08:00
Nick Briggs
895f765105 Merge pull request #490 from Interlisp/nhb-no-wasm-getrusage
Emscripten/wasm does not support getrusage() system call
2024-02-13 16:08:40 -08:00
Nick Briggs
9f02ce0590 Emscripten/wasm does not support getrusage() system call
Updating the MiscStats data can at best provide the time of day and
attribute all elapsed time to total CPU time.

Closes issue #1537
2024-02-12 09:30:46 -08:00
Frank Halasz
ce20accae3 Merge pull request #489 from Interlisp/fgh_em-build-01
Add Emscripten build to buildRelease workflow
2024-02-11 14:28:57 -08:00
Frank Halasz
ce7deadad3 Added LZ4 compression to wasm_nl 2024-02-10 00:40:20 -08:00
Frank Halasz
0b0c82ce18 Returning buildRelease to full builds 2024-02-07 18:37:47 -08:00
Frank Halasz
3ae25f81f8 update actions to later versions to account for githiubs move from node16 to node20 2024-02-07 18:29:22 -08:00
Frank Halasz
52a3512379 additional fix to tar of emscripten files 2024-02-07 18:09:39 -08:00
Frank Halasz
df6dd883a6 fix tar of emscripten files 2024-02-07 18:01:36 -08:00
Frank Halasz
3d341e3bbd 5 Debugging emscripten install PATH updates 2024-02-07 17:53:53 -08:00
Frank Halasz
ebe4babbe1 4 Debugging emscripten install PATH updates 2024-02-07 17:23:40 -08:00
Frank Halasz
587ce1983a 3 Debugging emscripten install PATH updates 2024-02-07 17:14:16 -08:00
Frank Halasz
b841a44427 2 Debugging emscripten install PATH updates 2024-02-07 17:10:01 -08:00
Frank Halasz
efd200dbf7 Debugging emscripten install PATH updates 2024-02-07 17:02:21 -08:00
Frank Halasz
640f69877f More on fixing emscripten install PATH updates 2024-02-07 16:57:04 -08:00
Frank Halasz
400f3b7835 Fix emscripten install PATH updates 2024-02-07 16:49:26 -08:00
Frank Halasz
e657b2e1dc Debugging emscriten build 2024-02-07 13:21:01 -08:00
Frank Halasz
75c815f585 Fix typo in emscripten install 2024-02-07 13:13:04 -08:00
Frank Halasz
696ac9a675 Fix install of SDL2 2024-02-07 13:08:39 -08:00
Frank Halasz
8c54c0fbe0 First pass at workflow to build maiko for emscripten 2024-02-07 12:55:49 -08:00
Nick Briggs
586a3206c2 Merge pull request #488 from Interlisp/incorporate-wasm-changes
Incorporate wasm changes
2024-01-26 08:42:15 -08:00
Nick Briggs
e93e3c895e Update preloaded directories, allow Emscripten runtime to exit, set MAIKO_ENABLE_NETHUB
Compiling with -DMAIKO_ENABLE_NETHUB makes it possible to test out having a WebSocket
server that could pass packets back and forth to the Dodo NetHub.

Setting Emscripten link-time option for EXIT_RUNTIME allows the runtime code to shutdown
when you exit Medley via a (LOGOUT)

Set up preloads for all the parts of the Medley directory that MEDLEYDIR-INIT expects
to be there.  The resulting ldesdl.data is (at this time) 128 MB.  It can be installed
gzipped if using nginx or some other web server that supports pre-zipped static files.
It would be better to have these as lazy-loading files, but the setup for that is
complicated.  Another alternative to embedding all the data would be if a WebSocket
to  XNS/Nethub gateway were written and deployed.
2024-01-01 17:30:01 -08:00
Nick Briggs
29fdf4c40b Adapt to window geometry, set up a fake environment variable MEDLEYDIR
Passes the window width/height as the requested geometry to lde at startup.

Since we control the directory structure of the file-system, we can pass the
known fixed location of the Medley directories in the MEDLEYDIR environment variable.

Sets up the NetHub host as localhost - not currenty functional, but a WebSocket
server could be added to communicate with the NetHub gateway to enable local
networking from the browser version of Medley.
2024-01-01 16:58:23 -08:00
Nick Briggs
7bb2393637 Adjustments to WAsm file system layout and compilation options
Moves the full.sysout from the root of tle system to /medley/loadups/full.sysout,
adds /medley/lispusers/BACKGROUND-YIELD.LCOM and an Emscripten/WAsm specific
site init file at /usr/local/lde/site-init.lisp

Adjusts options so that the options are in the correct place for the
compiler and loader.
2023-12-27 17:20:11 -08:00
Nick Briggs
7c1d2081c8 Ignore all wasm generated directories, lde[sdl].html has moved to src directory 2023-12-22 19:21:59 -08:00
Nick Briggs
acffcb74aa Merge remote-tracking branch 'wasm-updates/master' into incorporate-wasm-changes 2023-12-22 19:18:56 -08:00
Nick Briggs
ad71e1e830 Merge remote-tracking branch 'no-defun-allowed/master' into incorporate-wasm-changes 2023-12-22 19:15:28 -08:00
Nick Briggs
4b0032e1b6 Piggyback on existing async timer emulation instruction countdown for periodic emscripten_sleep() call.
There is no need for an additional Emscripten-specific counter to periodically call emscripten_sleep().

Make test for Emscripten environment check MAIKO_OS_EMSCRIPTEN rather than checking __EMSCRIPTEN__,
which is localized in the maiko/platform.h include.
2023-12-22 18:17:02 -08:00
Nick Briggs
b21fbcbcb1 subr_settime should avoid settimeofday() completely in Emscripten environment 2023-12-22 18:15:18 -08:00
Nick Briggs
0cc8e4d71c Revert/update unixfork.c since it is no longer used in emscripten based builds 2023-12-22 13:35:33 -08:00
Nick Briggs
bee6a2f33e amend! Give emcc link-time flags only to the link phase not the compile phase
Give emcc link-time flags only to the link phase not the compile phase
Remove target "lde" which is not used in the emscripten configuration.
2023-12-22 13:27:05 -08:00
Nick Briggs
f208fd3302 Rename/move ldesdl.html out of emscripten.wasm (which gets cleared on rebuild) to src/lde.html 2023-12-22 13:18:20 -08:00
Nick Briggs
e82b47a9e7 Give emcc link-time flags only to the link phase not the compile phase 2023-12-22 13:13:32 -08:00
Nick Briggs
b666b1b2de Add stubs for X11 IOErrorHandler and IOErrorExitHandler (#487)
Adds stub procedures and hooks them in to the X11 error handlers as an
example of how we may be able to handle lost X connections and
gracefully terminate the session.
2023-12-22 10:36:13 -08:00
Matt Heffron
d933ba88b7 XFree(mapping) was called *before* mapping was referenced in DEBUG conditional code. (#486)
This is only a potential issue in DEBUG build. A problem hasn't occurred, that I know of, but it seemed best just to be safe.
Moved the DEBUG code to precede the XFree(mapping) call. (Equivalent to moving the XFree down.)
2023-12-16 15:14:02 -08:00
Nick Briggs
56e7591ada Although an unlikely case, LispNumToCInt() should handle negative SmallP numbers correctly 2023-11-17 13:11:11 -08:00
Nick Briggs
28d7d5ec00 improve debug output in interprocess communication code 2023-11-17 12:11:10 -08:00
Nick Briggs
1e0264416f Error exits in forked process code should exit with failure status rather than success 2023-11-17 12:07:23 -08:00
Nick Briggs
15966ccf34 If SUNDISPLAY is defined REALCURSOR will be defined so remove redundant defined(SUNDISPLAY) 2023-11-17 09:46:22 -08:00
Nick Briggs
09fae0a3f5 Add file name and line number to debug print output. 2023-11-17 09:41:37 -08:00
Nick Briggs
2caa2269a9 Avoid initializing CLastUserActionCell68k in INIT mode as \LASTUSERACTION will not have been set. 2023-11-13 13:23:41 -08:00
Hayley Patton
7b2cf44c7c Add ldesdl.html 2023-11-13 15:30:19 +11:00
Hayley Patton
79a788279b Add Emscripten/WASM support 2023-11-13 15:18:49 +11:00
Nick Briggs
42477318b5 Assignments embedded in if-condition are not a good idea. 2023-11-12 17:37:34 -08:00
Nick Briggs
6cea8c69b0 Switch makefile slice for building ldeinit on Linux x86_64 from clang to gcc 2023-11-12 15:46:30 -08:00
Nick Briggs
eb3b382ac6 Correct comment about processor type in makefile slice 2023-11-12 15:44:29 -08:00
Nick Briggs
c9b4164d89 Add makefile slice for building ldeinit on Linux aarch64 systems 2023-11-12 15:43:07 -08:00
Nick Briggs
562f4c30ee Fix typo 2023-11-09 16:48:48 -08:00
Nick Briggs
98569d10b4 Reduce false positives for misaligned pointer access when checking array blocks
The forward and backward pointers in an array block only contain
    valid pointer values when the block is free therefore avoid
    producing native addresses from these fields if the block is in use.

Add comments regarding the operation of the array block merging code
    Array block merging will produce a single block if possible,
    otherwise it will produce two blocks with one as large as possible
    and the other no less than the minimum block size.

Rewrite the checks in array block merge forward to minimize unnecessary field accesses
2023-11-09 15:43:11 -08:00
Bill Stumbo
3207df6e24 Update README fixing location of Medley Introduction. (#484) 2023-09-13 07:49:27 -07:00
Nick Briggs
7fce08f92c More Lisp variables to avoid in INIT mode - turn off X11 input handling (#482) 2023-08-09 14:04:51 -07:00
Nick Briggs
2c55f7923c Add makefile slice for OpenBSD init on x86_64. (#478)
* Add makefile slice for OpenBSD init on x86_64.

* Correct flags for init.
2023-08-03 11:55:22 -07:00
Nick Briggs
b441a28c34 Teach CMake to build ldeinit, update clang-tidy names (#474)
Have CMake build ldeinit when configured for X11 display, and
update the ever-growing list of names under which clang-tidy may
be found (now up to version 16)
2023-08-03 10:20:15 -07:00
Nick Briggs
09e73d4153 Update machinetype and osversion scripts to invoke config.guess from same directory (#479)
If machinetype or osversion are executed from other than the current working directory
they will fail to execute the config.guess script because it was invoked with "./config.guess".
This update attempts to determine the directory where machinetype or osversion
were found and uses the same path to invoke config.guess.
2023-08-03 10:18:02 -07:00
Nick Briggs
8e43a393bd Avoid setting Lisp variables whose locations are unknown when in INIT mode (#481)
* Avoid setting Lisp variables whose locations are unknown when in INIT mode.

* Exit with a success (0) status for normal lisp_finish.
2023-08-01 11:16:42 -07:00
Nick Briggs
4a9f5500c4 struct buf is missing definition for byte-swapped bigvm case (#477)
While there was a definition for the pre-bigvm case, with 24-bit
pointers, for byteswapped (little-endian) systems, there was no
structure definition for the bigvm case, with 28-bit pointers.
2023-07-24 20:43:25 -07:00
Frank Halasz
44a4a4c42c Add cygwin-sdl build to buildRelease workflow (#476)
* Start cygwin-sdl builds: first pass at buildCygwinBuilderImage workflow.  Add makefile-cygwin.x86_64-sdl.

* WIP Dockerfile_cygwin_builder

* First pass of complete cygwin-sdl build workflow

* Fix indent error in buildCygwinBuilderImage.yml

* fix incorrect use of github token in buildCygwinBuilderImage.yml

* fix incorrect use of --build-arg in buildCygwinBuilderImage.

* fix incorrect docker build statement in buildCygwinBuilderImage.

* make docker tag lowercase since apparently Wiondows docker doesn't like uppercase tags in buildCygwinBuilderImage.

* fix quotiing on last commit in buildCygwinBuilderImage.

* fix download output location for SDL2 in buildCygwinBuilderImage.

* Add windows/cygwin build to buildRelease workflow

* Fix typos in buildRelease workflow

* Fix more typos in buildRelease workflow

* Debugging per-system if statements buildRelease workflow

* Debugging per-system if statements buildRelease workflow #2

* Debugging per-system if statements buildRelease workflow #3

* Fix checkout actions step to use powershell-sims not bash-isms in Windows job

* Fix Docker_env step to use powershell-isms not bash-isms in Windows job

* Fix Docker_env step to use powershell-isms not bash-isms in Windows job #2

* Fix Docker_env step to use powershell-isms not bash-isms in Windows job #3

* Revamp cygwin build to use docker build instead of docker buildxx because buildx seems to not like windows containers

* Fix some line split nonsense

* Fix typo in last commit

* Add proper repo info to Dockerfile_cygwin_maiko

* More debugging

* Revamp how cygwin-sdl is built - now build directly on runner and not via a Dcokerfile and docker.

* Fix typo

* Fix retrieve of sdl2

* Fix set up release tag action to ake account of the fact that Maiko has been checked out to cygwin\maiko instead of top level workspace

* Fix set up release tag action to ake account of the fact that Maiko has been checked out to cygwin\maiko instead of top level workspace #2

* Fix set up release tag action to ake account of the fact that Maiko has been checked out to cygwin\maiko instead of top level workspace #3

* Cleanup build maiko step

* Prevent git from messing uo line endings on checkout

* Fix copy of cygwin.x86_64 dir to relesase tars

* Set execute bit of (almost) all files in release tar; rearrange build step to use cyugwin bash as the shell

* Fix rearrange build step to use cyugwin bash as the shell

* Try a different way of rearrange build step to use cyugwin bash as the shell

* Fix typo

* When cygwin bash as shell did not work; reverting to brute-force way

* Hopefully fix release push not getting tar file

* Cygwin-sdl build working; remove debugging code

* Remove wrokflow files associated with abandoned attempts at building cygwin via docker

---------

Co-authored-by: Frank Halasz <fghalasz@interlisp.org>
2023-06-18 11:48:39 -07:00
Frank Halasz
2b24184293 Merge pull request #475 from Interlisp/fgh_intro_cygwin_builder_workflow
Introduce buildCygwinBuilderImage.yml into master so I can test on dev branch

Trivial add so I can continue testing on a dev branch - so immediate merge.
2023-06-11 18:26:05 -07:00
Frank G Halasz
c4f8ccc928 Introduce buildCygwinBuilderImage.yml into master so I can test on dev branch 2023-06-11 18:22:47 -07:00
Frank Halasz
0ab92f5e65 Merge pull request #473 from Interlisp/fgh_efficent-linux-builds
Github workflow: increase efficiency of Linux builds (slightly)
2023-06-11 13:37:57 -07:00
Frank Halasz
501fb8e87a Fixing various typos 2023-06-08 12:06:13 -07:00
Frank Halasz
da7025ff02 Update MacOS build to use cmake instead of makeright 2023-06-07 23:24:39 -07:00
Frank Halasz
b6328a234d Fix typo and cleanup trailing whitespaces in buildRelease.yml 2023-06-07 23:21:11 -07:00
Frank Halasz
74d6728fba Results of debugging new linux workflows 2023-06-07 23:18:26 -07:00
Frank Halasz
59f2f2e835 Updated maiko build workflows to be mch more efficient incl. sing Apline Lnux to do the builds; also removed the Maiko docker image since it no longer makes sense 2023-06-07 23:18:05 -07:00
Frank Halasz
8563c8700d Merge pull request #472 from Interlisp/fgh_introduce-build-release-workflow
First step in renaming workflow buildReleaseInclDocker to just buildRelease
2023-06-07 23:03:29 -07:00
Frank Halasz
aa019bdce2 First step in renaming workflow buildReleaseInclDocker to just buildRelease. This commit allows us to test changes to buildRelease workflow on a branch before making the name change permanent. 2023-06-07 23:01:12 -07:00
Frank Halasz
d1f4653b95 Merge pull request #470 from Interlisp/fgh_darwin_cross-compile_redux
Workflow updates for Darwin: add SDL to release builds; enable cross-compile in makefiles; add cross-compile & universal executables to release builds ...
2023-06-07 22:15:11 -07:00
Frank Halasz
90899d01fd Remove debugging code 2023-06-07 22:06:05 -07:00
Frank Halasz
83cc2d2f36 Debugging cmake build #6 2023-06-07 18:02:31 -07:00
Frank Halasz
a6c38a04f4 Debugging cmake build #6 2023-06-07 17:45:10 -07:00
Frank Halasz
b7bcbc1a85 Debugging cmake build #6 2023-06-07 17:28:47 -07:00
Frank Halasz
ab2ddce621 Debugging cmake build #6 2023-06-07 17:14:36 -07:00
Frank Halasz
9e6611a47b Debugging cmake build #6 2023-06-07 17:11:05 -07:00
Frank Halasz
efaa97aa5f Debugging cmake build #6 2023-06-07 16:43:23 -07:00
Frank Halasz
2a3aaa6704 Debugging cmake build #6 2023-06-07 16:30:47 -07:00
Nick Briggs
408559b0d8 Add lisp keynames to document the SDL key map table (#471)
Adding the lisp keynames and reformatting the keymap table to be
one line per Lisp key bit makes it easier to see what is going on.
2023-06-07 16:12:32 -07:00
Frank Halasz
72850faf96 Debugging cmake build #6 2023-06-07 13:58:13 -07:00
Frank Halasz
79f3149c4e Debugging cmake build #4 2023-06-07 13:55:33 -07:00
Frank Halasz
985966925e Debugging cmake build #4 2023-06-07 13:40:28 -07:00
Frank Halasz
0cffe64c90 Debugging cmake build #3 2023-06-07 00:18:47 -07:00
Frank Halasz
9742a0fad9 Debugging cmake build #2 2023-06-06 23:49:40 -07:00
Frank Halasz
3f2db4883b Debugging cmake build 2023-06-06 23:46:11 -07:00
Frank Halasz
b91fdfe40b Changing MacOS build for lde, ldex, ldesdl to use cmake rather than makeright to make sure that lde can use both ldex and ldesdl 2023-06-06 22:59:43 -07:00
Frank Halasz
02b15a0cb0 Try sudo ditto for copy of SDL2.framework 2023-06-06 12:46:39 -07:00
Frank Halasz
c7c25e7c4d Change cp to ditto for copy of SDL2.framework 2023-06-06 12:28:46 -07:00
Frank Halasz
1b52f9fa44 Fix copy of SDL2.framework 2023-06-06 12:01:15 -07:00
Frank Halasz
f6f6653de0 Add GH_TOKEN to gh download release of SDL2 for MacOS 2023-06-05 23:23:18 -07:00
Frank Halasz
c49fa46c70 Change way we download Darwin SDL framework since brew places things in wrong place 2023-06-05 23:13:48 -07:00
Frank Halasz
7b42a5b51e Update makefile-darwin*-sdl for cross compiling. Update buildRelease workflow to handle compiling Darwin/SDL versions 2023-06-05 18:21:48 -07:00
Frank Halasz
29078cbb2c Updating actions versions as per move from node 12 to node 16; update set-output to be >> as per set-output being deprecated. 2023-06-05 17:12:01 -07:00
Frank Halasz
10093bad15 Fixing LDEARCH in buildRelease....yml 2023-06-05 17:12:01 -07:00
Frank Halasz
6f71e2b197 Return makeright to original and use LDEARCH env variable instaed; update darwin makefielsd with --target param; update buildReleaseInclDocker workflow to build both x86_64 and aarch64 binaries as well as universal binaries. 2023-06-05 17:12:01 -07:00
Frank Halasz
6d575a8f22 Updating darwin makefile-inits for cross-compilation 2023-06-05 17:12:01 -07:00
Frank Halasz
e074699beb Add extra arg to makeright to allow choice of arm64 or x64 on Darwin (MacOS) platform. Enables cross-compiles bertween x64 and arm64 Macs. 2023-06-05 17:12:01 -07:00
Nick Briggs
2e893a75ab Merge pull request #467 from Interlisp/sdl
Bring SDL into master branch
2023-05-31 14:44:04 -07:00
Nick Briggs
1f1e8753ef Merge pull request #468 from Interlisp/ctrl-shift-esc
Add ctrl-shift-esc as a synonym for ctrl-shift-delete (user interrupt)
2023-05-31 14:41:10 -07:00
Nick Briggs
4754ec73eb Add ctrl-shift-esc as a synonym for ctrl-shift-delete (user interrupt)
On a Mac laptop (without a full keyboard) it isn't easy to generate
the delete in the ctrl-shift-delete user interrupt.  The esc key is
in the same word and can easily be generated, so add ctrl-shift-esc
as an alternative.
2023-05-30 17:19:14 -07:00
Nick Briggs
a6d645ce9b SunOS bug avoidances should only execute when on SunOS 2023-05-16 21:18:15 -07:00
Nick Briggs
e8daed41ea UNIX-GETPARM(DISPLAY) should return "SDL" for SDL-based display, as it returns "X" for X11 2023-05-16 18:52:23 -07:00
Nick Briggs
41ae0162da Construct path for invoking display executable to match original path of lde
The pathname for the display program is constructed to parallel the
path for "lde", which makes it more likely that the correct display
program will get run rather than
  (a) not being found because "lde" wasn't found from the PATH, or
  (b) a different version of the display program which was found from the PATH
2023-05-07 15:10:01 -07:00
Nick Briggs
b265d3a917 Reorganize CMakeLists.txt to put display option selections together. 2023-05-06 13:36:00 -07:00
Nick Briggs
90c6c9a088 Merge pull request #466 from Interlisp/retire-katana
Remove "katana" from maiko files
2023-05-05 15:56:48 -07:00
Nick Briggs
3223ef2839 Remove now unnecessary hdw_conf.h and all references in makefile fragments and CMakeLists.txt 2023-05-05 14:02:30 -07:00
Nick Briggs
9cc7d9e13c Remove references to KATANA and replace with MAIKO
No functional difference. Replaces a few leftover references to a prior
project name for the C implementation of the Lisp Virtual Machine with the
current name.
2023-05-05 13:37:25 -07:00
Nick Briggs
45494170a3 Use SDL defined symbolic constants for mouse button events 2023-05-04 18:47:34 -07:00
Nick Briggs
a511feff39 Resolve some warnings noted by clang-tidy
Remove unused #include "miscstat.h"
Make parameters of cursor_equal_p both const
Remove unnecessary extern declarations for EmKbdAd068K, EmRealUtilin68K, MiscStats
2023-05-04 18:11:56 -07:00
Nick Briggs
42278285d3 Update .gitignore to ignore CLion related build directories 2023-05-04 12:59:18 -07:00
Nick Briggs
d14d6183da Comment out debug printf for mousewheel(trackpad) handling. 2023-05-04 12:51:29 -07:00
Nick Briggs
6ce6aa25e1 Make X11 default display method for CMake builds when SDL branch merged 2023-05-04 12:40:21 -07:00
Nick Briggs
68d63cc080 CMake warning: CMAKE_MINIMUM_REQUIRED must preceed PROJECT 2023-05-03 12:49:31 -07:00
Nick Briggs
44b2412fd6 Merge pull request #465 from Interlisp/warning-reductions-clang15-part2
Warning reductions clang15 part2
2023-05-01 15:35:01 -07:00
Nick Briggs
087c7a053a Compiling with -DDTDDEBUG requires including testtooldefs.h in gcrcell.c 2023-04-20 18:19:04 -07:00
Nick Briggs
222a9594d5 Speed up initial sysout loading by avoiding unnecessary lseek() calls. (#461)
On slower filesystems/disks, an lseek() operation can consume
noticeable time. During initial sysout loading we can avoid an
unnecessary lseek() before each read() by tracking if the position it
will seek to is the same position that the previous read() left us.
2023-03-19 16:32:00 -07:00
Nick Briggs
525b9c94d8 Add "clean" as synonym for "cleanup" in ./makeright <display> cleanup (#463)
There is no reason for the constructed makefile not to recognize "clean"
as well as the original "cleanup" as target to remove the object files
and executables.
2023-03-17 22:45:40 -07:00
Nick Briggs
7c322f41c4 Include for missing definition for MAXNAMLEN on Solaris (#462)
The fix to allow compiling for Alpine Linux caused breakage on Solaris
because MAXNAMLEN is defined in <dirent.h> which was now NOT included.
Pending a conversion to POSIX NAME_MAX, include <dirent.h> in "locfile.h".
2023-03-16 18:30:03 -07:00
Nick Briggs
6b69e0105f int => LispPTR for dtd_nextpage. 2023-03-10 15:24:24 -08:00
Nick Briggs
0bd29ae643 Remove extraneous extern declarations. Convert some int to LispPTR as appropriate. 2023-03-10 15:23:25 -08:00
Nick Briggs
f16b01167e Remove LHS casts in old color code. Add void return types where needed. Add includes. 2023-03-10 15:20:08 -08:00
Nick Briggs
92df6316dc Use do {} while (0) pattern for FPCLEAR when it is a no-op 2023-03-09 18:48:35 -08:00
Nick Briggs
662fe9550c Update default X11 window title (#460) 2023-03-07 14:30:05 -08:00
Frank Halasz
00d306d72f Maiko code changes needed to compile on Alpine Linux with clang. (#456)
* Changes needed to compile maiko on Alpine Linux with clang.  Switching to Alpine on github actions to streamline maiko release builds

* Changes needed to compile maiko on Alpine Linux with clang.

Switching to Alpine on github actions to streamline maiko release builds.

  * ether_nethub.c missing a couple of includes, and incorrectly including
    <sys/poll.h> instead of plain <poll.h>
  * <dirent.h> does not define MAXNAMLEN on Alpine Linux, but "locfile.h"
    compensates for this already, if it is modified to include <limits.h>,
    so use this in "dirdefs.h".

---------

Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2023-03-07 12:12:55 -08:00
Nick Briggs
a8ded8a5f6 Correct syntax error, missing semicolon (#459)
* Correct syntax error, missing semicolon

* Use appropriate datatype for dlpi buffer.  DLPI_CHUNKSIZE is already defined as 4*DLPI_MAXDLBUF.
2023-02-27 17:33:04 -08:00
Nick Briggs
88cde175fc Remove duplicate include version.h (loopsops.c, subr.c, z2.c) 2023-02-26 12:08:25 -08:00
Nick Briggs
d19aec2fbf Remove duplicate include version.h in xbbt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
8e40ae8811 Remove duplicate include version.h in xlspwin.c 2023-02-26 12:04:47 -08:00
Nick Briggs
7c81d1fa08 Remove duplicate include version.h in xrdopt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
ac14ce0e40 Collapse conditionals with identical consequents 2023-02-26 12:04:47 -08:00
Nick Briggs
3745c08f51 Remove unused include files from asmbbt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
5bd9de5e36 Suppress empty-statement warning for XLOCK/XUNLOCK macro when not doing locking 2023-02-26 12:04:47 -08:00
Nick Briggs
d4cccd7878 Simplify awkward if-test expression 2023-02-26 12:04:47 -08:00
Nick Briggs
3e1130909c Simplify awkward if-test expression 2023-02-26 12:04:47 -08:00
Nick Briggs
b3d27cdece Clean up formatting of table in NEWCDRCODING.md 2023-02-26 12:04:47 -08:00
Nick Briggs
55b45aa2aa Replace grammatically incorrect comments in rplaca/rplacd 2023-02-26 12:04:47 -08:00
Nick Briggs
2b5a34ebe9 Correct parameter declarations for N_OP_cons (int => LispPTR) 2023-02-26 12:04:47 -08:00
Nick Briggs
e94d0f1cff Correct capitalization of macOS in README.md 2023-02-26 12:04:47 -08:00
Bruce Mitchener
97bf4961ba Remove unused struct lbits / LBITS. (#458) 2023-02-26 11:31:44 -08:00
Frank Halasz
38147abef9 Merge pull request #455 from Interlisp/fgh_buildBuilder
Add a workflow to build a Docker image with all tools to build Maiko for Linux
2023-02-22 14:03:02 -08:00
Frank Halasz
fcdc180254 First-pass buildBuilderImage.yml 2023-02-22 12:29:49 -08:00
Frank Halasz
f36cc29af2 Adding new workflow to build builder image 2023-02-22 12:29:49 -08:00
Nick Briggs
2474619e83 Cleanup errors introduced resolving rebase conflicts. 2023-02-19 10:43:55 -08:00
Nick Briggs
11c7df5813 Note display subsystem configuration in CMake output. 2023-02-19 10:12:05 -08:00
Nick Briggs
d63b933dc8 Clean up various aspects of ldeboot.c (lde)
Handle compilation with both SDL and XWINDOW defines
   If both are defined then the -d/-display will accept
   SDL as a display name and invoke ldesdl rather than ldex.

Improve error messages when display can't be opened

Use exit status 1 for all failures (vs. mixed 1, -1)
2023-02-19 10:11:53 -08:00
Nick Briggs
7d8a7a6668 Clean up SDL infrastructure, add makefiles for more system/cpu combinations
Rationalize the SDL.h include file references so that they work on all systems

Use the correct macOS Framework options to get include path and library search path

Add makefile fragments for SDL on macOS on Apple Silicon, plus FreeBSD and Linux
on same cpus as X11

Switch to gcc rather than clang as the default compiler for Linux systems
2023-02-19 10:07:28 -08:00
Nick Briggs
4ae1987c33 Teach makeright to compile for SDL display on MacOS on x86_64 CPU 2023-02-19 10:07:28 -08:00
Nick Briggs
8c490df964 Instruct git to ignore SDL object directories for x86_64 builds 2023-02-19 10:07:28 -08:00
Nick Briggs
2bc704c5e3 Minor cleanups after rebase onto master
Fix merge edit mistake in CMakeLists.txt
Add missing includes in draw.c, keyevent.c
2023-02-19 10:07:28 -08:00
Nick Briggs
a3c462d211 Rename sdl_bitblt_to_texture2 to sdl_bitblt_to_texture_exact to be more descriptive 2023-02-19 10:07:28 -08:00
Nick Briggs
376b045c33 Use SDL_LowerBlitScaled() rather than SDL_BlitScaled() 2023-02-19 10:07:28 -08:00
Nick Briggs
7048f7dd8d Handle pixel scaling when creating the cursors 2023-02-19 10:07:28 -08:00
Nick Briggs
a5923f42f9 Clean up cursor code
Use the Lisp type DLword where referring to data stored by Lisp
Access the extern EmCursorBitMap68K directly where appropriate.
Use GETBYTE() macro to correct for endian-ness of host system
when accessing the cursor bitmaps.
Cached cursors can use an ordering strategy that only promotes the
found item if it is third or later in the list since in normal
operation Medley is highly likely to flip back-and-forth between
two cursors.
2023-02-19 10:07:28 -08:00
Nick Briggs
355e6dfb51 Reformat to standard with clang-format 2023-02-19 10:07:28 -08:00
Nick Briggs
b166d36ec4 Cleanup, strip some debug/performance code in display update, minor formatting 2023-02-19 10:07:28 -08:00
Nick Briggs
878168f4f5 Implement bitblt to texture at bit level rather than word level, some cleanup
sdl_bitblt_to_texture2 is an experiment, parallel to sdl_bitblt_to_texture
that only moves as many bits as are required, rather than rounding down(up) to the
nearest (16-bit) word boundary for the start(end) of the line.

Introduces some name changes to make things a little clearer.
2023-02-19 10:07:28 -08:00
Nick Briggs
78bcb188a8 Take pixelscale into account when repositioning cursor 2023-02-19 10:07:28 -08:00
Nick Briggs
d2700aa637 Some systems require C99 extensions to get sigset utilities. 2023-02-19 10:07:28 -08:00
Nick Briggs
0600a034b6 Speedups in texture based display path
Instead of checking "do_invert" at each pixel assignment, assign the
foreground and background colors appropriately when responding to the
(VIDEOCOLOR x) call.

Modify sdl_bitblt_to_texture() so that it does less arithmetic in the inner loop,
including using a table of masks rather than computing 1<<n on each pixel.
Modify sdl_bitblt_to_texture() so that it accesses the Lisp display region
16-bits at a time with the correct ordering for whether we are on a byte-swapped
system or not.
2023-02-19 10:07:28 -08:00
Nick Briggs
ca7f09bb6d Minor changes to add missing file for SDL and set no extensions for C compiler
Sets CMAKE_C_EXTENSIONS to OFF as we wish to use c99 *not* gnu99
Adds inc/sdldefs.h to SDL header files list
2023-02-19 10:07:28 -08:00
Nick Briggs
16e4062b8f When updating the window surface directly, at scale 1, avoid the intermediate buffer
Adds an sdl_blt_to_window_surface() that goes directly from the Lisp bitmap
to the window surface avoiding the intermediate copy.  This is only coded for a
scale factor of 1.  Uses the intermediate buffer if the scale is not 1.

Corrects an error where the damage rectangle was not properly reset.
2023-02-19 10:07:28 -08:00
Nick Briggs
4104219ee5 Avoid intermediate buffer and bitblt Lisp screen changes directly into the texture pixels
Using SDL_LockTexture/SDL_UnlockTexture we can gain more direct access to the pixels of the
texture and update them directly from the Lisp screen bitmap.

At the same time, for both the rendering case and the display surface case,
update the pixel format used to be either the first (presumably preferred?)
format for a texture, or the surface format of the window.

Use the SDL routines to pick out the pixel value for Black and White based on the
destination it will be placed in.
2023-02-19 10:07:28 -08:00
Nick Briggs
74da70d0b4 Introduce alternative method for updating window from Lisp bitmap
If the preprocessor symbol SDLRENDERING is defined the code operates as
it previously did.  In the absence of that, we process the Lisp bitmap
into an intermediate form (as before) but then use SDL bitblt to
redraw the intermediate form on the window's surface.
2023-02-19 10:07:28 -08:00
Nick Briggs
2b957aa8f3 Move display update into separate procedure 2023-02-19 10:07:28 -08:00
Nick Briggs
e5b8248465 Width, but not height, must be multiple of 32 2023-02-19 10:07:28 -08:00
Nick Briggs
fab10fc71f Bounds check indexing into intermediate screen buffer
When building with -DCMAKE_BUILD_TYPE=Debug, we assert() that the
index into the intermediate screen buffer is in bounds.
2023-02-19 10:07:28 -08:00
Nick Briggs
a2f8f23152 Keep damage notification boundaries within the current screen
On startup, bitblt calls may be made for the original screen size
and if the new screen size is smaller than that, we must ensure
that damage notifications are contained within the new screen.

Move definition of min() so we can use it in sdl_notify_damage()
2023-02-19 10:07:28 -08:00
Peter
0e731ce02d Cache cursors for SDL. 2023-02-19 10:07:28 -08:00
Peter
0ed7719343 Change Pixelformat to 332 (one byte) instead of 8888 (four bytes). 2023-02-19 10:07:28 -08:00
Nick Briggs
64e0419af3 Fix "error: implicit declaration of function" from dspsubrs
Creates an sdldefs.h, declares a few more functions in sdl.c static,
and includes sdldefs.h in dspsubrs.c when necessary.
2023-02-19 10:07:28 -08:00
Peter
1db44b1f76 Add support for setting the mouse cursor. Not finished!
Currently this just allocates a new X cursor each time, should be
amended to cache the cursor, just like X does at the moment.
2023-02-19 10:07:27 -08:00
Peter
dbba06d9e1 Add support for inverting video and setting mouse position.
Use (IL:VIDEOCOLOR T/NIL) to change inversion.
2023-02-19 10:07:27 -08:00
Peter
cf8ecc1dd4 Add mouse wheel diagnostics. 2023-02-19 10:07:27 -08:00
Peter
380416fa2d Only update texture on damage. 2023-02-19 10:07:27 -08:00
Peter
6f0ca7ad1c Add support for key repeating. 2023-02-19 10:07:27 -08:00
Peter
7573151be8 For now, some more extern functions declarations. 2023-02-19 10:07:27 -08:00
Peter
083d153d43 Maybe fix cmake for SDL2. 2023-02-19 10:07:27 -08:00
Peter
13d367e766 Remove SDL2 directory from include SDL2/SDL.h. 2023-02-19 10:07:27 -08:00
Peter
af6c6e3e1d Fix Caso. 2023-02-19 10:07:27 -08:00
Peter
2f633f2f50 Try to unify cmake file for different versions of SDL2. 2023-02-19 10:07:27 -08:00
Peter
74d47b07ca Try SDL2::SDL2 instead of SDL2 in CMakeLists.txt. 2023-02-19 10:07:27 -08:00
Peter
292e5dd9b2 Try to placate the macos build. 2023-02-19 10:07:27 -08:00
Peter
71d2d0a5b0 Apparently there is no sdl2 cask for macos :-/ 2023-02-19 10:07:27 -08:00
Peter
d046d26003 Add SDL2 dependency to macos build. 2023-02-19 10:07:27 -08:00
Peter
81e17c0955 Show cmake version before building. 2023-02-19 10:07:23 -08:00
Peter
40b24ec655 Try to make builds pass again. 2023-02-19 10:06:26 -08:00
Peter
5e28babfa5 Run apt-get update before trying to install. 2023-02-19 10:06:26 -08:00
Peter
6604b3dd06 Add support for -t / -title. 2023-02-19 10:06:24 -08:00
Peter
0187073ae0 Revert CMakeLists.txt change until better understanding. 2023-02-19 10:05:18 -08:00
Peter
79903e311e Also *correctly* install SDL2 on ubuntu runners. 2023-02-19 10:05:18 -08:00
Peter
e2e6aa5366 Also install SDL2 on ubuntu runners. 2023-02-19 10:05:18 -08:00
Peter
8c34ca3106 Try to get CI running again ;) 2023-02-19 10:05:18 -08:00
Peter
b77f64f31e Add command line parameters -sc WxH and -pixelscale n for SDL. 2023-02-19 10:05:15 -08:00
Peter
8038a959c5 Update CMakeLists.txt for cross-compiling. 2023-02-19 10:03:59 -08:00
Peter
085e99a7c0 Add more #ifdef XWINDOW 2023-02-19 10:03:59 -08:00
Peter
3b6b203e6c Remove extra directory from includes for SDL. 2023-02-19 10:03:59 -08:00
Peter
948db16ed9 Refactor, only bitblt once per "frame". 2023-02-19 10:03:59 -08:00
Peter
ffacda1278 Refactor, don't update texture on every bitblt. 2023-02-19 10:03:59 -08:00
Peter
e39b650f4d Only bitblt on damage.
Also add an alternative for key handling, which does not work any better...
2023-02-19 10:03:55 -08:00
Peter
a722e01a4f Change SDL backend to accelerated renderer, support pixel scaling.
Edit main.c, init_SDL(1600, 1024, 1) means lisp display size 1600x1024, pixel scaling 1.

Try init_SDL(800, 512, 2) or even init_SDL(608, 1023, 3).
2023-02-19 10:02:25 -08:00
Peter
8cf471bec9 Add prototypical SDL support.
Build with cmake. This will create a new backend (ldesdl).
- Resolution can only be set by editing the variables in sdl.c.
- Key repeat does not work.
- Still problems with keysyms that implicitly contain modifiers.
- The entire screen is bitblted onto the SDL display every frame.

Support keyboard, and work on mouse.

Kind of working...

Fix display resolution problems.
2023-02-19 10:00:21 -08:00
Nick Briggs
900c9557ab Fix gcscan1, gcscan2 can miss finding 0th entry in gc hashtable #1038
The Lisp implementation distinguishes between 0 and NIL as the result of
    the gcscan1/gcscan2 opcodes, however the C implementation did not, since
    NIL and 0 are indistinguishable.
2023-02-17 17:01:27 -08:00
Nick Briggs
937a003bfb Correct format specification for printing DLword StackOffset (%tx -> %hx) 2023-02-17 17:01:27 -08:00
Nick Briggs
a958af1627 Resolve warning: variable may be uninitialized when used - initialize more variables. 2023-02-17 17:01:27 -08:00
Nick Briggs
7c270c8b49 Adjust CURRENTFX definition to avoid alignment warning (with cast through (void *)) because the stack is appropriately aligned. 2023-02-17 17:01:27 -08:00
Nick Briggs
f7542df4e7 Remove unused macro IDiff and associated SNum struct definition. 2023-02-17 17:01:27 -08:00
Nick Briggs
53fe052432 Quote words in comments that result in warning: unknown command tag name [-Wdocumentation-unknown-command] 2023-02-17 17:01:27 -08:00
Nick Briggs
18089578f6 Remove incorrect comment refering to non-existant '\KB_setMP' function. 2023-02-17 17:01:27 -08:00
Nick Briggs
2cb51ad326 Silence warnings for incompatible pointer type assignments in stack pointer save/restore defines
CSTKPTR is "LispPTR *" while CurrentStackPTR is "DLword *", cast to "void *" to
  silence the warning, add comment pointing out size difference to explain the
  "- 1" vs "+ 2" adjustments when saving/restoring.
2023-02-17 17:01:27 -08:00
Nick Briggs
98a8d8be49 Add diagnostics for odd-sized stack free blocks and guard blocks, silence alignment upgrade warnings
Creating a free block or guard block on the stack with an odd number of 16-bit words
  will cause the system to break badly.  Always check that and report an error.

  Because the stack pointer is declared as "DLword *" (16-bit) for pointer arithmetic,
  although it is always maintained as a pointer to a 32-bit boundary, the compiler generates
  spurious warnings on casting the stack pointer to structures that require 32-bit alignment.
  Silence those warnings by casting through (void *).
2023-02-17 17:01:27 -08:00
Nick Briggs
4cc267856b Correct types in array header and sequence descriptors to match Lisp datatypes
The "fillpointer" and "totalsize" fields of the array header and the "offst"
   of the sequence descriptor were declared as LispPTR, an unsigned type that
   represents an offset into the Lisp memory, however the Lisp datatype
   declaration indicates that these are FIXP (int32_t) rather than pointers.
2023-02-17 17:01:27 -08:00
Nick Briggs
ff7cf4f139 Use compile-time constant SMALLP_ZERO instead of GetSmallp(0) call 2023-02-17 17:01:27 -08:00
Nick Briggs
a7fba8d4bd Clean up various warnings
Number of items to be sorted (prepare_sort_buf, file_sort) is size_t
  Get consts in correct place arguments for comparison routines dsk_filecmp, unix_filecmp
  Use compile-time constant SMALLP_MINUSONE/SMALLP_ZERO instead of calling GetSmallp()
  ERRSETJMP(-1) should be ERRSETJMP(SMALLP_MINUSONE) as it must return a LispPTR
  Call GetPosSmallp() when argument is unsigned (correct type conversion warning)
2023-02-17 17:01:27 -08:00
Nick Briggs
d5490ed807 Rearrange/resize FINFO and FPROP structures to avoid compiler added padding 2023-02-17 17:01:27 -08:00
Nick Briggs
feb546c639 Correct syntax error (missing semicolon) in OPDISP branch table declaration 2023-02-17 17:01:27 -08:00
Nick Briggs
cdf6024452 Add compile-time constants for SMALLP values 0 and -1 2023-02-17 17:01:27 -08:00
Nick Briggs
96b3bddf12 Resolve warning: arithmetic on a pointer to void is a GNU extension
GCC treats the size of a void as 1 for the purposes of arithmetic on
a pointer to void.  Since this was provoked by an explicit cast to
pointer to void we can replace it with a cast to pointer to char for
the same effect.
2023-02-17 17:01:27 -08:00
Nick Briggs
e5894e5b81 Remove unused variable 'before' in check_dtd_chain() 2023-02-17 17:01:27 -08:00
Nick Briggs
b53b5bd710 Resolve unused-variable warning for DOSLispKeyMap_101
DOSLispKeyMap_101 will not be referenced unless compiling with -DDOS so wrap the
declaration in an #ifdef DOS.
2023-02-17 17:01:27 -08:00
Nick Briggs
39b12b20ba Resolve "warning: cast from 'DLword *' to 'LispPTR *' increases required alignment from 2 to 4"
by casting through (void *) since we know that the CurrentStackPTR is maintained with 4-byte
   aligned pointers.
2023-02-17 17:01:27 -08:00
Nick Briggs
fff86c8050 Resolve warning: implicit conversion changes signedness: 'unsigned int' to 'int' by
making the conversion explicit.  The signedness conversion is necessary and expected.
2023-02-17 17:01:27 -08:00
Nick Briggs
dadb754e56 Resolve "warning: cast from 'DLword *' to 'LispPTR *' increases required alignment from 2 to 4"
by casting through (void *) since we know that the CurrentStackPTR is maintained with 4-byte
   aligned pointers.

Resolve type error for user_subr argument.
2023-02-17 17:01:27 -08:00
Nick Briggs
6fdb54f2c8 Minor cleanup of some casts. 2023-02-17 17:01:27 -08:00
Nick Briggs
336c13369a Add explanation for xxxL macro definitions to xc.c
Define alternative macros for CSTKPTR, PVAR, and IVAR that can be used
in an lvalue context, since CSTKPTR = ...; would generate
error: assignment to cast is illegal, lvalue casts are not supported

A similar issue drives the PCMAC/PCMACL defines, although there it is
that the rvalue is (pccache - 1) and the lvalue is (pccache)
2023-02-17 17:01:27 -08:00
Nick Briggs
b3f97a85c8 Move misplaced 'break' out of 'if' consequent 2023-02-17 17:01:27 -08:00
Nick Briggs
d95b82ac45 Add (LispPTR) cast to VAG2 macro as this would otherwise produce a signed integer 2023-02-17 17:01:27 -08:00
Nick Briggs
ddc09e09ba Avoid type conversion from float to double implied by comparison to double 0.0 constant 2023-02-17 17:01:27 -08:00
Nick Briggs
f51d269b1e Ensure pointers have appropriate type and alignment for data being referenced 2023-02-17 17:01:27 -08:00
Nick Briggs
96fcc9475a Correct parameter type declaration error for N_OP_ubfloat1
Ensure pointers have appropriate alignment for data being referenced
2023-02-17 17:01:27 -08:00
Nick Briggs
c10d339036 Correct various warning: implicit conversion changes signedness (15)
Correct various warning: implicit conversion loses integer precision (30)

Correct parameter type declaration error for  N_OP_aset1()
Ensure that appropriate types and casts are used in aref_switch()
Remove requirement for declaring "int new" when using aset_switch() macro
2023-02-17 17:01:27 -08:00
Nick Briggs
7aca8bf599 Resolve warning: enumeration values not explicitly handled in switch 2023-02-17 17:01:27 -08:00
Nick Briggs
4a61a3fa6b Remove unused/obsolete LispWindowFd references/definition 2023-02-17 17:01:27 -08:00
Nick Briggs
c57ae7666d Resolve warning: no previous extern declaration for non-static variable 2023-02-17 17:01:27 -08:00
Nick Briggs
296ccb3ec9 Resolve warning: variable 'clbp' may be uninitialized when used (it's not, but initialize anyway)
Resolve warning: no previous extern declaration for non-static variable (Current_Hot_X, Current_Hot_Y)
2023-02-17 17:01:27 -08:00
Nick Briggs
dc893dda99 Make local procedures map_code_pointers() and remimplicitkeyhash() static and remove from gccodedefs.h 2023-02-17 17:01:27 -08:00
Nick Briggs
26737f3cbf Resolve warning: no previous extern declaration for non-static variable in gccode.c 2023-02-17 17:01:27 -08:00
Nick Briggs
235246ded3 Resolve warning: no previous extern declaration for non-static variable by making locals static. 2023-02-17 17:01:27 -08:00
Nick Briggs
6603957a0b Move extern declaration for IOINTERRUPTFLAGS_word to lspglob.h and remove from initsout.c
Initialize MaxTypeNumber_word from address of value cell of \MaxTypeNumber in initsout.c
Correctly extract value of \MaxTypeNumber where used in gcmaptable() (though gcmaptable() itself is unused at this time)
Update GetDTD() macro to return (void *), result will be cast to (struct dtd *) where it is needed.  Alignment should always be sufficiently large.
2023-02-17 17:01:27 -08:00
Nick Briggs
6158162b62 Make local variables static to resolve warning: no previous extern declaration for non-static variable 2023-02-17 17:01:27 -08:00
Nick Briggs
13cd97ad41 Resolve warning: no previous extern declaration for non-static variable in ufs.c 2023-02-17 17:01:27 -08:00
Nick Briggs
215d4ff8c7 Make local variables static to resolve warning: no previous extern declaration for non-static variable 2023-02-17 17:01:27 -08:00
Nick Briggs
4b0eea260f Resolve warning: no previous extern declaration for non-static variable.
Declare ether broadcast address constant.
2023-02-17 17:01:27 -08:00
Nick Briggs
97cca299be Remove unused variable and resolve warning: no previous extern declaration for non-static variable in xc.c 2023-02-17 17:01:27 -08:00
Nick Briggs
904f5b4d3d Resolve warning: no previous extern declaration for non-static variable in lineblt8.c 2023-02-17 17:01:27 -08:00
Nick Briggs
2b126bd083 Resolve warning: no previous extern declaration for non-static variable in timer.c
Remove unreferenced extern LispWindowFd
2023-02-17 17:01:27 -08:00
Nick Briggs
ea022aa61c Resolve warning: no previous extern declaration for non-static variable in llcolor.c 2023-02-17 17:01:27 -08:00
Nick Briggs
a06e4c949d Move temporary colormap variables to stack allocated in the only routine in which they are used 2023-02-17 17:01:27 -08:00
Nick Briggs
d84f85c7e0 Remove local variables no longer needed for debugging. 2023-02-17 17:01:27 -08:00
Nick Briggs
526e559c8d Declare module local variables static in loopsops.c 2023-02-17 17:01:27 -08:00
Nick Briggs
cb441fd8e5 Declare local table generic_X_keymap static and constant, and adjust reference to it. 2023-02-17 17:01:27 -08:00
Nick Briggs
f18295480f Resolve warning: no previous extern declaration for non-static variable in initkbd.c 2023-02-17 17:01:27 -08:00
Nick Briggs
9d40ecd77a Update commentary for LispKbdFd, remove unused LispWindowFd extern reference 2023-02-17 17:01:27 -08:00
Nick Briggs
ade2b1461a Correct declared type of LispWindowFd and LispKbdFd 2023-02-17 17:01:27 -08:00
Nick Briggs
ce97f136ec Declare unexported variables static and remove unused debug-related variables. 2023-02-17 17:01:27 -08:00
Nick Briggs
bb1b541014 Add extern declarations for globals defined in xlspwin.c 2023-02-17 17:01:27 -08:00
Nick Briggs
7e2620db20 Remove extraneous forward declaration of contextsw() 2023-02-17 17:01:27 -08:00
Nick Briggs
50f88d9f05 Fix typo in comments, upnt => punt 2023-02-17 17:01:27 -08:00
Nick Briggs
b85e7cac80 Use (void *) casts in adr68k.h functions, after ensuring correct pointer alignment, to eliminate spurious alignment warnings. 2023-02-17 17:01:27 -08:00
Nick Briggs
679b201849 Remove unused #defines 2023-02-17 17:01:27 -08:00
Nick Briggs
7eb3cd0ceb Address alignment warnings for createcell68k()
createcell68k(typecode) returns a pointer that is aligned for the typecode
argument.  Changing the return type to "void *" puts the onus on the caller
to cast the result to an appropriately aligned object.  All current uses
in the maiko source ask for 4-byte objects (TYPE_FIXP, TYPE_FLOATP).
2023-02-17 17:01:27 -08:00
Nick Briggs
9bfeaeb8b4 Resolve warning because URaid_comm string as a target of a sscanf() must have space for a terminating NUL 2023-02-17 17:01:27 -08:00
Nick Briggs
7eb87576f5 cursorlist and cursor fore/background colors are local to module and can be static. 2023-02-17 17:01:27 -08:00
Nick Briggs
4b3997b432 The todo_... variables are not referenced elsewhere and can be static. 2023-02-17 17:01:27 -08:00
Nick Briggs
a536faa736 Reduce missing-variable-declarations, move some atom index extern definitions to lspglob.h. 2023-02-17 17:01:27 -08:00
Nick Briggs
4834f6f2b1 Eliminate various warnings from vmemsave.c/vmemsavedefs.h
* sort_fptovp() and twowords() can be static and are sometimes (depending on flags)
   not needed at all
 * roundup() macro is unused and can be removed
 * maxpages can be unsigned (affects main.c)
 * variables used for return values of system calls should be correctly declared
 * pointers into Lisp_world should be DLword* rather than char*, and
   computations must take that into account.
 * ENOSPC and EDQUOT errors on write should return NOFILESPACE instead of FILECANNOTWRITE error.
2023-02-17 17:01:27 -08:00
Nick Briggs
766de557bb Cleanup warnings from byte swapping routines 2023-02-17 17:01:27 -08:00
Nick Briggs
d98df4f8d3 Remove extra MState macro and replace MState(&MachineState)->x with a direct MachineState.x field access. 2023-02-17 17:01:27 -08:00
Nick Briggs
6b41fcea17 Use PVar macro rather than directly referencing MState->pvar; MState itself is another macro. 2023-02-17 17:01:27 -08:00
Nick Briggs
a17460cd6b Remove unused atom_to_str() function and the warning it generates 2023-02-17 17:01:27 -08:00
Nick Briggs
55939e0bc9 Resolve warning: variable '...' may be uninitialized when used here in new_bitblt_code
Note that one might analyze the order of the variables in the bitblt inner loops and
adjust so that items accessed together are in the same cache-line.
2023-02-17 17:01:27 -08:00
Nick Briggs
960baf9b96 fix signedness issue in N_OP_bind(unused), matching correction made in inlineC.h BIND in 26e67a51 2023-02-17 17:01:27 -08:00
Nick Briggs
5c81ca3f41 Resolve warning: 'DOS' (and 'SUNDISPLAY') is not defined, evaluates to 0; use #ifdef/#if defined(...) 2023-02-17 17:01:27 -08:00
Nick Briggs
38761fbd93 Resolve warning: unreachable-code-break (remove break following return) 2023-02-17 17:01:27 -08:00
Nick Briggs
7b67b3f79f Use in_display_segment(...) macro where possible. 2023-02-17 17:01:27 -08:00
Nick Briggs
a6b8b65b5b Remove extern references for variables already present in lspglob.h, and subsequent extraneous includes for their types 2023-02-17 17:01:27 -08:00
Nick Briggs
11efd15613 Clean up usage of the native address of the MiscStats and its struct typedef
The global variable MiscStats is declared extern in "lspglob.h"
The structure that MiscStats points to is MISCSTATS and is defined in "miscstats.h"
2023-02-17 17:01:27 -08:00
Nick Briggs
b71a8088d3 Uncomment and correct spelling error in use of getrusage() result, ru_outblock => ru_oublock 2023-02-17 17:01:27 -08:00
Nick Briggs
1c6277d313 Clean up usage of the native address of the I/O page and its struct typedef
The global variable holding the native address of the I/O page is spelled "IOPage"
The global variable "IOPage" is declared extern by "lspglob.h"
The structure pointed to by IOPage is named IOPAGE and is defined in "iopage.h"
If there is no direct reference to the IOPAGE struct do not include "iopage.h"
2023-02-17 17:01:27 -08:00
Nick Briggs
602fff2c2f Reformatting, remove whitespace before semi-colon 2023-02-17 17:01:27 -08:00
Nick Briggs
43809d070b Fix a few sign-conversion and shorten-64-to-32 warnings while converting some values from int to unsigned 2023-02-17 17:01:27 -08:00
Nick Briggs
60a9497e7a Remove extraneous extern declarations duplicated from lspglob.h 2023-02-17 17:01:27 -08:00
Nick Briggs
2e6aba0d19 Fix warning for dropping const in cast 2023-02-17 17:01:27 -08:00
Nick Briggs
e1c4263dd8 Remove extraneous extern references for Lisp_world that are covered by lspglob.h 2023-02-17 17:01:27 -08:00
Nick Briggs
871bf5459c Fix a couple of sign-conversion warnings (int to LispPTR) in adr68k.h 2023-02-17 17:01:27 -08:00
Nick Briggs
67d9ee8b07 Fix four each implicit-int-conversion and cast-qual warnings in mkatom.c 2023-02-17 17:01:27 -08:00
Nick Briggs
aa29914b2b rs232c.h does not directly reference Lisp_world and both rs232 implementations include lspglob.h for it 2023-02-17 17:01:27 -08:00
Nick Briggs
2b7228f37e Remove typedefs for function pointers and their uses. Methods which are defined but never used get (void) args until they are implemented. 2023-02-17 17:01:27 -08:00
Nick Briggs
4853f0e3f5 Fix missing prototype adding ttydefs.h, declare tty_baudtosymbol() as static. 2023-02-17 17:01:27 -08:00
Nick Briggs
a1e5e6eecc fix warning: break will never be executed 2023-02-17 17:01:27 -08:00
Nick Briggs
748c52fbaa lispcmp should be declared static 2023-02-17 17:01:27 -08:00
Nick Briggs
6d7b4c1cd2 panicuraid should be declared static 2023-02-17 17:01:27 -08:00
Nick Briggs
80c9c796c5 Address "warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x"
* Update struct DevRec methods to take a "void *" parameter
   since they get called with different xxxInterface records
   depending on whether they are a keyboard, mouse, or display.
   Introduce GenericReturnVoid method implementation for use
   where needed with DevRec methods. (see mouseif.c)

 * Cast functions implementing DevRec methods as appropriate to match
   the method signature.

 * Update struct DspInterfaceRec methods cleardisplay,
   bitblt_to_screen, mouse_invisible, and mouse_visible to declare
   the parameters they require and all return unsigned long results
   (though it's not clear that this is actually the correct type).
   Requires updating dosmouse.c method implementations.

 * Update GenericReturnT and GenericPanic method implementations
   to have the signature required by the method slots they
   are used in.

 * Correct DOS-only section with incorrect arguments to device.exit
   call for the mouse.

 * Use include "dspifdefs.h" for prototypes for GenericReturnXXX method
   implementations.
2023-02-17 17:01:27 -08:00
Nick Briggs
80e40fa942 Fix warning: The left operand of \'==\' is a garbage value 2023-02-17 17:01:27 -08:00
Nick Briggs
38bf60c626 Static analysis suggests (incorrectly) that a reference *srcbase accesses uninitialized memory in grayword.
Correct its misunderstanding by explicitly initializing all elements of grayword[4] to 0.
2023-02-17 17:01:27 -08:00
Nick Briggs
d5acdf7ea4 Static analysis suggests savedS might be used uninitialized (pathlength > 150). It is or-ed into a result, so initialize to 0 2023-02-17 17:01:27 -08:00
Nick Briggs
0ba8380aea Don't reference uninitialized fields in DspInterface when processing window events in no-scroll case.
Initialize variables to suppress "may be uninitialized when used here" warning that couldn't actually happen.
2023-02-17 17:01:27 -08:00
Nick Briggs
8054c62f8a Ensure XImage and XEvent variables are completely initialized 2023-02-17 17:01:27 -08:00
Nick Briggs
ab79048dae fix warning: incompatible function pointer types for file sort functions in dir.c 2023-02-17 17:01:27 -08:00
Nick Briggs
e03782c6b6 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
14c5f9245e fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
c6b7eb7fd7 Fix incorrect prototype 2023-02-17 17:01:27 -08:00
Nick Briggs
3ccc28d16a fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
51cae2af8d fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
f0f33fe587 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
9ab1215fc8 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
a3ba41fba2 fix warning: a function declaration without a prototype is deprecated in all versions of C
make savestr() static and remove it from dlpidefs.h since it is not used outside of dlpi.c
2023-02-17 17:01:27 -08:00
Nick Briggs
39a716ace8 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
bae09d8eba fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
6838c701cc fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
2175364380 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
202db168a9 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
4a82b6c549 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
76cb36993c fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
89a2b73d33 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
523368a710 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
bee3d3334a fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
5f98006d38 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
093b4526ad fix warning: a function declaration without a prototype is deprecated in all versions of C
remove extraneous declaration of dispatch() (now covered by xcdefs.h)
2023-02-17 17:01:27 -08:00
Nick Briggs
f9e8f7ed85 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
d7ab75b1a7 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
d7c294bc0d fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
1cfa67c515 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
434067770a fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
072a493d56 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
b812513696 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
5ee8f49002 fix warning: a function declaration without a prototype is deprecated in all versions of C 2023-02-17 17:01:27 -08:00
Nick Briggs
81d459be16 Substitute include <errno.h> for extern int errno. 2023-02-17 17:01:27 -08:00
Nick Briggs
f7c67a6317 Correct mismatch between Init_XCursor prototype and definition. 2023-02-17 17:01:27 -08:00
Nick Briggs
36355c12fb Add missing include etherdefs.h to ether_common.c 2023-02-17 17:01:27 -08:00
Nick Briggs
47ac0eacc5 Correct prototype/definition misuse of () for (void) on various functions. 2023-02-17 17:01:27 -08:00
Nick Briggs
36a7422ebc Correct malformed connectToHub prototype and definition 2023-02-17 17:01:27 -08:00
Nick Briggs
1dd86ed48c Correct mismatch between DoRing prototype and definition 2023-02-17 17:01:27 -08:00
Nick Briggs
a10bd9b1c3 Remove set but not used variables DisplayMask and LispMask 2023-02-17 17:01:27 -08:00
Nick Briggs
2c83acee31 Add extern for globally defined currentdsp (pointer), add static to curdsp (storage). 2023-02-17 17:01:27 -08:00
Nick Briggs
aa177fa40a Make typedefs for struct xxxRec/xxx clearer. 2023-02-17 17:01:27 -08:00
Nick Briggs
60e13a774d Net reduction of about 150 warnings when compiling with clang 15.0.6
devif.h, mnxdefs.h:
Update MRegion to reflect that width/height are unsigned.
Update ...EventMask fields in XWINDOW section of DspInterfaceRec to match parameter
   type used in XSelectInput() to which they are passed.
Add padding to explicitly align colors field (short among longs)

xbitmaps.h:
Reorder fields in LISP_CURSOR struct to avoid requiring padding for alignment
   constraints, and adjust initialization to match.
Declare cursors static const.
Move Lisp_Icon from xbitmaps.h to xmkicon.c

xinit.c, xinitdefs.h
Replace bound() (xwinmandefs.h) with static inline unsigned ubound() in xinit.c
Change signature of X_init() to use unsigned values for width, height, depth.
Add casts where necessary to avoid implicit signedness conversions.
Add extern declarations for all globals defined in xinit.c

xwinman.c, xwinmandefs.h
Remove bound() from xwinmandefs.h and use static inline unsigned ubound() in xwinman.c
Change signature of lisp_Xconfigure() to use unsigned width and height parameters.
Make GravSize unsigned to match its usage context.
Add casts where necessary to avoid implicit signedness conversions.
Add missing break to correct switch case fall-through warning.

dspif.c
Change LispDisplayRequestedWidth/Height to unsigned to reflect context of use.

xlspwin.c
Eliminate declaration for unused XEvent report.
Move global variable gcv, used only locally, to local variable in the procedures where needed.
Change various variables used in width/height calculation to unsigned to match usage context.
Add casts where necessary to avoid implicit signedness conversions.

xmkicon.c
Move Lisp_Icon from xbitmaps.h to xmkicon.c.
Move global XImage IconImage to local in function where it is required.
Add cast where necessary to avoid implicit signedness conversions.

xrdopt.c
Remove incorrect casts for signedness causing implicit sign conversion warnings.
Add extern declarations for all globals defined in xrdopt.c

xscroll.c
Replace bound() (xwinmandefs.h) with static inline signed sbound() in xscroll.c

initdsp.c, initdspdefs.h
Change signedness of various display variables from int to unsigned.
Change signature of init_display2() to unsigned display_max.
Add extern declarations for some globals defined in initdsp.c

xbbt.c
Add explicit casts for type warnings from MRegion width/height change.
Add explicit casts for type warnings in arguments to XPutImage().
2023-02-17 17:01:27 -08:00
Frank Halasz
e122d894f9 Merge pull request #452 from Interlisp/update-github-checkout-version
Update github workflows from actions/checkout@v2 to actions/checkout@v3
2023-02-15 16:15:51 -08:00
Nick Briggs
a83cb5ad64 Update github workflows from actions/checkout@v2 to actions/checkout@v3 2023-02-15 14:01:05 -08:00
Larry Masinter
74361cb5a1 fix README.md: need libx11-dev, not x11dev (#451) 2023-02-09 16:21:13 -08:00
Nick Briggs
098aa9b2af Update github runners os matrix to add macos-12 and replace now deprecated ubuntu-18.04 with ubuntu-20.04 (#449) 2022-12-07 16:15:44 -08:00
Nick Briggs
d3e8df5b1c Rework Nethub ether interface (#448)
* The transport between the Maiko client and Nethub server is TCP based and therefore data is buffered by the kernel so it is not necessary to have an additional layer of buffering to capture multiple logical packets before passing them to the Lisp ethernet interrupt handler.

  * Receive packet directly into Lisp’s buffer and byte-swap in place only if necessary.

  * Ethernet packet handling is no longer done directly in the signal handler so it is not necessary to block/unblock signals while a packet is being read from the byte stream in ether_get().

  * Remove references to ETHEREventCount as it is unnecessary and the implementation (xc.c; other ethernet handlers) that attempted to use it to handle missed ethernet interrupts is incorrect, resulting in calls to the Lisp interrupt handler with no new packet data.

  * Style changes - Use early return rather than nesting if statements.  Move variable declarations from inline to beginning of function if they are not local to a small block. Use %p format specifier for printing pointers.
2022-11-09 17:09:32 -08:00
Nick Briggs
6e38d50829 Improve implementation of word_swap_page() and remove unused code (#447)
word_swap_page() should only touch each 32-bit word once to change
  the byte order from ABCD to DCBA rather than twice doing a transform
  of the entire region from ABCD to BADC and then again to DCBA

  The compiler provided ntohl() usually gets favorable optimizations
  applied, so use it for the byte reordering.

  With word_swap_page() rewritten, byte_swap_word() is superfluous.
2022-10-30 15:49:32 -07:00
Nick Briggs
71e2d9f3e0 Fix typo in Dodo network document name 2022-10-11 14:23:59 -07:00
devhawala
82577ce951 Dodo Nethub support (#445)
* added support for XNS networking via Dodo-Nethub

* NetHub connection now optional (only if -nh-host is given); released NetHub-related changes to 'ether.c' to the public domain

* Added file using-dodo-networking-with-maiko.md

Documentation for building and using the Dodo-networking addition to Maiko

* Added support for running Maiko unter cygwin/x86_64-x

* Migrate Addr68k/NativeAlignment{2,4} in Nethub code, move timer/async defines to platform.h

* added missing include <netinet/in.h> for FreeBSD

* updated 'compile-flags' with added flags

* splitted ether.c in 3 (_common, _sunos, _nethub)

* reworks/modifications for nbriggs' pull-request review comments

* addintional additions for nbriggs' pull-request review comments

* get the Lisp packet lengths with 'LispInt2CInt'

* renamed variables in dblwordsSwap to indicate it's about double-words

* fixed wrong preprocessor directive unnoticed by clang

* added networking choice option to cmake build, fix to printf warning

- for cmake specify the networking to use with -DMAIKO_NETWORK_TYPE=<type>
- with <type> one of: NONE, SUN_DLPI, SUN_NIT, NETHUB
- e.g.: cmake .. -DMAIKO_NETWORK_TYPE=NETHUB

* integrated improvement to sendPacket() proposed by nbriggs

* integrated fix for SIGBUS on 32-bit big-endian, provided by nbriggs

* MAIKO_ENABLE_ETHERNET should not be unconditionally set on Solaris systems

* Receiving an ethernet packet is an ether interrupt but not an i/o interrupt.

Co-authored-by: dev hawala <devhawala@x.y>
Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2022-10-11 14:21:55 -07:00
Nick Briggs
2509a796ce Correct async I/O setup to work for Solaris (#446)
Solaris does not define O_ASYNC, but does define FASYNC and FNDELAY,
which it expects to be used in place of O_ASYNC in an fcntl() to set up
asynchronous I/O on a socket.

This fix also generates a compiler warning if neither the O_ASYNC nor
FASYNC/FNDELAY methods are available.
2022-10-10 09:17:39 -07:00
Nick Briggs
cdffa541ef Remove extra semicolons, convert #define x() {...} to do {...} while (0) style (#444)
* Remove extra semicolons, convert #define x() {...} to do {...} while (0) style

* Fix missing brace in INIT-specific definition of init_kbd_startup
2022-10-05 09:07:17 -07:00
Nick Briggs
f5b17b0e63 Merge pull request #443 from Interlisp/cast-align
Replace Addr68k and stack offset related macros with NativeAligned inline functions
2022-09-29 13:01:32 -07:00
Nick Briggs
c2070d9892 Remove definitions of Addr68k/StkOffset macros which have been replaced by inline functions. 2022-09-28 15:21:50 -07:00
Nick Briggs
344351acba Replace StkOffset related macros with StackOffset inline functions 2022-09-28 15:17:53 -07:00
Nick Briggs
fcc62953d8 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
33ba044dc1 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
387be9d2b6 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
5565c9db8b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
ad9487a89b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
fdef5e6dde Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
ebd7a197f2 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
6a7e018a0c Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
7a28ba5731 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
c4ad41fcb7 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
fda6153d5b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:38 -07:00
Nick Briggs
419ff4a549 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
695f559af8 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
a24f10a995 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
6944c1289b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
b8873485c7 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
1a98f0783e Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
77894f993c Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
83cd45d8dc Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
8b746780cd Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
269e5d8235 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
cc6e8b6986 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
b7b364359b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
e84703c3bd Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
5fbc3d0480 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
97e811e3de Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
f6aa8f1dcd Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
1b90398cfc Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
b758597f96 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
4b603a8a31 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
d6a5e5298a Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
483506234b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:37 -07:00
Nick Briggs
f3592648b6 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
d266f4d987 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
05f49a3556 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
2a42cd8e52 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
dab77421a2 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
5143aa25b0 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
56b6cfaa19 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
3786630f33 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
63bfea5adf Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
c2ee07f609 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
a3b064b2b7 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
bba1dd660f Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
f701bb40ac Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
9941356250 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
e843dfbd76 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
7ea30a40cc Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
a38ae21908 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
f543d56260 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
bf8c1ae277 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:36 -07:00
Nick Briggs
7e819fbb69 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
166d54e938 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
94a41d2a5b Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
2c4ccf54c3 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
903a7f64fc Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
a9dcff6fd6 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
049568b0f8 Replace Addr68k related macros with NativeAligned inline functions 2022-09-01 14:15:35 -07:00
Nick Briggs
d4226c20f2 Replace Addr68k related macros with NativeAligned inline functions
Addr68k_from_LADDR always produced a 2-byte aligned pointer which
  was frequently cast to a type requiring 4-byte alignment.
  This commit changes Addr68k_from_LADDR uses to one of two new
  inline procedures, NativeAligned2FromLAddr or NativeAligned4FromLAddr,
  which produce a result with the appropriate alignment for the context.
  This permits checking for cases where the Lisp address is not
  appropriately aligned for the usage context, and localizes compiler
  warnings to these two procedures.

  Similarly, the Addr68k_from_StkOffset macros are replaced by
  NativeAligned2FromStackOffset and NativeAligned4FromStackOffset.

  NativeAligned4FromLPage replaces Addr68k_from_LPAGE as page address
  will always be at least 4-byte aligned.

  LAddrFromNative, LPageFromNative, and StackOffsetFromNative complete
  the set, replacing LADDR_from_68k, LPAGE_from_68k, and
  StkOffset_from_68K (note K not k) respectively.
2022-09-01 14:11:54 -07:00
Nick Briggs
889adcaa35 Add NativeAligned4FromStackOffset() and LPageFromNative() before using them 2022-09-01 12:53:24 -07:00
Nick Briggs
a448bd0329 Convert from LADDR_from_68k to LAddrFromNative in uraid.c 2022-09-01 12:53:24 -07:00
Nick Briggs
02fa9a6b23 Convert from LADDR_from_68k to LAddrFromNative in ufn.c 2022-09-01 12:53:24 -07:00
Nick Briggs
1790919750 Convert from LADDR_from_68k to LAddrFromNative in ubf1.c 2022-09-01 12:53:24 -07:00
Nick Briggs
5a3729886e Convert from LADDR_from_68k to LAddrFromNative in subr.c 2022-09-01 12:53:24 -07:00
Nick Briggs
9eba057b94 Convert from LADDR_from_68k to LAddrFromNative in storage.c 2022-09-01 12:53:24 -07:00
Nick Briggs
4806d98270 Convert from LADDR_from_68k to LAddrFromNative in rplcons.c 2022-09-01 12:53:24 -07:00
Nick Briggs
1af3803fca Convert from LADDR_from_68k to LAddrFromNative in return.c 2022-09-01 12:53:24 -07:00
Nick Briggs
6c5b8391b7 Convert from LADDR_from_68k to LAddrFromNative in llstk.c 2022-09-01 12:53:24 -07:00
Nick Briggs
09bf2988be Convert from LADDR_from_68k to LAddrFromNative in gcr.c 2022-09-01 12:53:24 -07:00
Nick Briggs
059d750c75 Convert from LADDR_from_68k to LAddrFromNative in gchtfind.c 2022-09-01 12:53:24 -07:00
Nick Briggs
f0079b1e73 Convert from LADDR_from_68k to LAddrFromNative in fvar.c 2022-09-01 12:53:24 -07:00
Nick Briggs
dad4a8cc79 Convert from LADDR_from_68k to LAddrFromNative in fp.c 2022-09-01 12:53:24 -07:00
Nick Briggs
822a03a95b Convert from LADDR_from_68k to LAddrFromNative in dbgtool.c 2022-09-01 12:53:24 -07:00
Nick Briggs
b7ee0eb34f Convert from LADDR_from_68k to LAddrFromNative in conspage.c 2022-09-01 12:53:24 -07:00
Nick Briggs
dbdd7c2dc2 Convert from LADDR_from_68k to LAddrFromNative in car-cdr.c 2022-09-01 12:53:24 -07:00
Nick Briggs
6a4ed88f37 Convert from LADDR_from_68k to LAddrFromNative in allocmds.c 2022-09-01 12:53:24 -07:00
Nick Briggs
9239fb3c29 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned4FromLAddr/LAddrFromNative in xc.c 2022-09-01 12:53:24 -07:00
Nick Briggs
78f0d3c511 Convert from LADDR_from_68k to LAddrFromNative in inlnSPARC.h 2022-09-01 12:53:24 -07:00
Nick Briggs
4dc9429b19 Convert from Addr68k_from_LADDR to NativeAligned4FromLAddr in xinit.c 2022-09-01 12:53:24 -07:00
Nick Briggs
55a7a47598 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned2FromLAddr/LAddrFromNative 2022-09-01 12:53:24 -07:00
Nick Briggs
34fc725758 Convert Addr68k_from_LADDR in rawcolor.c 2022-09-01 12:53:24 -07:00
Nick Briggs
3ee8530dc1 Convert Addr68k_from_LADDR/LADDR_from_68k to NativeAligned4FromLAddr/NativeAligned2FromLAddr/LAddrFromNative in picture.c (unused) 2022-09-01 12:53:24 -07:00
Nick Briggs
49a6891283 Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in inet.c 2022-09-01 12:53:24 -07:00
Nick Briggs
7d760f64cf Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr etc. in foreign.c 2022-09-01 12:53:24 -07:00
Nick Briggs
68137d6251 Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in ejlisp.c (unused) 2022-09-01 12:53:24 -07:00
Nick Briggs
8e34c274c0 Convert from Addr68k_from_LADDR/Addr68k_from_LPAGE to NativeAligned4FromLAddr/NativeAligned4FromLPage in gcrcell.c 2022-09-01 12:53:24 -07:00
Nick Briggs
695828a600 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned4FromLAddr/NativeFromLAddr in gcfinal.c 2022-09-01 12:53:24 -07:00
Nick Briggs
10f53dfb93 Convert from Addr68k_from_LADDR to NativeAligned4FromLAddr in gccode.c 2022-09-01 12:53:24 -07:00
Nick Briggs
584a719f8d Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in gcarray.c 2022-09-01 12:53:23 -07:00
Nick Briggs
be9eb33ca0 Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in chatter.c 2022-09-01 12:53:23 -07:00
Nick Briggs
acc4d387a1 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned2FromLAddr/NativeAligned4FromLAddr/LAddrFromNative in bbtsub.c 2022-09-01 12:53:23 -07:00
Nick Briggs
7965bfe131 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned2FromLAddr/NativeAligned4FromLAddr/LAddrFromNative in loopsops.c 2022-09-01 12:53:23 -07:00
Nick Briggs
d28f05f79d Convert to NativeAligned2FromLAddr, NativeAligned4FromLAddr in main.c 2022-09-01 12:53:23 -07:00
Nick Briggs
ed77b2fb7b Convert to LAddrFromNative, NativeAligned2FromLAddr in return.h 2022-09-01 12:53:23 -07:00
Nick Briggs
7dc889249b Convert from LADDR_from_68k to LAddrFromNative in arith.h 2022-09-01 12:53:23 -07:00
Nick Briggs
ee777103ad Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned4FromLAddr/LAddrFromNative in stack.h 2022-09-01 12:53:23 -07:00
Nick Briggs
76e1503249 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned2FromLAddr/NativeAligned4FromLAddr/LAddrFromNative in testtool.c 2022-09-01 12:53:23 -07:00
Nick Briggs
7377613aab Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in kprint.c 2022-09-01 12:53:23 -07:00
Nick Briggs
5fcd1ced65 Convert from Addr68k_from_LADDR to NativeAligned2FromLAddr/NativeAligned4FromLAddr in initsout.c 2022-09-01 12:53:23 -07:00
Nick Briggs
e6d981632e Convert from Addr68k_from_LADDR to NativeAligned4FromLAddr in timer.c 2022-09-01 12:53:23 -07:00
Nick Briggs
a2c908fc32 Convert from Addr68k_from_LADDR/LADDR_from_68k to NativeAligned... in lisp2c.c 2022-09-01 12:53:23 -07:00
Nick Briggs
9df1ea251a Replace Addr68k_from_LADDR with NativeAligned2FromLAddr/NativeAligned4FromLAddr in bin.c 2022-09-01 12:53:23 -07:00
Nick Briggs
cde0be42f0 Replace Addr68k_from_LADDR by NativeAligned[x]FromLAddr() as appropriate in inlineC.h 2022-09-01 12:53:23 -07:00
Nick Briggs
29f2a78a2f Replace Addr68k_from_LADDR by NativeAligned4FromLAddr 2022-09-01 12:53:23 -07:00
Nick Briggs
61d6cdbcc9 Replace Addr68k_from_LADDR by NativeAligned2FromLAddr/NativeAligned4FromLAddr 2022-09-01 12:53:23 -07:00
Nick Briggs
ead2a6771c Replace Addr68k_from_LADDR by NativeAligned2FromLAddr/NativeAligned4FromLAddr 2022-09-01 12:53:23 -07:00
Nick Briggs
5a3425e426 Use NativeAligned4FromLAddr() to access FIXP cells in arithops.c 2022-09-01 12:53:23 -07:00
Nick Briggs
010329f29d Convert to NativeAligned4FromLAddr/LPage in macros defined in cell.h 2022-09-01 12:53:23 -07:00
Nick Briggs
8a0804831e Once and only once for code in GetXXX68k() and GetXXXnew() macros 2022-09-01 12:53:23 -07:00
Nick Briggs
eae42d1a6d Switch from Addr68k_from_LADDR to NativeAligned4FromLAddr in arith.h 2022-09-01 12:53:23 -07:00
Nick Briggs
ed5e504b06 Resolve ~90 cast-align warnings generated by macros in my.h 2022-09-01 12:53:23 -07:00
Nick Briggs
215a22ea9f Introduce functions to convert between lisp addresses and native pointers
Instead of using a single macro that converts from a lisp pointer to
  a native pointer to a 2-byte aligned item then perhaps casting to objects
  that require 4-byte alignment... use separate functions for 2-byte and
  4-byte aligned pointer results.  The clients should be explicit about
  which alignment they require, and the conversion functions can check
  (perhaps in DEBUG mode) that the resulting pointer is on an appropriate
  boundary.

  This commit defines the functions but does not introduce any uses.
2022-09-01 12:53:23 -07:00
Nick Briggs
5202c71a95 Merge pull request #442 from Interlisp/memory-allocation-via-mmap
Use mmap() in place of posix_memalign() to allocate Lisp memory
2022-09-01 11:18:23 -07:00
Nick Briggs
2b270e6697 Use mmap() in place of posix_memalign() to allocate Lisp memory
posix_memalign() does not guarantee initializing the allocated
  memory to zero, which Lisp expects, so the code must memset() the
  entire allocated region to zero.  The effect of this is (generally) to
  force the allocation of RAM to the process, which is wasteful, since
  we normally start with only 4% of 256 MB in use for a full.sysout.
  Allocating memory with mmap, using MAP_ANON, guarantees that the
  memory is already zeroed (effectively mapping /dev/zero with copy-on-write)
  so it is not necessary to touch it before use.  This keeps the
  pre-allocated RAM to a minimum.
2022-08-31 12:42:39 -07:00
Nick Briggs
59d3446c6a Merge pull request #441 from kuriboshi/fix/mkvdate
Run the 'mkvdate' script relative to CMAKE_CURRENT_SOURCE_DIR
2022-08-29 08:19:57 -07:00
Krister Joas
0c505f9576 Run the 'mkvdate' script relative to CMAKE_CURRENT_SOURCE_DIR
This fixes the limitation that the build directory has to be in the
source tree and can instead be located anywhere.
2022-08-29 18:18:38 +09:00
Nick Briggs
51fffe5827 Merge pull request #440 from Interlisp/warning-cleanup-part1
Start to address warnings from -Weverything
2022-08-18 12:42:56 -07:00
Nick Briggs
d35b964393 Cleanup in eqf.c
Correct procedure declarations since N_OP_xxx function args are all LispPTRs
    Replace my.h defn of IsNumber() with Numberp() defn in lsptypes.h
2022-08-15 16:19:38 -07:00
Nick Briggs
58f6f68c7e Correct procedure declarations since N_OP_xxx function args are all LispPTRs 2022-08-15 16:18:37 -07:00
Nick Briggs
873d4927ce Wholesale removal of deprecated register attribute from all source files 2022-08-15 15:04:07 -07:00
Nick Briggs
5c0349cc69 Remove deprecated register attribute, ensure return types match system call results in chardev.c 2022-08-15 14:50:59 -07:00
Nick Briggs
d509224797 Add explicit cast to byte_swap_word to resolve implicit conversion issue
warning: implicit conversion loses integer precision: 'int' to 'unsigned short'
2022-08-15 14:43:32 -07:00
Nick Briggs
f8f7b2ace9 Clean up types in dsk.c
Remove deprecated register attribute
    Ensure correct type used to store result of system calls
    Use memset to zero buffer vs byte-at-a-time stores
    Use GetPosSmallP where appropriate
2022-08-15 13:44:28 -07:00
Nick Briggs
89c01ad00a Fix pointer vs. unboxed fixp in certain fields in onde_array/general_array 2022-08-15 13:32:08 -07:00
Nick Briggs
3075cc93bb Fix types for smallp manipulation in arith.h
Introduce GetPosSmallp for converting an unsigned value to smallp
    Use [unsigned] long as input to Get...Smallp to avoid shortening input
2022-08-15 13:26:53 -07:00
Nick Briggs
4a02a1a24d Rename lisp2c's LispStringLength to LispStringSimpleLength
Avoid confusion with the LispStringLength definition in locfile.h
    This lisp2c function ONLY looks at the fillpointer for the length.
2022-08-14 21:43:48 -07:00
Nick Briggs
813d2aa2b5 Inline GetSmalldata and GetSmallp to improve type diagnostics, code, and readability in arith.h 2022-08-14 16:53:22 -07:00
Nick Briggs
1fe71e5b84 Cleanups in vmemsave.c
Remove deprecated register attribute
    Use #ifdef SYM (vs #if SYM) when SYM may be undefined
    Use ptrdiff_t rather than int for pointer differences
    Correct signedness problems
2022-08-14 13:54:24 -07:00
Nick Briggs
8d804ad5cd Cleanup signedness, remove abuse of comma operator, use C99 local for-loop decls where appropriate 2022-08-14 13:46:27 -07:00
Nick Briggs
ad045ce356 Alarm timer requires an unsigned timeout value in timer.c, timeout.h 2022-08-14 12:50:16 -07:00
Nick Briggs
c49eb4a4ce Clean up abuse of comma operator as statement separator in vmemsave.c 2022-08-14 12:06:02 -07:00
Nick Briggs
1c5881fad4 Cleanups in uutils.c
Resolve shadow declarations
    Remove deprecated register attribute
    Simplify for-loop syntax, use C99 style loop var declaration
    Make (not used elsewhere) string functions static
2022-08-14 11:44:27 -07:00
Nick Briggs
77ad9204af Remove unused variable and avoid shadow declarations, declare temps near point-of-use in unixcomm.c 2022-08-14 10:55:56 -07:00
Nick Briggs
89c3041339 bitmaps only referenced internally in xbitmaps.h can be static 2022-08-14 10:34:24 -07:00
Nick Briggs
142b5679cf Use correct type for FIXP (and pointer to it), and reformat for readability in my.h 2022-08-13 19:33:24 -07:00
Nick Briggs
0e7dc75fd9 Use correct type for pointer to FIXP in arith.h 2022-08-13 19:31:05 -07:00
Nick Briggs
41e7a15b1e Fix types for boxed add/subtract, the boxes contain FIXPs not pointers 2022-08-13 16:04:58 -07:00
Nick Briggs
5a7cfcbbe7 Correct procedure declarations since N_OP_xxx function args are all LispPTRs 2022-08-13 15:55:11 -07:00
Nick Briggs
9e2b3eb882 Types work out better and better code if not trying to over-optimize memory accesses in arith.h 2022-08-13 15:35:18 -07:00
Nick Briggs
543f7985a2 Fix type of parameter to SAFEREAD in unixfork.c 2022-08-13 09:11:58 -07:00
Nick Briggs
c07ad9fe8e A couple of variables that should be static rather than global in unixfork.c 2022-08-13 09:11:58 -07:00
Nick Briggs
fff53ba224 Move ldeboot.c #defines to under same #if condition as when they are used 2022-08-13 09:11:58 -07:00
Nick Briggs
d842b284ac correct prototype declaration for process_io_events 2022-08-13 09:11:58 -07:00
Nick Briggs
64b47841d8 Merge pull request #439 from Interlisp/dbprint-format-errors
Correct -Wformat-pedantic warnings
2022-08-13 09:10:18 -07:00
Nick Briggs
d91de66322 Correct -Wformat-pedantic warnings
Many of the warnings were newly visible after the DBPRINT macro
was modified, but the pedantic warnings also caught existing printf
family usage which was not strictly correct.

Mostly replacing 0x%x with %p for pointers, adding (void *) for
those and other pointers, %td for ptrdiff_t, but also changing
some function parameters from UNSIGNED (uintptr_t) to int
where that was the more appropriate type.
2022-08-11 15:38:07 -07:00
Nick Briggs
e72dd332a3 Missing include for kprintdefs.h causes error in tosret.h when compiling with OPTRACE enabled. 2022-08-11 14:22:35 -07:00
Nick Briggs
f7fd547360 Merge pull request #438 from Interlisp/combine-arith-files
Combine three small arithmetic opcode implementation files into one
2022-08-11 13:27:07 -07:00
Nick Briggs
b94cb8809b Combine three small arithmetic opcode implementation files into one
Combines arith2.c ... arith4.c files and their associated header files
into new arithops.c/arithopsdefs.h files, and adjusts the CMakeLists.txt,
and old-style makefile-tail.  Also updates  makefile-dos,
inlnPS2.h, and inlndos.h to reflect these changes, though these are not
used.
2022-08-10 20:16:59 -07:00
Nick Briggs
6010df35fe Merge pull request #437 from Interlisp/combine-array-files
Combine six small array opcode implementation files into one
2022-08-10 20:13:38 -07:00
Nick Briggs
601d6e9142 Combine six small array opcode implementation files into one
Combines the array..array6 files and their associated header files
into new arrayops.c/arrayopsdefs.h files, and adjusts the CMakeLists.txt
and old-style makefile-tail to reflect these changes.
2022-08-10 12:54:06 -07:00
Nick Briggs
3d9f090e70 Cleanup of includes and related changes based on include-what-you-use diagnostics (#436)
Remove unused #define PERCENT_OF_SCREEN in MyWindow.h
Move structures for dir.c to dirdefs.h where they are used
Resolve S_CHAR vs S_CHARACTER in favor of S_CHARACTER and cleanup #defines
Fix  = vs == bug in FSDEBUG code in dir.c
Eliminate duplicate/unused constant definitions in gcr.c
Declare static internal function bytecmp in mkatom.c
Update many source and include files to include headers for what they use
2022-08-10 11:07:57 -07:00
Nick Briggs
4bd1f4b49a Ensure compiler sees debug printf even if won't be executed (#433)
If the debugging printf macros are elided by the preprocessor
rather than being removed by the compiler's optimizer then
the debugging statements may get out-of-date as variables are
modified.  Wrap the non-debug case in "if (0) ..." instead.
2022-08-09 18:11:05 -07:00
Nick Briggs
681f3b2592 Update github workflow runners list (#435)
Github is deprecating the MacOS-10.15 environment as MacOS-12 is coming
online (currently beta), so this runner must be updated to MacOS-11

Ubuntu 22.04 LTS is now available so add that to the builds.

Ubuntu 18.04 LTS should be supported until April 2023.
2022-08-03 11:03:18 -07:00
Nick Briggs
c3f79872f1 Update memory allocator function (#434)
* Missing include unistd.h for getpagesize()

* Update from valloc() to posix_memalign() for large aligned allocations
2022-08-03 09:59:08 -07:00
Nick Briggs
a15de4df10 quick_stack_check() should return a result indicating status (#432) 2022-07-24 21:49:39 -07:00
Bruce Mitchener
430da79e73 Remove a dead store. (#431) 2022-07-22 11:54:19 -07:00
Bruce Mitchener
259658fa2c No need for NULL mode arg to open when not creating a file. (#430) 2022-07-22 11:53:49 -07:00
Nick Briggs
317f081409 Add missing uraidextdefs.h to CMakeLists.txt (#429) 2022-07-22 10:29:00 -07:00
Nick Briggs
5fa05ac3d7 Cleanup types in URaid and move declarations to separate include file (#428) 2022-07-20 10:45:37 -07:00
Nick Briggs
9a10f63fe6 some cleanups in the arithmetic operations code (#427)
* arithmetic opcode implementations should return LispPTR rather than int

* all callers of ERROR_EXIT() have return type LispPTR, therefore ERROR_EXIT should too

* N_[I]GETNUMBER, [N_]ARITH_SWITCH need (int) casts for some large constants that would otherwise be unsigned

* Expand use of macro N_ARITH_BODY_1_UNSIGNED and correct types

* Remove unused macros N_ARITH_BODY_1 and N_ARITH_BODY_1_UNSIGNED

* Cast to correct type for storing to TopOfStack, and return type of TIMER_EXIT()
2022-07-20 10:28:21 -07:00
Nick Briggs
77957d421a fix some compiler warnings (#423)
* Pedantic C compilers want an extern declaration separate from initialization

* Remove duplicate definitions for fns in initdspdefs.h from display.h

* Remove misleading comments on structure member offsets and reorder to minimize padding
2022-07-20 10:18:59 -07:00
Nick Briggs
e81345218a Prevent X11 error when resuming after call to RAID when -noscroll is in use (#426)
The device_before_raid() call that disables X11 scrolling and bit-gravity
selection needs to avoid referring to the scrollbars and other ancillary
windows that have not been initialized when the "-noscroll" option was
given at startup.
2022-07-16 07:32:19 -07:00
Nick Briggs
b27bd2fbab Fix ldeinit segmentation fault on keyboard/mouse input (#425)
Keyboard, cursor, and mouse pointers are not initialized in
ldeinit.  Do not process X events as they will cause a segmentation
fault referencing the uninitialized pointers.
2022-07-14 13:34:36 -07:00
Nick Briggs
b5f51d58f1 Correct missing htons() on port number for TCPop connect 2022-06-03 18:32:36 -07:00
Nick Briggs
60af445afa If SHELL is not set, fall back to /bin/sh so CHAT(SHELL) might work. (#424) 2022-05-28 12:37:43 -07:00
Nick Briggs
a18f09d788 Create missing directories when opening directory/file on {UNIX} device for output (#422)
Prior to this change there was no mechanism within Medley to create a new directory
on a {UNIX} style device.  This change makes the {UNIX} directory creation happen in
the same manner that {DSK} directory creation is done.  Opening a file with access
OUTPUT, BOTH, or APPEND, which would create the file if it does not exist, will also
create any missing directories in the path.
2022-05-24 16:08:26 -07:00
Nick Briggs
2bf7047709 Correct usage of stat.st_mode result for testing S_IFREG and S_IFDIR (#421)
stat.st_mode cannot be tested for whether a node is S_IFDIR with
    if (stat.st_mode & S_IFDIR) ...
since S_IFDIR bit (0040000) is a subset of S_IFSOCK (0140000) bits.
A correct check is
    if ((stat.st_mode & S_IFMT) == S_IFDIR) ...
or alternatively, since the convenience macros are defined on all modern systems
    if (S_ISDIR(stat.st_mode)) ...
2022-03-29 18:15:21 -07:00
Nick Briggs
90b967c8d3 Implement DELFILE for (empty) directories on the {unix} device (#409)
If the argument to DELFILE represents a directory on the {unix} device
either directly or through resolving to a full pathname via the connected
host/directory, and the directory is empty, then the directory will be deleted
and the deleted directory name will be returned.  Will error if the
directory is not empty, and return NIL if the argument does not name a directory
or file.
2022-03-18 18:20:35 -07:00
Frank Halasz
b005501427 Cosmetic fix: Use DOCKER_NAMESPACE instead of DOCKER_OWNER in workflows. Matches the corresponding change in Medley workflows (where it was more than cosmetic). (#419) 2022-02-12 18:04:36 -08:00
Frank Halasz
20046b265b Taking source builds out of buildReleaseInclDocker workflow (#418)
Github does this automatically when release published
2022-02-12 13:44:50 -08:00
Frank Halasz
e6a974a2a7 Fix for maiko buildReleaseInclDocker workflow failures. Dockerfile out of sync. (#416)
* Adding new workflow that builds maiko releaases for Linux/amd64, Linux/arm64, Linux/arm7, Macos/amd64.  (Not Macos/arm64 as yet.) Also builds and pushes to DockerHub docker images for Linux/amd64 and Linux/arm64.  Delete old buildDocker.yml workflow.

* Adding latest version of buildReleaseInclDocker.yml; builds release and docker images for all major platforms except MacOs arm64.

* Adding Dockerfile.  Was out of sync with final dev version at fghalasz/maiko
2022-02-12 09:36:04 -08:00
Frank Halasz
8ea2c76110 Fgh004: Adding new workflow that builds maiko releases and docker images (#415)
* Adding new workflow that builds maiko releaases for Linux/amd64, Linux/arm64, Linux/arm7, Macos/amd64.  (Not Macos/arm64 as yet.) Also builds and pushes to DockerHub docker images for Linux/amd64 and Linux/arm64.  Delete old buildDocker.yml workflow.

* Adding latest version of buildReleaseInclDocker.yml; builds release and docker images for all major platforms except MacOs arm64.
2022-02-11 14:21:19 -08:00
Nick Briggs
3e7c71c0c0 Use pointer format and don't cast address to int for ethernet debuggging 2022-01-22 17:04:39 -08:00
Nick Briggs
f2a3715930 Remove support for GET-NATIVE-ADDR-FROM-LISP-PTR and GET-LISP-PTR-FROM-NATIVE-ADDR (#414)
Since the native addresses for objects within the Lisp memory may be at locations
that can't be represented in 32-bits conversion between a native address and a
Lisp FIXP can't be supported.  For now, return NIL for conversion in either direction.

There are no known users of these two subrs.  Should it be necessary to reimplement them
at some future time the representation will need to be something that can hold 64 bits.
2022-01-22 16:02:26 -08:00
Nick Briggs
f15d8eca09 Use correct size for %x format for LispPTR in debug output for GC array problems. 2022-01-22 15:21:20 -08:00
Nick Briggs
008ce703e7 Use inttypes.h to provide uintptr_t/intptr_t of machine dependent size for UNSIGNED/INT declarations 2022-01-22 15:16:36 -08:00
Nick Briggs
fa08a08648 Update possible names for clang-tidy to include version 13 2022-01-22 14:03:14 -08:00
Nick Briggs
bb0b011f90 Remove debugging printf(.) that was left in unixcomm.c 2022-01-03 22:48:23 -08:00
Nick Briggs
6bccbfbcf3 Clean up issues in Unix_handlecomm preventing clean process exit (#413)
When Medley closes a stream open to a process it uses a "unixcomm"
command (3) which should close() the communication channel open with
the process and give it a chance to handle that and exit cleanly
before using a SIGKILL on it.  We can't determine apriori whether the
process is going to cooperate, so we're stuck trying for up to 0.1s
(arbitrary choice!)  waiting for the process to exit, then it gets a
SIGKILL, and we wait up to 0.1s again to see that it really exited.
2021-12-23 10:46:37 -08:00
Nick Briggs
e3af3b03b9 Remove unused "readsock" field from Unix job table. 2021-12-21 21:33:03 -08:00
Nick Briggs
880747f2dc Add m68k to directories that .gitignore ignores for build artifacts 2021-12-09 21:15:48 -08:00
Nick Briggs
c7fd28a438 Removed unused (and unimplemented) stackcheck() and stackoverflow() routines
These routines were stubs that did nothing and were not called from anywhere
so lack value in even providing a template or hook for a fuller implementation.
Also note that "stackcheck" conflicts with a predefined symbol in some runtime
libraries.  Should these be implemented in the future they should use a
maiko-specific name.
2021-12-09 14:57:45 -08:00
Nick Briggs
e1efc860c4 Prefer typedef over #define where it can be used for type definitions 2021-12-09 14:48:52 -08:00
Nick Briggs
26fe840edf Convert "mkvdate" into a shell script instead of compiled C code (#411)
For all	systems other than DOS, use a simple shell script to create
the vdate.c (contains version date) that goes into every build.
2021-12-09 12:36:12 -08:00
Nick Briggs
212a0fa9c6 Add some support for cross-compilation to MC68000 AmigaOS (#412)
Add m68k to recognized CPUs (machinetype)
Add amigaos to recognized operating systems (osversion)
Add ability to override "config.guess" output w/ LDEARCH= to osversion
Add platform.h clauses to recognize AmigaOS 3 using gcc to cross-compile
2021-12-08 12:03:04 -08:00
Nick Briggs
65bbcb7d9d Remove makepathname() (#410)
makepathname() is only ever called with one of two constant string
arguments, in one case (DOS) such that it only does a strncpy(...),
and the other case (non-DOS) expanding "~" to the current user's home
directory. Additional code duplicates realpath() functionality but is
never used.
2021-11-26 19:53:26 -08:00
Nick Briggs
987cf4c7c6 Correct error for missing byteswap macros in tosfns.h EVAL implementation (#407)
Commit c46fcce307 fixed a warning for
incompatible pointers to nnewframe() but did not consider that the
order of the DLwords is swapped depending on the endianness of the
system it is running on.  Add the necessary GETBASEWORD() macros to
access the items when constructing the pointer.
2021-11-06 18:36:25 -07:00
Nick Briggs
c46fcce307 Fix "warning: incompatible pointer types" in EVAL implementation (#406)
nnewframe() as called from the EVAL implementation expects to be passed
the address of an array of two DLwords.  Do that, and compose the 32-bit
result correctly rather than passing the address of a (32-bit) LispPTR
and then having to swapx() that result to get the expected value.
2021-11-04 20:18:27 -07:00
Nick Briggs
de5ea2110f Correct integer type warnings (#405)
* Correct warning: cast to smaller integer type -- X_init/lispbitmap

* Fixes to INTRSAFE, INTRSAFE0 and ensure TIMEOUT, TIMEOUT0 used appropriately

INTRSAFE and INTRSAFE0 must clear errno before executing the library or system
call because not all library calls set errno on success.
Avoid casting pointers or larger integer values down to smaller ints before
comparing to 0 or -1, and use NULL (a pointer) rather than 0.

Fix cases where the result of the library call is a pointer rather than an int
to use TIMEOUT0 instead of TIMEOUT, testing for NULL rather than -1
on timeout (errno == EINTR)

* Remove useless validity check of LASTVMEMFILEPAGE_word pointer

* Convert pointer arithmetic type in drawline from int to ptrdiff_t

* Add NOTE warning about a 32-bit vs 64-bit issue affecting currently unused GET_NATIVE_ADDR_FROM_LISP_PTR
2021-11-04 09:08:55 -07:00
Nick Briggs
6c241f1eaa Make opcode_table (names of opcodes) visible as useful debug aid. 2021-10-29 10:02:47 -07:00
Nick Briggs
19688bc314 Drop setuid privilege correctly. (#401) 2021-10-29 09:52:51 -07:00
Nick Briggs
c39b751f42 Rework make_atom() to allow removal of parse_number() (#404)
No calls to make_atom() depend on the ability to parse the atom's
pname as a number.  Additionally, the parse_number() implementation
used here was non-functional.

We remove parse_number() and adjust the parameter list of make_atom()
to remove the non_numericp flag.
2021-10-29 09:51:32 -07:00
Nick Briggs
75c668f1cd The pointers Atomspace, Spospspace, Snegspace, Arrayspace can be removed (#402)
These pointers are neither initialized nor referenced anywhere in the code.
2021-10-10 16:55:33 -07:00
Nick Briggs
a25368714f Use SHELL rather than /bin/csh when forking shells. Issue Interlisp/medley#384 (#400)
As long as $(SHELL) names an executable that appears in /etc/shells (as determined
by the getusershell() function) use that.  It used to always use /bin/csh, but some
modern distros do not ship with csh installed.  Using the user's preferred shell
seems like a better choice, while allowing the choice from /etc/shells gives some
additional flexibility.
2021-10-08 17:58:29 -07:00
Nick Briggs
3cdbccd0c7 Implement -noscroll option to ldex to disable X window scroll bars (#399)
Adds a -noscroll option, parsed as an X option, also accessible via
resource ldex*noscroll, which avoids adding the bottom and side scroll
bars and the bit-gravity control buttons to the main Lisp display window.

Unless the geometry given for the X window in which the Lisp screen is
displayed is at least as big as the Lisp screen part of the Lisp screen
(bottom, right) will not be visible.

On macOS with XQuartz, maximizing the X window will bring it to
the size of the Lisp screen (or the size of the display, whichever is smaller)
2021-09-30 10:44:37 -07:00
Nick Briggs
4d2bf13347 Add description for ethernet related flags to compile-flags 2021-09-25 15:01:21 -07:00
Nick Briggs
f7e40d1ed5 Use symbolic constants for COLOR related subrs rather than numbers
cases for subrs UNCOLORIZE-BITMAP, COLORIZE-BITMAP, COLOR-8BPPDRAWLINE (which
are not compiled into current code) can have the numbers replaced by the
symbolic constants that are now defined in subrs.h
2021-09-19 14:19:42 -07:00
Nick Briggs
9bb5a4298c Use symbolic constant for subr CAUSE-INTERRUPT switch/case rather than number (0222) 2021-09-19 14:12:47 -07:00
Nick Briggs
533c935e72 Fix various bugprone warnings (#397)
* Fix some warnings in main.c

main.c:678: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined
main.c:493: The return value from the call to 'seteuid' is not checked.

* Fix some warnings in array operations

Instead of extracting typenumbers to an 'int', use the unsigned typenumber directly

array3.c:49: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined
array4.c:61: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined
array5.c:63: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined
array6.c:50: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined

* Resolve type mismatches for version numbers and propp flag

dir.c:1849: narrowing conversion from 'unsigned int' to signed type 'int'
dir.c:1850: narrowing conversion from 'unsigned int' to signed type 'int'
dir.c:2114: narrowing conversion from 'unsigned long' to signed type 'int'
dir.c:2207: narrowing conversion from 'unsigned int' to signed type 'int'

* Resolve type mismatches for version numbers and strlen result type

dsk.c:1072: narrowing conversion from 'unsigned long' to signed type 'int'
dsk.c:1108: narrowing conversion from 'unsigned long' to signed type 'int'
dsk.c:1549: narrowing conversion from 'unsigned long' to signed type 'int'
dsk.c:1712: narrowing conversion from 'unsigned long' to signed type 'int'
dsk.c:1751: narrowing conversion from 'unsigned long' to signed type 'int'
dsk.c:3426: narrowing conversion from 'unsigned int' to signed type 'int'

* Resolve type mismatches for strlen result type

ufs.c:213: narrowing conversion from 'unsigned long' to signed type 'int'
ufs.c:404: narrowing conversion from 'unsigned long' to signed type 'int'

* Resolve type error

uutils.c:117: 'signed char' to 'int' conversion [bugprone-signed-char-misuse,cert-str34-c]
2021-09-16 17:24:25 -07:00
Nick Briggs
6fedd97d21 add yield subr (#398)
* Add experimental SUBR to call nanosleep() for experiments in reducing CPU load

This adds a SUBR, sb_YIELD, value (octal) 0322 which takes a single number
0..999999999 which is the number of nanoseconds to pass to nanosleep().

The return value is T if the call to nanosleep() was executed or NIL
if it was not (argument out-of-range, or other error in getting the
number from the argument).

To use this experimental SUBR in a sysout you should:

   (SETQ \INITSUBRS (CONS '(YIELD #o322) \INITSUBRS))

then you can define functions that use that SUBR:

   (DEFINEQ (BACKGROUND-YIELD () (SUBRCALL YIELD 833333)))
   (COMPILE 'BACKGROUND-YIELD)
   (SETQ BACKGROUNDFNS (CONS 'BACKGROUND-YIELD BACKGROUNDFNS))

* Update to use subrs.h newly generated from LLSUBRS

The subrs.h include file is generated by WRITECALLSUBRS based on the \INITSUBRS
list.  This update provides for the new YIELD subr in the generated file,
and makes some necessary updates to the C code implementations for some subr
names which have changed.
2021-09-15 10:30:04 -07:00
Nick Briggs
a70b18d444 Avoid use of sscanf() for parsing simple integer values (#396)
There is no reason to use sscanf() rather than strtol()/strtoul()
for parsing simple integer values from a string.
Resolves a number of cert-str34-c warnings from clang-tidy.
2021-09-12 14:24:05 -07:00
Larry Masinter
c7adb3c4ba Add scripts to aid in constructing github releases of the maiko artifacts (#395)
Until these are superceded by github actions, if the github CLI tool "gh"
is installed, a github release of the maiko code can be created by running
   ./start-release
from the maiko/bin directory, and then running
   ./release-one
for each combination of OS/architecture that should be included in the
release.

The scripts assume that the maiko code is checked out in a directory
named "maiko" (and may produce unexpected results if run from somewhere else)

Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2021-09-10 13:33:54 -07:00
Nick Briggs
b1545e4ccc fix 'signed char' to 'int' conversion [cert-str34-c]
Fortunately here we don't need to convert to unsigned char then int,
we can do the only comparisons we need staying in the char domain.
2021-09-09 18:01:02 -07:00
Nick Briggs
4f79f55c20 Replace uses of atoi() with strtol() or stroul() as appropriate (#394)
As a side-effect of this change, we also resolve a a problem with
signed file version numbers, so that instead of version 2147483647
wrapping to -2147483648 we can go as far as 4294967296 before we
have issues.  Various sprintf() formats get changed from %d to %u.
The DOS version code is left behind as int versions.
2021-09-08 09:58:01 -07:00
Nick Briggs
85c4ebf0ac Merge branch 'master' of github.com:Interlisp/maiko 2021-09-03 16:47:02 -07:00
Nick Briggs
7284e19b32 Suppress clang-tidy warnings for uses of bzero()
The only uses of bzero() in the maiko sources come about because it is used in the macOS
definition of the FD_ZERO() macro in sys/select.h.  Suppress the warning by including
   -clang-analyzer-security.insecureAPI.bzero
in the clang-tidy list of checks.  This may well have been replaced by a memset()
call in more up-to-date macOS releases.
2021-09-03 16:39:29 -07:00
Nick Briggs
0de1b1438b Left shift is undefined if left argument is negative (#454) (#393) 2021-09-03 12:46:21 -07:00
Nick Briggs
740f012254 Eliminate URaid access to uninitialized pointer when saving post-crash VM image
Old code attempted to save the display region through an uninitialized pointer
which occurs nowhere else in the system.  Removed the save.
2021-09-02 15:14:32 -07:00
Nick Briggs
377a6f3f47 Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals (#392)
* Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals

Replaces the SIGIO handler, which used to process X events in the interrupt context, with
a stub routine that sets a flag to signal processing is required.
Actual event processing is moved to the main dispatch loop where Lisp periodic interrupts
are handled.

Removes the X connection file descriptor from the set of fds contributing to SIGIO events
and moves the processing of X events to where the Lisp periodic interrupt is handled in
the main dispatch loop.  This code is already guarded by a check for XPending() so can
be called regardless of whether any file descriptors are known to be ready.

Actual processing of async I/O events and X events are handled by procedures
process_io_events() and process_Xevents() respectively.  For the most part these are
a renaming of getsignaldata() and getXsignaldata().

The Lisp periodic timer (VTALRM) was set to operate with a 25000 us period (40 Hz),
but on modern hardware it is possible to run this timer with a period of 10000 us (100 Hz)

Incidentally, a bug was noted (and fixed) in the X event handling code for motion events:
Mouse motion without any keyboard activity should not add an entry to the keyboard event
ring buffer as these events do not represent a key state change.
Since the ring buffer is of limited size, when it is filled new events are ignored
until the buffered events are processed.  This resulted in the loss of a key/mouse button
transition (up or down) if the mouse was moved about "too much" between keyboard events.

A few incidental cleanups were also made:
  - KBDEventFlg initialization fixed (wrong semantic type)
  - Event_Req renamed to IO_Signalled (more appropriate name)
  - int_io_open() sets up process (self) to handle SIGIO generated by O_ASYNC operations
  - LOCK_X_EVENTS turned off since X library calls can no longer happen in an interrupt context

* Use of O_ASYNC must depend on the symbol being defined (looking at you, Cygwin)

* Add SA_RESTART flag to sigaction for SIGVTALRM periodic interrupt

* LOCK_X_UPDATE is no longer needed and should not be defined by default for Solaris in version.h
2021-09-02 12:42:51 -07:00
Nick Briggs
c07618f55c Do not attempt to use ether_fd as valid fd if it is -1. Closes medley #450 2021-09-02 10:35:10 -07:00
Nick Briggs
dbbb59b30b Add clang-tidy to CMakeLists.txt -- run it at compile time if it is found at cmake configuration time 2021-08-29 13:39:07 -07:00
Nick Briggs
e957e331c4 Lock X updates for all systems and lock around X cleanup at exit (#391)
* Lock X updates for all systems and lock around X cleanup at exit

All systems which could generate I/O interrupts on the X file descriptor need
to have locking enabled, or there is a high probability that the X library
will deadlock. This requirement may be removed in the future with restructuring
of the way that the interrupt driven I/O is handled.

Ensure that the appropriate XLOCK/XUNLOCK is done around the X window
closing code.

* Also lock X updates when building with CMake.
2021-08-26 16:29:10 -07:00
Nick Briggs
934a86fbb5 Remove Create_N_Set_Cell() which is unused since native code is not supported. 2021-08-24 12:05:17 -07:00
Nick Briggs
28ea238807 Check for flags in argv[1..n] not argv[0..n] 2021-08-23 21:15:23 -07:00
Nick Briggs
81c36341ef Fully initialize XImage ScreenBitmap with XInitImage() before using it. 2021-08-22 18:23:41 -07:00
Nick Briggs
6cad51735f Fix errors preventing the use of -DDTDDEBUG for mkcell.c (#389) 2021-08-11 11:37:15 -07:00
Nick Briggs
c33386ef44 Remove code for unsupported Sun display configurations (#388)
* Remove code for unsupported Sun display configurations

Initial cleanup removing all code that was #ifdef'd for SUNDISPLAY.
Other SunWindows dependent code may also be removeable

* prropstyle will never be defined with no SunWindows support and therefore no pixrect code

* Remove code that is ifndef NOPIXRECT, since pixrects are part of the obsolete Sun windows code.

There are still traces of pixrect dependent code that could be removed.
2021-08-10 16:31:59 -07:00
Nick Briggs
588e804a2f Merge branch 'master' of github.com:Interlisp/maiko 2021-08-09 13:15:04 -07:00
Nick Briggs
c56cbb2a91 Add missing include of <time.h> to initsout.c 2021-08-09 12:30:34 -07:00
Tim Hawes
ef31b3fe0b Additional Makefiles for FreeBSD amd64, Raspberry Pi (#387)
* Add makefiles for FreeBSD amd64 and aarch64

* Add appropriate comments in new makefiles

* Add makefile-init files for the new FreeBSD archs
2021-08-08 14:59:15 -07:00
Nick Briggs
ea8d31f590 Set up git workflow to build a maiko docker image with multi-architecture support
On pushes to master: builds images for x86_64, Apple M1, and ARMv7
architectures based on Ubuntu Focal release.  This builds only the
regular lde/ldex and does NOT build the ldeinit, so these are not
suitable for doing a loadup from scratch.

Commit based on https://github.com/stumbo/maiko/tree/gitHubBuild
2021-07-31 11:34:27 -07:00
Nick Briggs
093fb9a3d5 Merge branch 'master' of github.com:Interlisp/maiko 2021-07-30 18:30:05 -07:00
Nick Briggs
b53620852a Clean up makefile fragments for FreeBSD on 386
* Add LOCK_X_UPDATES
* Increase optimization level to -O2 and adjust -g option
* Add makefile-init-freebsd.386 in order to do loadups
2021-07-30 17:46:35 -07:00
Nick Briggs
13163c6772 Add build directory to .gitignore so typical cmake build doesn't generate git changes 2021-07-30 17:25:00 -07:00
Nick Briggs
9e179e66f2 Call getXsignaldata() with XLocked set
getXsignaldata() can call additional Xlib procedures which could generate an I/O
interrupt.  To avoid deadlocks in Xlib, ensure that XLocked is set when
getXsignaldata() is called.
2021-07-08 15:18:41 -07:00
Nick Briggs
084d69c6e8 Comment out build-pi in workflows because the RPi system is not online at this time. 2021-07-06 20:21:03 -07:00
Nick Briggs
40e18e6da0 Remove unnecessary XLOCK/XUNLOCK around calls to bitblt_to_screen/clipping_Xbitblt in getXsignaldata() 2021-07-06 20:15:35 -07:00
Nick Briggs
9ed46e6b69 Integer variables referenced from a signal handler (XLocked, XNeedSignal) should be type sig_atomic_t 2021-07-05 14:19:23 -07:00
Nick Briggs
934b15b63b Correct declaration mismatch for Event_Req between xc.c and other (correct) sites 2021-07-05 14:10:38 -07:00
Nick Briggs
2de44247b5 Include byteswapdefs.h for swapx() and byte_swap_code_block() 2021-07-05 14:03:02 -07:00
Nick Briggs
ef6a6554ac Remove SIGPOLL usage (#385)
* Remove unnecessary calls to XLOCK/XUNLOCK

The X methods called by flush_display_region() and flush_display_lineregion() handle the
locking/unlocking, therefore it is unnecessary to invoke the locking here.

* Remove explict signals when doing XUNLOCK()

Call getXsignaldata() directly if a signal happened while X code
was locked, instead of generating a signal and then handling it.

Some macros and functions needed to pass the DspInterface instead of
extracting the X display and window and passing those so that the
correct structure was available for the XUNLOCK() call.
2021-06-27 19:02:02 -07:00
Nick Briggs
1c47bf5df0 Fix the FastRetCALL macro to use do {} while (0) style (#384) 2021-06-17 13:21:00 -07:00
Nick Briggs
f42671022f Remove outdated hand-optimized assembler support for gcc on 386 (#379) 2021-05-29 17:32:32 -07:00
Nick Briggs
2122f095e8 Simplify OPFN/OPFNX macros by removing hand expansion of 1, 2, N bindings (#383)
The OPFN and OPFNX macros had been coded with a hand expansion of a loop
pushing values on the stack to separately handle the cases of 1, 2, and
more values.  This actually lead to larger, likely slower, and certainly
less obvious code.
2021-05-18 16:35:21 -07:00
Abe Jellinek
91fe7d51f9 Correct Medley GitHub link in README (#380) 2021-04-14 09:38:11 -07:00
Nick Briggs
a5410ef93d Cleanup USE_DPLI usage (#378)
Until now, the only differentiation between using DLPI and using NIT for
the ethernet interface was expressed as a function of USE_DLPI.

This commit makes explicit when code is for the DLPI interface or the NIT
interface, with USE_DLPI and USE_NIT.  This is setup for using the BPF
interface to the ethernet as an alternative.
2021-04-07 20:51:28 -07:00
Abe Jellinek
5ce292ed32 Command line: fix potential buffer overruns in argument/env variable handling (#375)
* Fix buffer overrun vulnerability: use strncpy

read_Xoption uses a char buffer defined in main.c with length
MAXPATHLEN, aka PATH_MAX in POSIX. Unfortunately it was using strcpy to
copy from the command-line arguments (via argv) and the environment (via
getenv) without any bounds checking whatsoever. This could very easily
cause an overflow.

It's unlikely that a user will want to provide a path longer than
PATH_MAX-1 (a generous 1023 bytes on my machine). If they try, we should
stop them from causing any damage.

* Use strlcpy instead of strncpy

Thanks to Nick Briggs for the suggestion. It would be best to use
sizeof(sysout_name) instead of hardcoding a reference to the PATH_MAX
constant, but unfortunately sysout_name is an extern in xrdopt.c and so
the compiler doesn't know its size. I don't want to mess with that
coupling in this commit, because I assume there was a reason for doing
it that way rather than putting sysout_name in a header; I'll keep the
scope of the changes here small.

* Revert "Use strlcpy instead of strncpy"

Ah. This is not great. Turns out strlcpy is a nonstandard BSD extension
with its own set of problems
[https://en.wikibooks.org/wiki/C_Programming/C_Reference/nonstandard/strlcpy]
that we may be best served by avoiding. On Linux, it's only accessible
through libbsd, and we have no other reason (as far as I can tell) to
require that. Unless we want to provide our own strlcpy implementation,
we should stick with strncpy. It's far safer than what was there before
and doesn't present any edge cases in this scenario that are apparent to
me.
2021-04-05 14:43:37 -07:00
Nick Briggs
081e2288ff Enable X mouse buttons 6 and 7 for horizontal scrolling. (#367) 2021-03-29 14:03:14 -07:00
Nick Briggs
c4873d0ff8 Improvements to package/atom access in the sysout from maiko C code (#372)
* Display atom name in error message if get_package_atom() fails

* Various fixes to package/atom handling in testtool.c

Remove S_TOPVAL and S_MAKEATOM which only existed to deal with an old issue
with dbx where you supposedly couldn't enter a string with "\" in it.

Remove countchar(), which is functionally identical to  strlen(), and adjust
code that used it.

Adjust return type of MAKEATOM() to be the LispPTR that it should be, instead of int.

Limit find_package_from_name() to examining only the number of entries that are
present in the *PACKAGE-FROM-INDEX* array, instead of walking off the end.

MakeAtom68k() now drops into uraid() if asked to look up an atom that does not exist
(Make... is a misnomer, it will never *make* the atom, only lookup an existing
one)
2021-03-29 14:01:10 -07:00
Nick Briggs
01a8948a7d Rename _curXXX structures to curXXX to avoid leading underscore (#376) 2021-03-29 12:34:32 -07:00
Nick Briggs
36ccd9a5f5 warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] (#374)
Except where the expansion would be syntactically invalid,
for example "goto macroarg;" detection of which is a bug in clang-tidy,
so warn it off with a NOLINT...(bugprone-macro-parentheses)
2021-03-20 16:31:23 -07:00
Larry Masinter
f6da80f8b3 add makefile-init-linux.x86_64 (#373) 2021-03-18 15:45:02 -07:00
Nick Briggs
be4d4c771e Fix printf format warnings in testtool.c (#369)
Conversion of PC output from octal to hexadecimal will be handled separately as there are multiple places that this change needs to take place.
2021-03-18 15:40:02 -07:00
Nick Briggs
d025ff0101 Add makefile fragment for INIT processing for macOS on x86_64 (#371) 2021-03-15 20:52:45 -07:00
Larry Masinter
22ae23552c Update README.md for simplified Mac instructions (#370)
* Update README.md

* update (new M1)
2021-03-03 17:17:04 -08:00
Nick Briggs
082bd15542 Add makefile fragment for armv7l systems that self-identify as aarch64 instead (#368)
Closes #361
2021-02-24 19:24:19 -08:00
Nick Briggs
c6a74b2516 XrmParseCommand and XrmMergeDatabases depend on destination database being initialized. (#366) 2021-02-23 01:45:43 +00:00
Bruce Mitchener
d8e063bf02 tidy: Remove last caddr_t. (#365)
This cast isn't needed here and `caddr_t` is obsolete / not POSIX.
2021-02-22 09:45:07 -08:00
Bruce Mitchener
0129b50127 tidy: xrdopt. (#364)
* Remove unused `print_lispusage()`.
* Make some globals into function locals.
* Make the options table into a `static`. It can't be `const`
  because `XrmParseCommand` wants a mutable pointer.
* Remove unused `homeDB`.
* Stop using `caddr_t`, use `XPointer`. `caddr_t` is not POSIX
  and never made it past old obsolete BSD code.
2021-02-22 09:44:43 -08:00
Bruce Mitchener
a64a06466c tidy: initdsp: Remove some unused globals. (#363) 2021-02-22 09:44:21 -08:00
Nick Briggs
12ef73a794 Merge pull request #362 from waywardmonkeys/cleanup-find-available-pty
tidy: FindAvailablePty.
2021-02-21 22:35:12 -08:00
Bruce Mitchener
ddb1c9f717 tidy: FindAvailablePty.
* Remove unused `Master` argument.
* Update documentation.
* Remove unused `MasterFD` variable in caller.
* Remove `slot` variable in caller and use `Master` in each case.
* Make `FindAvailablePty` a static function.
2021-02-22 11:54:51 +07:00
Nick Briggs
923f472a8f Merge pull request #360 from Interlisp/fixups-for-INIT-handling
Improve process for building ldeinit
2021-02-18 20:29:58 -08:00
Nick Briggs
aa32c8347b Improve process of building ldeinit to allow for different options on different OSs 2021-02-18 11:12:14 -08:00
Nick Briggs
966a0bd7e0 Move default target out of makefile-tail to more specific makefile fragments
The default targets differ depending on the display type and whether networking
is configured in or not, so it's more appropriate in the individual fragments
2021-02-18 10:33:30 -08:00
Nick Briggs
e317c37f03 Move OSARCHDIR defn from makefile-tail to makefile-header 2021-02-18 09:17:56 -08:00
Nick Briggs
31927cd255 Clean up missing include file when compiling for INIT (#359)
* Compiling for INIT requires an extra include file vs normal.

* Compiling for INIT often includes tracing which also requires additional includes
2021-02-17 11:35:33 -08:00
Nick Briggs
747b8e468e Merge pull request #357 from Interlisp/update-makefile-tail-dependencies
Update dependencies in makefile-tail
2021-02-15 18:57:45 -08:00
Nick Briggs
ef7149e8e4 Cleanup whitespace issues 2021-02-15 16:47:14 -08:00
Nick Briggs
64c04b5e2d Update dependencies in makefile-tail
Dependencies for all object files created during default compilation are updated
based on compiler generated, non-system, headers used.
2021-02-15 16:25:40 -08:00
Nick Briggs
1043a80d1f Remove unnecessary (re)definitions of TRUE/FALSE (#356) 2021-02-14 16:47:04 -08:00
Nick Briggs
c60b522012 Files should explicitly include the definitions they directly depend on (#355)
... start by fixing the include files and the fallout in C source from
removing includes not directly needed by headers that previously included
them.
2021-02-13 21:41:31 -08:00
Nick Briggs
f019d3ddc2 Compiling with ethernet support requires etherdefs.h in certain places (#354) 2021-02-13 17:22:27 -08:00
Bruce Mitchener
64957b508d Fix some unused variable warnings. (#352)
Also removes a prototype that wasn't needed.
2021-02-13 09:14:12 -08:00
Nick Briggs
1116ee7b60 Fix missing includes in ldeether.c (#351) 2021-02-13 09:07:21 -08:00
Nick Briggs
3a55f1d132 Missing include of sys/select.h in tty.c (closes Interlisp/medley#186) (#353)
(fix confirmed by original issue reporter)
2021-02-13 16:41:20 +00:00
Nick Briggs
f2ac050e8e Prevent duplicate printing of info lines in response to -info option (#349)
The X options parser printed the info lines as well as the main options handler.
Add mention of the -info option in the -help usage information.

Fixes Interlisp/medley#41
2021-02-12 08:06:43 -08:00
Nick Briggs
6fe94fd655 Merge pull request #350 from Interlisp/ldsout-heap-fptovp
Allocate fptovp temporary table in heap
2021-02-12 08:05:20 -08:00
Nick Briggs
0d7dcc24bd Minor formatting revisions. 2021-02-11 23:35:38 -08:00
Nick Briggs
2a71f330b5 Allocate fptovp table from heap and release it when done 2021-02-11 23:24:25 -08:00
Bruce Mitchener
694d9b08c6 Update more header include guards. (#348)
Some of these didn't have include guards, some  used old names
for them. Now they follow the current convention.
2021-02-11 10:42:07 -08:00
Bruce Mitchener
d1e0e006da Remove some of the outdated compile-flags entries. (#347)
These are no longer referenced in code.
2021-02-11 18:29:31 +00:00
Nick Briggs
1fc0d28167 Fix extra semicolon warnings (#345)
"warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning" [-Wextra-semi-stmt]
occurred 254 times in xc.c when warnings were turned up.

Review this commit with "git diff -w ..." to make it easier to see changes other than indentation caused by
the addition of do { ... } while (0) around many macro definition bodies.
2021-02-10 20:33:54 -08:00
Nick Briggs
7274e16b24 Reformat (with clang-format 10.0) some header files (#344)
...in preparation for editing macro definitions to wrap in do {} while (0)
or other adjustment to make them complete statements without unnecessary
semicolons.

This programmatic reformatting should not introduce any functional changes.
2021-02-10 16:44:37 -08:00
Nick Briggs
c9a0d441c4 Cleanup timer leftovers (#341)
* Remove unnecessary variables and calls during itimer setup.

* Variable referenced from signal handler should be volatile and sig_atomic_t
2021-02-10 13:58:40 -08:00
Larry Masinter
3ae9d558b1 fix the darwin.arm64 to use xquartz config (#342) 2021-02-10 21:36:05 +00:00
Bruce Mitchener
015972c05c Remove Cldeetr.c. (#340)
This was like `ldeether`, but for SunOS4 with a color display. It
isn't needed any longer as on Solaris, we have `ldeether`, no color
display, and that code already works, unlike this one.
2021-02-09 23:14:51 -08:00
Bruce Mitchener
b21aeecf4c Remove cdrom&cdaudio support code. (#339)
This is not used in Medley (the MISCN-TABLE-LIST doesn't include
the required constants), nor does anything use or reference this
code. It also won't compile as it needs some routines that are
missing from our code.
2021-02-09 20:38:08 -08:00
Bruce Mitchener
78943073c3 Favor C99 inline over __inline__. (#337) 2021-02-08 19:11:31 -08:00
Bruce Mitchener
c19b184820 Remove GetNumber. (#338)
This isn't used and if it were, it wouldn't compile. It calls
`ufn`, which doesn't get compiled in either (unless `C_ONLY`
is defined, which it isn't, and if it were, that wouldn't
compile either due to a missing `StkLim0`).

A subsequent PR will remove `ufn` and related code.
2021-02-09 03:10:38 +00:00
Bruce Mitchener
ec95bb7a51 Remove OEXT from makefile system. (#336)
This was originally here to make something in the Apollo toolchain
happy, but it hasn't been needed in ages, and was inconsistently
applied.
2021-02-09 02:48:09 +00:00
Nick Briggs
2aacca596b Fix the unixfork/unixcomm code to deal with pid over 65535 (#333)
* ForkUnixShell() can be a static procedure

* Restructure SAFEREAD() to be a little clearer

* Convert unixjob type field defines to an enum and fix related unhandled switch cases.

* Use local declaration of loop variables in for-loop, removing register attributes

* Restructure SAFEREAD() to be a little clearer

* Send and receive 2 additional bytes for pid.

* Prefer standard C99 "inline" over "__inline__" for SAFEREAD
2021-02-08 18:26:56 -08:00
Nick Briggs
d482cc461c Address older versions of C compiler which don't have __BYTE_ORDER__ (#335)
* Address older versions of C compiler which don't have __BYTE_ORDER__

* Checking for __GNUC__ is not sufficient to determine if builtins are available.

* Add makefile fragment for 32-bit PowerPC on Mac OSX build, and ignore the build directories.

* Add comment describing use of __BIG/LITTLE_ENDIAN__ definition
2021-02-06 20:51:42 -08:00
Nick Briggs
9957f5c305 Cleanup EVAL macro definition (#334)
Reformat and make use of PTRMASK & swapx() as appropriate.
It's likely that nnewframe() could be reworked to avoid needing
to unconditionally swapx() the result and, like native_newframe()
return the appropriate value as the result.
2021-02-05 00:20:26 +00:00
Bruce Mitchener
f0a53302ce Fix compilation with MAIKO_HANDLE_CONSOLE_MESSAGES. (#332)
* Switch from sgtty over to termios. All of the various
  separate values that were copied individually before
  can now be done at once.
* Fix compilation error with missing `&`.
* Fix compilation error with missing return value.

I haven't tested that this works as I don't know how to do that,
but at least it compiles now.
2021-02-01 06:42:39 +00:00
Bruce Mitchener
275c5b9c13 Clean up MAIKO_HANDLE_CONSOLE_MESSAGES some. (#331)
* `LOGINT` is only useful when `MAIKO_HANDLE_CONSOLE_MESSAGES`
  is set.
* Only define some variables if `MAIKO_HANDLE_CONSOLE_MESSAGES`
  is set. Flag them as static.
* Remove setting `LOGINT` from the build system as it isn't
  needed because we aren't handling console messages.
2021-01-31 21:22:13 -08:00
Nick Briggs
261069f131 Detect byte order from preprocessor definition (#330)
Rather than having to specify or omit -DBYTESWAP in the Makefile
fragment for each system we can detect whether the system requires
byte swapping  based on the __BYTE_ORDER__ C preprocessor definition.

Update CMakeLists.txt to account for this as well.
2021-01-31 16:56:35 -08:00
Bruce Mitchener
70db63449c Remove support for the Sun386i. (#329)
This was a machine running SunOS 4, which we no longer support.

It had an odd display controller and a compiler with issues that
required workarounds. Those compiler issues aren't an issue in
today's world, so we don't need to keep the workarounds present
for reference.

It had a bit of inline assembly, but that is still present in
other files for other platforms.
2021-01-31 04:02:40 +00:00
Nick Briggs
1f17665741 Fix off-by-one error in clipping_Xbitblt (#327)
The LowerRightX and LowerRightY were calculated as the X and Y coordinates of the
pixel to the right and below the last visible pixel, but are compared with the
last actually visible pixel in the source. They need an extra -1 offset to correct.

Add comments to explain what's going on.  Fix the signature of the function to reflect
that the "dummy" passed for the display region is a pointer not an integer.
2021-01-30 19:03:17 -08:00
Nick Briggs
3764acda85 The MISC7 (FBITMAPBIT) opcode should flush the correct bits to the display (#328)
The MISC7 opcode was not accounting for the offset from the base when
calculating which (16-bit) word should be flushed to the actual display.
2021-01-30 18:42:47 -08:00
Nick Briggs
88cf76e18b Remove redundant calls to XFlush (#325)
Calls to flush_display_region() are responsible for calling XFlush()
and it is pointless to follow them up with another call.
2021-01-30 18:25:58 -08:00
Nick Briggs
fd19d5273e Fix missing initialization in int_panic_init() (#324)
panic_action.sa_mask and .sa_flags initialized twice, corresponding fields
in ignore_action not initialized.
2021-01-30 18:11:30 -08:00
Nick Briggs
5c12d3d9fc Define RM in makefile if it is not already defined (#326)
Some versions of "make" do not predefine make variable RM (looking at you, FreeBSD)
so if it has NOT been defined we define it as "rm -f"

Also, update the cleanup target to use $(RM) rather than refering directly to "rm".
2021-01-30 18:10:39 -08:00
Bruce Mitchener
4788031c15 Add an opcodes enum with names for each opcode. (#321)
This is based on the info in `medley/sources/LLCODE`.
2021-01-30 17:24:28 -08:00
Bruce Mitchener
b09663b3e9 Inline swapx and byte_swap_word. (#323)
This lets us remove `SWAP_WORDS` and some bits of assembly.
2021-01-29 23:18:09 -08:00
Bruce Mitchener
0480fee86c Move opcode_table into read-only storage. (#322) 2021-01-29 22:46:24 -08:00
Bruce Mitchener
40aa5d392d Remove SwitchDisplay and colordsp. (#317) 2021-01-29 19:56:07 -08:00
Bruce Mitchener
0efeedd6d3 Remove AIX define from Linux, Cygwin, Solaris, OpenBSD. (#320) 2021-01-28 23:04:57 -08:00
Bruce Mitchener
805cb86a06 Remove Bitmap_Pad global. (#318)
Since this is just being used for a 0 value, just use `0`.
2021-01-28 22:52:51 -08:00
Bruce Mitchener
fd62c9ab3a Remove cursor_source_gc. (#319)
This was only used in commented out code, which is now removed
as well. In that code, it was used to set the function to `GXcopy`,
but it would already have been that as that's the only thing
we set function to.

This also lets us remove the `gcv` code in `xcursor.c`, since
we no longer need those values there.
2021-01-29 06:47:45 +00:00
Bruce Mitchener
405b55509e mnwevent: Fix copy/paste error in log message. (#316)
This gets it out of search results when looking for getXsignaldata.
2021-01-28 10:21:03 -08:00
Bruce Mitchener
2e83d8e619 Improve tty.c, fix compilation on Cygwin. (#314)
`EXTA` and `PENDIN` are not POSIX, so let's not use them.

Make notes that the baud rate constant mapping comes from DLTTY
and add comments explaining the holes.
2021-01-28 10:20:45 -08:00
Bruce Mitchener
b766153e85 Remove checksum scripts. (#312)
These are no longer used in our installation / deployment
process.
2021-01-28 18:19:21 +00:00
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
Bruce Mitchener
bf15105d3c Remove 'release' support from makeright. (#265)
This is the old way that releases were built and isn't relevant
today. It made a variety of assumptions about how things were
linked and allowed for the user to re-link an executable, but
that isn't something we need to do any longer.

This doesn't yet remove the checksum, ldechecksum, and related
scripts.
2021-01-21 13:03:11 -08:00
Bruce Mitchener
95b482d5d5 Use gcc / clang overflow builtins. (#142)
* Use gcc / clang overflow builtins.

This avoids expensive checks for overflow that employ undefined
behavior.

This is a step along the way towards replacing the old hand-written
assembler that did the same thing in terms of using the CPU's
overflow detection.

* Remove unimplemented SPARC asm for multiplication, divide, and remainder.

This wasn't implemented before, and for multiplication, it is now
implemented for gcc and friends using overflow detection.

* Remove USE_INLINE_ARITH.

Now that we have the compiler built-ins for detecting overflow,
we don't need custom assembly for it for each platform.

For now, we keep, but still don't use, the code that do a hot
path through the dispatch loop for some math. This code isn't
actually running or in use, but it is separate from how the
other inline arithmetic was being performed. These are the
`fast_op_*` functions that are implemented in assembler.
2021-01-21 00:27:31 -08:00
Bruce Mitchener
36b8695bf6 Fix compilation error from dead store removal. (#266)
In commit 6f7ec059bc, we removed
some dead stores. This broke compilation when `STACKCHECK` was
enabled.

Closes Interlisp/medley#162.
2021-01-20 23:49:18 -08:00
Bruce Mitchener
421685bd49 Remove find-writes and fixid. (#264) 2021-01-20 23:43:26 -08:00
Bruce Mitchener
1828f208ec Remove outdated comment about RISCOS. (#263) 2021-01-20 23:42:32 -08:00
Bruce Mitchener
68de0e2dfc Use the same TIMER_INTERVAL on all platforms. (#262)
This removes a special case for SPARC which was using a slower
interval.
2021-01-20 23:41:37 -08:00
Bruce Mitchener
979c3ad6be Remove flags for LINUX, OPENBSD, FREEBSD, MACOSX from build system. (#261)
We now can handle these via `inc/maiko/platform.h` and the
constants defined there.

This doesn't change `OS5` for Solaris yet as that's a much wider
set of changes.
2021-01-20 23:38:15 -08:00
Bruce Mitchener
164b5651b7 Remove obsolete testdsp. (#235)
This was an old executable from the SUNDISPLAY days and is not
needed any longer.
2021-01-20 18:34:45 -08:00
Bruce Mitchener
0010a02cb1 Disallow UNALIGNED_FETCH_OK on ARM, not LINUX. (#258)
UNALIGNED_FETCH_OK shouldn't be set for an entire OS, but
based on the CPU architecture.

Some ARM systems don't allow unaligned reads. x86 and x86_64
do, so update how we configure this.
2021-01-21 02:26:47 +00:00
Bruce Mitchener
819f1c6c0a Fix crash in xrdopt. (#260)
In 85fa89ba88, I removed 2 entries
from a table, but didn't update the count. This leads to a
`SIGSEGV`.
2021-01-21 02:19:29 +00:00
Bruce Mitchener
45d67305e7 Remove ANSICC and related variables. (#257)
In the SunOS 4 days, the system cc apparently couldn't compile
the lp* files, so there was an arrangement to use an `ANSICC`,
which was just `gcc`, to build those files.

We no longer have this issue.
2021-01-20 09:43:46 -08:00
Bruce Mitchener
d311b0f4c8 Remove unintentional coercion from float to double. (#256)
By adding `0.0` and not `0.0f` and by calling `fmod()` rather than
`fmodf()`, we were unintentionally coercing the value from a
`float` to a `double`.

This resulted in x86_64 assembler like this:

```
    cvtss2sd %xmm0,%xmm0
    cvtss2sd %xmm1,%xmm1
    callq  403340 <fmod@plt>
    cvtsd2ss %xmm0,%xmm0
```

which is now:

```
    callq  403360 <fmodf@plt>
```

And for the `N_OP_equal` change:

```
    cvtss2sd %xmm0,%xmm0
    xorpd  %xmm2,%xmm2
    addsd  %xmm2,%xmm0
    cvtss2sd %xmm1,%xmm1
    addsd  %xmm2,%xmm1
    xor    %ecx,%ecx
    ucomisd %xmm1,%xmm0
```

is now:

```
    xorps  %xmm2,%xmm2
    addss  %xmm2,%xmm0
    addss  %xmm2,%xmm1
    xor    %ecx,%ecx
    ucomiss %xmm1,%xmm0
```

(Note `ss` rather than `sd`, along with the missing `cvtss2sd` calls.)
2021-01-20 09:36:13 -08:00
Bruce Mitchener
a427d9f394 Remove stderr output from mkvdate. (#255)
This shows up on every build and isn't needed.
2021-01-20 09:29:38 -08:00
Bruce Mitchener
addaad51fc Remove SunOS4 removal of __inline__. (#253) 2021-01-20 17:28:06 +00:00
Bruce Mitchener
6c1bfeaf79 Use MAIKO_ARCH_SPARC rather than sparc. (#252) 2021-01-19 23:50:03 -08:00
Bruce Mitchener
85fa89ba88 Remove key checking code. (#251)
This wasn't actually hooked up any more, so it was pretty much
all dead code. The handling of this in the command line options
is gone.

In `bin/makefile-tail`, `DEVFILES` and `LIBFILES` became identical, so
`DEVFILES` went away.
2021-01-19 23:47:55 -08:00
Bruce Mitchener
397143d760 xc.c: Remove sparc-only optimization hack. (#254)
It looks like this was trying to force a pointer into a register,
but only for SPARC.
2021-01-20 07:46:43 +00:00
Bruce Mitchener
d99209916a Remove bin/launch.asm. (#249)
This was a copy of `src/launch.asm`. Part of the DOS build process
made a copy, but that isn't something that needs to be in version
control.
2021-01-20 06:10:11 +00:00
Bruce Mitchener
f4c2f872a1 Remove bin/runlisp* (#250)
These are from when people were running lde on a small set of hosts
and needed some keys hardcoded. They are no longer relevant.
2021-01-20 06:07:45 +00:00
Bruce Mitchener
c51aff7bf3 Remove endiffix relics. (#248)
This isn't something we need around or even have the full source
for. It is a SPARC binary and a lexer script.
2021-01-19 21:45:43 -08:00
Bruce Mitchener
26bccdb3a8 Change some NOPIXRECT checks to SUNDISPLAY or remove. (#244) 2021-01-19 21:30:52 -08:00
Bruce Mitchener
e63c53cc06 Move SunOS 3 and 4 makefiles to legacy directory. (#245)
We don't remove them for now as we still reference the build
options as we work through things.
2021-01-19 21:27:22 -08:00
Bruce Mitchener
3318e75f7a Remove csh version of makeright. (#246)
In 2001, makeright was ported from csh to bash. This is the old
csh version.
2021-01-19 21:26:09 -08:00
Bruce Mitchener
2ffcc4209d Remove macOS 11 from GitHub Actions. (#247)
This platform is experimental on their end and is having
capacity problems. We don't need it for now and the noise
of the failures is not worth it.
2021-01-19 21:24:39 -08:00
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
Bruce Mitchener
c89b6fd611 Use the C99 floating point error code on Solaris. (#243)
Previously, we were building as C89 and the new code required
the C99 flag on Solaris with Sun Studio. Now that we build as
C99, this should work now and we can remove the special case
code.
2021-01-19 19:35:00 +00: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
32a4b52c66 GitHub Actions: Add builds using cmake. (#231) 2021-01-17 05:01:59 +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
Nick Briggs
2bb5854303 Remove -funsigned-char from standard compilation options (Issue Interlisp/medley#152) (#229)
Add standardized options for Oracle Developer Studio C compiler (aka SunPro C)

Using -funsigned-char causes the Oracle Developer Studio C compiler typedefs for
int8_t to become unsigned (uint8_t) rather than signed, with no warning or
other indication that this has happened.
2021-01-15 19:47:06 -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
Bruce Mitchener
373f66c855 GitHub Actions: Skip build-pi when not in Interlisp/maiko. (#224)
The build-pi builder is self-hosted, so it may not be present,
and isn't present in forks of this repo, making the CI less
useful.
2021-01-14 07:32:36 +00:00
Nick Briggs
ebc4a24d0b Fix various spelling, grammatical, and punctuation errors (#222) 2021-01-13 23:08:35 -08:00
Bruce Mitchener
be9c0c30c4 GitHub Actions: Update syntax for installing a cask from homebrew. (#225)
Homebrew on the macOS build machines for GitHub Actions was
updated to version 2.7 and that deprecated the `brew cask install`
syntax in favor of `brew install --cask`, so we need to update
here.

The announcement for the GitHub change is:

https://github.com/actions/virtual-environments/issues/2415
2021-01-13 23:07:39 -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
Larry Masinter
fc81b26085 Add build for self-hosted linux ARM (pi) 2021-01-13 14:43: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
c7314dcb31 Remove -DLINUX from Cygwin makefile. (#213)
This might have been necessary before where we had bits of code
that were still `#ifdef LINUX`, but that's mostly gone now, so
this should no longer be required.
2021-01-12 17:46:48 +00: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
Nick Briggs
fac400f918 Clean up CMakeLists.txt for Solaris (SunOS5) builds with ethernet enabled (#210)
dlpidefs.h was missing from the list of headers.
Solaris compiles should have USE_DLPI set.
ldeether depends on the dlpi object in the maiko library.
2021-01-11 20:30:56 -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
5a8f20c0ca Default NOFORN to defined. (#209)
The NOFORN flag controls foreign function interface code, which
was written using the dld_* APIs which haven't existed in years.

There was a GNU dld that provided this API, but it was withdrawn
in 2006.

If this code is to be re-enabled, it will have to be changed to
use the `dlopen` family of APIs.
2021-01-11 18:17:42 -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
Alex Segura
68d7908ee6 Support building on OpenBSD, x86-64 (#207)
* Support building on OpenBSD, x86-64

* Clean up OpenBSD Makefile

* Add OpenBSD to cmake build

* Use clang as CC for OpenBSD

Co-authored-by: Alex Segura <alex@lispm.dev>
2021-01-11 17:10:57 -08:00
Bruce Mitchener
fa13cc964c Switch to compiling as ISO C99 + GNU extensions. (#203)
We currently build for ISO C90 with GNU extensions. The GNU
extensions include both library and language features.
Compiling without GNU extensions results in a number of compilation
failures due to use of those library features.

With this, we'll build for ISO C99 with the GNU extensions and
can evaluate what's going on with those library features in the
future.
2021-01-10 20:47:55 -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
19033bba89 Remove extra flags for gcc on some platforms. (#202)
On Linux x86 and x86_64 as well as Cygwin, we were adding some
flags to the (commented out) usage of gcc. These shouldn't be
here.
2021-01-10 17:24:42 -08:00
Bruce Mitchener
0058cacc12 Remove I386 version of N_MakeFloat. (#204)
This used to differ, but the differences were dead code and
removed. We have no need for this extra bit of baggage.
2021-01-10 17:24:07 -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
fb7758a9ac Experimental build support via cmake. (#198)
This doesn't remove or replace the existing build system, but
provides an alternative. It allows for faster builds with proper
incremental builds, as well as using tools such as `clang-tidy`,
which work better when they have a compiler commands 'database'.
2021-01-09 11:05:41 -08: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
a093d80fa5 Add include guards to all the include files in inc/ which were missing them. (#189)
As a prerequisite for cleaning up some other include issues, all the
include files in inc/ should have an include guard.  All the xxxdefs.h
were created with them, but most older files were not.
2021-01-07 03:06:42 +00: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
Larry Masinter
995248decf Merge pull request #187 from Interlisp/revert-170-dont-open-unopened-file
Revert "Don't close a file that hasn't been opened (2)"
2021-01-05 18:56:11 -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
Nick Briggs
79b7a300a9 Clean up some mixed signedness issues (#175) 2021-01-04 16:50:21 -08:00
Bruce Mitchener
e73e125cbf uraid: Suppress incompatible pointer type warnings. (#160)
These pointers are pointers into the Lisp memory with a known
layout represented by that struct type.
2021-01-04 16:49:46 -08:00
Bruce Mitchener
226815dbd8 Pass correct sockaddr size to bind. (#178)
We should be passing the size of the `struct sockaddr_un`, not
the length of the path + the size of the path field.

There is another `bind` call in this file that had it right.
2021-01-04 20:26:57 +00:00
Bruce Mitchener
85aa360f2e Zero buffers before filling for write. (#177)
We were filling in parts of a buffer and writing it, but that
left some parts either uninitialized or with stale data from
the last read.

This clears out the buffer first so that we're not sending junk.
2021-01-04 17:43:08 +00:00
Bruce Mitchener
a481057fbe Fix unused variable warnings. (#173) 2021-01-03 21:58:16 -08:00
Nick Briggs
9373f4ebbe Fix warnings for unused variables when NOETHER is defined (#174) 2021-01-03 21:54:53 -08:00
Bruce Mitchener
e63d123c24 Fix misleading indentation. (#172) 2021-01-04 04:13:58 +00:00
Larry Masinter
29d1740ca6 Update README.md 2021-01-03 16:56:37 -08:00
Blake McBride
657539bcbf Correctly terminate execl() (#169) 2021-01-03 10:56:57 -08:00
Bruce Mitchener
ac2bfaa14c dbgtool: Fix warning from incorrect LispPTR* usage. (#161)
`fnobj_lisp` was being treated as a `LispPTR*` when it was just
a `LispPTR`. This requires fixing up the printfs as well since it
is no longer a void* to treat it as `%p`.
2021-01-03 10:45:15 -08:00
Bruce Mitchener
b549324eb1 Remove inlsparc.h, duplicate of inlnSPARC.h. (#159) 2021-01-03 10:35:42 -08:00
Bruce Mitchener
1d9c9eaa3f Cleanup typeof.c (#156)
* instanceof: Remove unused local var `type`.

* Remove unused N_OP_dtest.

This isn't used to actually implement the op. That is done via
the `DTEST` macro defined in `inc/inlineC.h` which duplicated
this code with minor differences in how it signals the error.
2021-01-03 10:33:31 -08:00
Bruce Mitchener
907e86c8d9 Fix some unused variable warnings. (#162) 2021-01-03 18:30:04 +00:00
Blake McBride
03c0d429f1 Don't close a file that hasn't been opened 2021-01-03 12:16:02 -06:00
Bruce Mitchener
4d00e0b2a1 Remove #ifdef I386 def for N_GETINUMBER. (#166)
There were 2 definitions for `N_GETINUMBER`, one for `I386` and one
for `I386` not being defined. Whether they differed or not in the
past isn't known, but they're identical now, so we don't need
two definitions.
2021-01-03 09:43:45 -08:00
Nick Briggs
c097563730 The error() function may return under exceptional circumstances (#97)
There are a few places where error() was called that in practice would never
be returned from, however since it was coded with the possibility of returning
all call sites must be consistent with that.

	modified:   ../src/car-cdr.c
	modified:   ../src/gchtfind.c
	modified:   ../src/hardrtn.c
2021-01-02 13:36:14 -08:00
Bruce Mitchener
a1e0e750d4 Remove F_SETSIG (#164)
* Remove F_SETSIG call from Linux on X11 display.

Presumably, this was added to be like the `I_SETSIG` call on Solaris.
But it is the only `F_SETSIG` done on Linux and there isn't an
equivalent on the other platforms that we support as it is a GNU
extension.

Also, `F_SETSIG` with an argument of `0`, as here, means to send
the `SIGIO` signal, which is what is done by default.

From the man page:

    F_SETSIG (int)

    Set the signal sent when input or output becomes possible
    to the value given in arg. A value of zero means to send
    the default SIGIO signal. Any other value (including SIGIO)
    is the signal to send instead, and in this case additional
    info is available to the signal handler if installed with
    SA_SIGINFO.

    By using F_SETSIG with a nonzero value, and setting
    SA_SIGINFO for the signal handler (see sigaction(2)),
    extra information about I/O events is passed to the
    handler in a siginfo_t structure. If the si_code field
    indicates the source is SI_SIGIO, the si_fd field gives
    the file descriptor associated with the event. Otherwise,
    there is no indication which file descriptors are
    pending, and you should use the usual mechanisms
    (select(2), poll(2), read(2) with O_NONBLOCK set etc.)
    to determine which file descriptors are available for I/O.

We aren't setting a non-zero value and we aren't establishing signal
handlers via `sigaction` with `SA_SIGINFO` set, so this shouldn't
be doing anything important for us.

* Stop setting _GNU_SOURCE for GNU libc extensions.

We were previously doing this to get access to the
`F_SETSIG` flag for `fcntl`, but this isn't being
used any longer.
2021-01-02 21:21:16 +00:00
Larry Masinter
33a67a80e9 Merge pull request #163 from waywardmonkeys/use-posix-pseudoterminals
Switch to using POSIX pseudoterminals.
2021-01-01 23:30:30 -08:00
Bruce Mitchener
a271917a61 Switch to using POSIX pseudoterminals.
Previously, we were using SysV pseudo-terminals on Solaris and BSD
pseudo-terminals on other Unix platforms. BSD pseudo-terminals have
been deprecated on Linux and are no longer available in some kernel
configurations.

The POSIX API is basically the same as the SysV API, apart from using
`posix_openpt` instead of `open` with `/dev/ptmx`.

Closes interlisp/medley#121.
2021-01-02 12:57:23 +07:00
Larry Masinter
67d6a799db Merge pull request #158 from Interlisp/unwind-int-unsigned-ptr-confusion
Correct handling of return value of N_OP_unwind()
2021-01-01 14:29:44 -08:00
Nick Briggs
12c5f3231e Correct handling of return value of N_OP_unwind()
The return value of N_OP_unwind is really of type LispPTR *, however it was
declared as UNSIGNED (effectively uintptr_t) so that the ERROR_EXIT macro
could be used to return an error indication (-1, =UINT_MAX). The call site
checked for the error condition with (int)result < 0, not accounting for the
case where a native pointer may have the high-order bit set.

We correct this problem by declaring the return type as LispPTR *,
and expand the ERROR_EXIT macro in place substituting (LispPTR *)(-1)
as the error return value, and at the single call site check for equality
with that same value.

The test case was executing the opcode tester on a Raspberry Pi or
a BeagleBone Black/Debian 10.3 where the non-error result was > 0xB0000000

  	modified:   inc/inlineC.h
        modified:   inc/unwinddefs.h
        modified:   src/unwind.c
2021-01-01 14:08:41 -08:00
Bruce Mitchener
fc3908f19a Fix typos. (#157) 2021-01-01 08:55:24 -08:00
Bruce Mitchener
b31ac48ed0 timer.c: Clean up / simplify includes. (#155) 2021-01-01 05:01:32 +00:00
Bruce Mitchener
848177aa95 The SYSVONLY flag is no longer used or needed. (#153)
Welcome to the world of being mostly POSIX!
2020-12-31 17:13:05 -08:00
Bruce Mitchener
d717946929 Cleanup byteswap.c a bit (#154)
* Remove word_swap_longword.

This was the same as `swapx` and not used except in one place which
now uses `swapx` instead.

* Remove assembly versions of swapx, byte_swap_word, word_swap_page.

`swapx` and `byte_swap_word` were defined as:

```
extern inline const unsigned int swapx (unsigned int word)
{
   asm("roll  $16,%0" : "=g" (word) : "0" (word));
   return(word);
}

extern inline const unsigned short byte_swap_word (unsigned short word)
{
   asm("rolw  $8,%0" : "=r" (word) : "0" (word));

   return(word);
}
```

But the generated code from the C version is:

```
(lldb) disassemble -n swapx
ldex`swapx:
ldex[0x10002e0d0] <+0>:  pushq  %rbp
ldex[0x10002e0d1] <+1>:  movq   %rsp, %rbp
ldex[0x10002e0d4] <+4>:  movl   %edi, %eax
ldex[0x10002e0d6] <+6>:  roll   $0x10, %eax
ldex[0x10002e0d9] <+9>:  popq   %rbp
ldex[0x10002e0da] <+10>: retq

(lldb) disassemble -n byte_swap_word
ldex`byte_swap_word:
ldex[0x10002e0e0] <+0>:  pushq  %rbp
ldex[0x10002e0e1] <+1>:  movq   %rsp, %rbp
ldex[0x10002e0e4] <+4>:  rolw   $0x8, %di
ldex[0x10002e0e8] <+8>:  movzwl %di, %eax
ldex[0x10002e0eb] <+11>: popq   %rbp
ldex[0x10002e0ec] <+12>: retq
```

So we don't really stand to gain by re-enabling this old assembler code.

We would gain from switching to C99 or C11 and improving our
inlining.

* Remove 386 asm version of bit_reverse_region.

This is implemented in C and the code isn't actually set up to
allow using the assembler version.
2020-12-31 10:29:19 -08:00
Bruce Mitchener
ca3f27db1f Use setsid on all Unix platforms. (#152)
Previously, we used `TIOCNOTTY` on some platforms (FreeBSD, macOS)
and `setsid` on Linux and Solaris. The correct modern way to do
this is to use `setsid` and the BSDs support this, so let's just
do that.
2020-12-31 09:44:36 -08:00
Nick Briggs
d28334bd24 Fix makefile fragment for linux on arm (#147)
* Update comments describing configuration this makefile fragment supports.

* Remove extra compiler options for suggested gcc build

* Remove unnecessary -m32 option for suggested clang build

* switch default compiler from clang to gcc
2020-12-30 22:18:28 -08:00
Bruce Mitchener
0bbdf606b6 Cygwin doesn't have O_ASYNC, so fix compilation. (#151)
It looks like Cygwin doesn't actually support signal-based I/O,
so while this compiles, it won't be correct and will need
addressing in another way.
2020-12-30 21:47:50 -08:00
Bruce Mitchener
a47119f006 killpg is POSIX, so we can rely on it now. (#150)
This removes some usages of the SYSVONLY flag and lets us assume
the existence of `killpg`. It also updates a bit of code to accurately
populate the `pgrp` variable using `tcgetpgrp` rather than an ioctl.
2020-12-30 21:39:42 -08:00
Bruce Mitchener
f1647df8b1 Default to NOETHER, only enable on Solaris. (#149)
* Default to NOETHER, only enable on Solaris.

* DOS: NOETHER controlled by inc/version.h

We set NOETHER by default on DOS, so no need for it here in the
build system.
2020-12-31 01:33:58 +00:00
Bruce Mitchener
6adb79840d Update fcntl F_SETFL usage. (#144)
This changes from `FASYNC` to `O_ASYNC`, `FNDELAY` to `O_NONBLOCK`,
and `O_NDELAY` to `O_NONBLOCK`. These are the modern names.

`O_NONBLOCK` is part of the POSIX standard. However, `O_ASYNC` is
specific to Linux and BSD. It is not available on Solaris, where
we still need to use `FASYNC`. Also, the behavior of having I/O
trigger a `SIGIO` signal is not in POSIX, since the `SIGIO` signal
is not in POSIX. Instead, it is only the behavior of having `SIGURG`
being signalled for out of band data that is specified.

We also takes this opportunity to collapse some multi-line calls
to get the flags, store it into a temp, and then set them, to
just doing it in one line, skipping the stored temporary value.

We also change one instance of `65535 - FNDELAY` to `~O_NONBLOCK`.

Closes interlisp/medley#85.
2020-12-31 01:28:34 +00:00
Bruce Mitchener
3b1bdd225f REGISTER is for floats. (#148)
According to `inc/version.h`, `REGISTER` is for floats which may
or may not be able to be in registers due to the `FPTEST` macro
implementation. We shouldn't be using it here for non-float
data.
2020-12-31 00:16:03 +00:00
Bruce Mitchener
7f7952cbad Remove USETIMEFN define. (#143)
In the past, we didn't use `gettimeofday()` on all non-DOS platforms
because it wasn't available, so we had to fall back to `time()`.
Those days are long gone and we have `gettimeofday()` on all non-DOS
platforms.

This also removes some code that used `times()` when it used `time()`.
This leaves us using `getrusage()` on all non-DOS platforms. This,
much like `gettimeofday()`, is now available everywhere. Not all of
the fields used here are guaranteed by POSIX, but the ones used
here shouldn't be an issue for now.
2020-12-30 14:38:58 -08:00
Bruce Mitchener
7a74d6e66f Control VM config via RELEASE. (#136)
When `RELEASE` is set, then `inc/version.h` configures some
defines appropriately, including `BIGATOMS`, `BIGVM`, and
`NEWCDRCODING`. There's no need to manage it directly on
the compiler command line.
2020-12-30 14:32:31 -08:00
Bruce Mitchener
3eb8d36a49 README: Add discussion of platform support. (#146) 2020-12-30 09:59:22 -08:00
Larry Masinter
c395b816d8 Merge pull request #145 from Interlisp/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2020-12-29 15:42:04 -08:00
Larry Masinter
fef8be9f5c Create CODE_OF_CONDUCT.md
as per Discussion#111
2020-12-29 11:00:24 -08:00
Bruce Mitchener
3e2a2d76ec fcntl(..., F_SETFL, ...) return value only signals error. (#141)
The return value of `fcntl` when passed `F_SETFL` isn't guaranteed
to return the flags passed in as its return value. It will be `-1`
in the event of an error, but no other value is to be relied upon.

Fortunately, we weren't relying upon the value apart from
occasionally checking for an error.

This is as it is specified in https://pubs.opengroup.org/onlinepubs/7908799/xsh/fcntl.html

Closes interlisp/medley#87.
2020-12-28 17:59:27 -08:00
Bruce Mitchener
01926fc232 NEW_STORAGE is no longer new. (#135)
* Always follow NEW_STORAGE code paths.

This removes the code paths for the pre-NEW_STORAGE code.

* Remove NEW_STORAGE from build system.

The code no longer refers to `NEW_STORAGE`, so we can remove
this from the build system.
2020-12-28 10:10:43 -08:00
Bruce Mitchener
14402131e7 Reduce number of -Wshorten-64-to-32 warnings. (#138) 2020-12-28 00:19:26 -08:00
Bruce Mitchener
999851e60c Use SEEK_SET for third arg to *seek() functions. (#139)
Instead of sometimes passing `0` to `lseek` and friends, we should
use the standard symbolic constant `SEEK_SET`.
2020-12-28 00:18:41 -08:00
Bruce Mitchener
a986b1e57a Remove unused fptovp_scratch variable. (#140) 2020-12-28 00:10:23 -08:00
Bruce Mitchener
023cf609f2 init_Xcursor takes Window, not int for window. (#137)
`Window` is an X11 typedef for `unsigned long` (via `XID`). We should
pass it as that, not an `int`, to avoid 64 bit conversion issues.
2020-12-28 07:19:30 +00:00
Bruce Mitchener
0880b2f3dd Remove UNSAFE flag. (#134)
This flag was for SunOS 3 and 4 on sun3 hardware (68k).

It enabled some unsafe optimizations via assembler. This hasn't
actually been built since the DOS port (since the header for this
was renamed, but the code in `xc.c` wasn't updated).

The optimizations here made assumptions that were specific to the
68k hardware and register allocation. They aren't likely to be
of much use moving forward, and we've got plenty of safe performance
improvements from the last 30 years of hardware advances.
2020-12-26 20:53:47 +00:00
Bruce Mitchener
e295a34484 Remove inlnMIPS.h. (#133)
We removed support for MIPs platforms, so this code is unused.
2020-12-26 10:43:35 -08:00
Larry Masinter
100b0968cf Merge branch 'master' of https://github.com/interlisp/maiko into cygwin3 2020-12-25 11:15:18 -08:00
Nick Briggs
ac48a9bf9d Fix typo in environment variable name that broke interprocess communications (issue Interlisp/medley#106) (#132) 2020-12-24 10:02:20 -08:00
Larry Masinter
db281a361c Merge branch 'master' of https://github.com/interlisp/maiko into cygwin3 2020-12-24 17:17:29 +00:00
Bruce Mitchener
bf2855be58 Use the real gethostid on Solaris. (#121)
* Use the real gethostid on Solaris.

Solaris has this, so we might as well use it like we do on other
platforms. This value is used in response to queries from it from
Lisp.

* Improve undefining of HAS_GETHOSTID.

Enable it on Solaris in `inc/version.h`. This file already
disables it on DOS, so no need to do so again in `src/initsout.c`.
2020-12-23 19:55:58 -08:00
Larry Masinter
e452a97e22 setup for cygwin (compiles but crashes) 2020-12-24 01:55:27 +00:00
Larry Masinter
e801373222 X11 definitions moved for MacPorts X11 2020-12-23 11:01:10 -08:00
Bruce Mitchener
3ef2d12115 Use memset instead of bzero. (#131) 2020-12-23 10:34:27 -08:00
Bruce Mitchener
985f2c43fe Remove prototypes for getenv. Use stdlib.h. (#122)
This also removes some casts to `char *` that were present but
not needed, since `getenv()` is defined to return `char *`.
2020-12-23 15:44:16 +00:00
Bruce Mitchener
530aa4ce6d Simplify including sun/fbio.h. (#130)
Both sides of this #ifdef were the same, so just collapse it.

This code isn't actually relevant any longer, but this removes
an OS-specific #ifdef, making inspection of platform specific
code a bit easier.
2020-12-23 15:34:14 +00:00
Bruce Mitchener
16019c24eb Don't use dirent's d_reclen as if it were d_namlen. (#128)
This code was treating the `d_reclen` incorrectly from some of the
original old porting work. It is not the same as `d_namlen` and
`d_namlen` is not widely supported or standard. It should be using
`strlen(d_name)`.

This addresses an issue mentioned in interlisp/medley#103.
2020-12-22 23:26:56 -08:00
Bruce Mitchener
72948ae0fd Clean up medleyfp.h. (#127)
* Include <ieeefp.h> for Solaris.
* Remove sections for sparc and Sun i386 for non-Solaris.
* Have Linux use the same code as FreeBSD and macOS.
* Make the FreeBSD / Linux / macOS code path the default, if nothing
  special is defined since it is the modern way.
* Remove fpstatus_() usage from the ancient days.
2020-12-22 23:23:26 -08:00
Bruce Mitchener
0c8ae869b9 Remove comment reference to SIGNED_CHARS define. (#126)
None exists or is used, so no need to discuss it.
2020-12-22 23:17:28 -08:00
Bruce Mitchener
9aeac67592 Only include stropts.h on Solaris. (#125) 2020-12-22 23:09:42 -08:00
Bruce Mitchener
1b9a90add6 Remove XWINDOWS define from FreeBSD, Linux, and macOS builds. (#124)
The right define is `XWINDOW` which is already defined via the
build system.
2020-12-22 23:08:00 -08:00
Bruce Mitchener
4ef79b54a5 Remove unused prototype for getpass(). (#123)
This function wasn't actually used here, which is good since it
is long deprecated.
2020-12-22 23:06:14 -08:00
Bruce Mitchener
a6ef508a7c Remove ToMem macro. (#120)
We can always use `memcpy` to copy from a `hostent` struct to a
`sockaddr_in` struct as they will not be overlapping.
2020-12-22 22:57:40 -08:00
Bruce Mitchener
8b67b6b75a Remove call to ieee_handler(). (#119)
When `FLTINT` is defined (which is currently only on SunOS), if
`OS5` was not defined, then it tried to use `ieee_handler` which
doesn't exist on Linux and friends. If we were to enable `FLTINT`
on more platforms, then we'd want to always be using more modern
signal handling and not `ieee_handler`.
2020-12-22 22:57:19 -08:00
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 761ab8cac6.
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
Nick Briggs
d3a94b2d86 gcc says error: C++ style comments are not allowed in ISO C90 2020-12-15 09:51:36 -08:00
Bruce Mitchener
3de2787166 Use settimeofday() instead of stime(). (#65)
Also, fully initialize timeval usec to 0. (Noticed by @nbriggs.)
2020-12-15 09:45:51 -08:00
Bruce Mitchener
e6a5d898c5 Remove more AIX (but not really AIX) ifdefs. (#66)
Trying to remove / replace / update all remaining AIX ifdefs.
2020-12-15 09:02:26 -08:00
Bruce Mitchener
30f51a0601 Switch from ioctl/FIONBIO to fcntl/O_NONBLOCK. (#64) 2020-12-15 08:38:14 -08:00
Bruce Mitchener
69adf2ffd3 Use LINUX, not AIX, in medleyfp.h. (#63)
AIX was defined by a number of targets, but the only one that
doesn't currently have anything here is LINUX, so we can just
check that instead.
2020-12-15 08:32:44 -08:00
Bruce Mitchener
680e8485fe Remove unused timeoday.c and timeofday.c files. (#62) 2020-12-15 08:09:04 -08:00
Bruce Mitchener
433a659063 Require termios on Unix. (#61)
Remove the USETERMIOS preprocessor definition as well.
2020-12-15 08:05:59 -08:00
Nick Briggs
50c4aa24d6 Interface page storagefullstate is only defined if NEW_STORAGE. 2020-12-14 22:35:55 -08:00
Bruce Mitchener
f6ab28d273 Convert nearly-dead code to using statvfs, not statfs. Remove unused stat buf. (#60)
This code is for non-DOS, non-XWindows, and still used the legacy
statfs API.
2020-12-14 22:24:32 -08:00
Bruce Mitchener
cbcb544e02 xrdopt always needs unistd.h, so don't conditionally include it. (#59) 2020-12-14 22:21:54 -08:00
Bruce Mitchener
bdb7e584b6 Improve I_SETSIG check for X I/O. (#58)
I_SETSIG is part of the STREAMS interface, which is only present
on Solaris (among our supported platforms), so simplify this check.

Other usages of I_SETSIG could be improved, but they need more
investigation and perhaps removal.
2020-12-14 22:17:54 -08:00
Bruce Mitchener
7e2e1399e3 inc/version.h: Remove some old/unused workarounds. (#57) 2020-12-14 22:10:30 -08:00
Bruce Mitchener
57d2fee754 Fix endif comment to indicate correct define. (#55) 2020-12-14 20:39:10 -08:00
Bruce Mitchener
ebf806fc79 Remove remnants of valloc workarounds. (#54) 2020-12-14 20:38:53 -08:00
Bruce Mitchener
fb7e88aba4 Remove makewrong, remnant from Sun3 days. (#53) 2020-12-14 20:38:09 -08:00
Bruce Mitchener
54b4f22d9b Modernize / simplify statfs / statvfs handling. (#52)
`statfs` was replaced by `statvfs` some years ago in SuSv4 and
is significantly more portable.
2020-12-15 03:30:25 +00:00
Bruce Mitchener
dba22abf93 Remove the signal handler prototype that returns int. (#51)
These should return void and we no longer build for any OS where
an int is returned.
2020-12-14 18:32:50 -08:00
Bruce Mitchener
857100a29a Remove AIX on PS/2 platform support. (#50) 2020-12-14 18:14:59 -08:00
Bruce Mitchener
df4f8c25eb Update an inclusion of inlnPS2.h (#49)
Most includes of this file are protected by #ifdef GCC386, but this
one was AIXPS2, which is going away.
2020-12-14 17:16:27 -08:00
Bruce Mitchener
a2c527378e Remove src/xc.c.orig (#48)
This was a backup copy of xc.c made in 2001 (judging by the Id
line).
2020-12-14 16:59:55 -08:00
Nick Briggs
e267ebcd05 Convert debug print macros to do {} while (0) style.
Convert conditional debug statements to require external semi-colon.

	modified:   ../inc/dbprint.h
	modified:   ../src/ldsout.c
2020-12-14 13:50:55 -08:00
Nick Briggs
cd9e0aa877 Add braces around DBPRINTF macro which could expand to nothing 2020-12-14 13:02:51 -08:00
Bruce Mitchener
7d2de5e4de Remove define direct dirent workarounds. (#47)
This also removes a workaround for L_SET, as well as some of the
dirent member fields.
2020-12-14 12:16:59 -08:00
Bruce Mitchener
fd0e12e855 Remove AIX RS/6000 platform support. (#46)
AIX on PS/2 will be removed separately.
2020-12-14 12:13:38 -08:00
Bruce Mitchener
605499bfc2 Remove getdtablesize calls in favor of sysconf(_SC_OPEN_MAX). (#45)
`getdtablesize()` has long been deprecated in favor of
`sysconf(_SC_OPEN_MAX)`.
2020-12-14 11:55:08 -08:00
Bruce Mitchener
9c01d39812 Use waitpid, not wait3, etc. (#44)
This removes code that uses `union wait` status in favor of code
that uses `int` status. This has been the correct way since
SvR4, BSD 4.3, POSIX.
2020-12-14 09:58:28 -08:00
Bruce Mitchener
20040a73b0 Use tcgetattr/tcsetattr in termios code, not ioctl. (#43)
Previously, we were using ioctl directly on some platforms rather
than always going through termios. This complicates portability.
2020-12-14 17:49:28 +00:00
Bruce Mitchener
52d3590401 Remove 1988-era copies of some SunOS headers. (#42) 2020-12-14 17:38:14 +00:00
Bruce Mitchener
a68cce2203 Begin to clean up includes and ifdefs in includes. (#41) 2020-12-14 09:26:06 -08:00
Bruce Mitchener
2dba7492af Begin to remove ISC platform support. (#40)
We don't want to modify emulation code yet as ISC support included
a number of other things, including some i386 code that isn't used
on other platforms, but is still useful as a reference.
2020-12-13 22:31:58 -08:00
Bruce Mitchener
7119613aee Remove RISCOS platform support. (#39) 2020-12-14 01:38:57 +00:00
Bruce Mitchener
7313de4274 Remove FUJI compile flag. (#38)
This was only used for a keyboard warning that doesn't seem
relevant any longer.
2020-12-14 01:21:54 +00:00
Bruce Mitchener
074dce0e90 Remove bin/optck and bin/optck-. (#24)
These were binaries built for SPARC to test some assembler
optimizations.

They aren't needed as part of the version control as they're just
artifacts of the past.
2020-12-13 15:40:24 -08:00
Bruce Mitchener
46e9882f30 We only build as ANSI C, so we don't check for __STDC__. (#37) 2020-12-13 10:24:04 -08:00
Bruce Mitchener
33a42736d4 Remove OSF1 / DEC3100 platform support. (#36)
This also removes support for the DEC3100 keyboard, but leaves a
constant behind for it as I'm not sure about re-numbering.
[NBriggs: keyboard type numbers are stored within all sysouts.  Do not renumber supported keyboards, do not reuse previously used keyboard numbers]
2020-12-13 10:22:43 -08:00
Nick Briggs
cfec521c33 Remove unused VOID 2020-12-12 23:44:12 -08:00
Bruce Mitchener
8e67d0e3c9 Remove unused externs.h (#35)
The things that are declared here either are declared elsewhere
or don't exist any longer.
2020-12-12 21:46:34 -08:00
Bruce Mitchener
362c658c73 Remove usermakefile for Apollo Domain. (#32)
Follow up on #30.
2020-12-12 21:46:07 -08:00
Bruce Mitchener
1c912ff57e Remove HP platform support. (#34)
This removes code related to HP9000, HPTIMERBUG, and HPUX defines.

It leaves KB_HP9000 for now as I'm not sure about renumbering
those constants.

This should not impact any of the core emulation code.
2020-12-13 05:35:53 +00:00
Bruce Mitchener
750d84c78c Remove SGI Irix platform support. (#33)
This platform had no emulation-related changes.

Remove code for IRIX40, INDIGO definitions.

In disk code, simplify a chain of #ifdef's around fsync handling.
2020-12-13 02:57:07 +00:00
Bruce Mitchener
1c28005420 Remove support for Ultrix. (#28)
Ultrix hasn't seen an update since 1995 and the DEC3100 hardware
that this was originally written for was released in 1989.

It isn't likely that anyone has Ultrix running on hardware where
they would also want to run this.
2020-12-12 18:15:22 -08:00
Bruce Mitchener
348a3a2b30 uutils: Clean up string.h inclusion. (#31)
This is similar to the change in #27. We can just include <string.h>
rather than doing performative dances and complicating everything.
2020-12-12 18:12:06 -08:00
Bruce Mitchener
d91bdc0994 initkbd: Fix warning about missing decl for strcmp. (#27)
Instead of adding more stuff to the `#ifdef` around the inclusion
of `<string.h>`, we remove that `#ifdef` entirely.

There are many instances of `<string.h>` being included in the
code without any `#ifdef` protection, and `strcmp` is defined to
be declared in `<string.h>`, so all platforms from the last 20
years and into the future will need this.
2020-12-12 18:09:10 -08:00
Bruce Mitchener
292809694e Remove platform support for Apollo/Domain. (#30) 2020-12-13 02:07:08 +00:00
Bruce Mitchener
69e66470a0 Remove unused _I386 -D flag. (#29)
This flag isn't actually used in any code, so let's remove it to
avoid confusion over whether it does do something or not.
2020-12-12 18:59:26 +00:00
Nick Briggs
a059b67e88 Make dremove() static in src/storage.c, there are no other references. 2020-12-11 22:06:23 -08:00
Nick Briggs
8ee75ede4e Don't define old_cursorin() if it's not going to be used (REALCURSOR || SUNDISPLAY).
modified:   src/bbtsub.c
2020-12-11 16:40:08 -08:00
Nick Briggs
0786d75e67 Correct C dremove() implementation (not used for implementation of the Lisp DREMOVE function)
The C translation didn't observe that the value of (COND (C X)) is NIL if not C.

	modified:   src/storage.c
2020-12-11 16:20:33 -08:00
Bruce Mitchener
259a2006a1 Remove inc/lnk-*.h (#23)
These headers aren't used and are all old copies of the same
headers without `lnk-` in the name.
2020-12-10 21:52:12 -08:00
Bruce Mitchener
fd9ca83dac Remove inc/stream.h2 (#26)
This is identical to inc/stream.h apart from a SCCS ID line and
is unused.
2020-12-10 21:41:52 -08:00
Bruce Mitchener
79c3fdd691 Add initial CI via GitHub Actions. (#22)
This does a basic build for macOS Catalina and Ubuntu Bionic.
2020-12-11 05:38:33 +00:00
Bruce Mitchener
d8aef575b4 Remove old editor save file for inc/sysatms.h. (#25) 2020-12-10 21:00:01 -08:00
Nick Briggs
a02ea64c52 Use correct format (%ld) for (long) times in seconds. 2020-12-10 16:53:40 -08:00
Bruce Mitchener
dbd5bd6679 Remove fp.h (#21)
This was replaced by medleyfp.h. Perhaps this happened because
some systems have an fp.h in their system includes and the naming
collision was an issue. But nothing uses fp.h and medleyfp.h is
an updated version of the contents.

This also updates a bunch of manually managed dependency lists
to reflect the usage of medleyfp.h rather than fp.h.

Nick Briggs: Note that on OSF1 medleyfp.h includes the system fp.h (probably the origin of the renaming)
2020-12-10 17:52:08 +00:00
Bruce Mitchener
d6d2a3371a Use getcwd() instead of getwd(). (#20)
getwd() has been deprecated for a long time and getcwd() should
be used instead.
2020-12-10 17:24:21 +00:00
Bruce Mitchener
11c083d792 Remove editor save files. (#19)
Reviewed differences between save files and current versions to ensure no relevant history was lost.
2020-12-10 08:39:07 -08:00
Bruce Mitchener
e025617c13 Fix some typos. (#18)
Changes to commentary only.
2020-12-10 08:07:35 -08:00
Nick Briggs
5c8fb47005 Change local variable name to avoid warnings for shadowing.
modified:   inc/arith.h
2020-12-09 18:23:16 -08:00
Nick Briggs
9b12db45be Really switch to UNSIGNED instead of uintptr_t -- modified src/findkey.c 2020-12-09 18:14:50 -08:00
Nick Briggs
af50a35911 version.h defines "UNSIGNED" as the type for pointer-sized integer. Using "unsigned" may produce the wrong answer on a 64-bit system.
modified:   ../src/findkey.c
2020-12-09 18:09:19 -08:00
Nick Briggs
a6db884947 Add a tiny bit of documentation for newpage(). No functional change.
modified:   src/storage.c
2020-12-09 13:50:15 -08:00
Nick Briggs
b234064d91 Rework handling of I/O via select() to use correct fd_set type instead of int for fd sets.
Some code that was maintaining an fd_set with only a single fd was replaced
       with just the fd as int, which can be added to the global fd_set as needed.
       More testing is required for less usual configurations such as host TCP/UDP/IP
       and direct ethernet (packet filter or NIT) I/O.

	modified:   src/common.c
	modified:   src/ether.c
	modified:   src/inet.c
	modified:   src/initkbd.c
	modified:   src/kbdsubrs.c
	modified:   src/keyevent.c
	modified:   src/main.c
	modified:   src/osmsg.c
	modified:   src/rawrs232c.c
	modified:   src/rpc.c
	modified:   src/rs232c.c
	modified:   src/tty.c
	modified:   src/uraid.c
	modified:   src/xinit.c
2020-12-08 19:26:56 -08:00
Nick Briggs
ba0a42f663 Remove replicated (debug) storage for stack block checks causing shadowed variable warnings.
Initialize free stack block debug storage using sizeof() appropriately.

	modified:   src/llstk.c
2020-12-08 12:34:59 -08:00
Nick Briggs
af30a6d5a9 Change names of block local variables causing shadowing warnings.
Remove duplicate function prototype declaration (duplicate in inc/returndefs.h)

	modified:   inc/return.h
2020-12-08 10:20:07 -08:00
Nick Briggs
be3ffd746c Remove unnecessary declaration causing shadowing warnings.
modified:   ../src/ldeboot.c
	modified:   ../src/unixfork.c
2020-12-08 10:03:40 -08:00
Nick Briggs
49aa01a70b Remove unnecessary declaration causing shadowing warnings.
Improve debugging output for fp-to-vp page runs.

	modified:   src/vmemsave.c
2020-12-08 09:55:41 -08:00
Nick Briggs
f89cc4449c Fix local variables declared in macros to avoid them shadowing other variables.
Fix some spelling errors.
Remove deprecated register attribute

	modified:   inc/lispver2.h
	modified:   inc/locfile.h
2020-12-07 15:36:53 -08:00
Nick Briggs
f94570d01c Fix warning for missing function prototype in keymaker.c 2020-12-07 15:22:47 -08:00
Nick Briggs
a067ab2a67 Correct spelling errors in rs232c.h 2020-12-07 11:03:05 -08:00
Nick Briggs
064027e841 Use MAXPATHLEN for length of arrays containing path.
Use strncpy() to replace unsafe use of strcpy().
Use getcwd() to replace unsafe use of getwd().

	modified:   main.c
2020-12-05 17:44:07 -08:00
Nick Briggs
be5e981941 Using memset() requires including <string.h>
modified:   src/ldsout.c
2020-12-04 13:07:55 -08:00
Nick Briggs
90cca21044 Don't use "id" for a variable shadowing the global "id" identification string.
modified:   src/chatter.c
	modified:   src/dir.c
	modified:   src/ejlisp.c
	modified:   src/osmsg.c
	modified:   src/picture.c
2020-11-28 18:21:59 -08:00
Nick Briggs
fea01d8b69 Don't use "id" for a variable shadowing the global "id" identification string.
Addresses passed as data to an ioctl() should be void* not int.

	modified:   src/chardev.c
2020-11-28 18:13:53 -08:00
Nick Briggs
bc702f74ad If "inline" is used it should be the first attribute in the procedure declaration.
modified:   ../inc/my.h
2020-11-27 14:52:03 -08:00
Nick Briggs
8dda1fe2a8 Update build files for M1 Mac systems (refs Interlisp/medley#69)
The config.guess script returns "aarch64-apple-darwin20.1.0" for an M1 Big Sur mac mini.

	modified:   bin/machinetype
	new file:   bin/makefile-darwin.aarch64-x
2020-11-24 17:43:04 -08:00
Nick Briggs
d8c0ab9bdf Fix detection of timezone offset for FreeBSD. (Refs Interlisp/medley/#65)
modified:   src/timer.c
2020-11-23 20:49:43 -08:00
Nick Briggs
d9d917ab82 Add a verbose option to tstsout to provide more info from the interface page
Usage: tstsout [-v] sysout-filename

    prints the minbversion, process_size, storagefullstate, and nactivepages

	modified:   src/tstsout.c
2020-11-21 14:16:51 -08:00
Nick Briggs
365d07f817 Some floating point related functions are defined in <math.h>, include it.
modified:   src/fp.c
2020-11-21 11:50:33 -08:00
Nick Briggs
2dd366bcb9 Fix timezone detection (refs Interlisp/medley#65)
Use tzset() and the timezone variable to more robustly detect the timezone.
    This will also allow a user to set the TZ environment variable to override system timezone settings.

	modified:   src/timer.c
2020-11-17 18:01:01 -08:00
Nick Briggs
b9fa900512 Fix memory leak in make_X_keymap(). Ref #64
Add extra debugging printfs for X keyboard mapping under ifdef DEBUG.

	modified:   src/initkbd.c
2020-11-11 18:33:43 -08:00
Abe Jellinek
3db585e2b2 Docker compatibility: makefile and headers (#17)
* Docker compatibility: makefile and headers
- _GNU_SOURCE required for F_SETSIG
* Remove duplicate makeright.sh script
* Update some includes that don't exist on modern Linux (termio.h); Clang in Docker
  has trouble resolving them automatically
2020-10-26 17:54:35 -07:00
Nick Briggs
a94e46bf8e Update wording and formatting of URaid command documentation
modified:   src/uraid.c
2020-10-25 18:39:38 -07:00
Nick Briggs
2bf4cea359 Remove unnecessary declaration for nametable that was shadowed by block local declaration, causing compilation warning.
modified:   src/gcmain3.c
2020-10-25 18:35:16 -07:00
Nick Briggs
135d7f65d3 Switch compilation flags for Solaris2 on x86_64 to compile in 64-bit mode rather than 32-bit mode.
modified:   bin/makefile-sunos5.x86_64-x
2020-10-18 16:33:21 -07:00
Nick Briggs
27d5e44b81 Add makefile fragment for sunos5-x86_64 compilation.
new file:   bin/makefile-sunos5.x86_64-x
2020-10-18 16:23:52 -07:00
Nick Briggs
1200763831 Update osversion script to recognize Solaris 2.x running on x86_64 hardware.
modified:   bin/osversion
2020-10-18 16:04:16 -07:00
Nick Briggs
56615128e0 Merge branch 'master' of https://github.com/Interlisp/maiko 2020-10-18 14:33:41 -07:00
Nick Briggs
17fbbe96d7 Hook up the X11 Button4 and Button5 events (from mouse scrollwheel or trackpad vertical scroll) to
the Dolphin/Dorado key set PAD1 (LEFTKEY) and PAD2 (LEFTMIDDLEKEY) keys.
2020-10-18 14:27:58 -07:00
Larry Masinter
0342f93b68 suggested replacement was better. 2020-10-10 06:31:22 -07:00
Larry Masinter
192c351007 fix #43
use of support phone numberes
2020-10-10 06:16:11 -07:00
Nick Briggs
14d4d3a5a2 Fix spelling error in variable name. No functional change.
modified:   src/unwind.c
2020-10-03 14:47:54 -07:00
Nick Briggs
d8fda3b846 Update error messages when fcntl/ioctl on X fd for SETSIG fails to make it a little clearer.
modified:   src/timer.c
2020-09-27 14:27:29 -07:00
Nick Briggs
21baf85c22 Fix prototype syntax for functions with no parameters in include files
Add some overlooked function prototypes  to xxxdefs.h include files
Add missing #include of relevant xxxdefs.h in a couple of source files
Add prototypes in standalone programs to silence (some) -Wmissing-prototype warnings
Remove duplicate prototype from hardrtn.c

	modified:   inc/commondefs.h
	modified:   inc/dirdefs.h
	modified:   inc/dspifdefs.h
	modified:   inc/dspsubrsdefs.h
	modified:   inc/etherdefs.h
	modified:   inc/gcmain3defs.h
	modified:   inc/initdspdefs.h
	modified:   inc/initkbddefs.h
	modified:   inc/keyeventdefs.h
	modified:   inc/maindefs.h
	modified:   inc/osmsgdefs.h
	modified:   inc/testtooldefs.h
	modified:   inc/timerdefs.h
	modified:   inc/unixfork.h
	modified:   inc/uraiddefs.h
	modified:   inc/vmemsavedefs.h
	modified:   inc/xcursordefs.h
	modified:   inc/xlspwindefs.h
	modified:   src/arith2.c
	modified:   src/ether.c
	modified:   src/hardrtn.c
	modified:   src/keytstno.c
	modified:   src/setsout.c
	modified:   src/tstsout.c
2020-09-27 11:58:17 -07:00
Nick Briggs
4bf195ee71 Some parts of the system still depend on the Lisp memory being initialized to zero. Ensure that that happens.
modified:   src/ldsout.c
2020-09-19 22:05:06 -07:00
Nick Briggs
cb1b3c65e8 Helpers for BITBLT and BLTSHADE need to return ATOM_T rather than T. Ref issue #35
modified:   src/bbtsub.c
2020-09-19 19:21:14 -07:00
Nick Briggs
a5e70206fc Fix free list construction in new cons page to explicitly initialize ALL cons cells on the page (Ref issue #34)
Update comments, correct spelling errors, simplify style, note some areas for future work.

	modified:   src/conspage.c
2020-09-18 15:07:10 -07:00
Nick Briggs
b1790bb7fe Remove extraneous external/forward declarations that are duplicates of those in "xxxdefs.h" files.
modified:   src/allocmds.c
	modified:   src/array5.c
	modified:   src/car-cdr.c
	modified:   src/dbgtool.c
	modified:   src/ether.c
	modified:   src/gc2.c
	modified:   src/gcfinal.c
	modified:   src/gcmain3.c
	modified:   src/gcrcell.c
	modified:   src/initkbd.c
	modified:   src/initsout.c
	modified:   src/keyevent.c
	modified:   src/keylib.c
	modified:   src/keymaker.c
	modified:   src/keytst.c
	modified:   src/loopsops.c
	modified:   src/lsthandl.c
	modified:   src/main.c
	modified:   src/mkatom.c
	modified:   src/mkcell.c
	modified:   src/mvs.c
	modified:   src/storage.c
	modified:   src/testtool.c
	modified:   src/unixcomm.c
	modified:   src/vars3.c
	modified:   src/xc.c
	modified:   src/z2.c
2020-09-17 23:07:56 -07:00
Nick Briggs
33ad64f45b Reorganize cdr implementation to move error test to front, early check for (cdr nil), reduce number of else clauses, reduce indentation. 2020-09-17 18:58:25 -07:00
Nick Briggs
2b02c15982 Note places where undefined behavior is detected by the UB sanitizer
Comments only, no functional changes.

	modified:   src/arith2.c
	modified:   src/arith3.c
	modified:   src/arith4.c
	modified:   src/xc.c
2020-09-17 18:24:54 -07:00
Nick Briggs
11690d0f9c clean up table format, add header 2020-09-16 15:16:52 -07:00
Nick Briggs
4f3e4e48c6 Merge branch 'master' of https://github.com/Interlisp/maiko 2020-09-16 15:13:39 -07:00
Nick Briggs
ce28b0da56 Add documentation of NEWCDRCODING cdr codes 2020-09-16 15:12:58 -07:00
Larry Masinter
a534592702 Update README.md 2020-09-11 13:41:05 -07:00
Nick Briggs
b68ecc73b9 Fix possible reference to undefined variable.
modified:   src/unixfork.c
2020-09-06 12:28:27 -07:00
Nick Briggs
52c04137b0 Remove unnecessary struct definition for SX hash arguments.
modified:   inc/sxhashdefs.h
	modified:   src/miscn.c
	modified:   src/sxhash.c
2020-09-06 12:22:50 -07:00
Nick Briggs
8612d84761 Add missing function prototype to gchtfinddefs.h
modified:   inc/gchtfinddefs.h
2020-09-05 17:04:28 -07:00
Nick Briggs
cfc0046675 Rename gc.h to gcdata.h to avoid conflict with Boehm GC system include file, and adjust sources.
Remove duplicate external function definitions from gcdata.h

	renamed:    inc/gc.h -> inc/gcdata.h
	modified:   src/array2.c
	modified:   src/array4.c
	modified:   src/array6.c
	modified:   src/asmbbt.c
	modified:   src/asmbitblt.c
	modified:   src/bbtsub.c
	modified:   src/car-cdr.c
	modified:   src/conspage.c
	modified:   src/fvar.c
	modified:   src/gc.c
	modified:   src/gcarray.c
	modified:   src/gccode.c
	modified:   src/gcfinal.c
	modified:   src/gchtfind.c
	modified:   src/gcmain3.c
	modified:   src/gcoflow.c
	modified:   src/gcr.c
	modified:   src/gcrcell.c
	modified:   src/gcscan.c
	modified:   src/gvar2.c
	modified:   src/initsout.c
	modified:   src/loopsops.c
	modified:   src/mkcell.c
	modified:   src/rplcons.c
	modified:   src/storage.c
	modified:   src/xc.c
	modified:   src/z2.c
2020-09-05 16:39:21 -07:00
Nick Briggs
e51a2e2b16 Remove temporary file that should not have been placed under version control.
deleted:    gc.h.save
2020-09-05 16:17:35 -07:00
Nick Briggs
f110951172 Remove obsolete and unused gcscan.h
Predates BIGVM changes and has been incorporated into gcscan.c
       with backward compatability.

	deleted:    gcscan.h
2020-09-05 16:15:22 -07:00
Nick Briggs
5c916cffb5 Remove obsoleted include files (replaced by xxxdefs.h files) and adjust dependencies in makefiles
modified:   bin/makefile-darwin.386-x
	modified:   bin/makefile-darwin.x86_64-x
	modified:   bin/makefile-init.386
	modified:   bin/makefile-sunos5.386-x
	modified:   bin/makefile-tail
	deleted:    inc/car-cdr.h
	deleted:    inc/chardev.h
	deleted:    inc/conspage.h
	deleted:    inc/dir.h
	deleted:    inc/dsk.h
	deleted:    inc/dspsubrs.h
	deleted:    inc/llstk.h
	deleted:    inc/storage.h
	deleted:    inc/ufs.h
	deleted:    inc/uraid.h
2020-09-05 12:59:08 -07:00
Nick Briggs
966adb6004 Replace -1 initializers in unsigned char keyboard map with 255 and correct code that checks > -1 (Ref issue #27)
modified:   src/initkbd.c
	modified:   src/keyevent.c
2020-09-04 23:33:41 -07:00
Nick Briggs
0ad69fc6fe Create a new inc/xxxdefs.h for each src/xxx.c containing appropriate function prototypes.
This also involves removing unnecessary forward declarations, inserting
       includes for all cross-file function references, making some definitions
       static if they are not otherwise used, correcting errors that were exposed
       by having correct prototypes.

	new file:   inc/allocmdsdefs.h
	new file:   inc/arith2defs.h
	new file:   inc/arith3defs.h
	new file:   inc/arith4defs.h
	new file:   inc/array2defs.h
	new file:   inc/array3defs.h
	new file:   inc/array4defs.h
	new file:   inc/array5defs.h
	new file:   inc/array6defs.h
	new file:   inc/arraydefs.h
	new file:   inc/bbtsubdefs.h
	new file:   inc/bindefs.h
	new file:   inc/bindsdefs.h
	new file:   inc/bitbltdefs.h
	new file:   inc/bltdefs.h
	new file:   inc/byteswapdefs.h
	new file:   inc/car-cdrdefs.h
	new file:   inc/chardevdefs.h
	new file:   inc/commondefs.h
	new file:   inc/conspagedefs.h
	new file:   inc/dbgtooldefs.h
	new file:   inc/dirdefs.h
	new file:   inc/drawdefs.h
	new file:   inc/dskdefs.h
	new file:   inc/dspifdefs.h
	new file:   inc/dspsubrsdefs.h
	new file:   inc/eqfdefs.h
	new file:   inc/etherdefs.h
	new file:   inc/findkeydefs.h
	new file:   inc/fpdefs.h
	new file:   inc/fvardefs.h
	new file:   inc/gc2defs.h
	new file:   inc/gcarraydefs.h
	new file:   inc/gccodedefs.h
	new file:   inc/gcdefs.h
	new file:   inc/gcfinaldefs.h
	new file:   inc/gchtfinddefs.h
	new file:   inc/gcmain3defs.h
	new file:   inc/gcoflowdefs.h
	new file:   inc/gcrcelldefs.h
	new file:   inc/gcrdefs.h
	new file:   inc/gcscandefs.h
	new file:   inc/gvar2defs.h
	new file:   inc/hacksdefs.h
	new file:   inc/hardrtndefs.h
	new file:   inc/inetdefs.h
	new file:   inc/initdspdefs.h
	new file:   inc/initkbddefs.h
	new file:   inc/initsoutdefs.h
	modified:   inc/inlineC.h
	new file:   inc/intcalldefs.h
	new file:   inc/kbdsubrsdefs.h
	new file:   inc/keyeventdefs.h
	new file:   inc/keylibdefs.h
	new file:   inc/kprintdefs.h
	new file:   inc/ldsoutdefs.h
	new file:   inc/lineblt8defs.h
	new file:   inc/lisp2cdefs.h
	modified:   inc/lispemul.h
	new file:   inc/llcolordefs.h
	new file:   inc/llstkdefs.h
	modified:   inc/lnk-inlineC.h
	new file:   inc/loopsopsdefs.h
	new file:   inc/lowlev1defs.h
	new file:   inc/lowlev2defs.h
	new file:   inc/lsthandldefs.h
	new file:   inc/maindefs.h
	new file:   inc/misc7defs.h
	new file:   inc/miscndefs.h
	new file:   inc/mkatomdefs.h
	new file:   inc/mkcelldefs.h
	new file:   inc/mvsdefs.h
	new file:   inc/osmsgdefs.h
	new file:   inc/perrnodefs.h
	new file:   inc/returndefs.h
	new file:   inc/rpcdefs.h
	new file:   inc/rplconsdefs.h
	new file:   inc/shiftdefs.h
	new file:   inc/storagedefs.h
	new file:   inc/subr0374defs.h
	new file:   inc/subrdefs.h
	new file:   inc/sxhashdefs.h
	new file:   inc/testtooldefs.h
	new file:   inc/timerdefs.h
	new file:   inc/typeofdefs.h
	new file:   inc/ubf1defs.h
	new file:   inc/ubf2defs.h
	new file:   inc/ubf3defs.h
	new file:   inc/ufsdefs.h
	new file:   inc/unixcommdefs.h
	new file:   inc/unwinddefs.h
	new file:   inc/uraiddefs.h
	new file:   inc/usrsubrdefs.h
	new file:   inc/uutilsdefs.h
	new file:   inc/vars3defs.h
	new file:   inc/vmemsavedefs.h
	new file:   inc/xbbtdefs.h
	new file:   inc/xcdefs.h
	new file:   inc/xcursordefs.h
	new file:   inc/xinitdefs.h
	new file:   inc/xlspwindefs.h
	new file:   inc/xmkicondefs.h
	new file:   inc/xrdoptdefs.h
	new file:   inc/xscrolldefs.h
	new file:   inc/xwinmandefs.h
	new file:   inc/z2defs.h
	modified:   src/allocmds.c
	modified:   src/arith2.c
	modified:   src/arith3.c
	modified:   src/arith4.c
	modified:   src/array.c
	modified:   src/array2.c
	modified:   src/array3.c
	modified:   src/array4.c
	modified:   src/array5.c
	modified:   src/array6.c
	modified:   src/bbtsub.c
	modified:   src/bin.c
	modified:   src/binds.c
	modified:   src/bitblt.c
	modified:   src/blt.c
	modified:   src/byteswap.c
	modified:   src/car-cdr.c
	modified:   src/chardev.c
	modified:   src/common.c
	modified:   src/conspage.c
	modified:   src/dbgtool.c
	modified:   src/dir.c
	modified:   src/draw.c
	modified:   src/dsk.c
	modified:   src/dspif.c
	modified:   src/dspsubrs.c
	modified:   src/eqf.c
	modified:   src/ether.c
	modified:   src/findkey.c
	modified:   src/foreign.c
	modified:   src/fp.c
	modified:   src/fvar.c
	modified:   src/gc.c
	modified:   src/gc2.c
	modified:   src/gcarray.c
	modified:   src/gccode.c
	modified:   src/gcfinal.c
	modified:   src/gchtfind.c
	modified:   src/gcmain3.c
	modified:   src/gcoflow.c
	modified:   src/gcr.c
	modified:   src/gcrcell.c
	modified:   src/gcscan.c
	modified:   src/gvar2.c
	modified:   src/hacks.c
	modified:   src/hardrtn.c
	modified:   src/inet.c
	modified:   src/initdsp.c
	modified:   src/initkbd.c
	modified:   src/initsout.c
	modified:   src/intcall.c
	modified:   src/kbdsubrs.c
	modified:   src/keyevent.c
	modified:   src/keylib.c
	modified:   src/kprint.c
	modified:   src/ldsout.c
	modified:   src/lineblt8.c
	modified:   src/lisp2c.c
	modified:   src/llcolor.c
	modified:   src/llstk.c
	modified:   src/loopsops.c
	modified:   src/lowlev1.c
	modified:   src/lowlev2.c
	modified:   src/lsthandl.c
	modified:   src/main.c
	modified:   src/misc7.c
	modified:   src/miscn.c
	modified:   src/mkatom.c
	modified:   src/mkcell.c
	modified:   src/mvs.c
	modified:   src/osmsg.c
	modified:   src/perrno.c
	modified:   src/return.c
	modified:   src/rpc.c
	modified:   src/rplcons.c
	modified:   src/setsout.c
	modified:   src/shift.c
	modified:   src/storage.c
	modified:   src/subr.c
	modified:   src/subr0374.c
	modified:   src/sxhash.c
	modified:   src/testtool.c
	modified:   src/timer.c
	modified:   src/truecolor.c
	modified:   src/tstsout.c
	modified:   src/typeof.c
	modified:   src/ubf1.c
	modified:   src/ubf2.c
	modified:   src/ubf3.c
	modified:   src/ufn.c
	modified:   src/ufs.c
	modified:   src/unixcomm.c
	modified:   src/unwind.c
	modified:   src/uraid.c
	modified:   src/usrsubr.c
	modified:   src/uutils.c
	modified:   src/vars3.c
	modified:   src/vmemsave.c
	modified:   src/xbbt.c
	modified:   src/xc.c
	modified:   src/xcursor.c
	modified:   src/xinit.c
	modified:   src/xlspwin.c
	modified:   src/xmkicon.c
	modified:   src/xrdopt.c
	modified:   src/xscroll.c
	modified:   src/xwinman.c
	modified:   src/z2.c
2020-09-04 18:21:44 -07:00
Nick Briggs
5fb5d93893 Add multiple include guard to cell.h 2020-09-04 16:27:23 -07:00
Nick Briggs
7bf5e18fbd Add multiple include guard to stack.h 2020-09-04 16:23:40 -07:00
Nick Briggs
9c658a4b2c Don't cast NULL pointer argument to putmsg() to (char *)
modified:   src/dlpi.c
2020-08-30 13:50:34 -07:00
Nick Briggs
623594fb89 Add LDEARCH environment variable to override config.guess host-triple in bin/machinetype (debug aid)
modified:   bin/machinetype
2020-08-27 21:40:42 -07:00
Nick Briggs
ee00d0e567 Best to have matching versions of config.sub and config.guess, so update both to current.
modified:   bin/config.guess
	modified:   bin/config.sub
2020-08-21 13:07:00 -07:00
Nick Briggs
cd4c59dbb3 Be clear that the code depends on the default char being unsigned.
Be clear that the code is not clean for pointer aliasing.

	modified:   bin/makefile-darwin.386-x
	modified:   bin/makefile-darwin.x86_64-x
	modified:   bin/makefile-linux.386-x
	modified:   bin/makefile-linux.armv7l-x
	modified:   bin/makefile-linux.x86_64-x
	modified:   bin/makefile-sunos5.386-x
2020-08-21 12:18:03 -07:00
Nick Briggs
418e1b1232 Have git ignore more build directories with less specific patterns
modified:   .gitignore
2020-08-21 12:04:54 -07:00
Gunter Mueller
d07540cbb1 Add support for compiling on Raspberry Pi4 (armv7l architecture) running Linux
Author:    Gunter Mueller <gunter.mueller@gmail.com>
Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>

	modified:   .gitignore
	modified:   bin/machinetype
	new file:   bin/makefile-linux.armv7l-x
2020-08-19 13:28:34 -07:00
Nick Briggs
3a7e5dae4f Ref issue #13, fix byte-order problem in FBITMAPBIT opcode affecting EDITBM
modified:   src/misc7.c
2020-08-18 22:21:21 -07:00
Nick Briggs
e8d961f569 Add LICENCE, NOTICE, and README.md reflecting the new licence terms and conditions 2020-08-17 14:33:51 -07:00
Nick Briggs
731c5de8da Update config.guess to modern version which recognizes x86_64 architecture for Darwin (MacOS)
Update osversion script to recognize x86_64 triples for Darwin as Darwin
Update machinetype script to return 386 for MacOS El Capitan (10.11), x86_64 for other versions
Add makefile-darwin.x86_64-x for compiling in 64-bit mode on later MacOS versions

	modified:   config.guess
	modified:   machinetype
	new file:   makefile-darwin.x86_64-x
	modified:   osversion
2020-08-17 14:14:17 -07:00
Nick Briggs
7b149c6316 Update notes on signal handlers. Commentary only, no functional change.
modified:   src/timer.c
2020-08-17 13:40:18 -07:00
Nick Briggs
f4024ab126 Implement foreground/background reversal for X displays on the (VIDEOCOLOR T) function, as it works on D-machines.
Ref: https://github.com/Interlisp/maiko/issues/12

	modified:   src/xlspwin.c
2020-08-13 18:14:34 -07:00
Nick Briggs
fe32f6bf09 Remove trailing semicolon from LispNumToCInt macro definition so it can be used in value context.
Add missing htonl/ntohl and htons/ntohs around IP address and port manipulation.

	modified:   inc/locfile.h
	modified:   src/inet.c
2020-08-12 13:40:15 -07:00
Nick Briggs
35498b971b Remove duplicate copyright notice.
modified:   inc/lspglob.h
2020-08-11 18:45:09 -07:00
Nick Briggs
6528ac38e3 Remove proprietary license from all files.
The code is being re-licensed under the MIT license.

	modified:   bin/fixid
	modified:   bin/launch.asm
	modified:   bin/makefile-hpux.hp9000-x
	modified:   bin/makefile-init.sgi
	modified:   bin/makefile-init.sparc
	modified:   bin/makefile-init.sparc-multi
	modified:   bin/makefile-irix.sgi-x
	modified:   bin/makefile-sunos4.sparc
	modified:   bin/makefile-sunos4.sparc%
	modified:   bin/makefile-sunos4.sparc-multi
	modified:   bin/makefile-sunos5.386-x
	modified:   bin/makefile-sunos5.i386-x
	modified:   bin/makefile-sunos5.sparc-x
	modified:   bin/makefile-tail
	modified:   bin/makeisc
	modified:   bin/makeright
	modified:   inc/Check.h
	modified:   inc/MyWindow.h
	modified:   inc/Stipple.h
	modified:   inc/XCursors.h
	modified:   inc/XKeymap.h
	modified:   inc/XVersion.h
	modified:   inc/Xdeflt.h
	modified:   inc/Xicon.h
	modified:   inc/address.h
	modified:   inc/arith.h
	modified:   inc/arith2.h
	modified:   inc/array.h
	modified:   inc/bb.h
	modified:   inc/cell.h
	modified:   inc/cell.h%
	modified:   inc/copyright
	modified:   inc/dbprint.h
	modified:   inc/debug.h
	modified:   inc/devif.h
	modified:   inc/display.h
	modified:   inc/dspdata.h
	modified:   inc/ether.h
	modified:   inc/fast_dsp.h
	modified:   inc/fp.h
	modified:   inc/gc.h
	modified:   inc/gc.h.save
	modified:   inc/gcscan.h
	modified:   inc/hdw_conf.h
	modified:   inc/ifpage.h
	modified:   inc/inlineC.h
	modified:   inc/inlnMIPS.h
	modified:   inc/inlnPS2.h
	modified:   inc/inlndos.h
	modified:   inc/iopage.h
	modified:   inc/kbdif.h
	modified:   inc/keyboard.h
	modified:   inc/keyboard.h%
	modified:   inc/keysym.h
	modified:   inc/ldeXdefs.h
	modified:   inc/lispemul.h
	modified:   inc/lispemul.h.save
	modified:   inc/lispmap.h
	modified:   inc/lldsp.h
	modified:   inc/lnk-Xdeflt.h
	modified:   inc/lnk-debug.h
	modified:   inc/lnk-fast_dsp.h
	modified:   inc/lnk-inlineC.h
	modified:   inc/lnk-lispmap.h
	modified:   inc/lnk-tosfns.h
	modified:   inc/lnk-tosret.h
	modified:   inc/locfile.h
	modified:   inc/lpdefs.h
	modified:   inc/lpglobl.h
	modified:   inc/lspglob.h
	modified:   inc/lsptypes.h
	modified:   inc/medleyfp.h
	modified:   inc/mnxdefs.h
	modified:   inc/my.h
	modified:   inc/native.h
	modified:   inc/ocr.h
	modified:   inc/osmsg.h
	modified:   inc/picture.h
	modified:   inc/pilotbbt.h
	modified:   inc/print.h
	modified:   inc/profile.h
	modified:   inc/rawrs232c.h
	modified:   inc/return.h
	modified:   inc/rs232c.h
	modified:   inc/stack.h
	modified:   inc/stream.h
	modified:   inc/stream.h%
	modified:   inc/stream.h2
	modified:   inc/sysatms.h
	modified:   inc/timeout.h
	modified:   inc/tos1defs.h
	modified:   inc/tosfns.h
	modified:   inc/tosret.h
	modified:   inc/tty.h
	modified:   inc/version.h
	modified:   inc/vmemsave.h
	modified:   inc/xbitmaps.h
	modified:   inc/xdefs.h
	modified:   src/Cldeetr.c
	modified:   src/allocmds.c
	modified:   src/arith2.c
	modified:   src/arith3.c
	modified:   src/arith4.c
	modified:   src/array.c
	modified:   src/array2.c
	modified:   src/array3.c
	modified:   src/array4.c
	modified:   src/array5.c
	modified:   src/array6.c
	modified:   src/asmbbt.c
	modified:   src/asmbitblt.c
	modified:   src/atom.c
	modified:   src/bbtSPARC.s
	modified:   src/bbtsub.c
	modified:   src/bin.c
	modified:   src/binds.c
	modified:   src/bitblt.c
	modified:   src/blt.c
	modified:   src/byteswap.c
	modified:   src/call-c.c
	modified:   src/car-cdr.c
	modified:   src/cdaudio.c
	modified:   src/cdrom.c
	modified:   src/chardev.c
	modified:   src/chatter.c
	modified:   src/codeconv.c
	modified:   src/codetbl.c
	modified:   src/colorbltfns.c
	modified:   src/common.c
	modified:   src/conspage.c
	modified:   src/cr
	modified:   src/dbgtool.c
	modified:   src/dir.c
	modified:   src/doscomm.c
	modified:   src/doskbd.c
	modified:   src/dosmouse.c
	modified:   src/draw.c
	modified:   src/dsk.c
	modified:   src/dspif.c
	modified:   src/dspsubrs.c
	modified:   src/ejlisp.c
	modified:   src/eqf.c
	modified:   src/ether.c
	modified:   src/findkey.c
	modified:   src/foreign.c
	modified:   src/fp.c
	modified:   src/fvar.c
	modified:   src/gc.c
	modified:   src/gc2.c
	modified:   src/gcarray.c
	modified:   src/gccode.c
	modified:   src/gcfinal.c
	modified:   src/gchtfind.c
	modified:   src/gcmain3.c
	modified:   src/gcoflow.c
	modified:   src/gcr.c
	modified:   src/gcrcell.c
	modified:   src/gcscan.c
	modified:   src/gvar2.c
	modified:   src/hacks.c
	modified:   src/hardrtn.c
	modified:   src/imagefile.c
	modified:   src/imagefile2.c
	modified:   src/inet.c
	modified:   src/initdsp.c
	modified:   src/initkbd.c
	modified:   src/initsout.c
	modified:   src/intcall.c
	modified:   src/kbdif.c
	modified:   src/kbdsubrs.c
	modified:   src/keyevent.c
	modified:   src/keylib.c
	modified:   src/keymaker.c
	modified:   src/keytst.c
	modified:   src/keytstno.c
	modified:   src/kprint.c
	modified:   src/launch.asm
	modified:   src/ldeboot.c
	modified:   src/ldeether.c
	modified:   src/ldsout.c
	modified:   src/lineblt8.c
	modified:   src/lisp2c.c
	modified:   src/llcolor.c
	modified:   src/llstk.c
	modified:   src/loader.c
	modified:   src/loopsops.c
	modified:   src/lowlev1.c
	modified:   src/lowlev2.c
	modified:   src/lpdual.c
	modified:   src/lpkit.c
	modified:   src/lplexyy.c
	modified:   src/lpmain.c
	modified:   src/lpread.c
	modified:   src/lpsolve.c
	modified:   src/lptran.c
	modified:   src/lpwrite.c
	modified:   src/lpytab.c
	modified:   src/lsthandl.c
	modified:   src/main.c
	modified:   src/misc7.c
	modified:   src/miscn.c
	modified:   src/mkatom.c
	modified:   src/mkcell.c
	modified:   src/mkkey.c
	modified:   src/mkvdate.c
	modified:   src/mnwevent.c
	modified:   src/mnxmeth.c
	modified:   src/mouseif.c
	modified:   src/mvs.c
	modified:   src/ocr.c
	modified:   src/ocrproc.c
	modified:   src/oether.c
	modified:   src/oldeether.c
	modified:   src/optck.c
	modified:   src/osmsg.c
	modified:   src/perrno.c
	modified:   src/picture.c
	modified:   src/rawcolor.c
	modified:   src/rawrs232c.c
	modified:   src/return.c
	modified:   src/rpc.c
	modified:   src/rplcons.c
	modified:   src/rs232c.c
	modified:   src/setsout.c
	modified:   src/shift.c
	modified:   src/socdvr.c
	modified:   src/storage.c
	modified:   src/subr.c
	modified:   src/subr0374.c
	modified:   src/sxhash.c
	modified:   src/testdsp.c
	modified:   src/testtool.c
	modified:   src/timeoday.c
	modified:   src/timeofday.c
	modified:   src/timer.c
	modified:   src/truecolor.c
	modified:   src/tstsout.c
	modified:   src/tty.c
	modified:   src/typeof.c
	modified:   src/ubf1.c
	modified:   src/ubf2.c
	modified:   src/ubf3.c
	modified:   src/ufn.c
	modified:   src/ufs.c
	modified:   src/unixcomm.c
	modified:   src/unixfork.c
	modified:   src/unwind.c
	modified:   src/uraid.c
	modified:   src/usrsubr.c
	modified:   src/uutils.c
	modified:   src/vars3.c
	modified:   src/vesafns.asm
	modified:   src/vesainit.c
	modified:   src/vgainit.c
	modified:   src/vmemsave.c
	modified:   src/xbbt.c
	modified:   src/xc.c
	modified:   src/xc.c.orig
	modified:   src/xcursor.c
	modified:   src/xinit.c
	modified:   src/xlspwin.c
	modified:   src/xmkicon.c
	modified:   src/xrdopt.c
	modified:   src/xscroll.c
	modified:   src/xwinman.c
	modified:   src/z2.c
2020-08-11 18:39:45 -07:00
Nick Briggs
8c13508c07 Debug checks use printf() and therefore require <stdio.h> so include it if debug checks are on.
modified:   inc/stack.h
2020-08-11 17:33:53 -07:00
Nick Briggs
055a9522f8 Use "t" modifier in printf formats when printing pointer differences.
Cast stack addresses to appropriate type when calling CHECK_BF and CHECK_FX.

	modified:   src/gccode.c
	modified:   src/llstk.c
2020-08-11 17:31:34 -07:00
Nick Briggs
34cde1a373 Cast to (FX *) when pointer into stack is being passed into check_FX and is expected to be a frame extension.
stdio.h is required if stack debugging is enabled, include it always.

	modified:   src/hardrtn.c
2020-08-11 16:02:15 -07:00
Nick Briggs
5d7e281aa6 Remove unused and incorrectly declared CIntToSmallp() function.
Fix warning for "control may reach end of non-void function".

	modified:   src/lisp2c.c
2020-08-11 15:29:57 -07:00
Nick Briggs
aac75b633c Change error message printed when ldeether is unable to exec() lde to provide more information.
modified:   src/ldeether.c
2020-08-11 14:44:29 -07:00
Nick Briggs
30bfeb3a43 WARN() macro is used in functions with and without return values so must not return in the macro.
Fix llstk.c uses of WARN() to return when necessary.

	modified:   inc/lispemul.h
	modified:   src/llstk.c
2020-08-11 14:09:19 -07:00
Nick Briggs
b2a8d11d9c Correct spelling of basicframe, which occurs only in gcmain3.c, no functional change.
modified:   src/gcmain3.c
2020-08-11 12:10:52 -07:00
Nick Briggs
881f21e9ce 16-bit constants with high bit set that are going to be shifted << 16 should be unsigned to avoid overflow warning.
Remove some unnecessary 32-bit convenience constants that can be calculated at compile time.

	modified:   inc/stack.h
2020-08-10 17:50:54 -07:00
Nick Briggs
395966b497 Merge branch 'master' of gitlab.com:nbriggs/maiko 2020-08-04 19:28:41 -04:00
Nick Briggs
a4fdd8b27d Print a better message than "File not found" when the correct display program cannot be determined.
modified:   src/ldeboot.c
2020-08-04 19:27:08 -04:00
Nick Briggs
9821329ec0 Move SYSVONLY define from version.h to the individual makefiles for Linux
Add makefile for Linux on x86_64 platforms
Remove include <stropts.h> for Linux as modern systems have dropped this
Adjust code to account for fcntl() vs ioctl() for generating signals on X I/O
Adjust includes for time related include files for modern Linux systems

	modified:   bin/makefile-linux.386-x
	new file:   bin/makefile-linux.x86_64-x
	modified:   inc/version.h
	modified:   src/mkvdate.c
	modified:   src/timer.c
2020-08-03 20:19:02 -07:00
Nick Briggs
79ad101cc1 Update machinetype to recognize x86_64 machines 2020-08-03 19:05:41 -07:00
Nick Briggs
36d3575736 Prepare to ignore upcoming linux.x86_64 binary directories 2020-08-03 19:04:24 -07:00
Nick Briggs
06872ed2b1 Ignore sunos5 SPARC build directories and plain core files 2020-07-26 20:46:30 -04:00
Nick Briggs
6a47a7733c Provide prototypes for gcscan1/gcscan2 implemented in gcscan.c
modified:   src/gcmain3.c
2020-07-26 20:42:34 -04:00
Nick Briggs
eaca0e1b72 If "my.h" is included "arith.h" is also required for N_ARITH_SWITCH macro definition.
modified:   src/draw.c
	modified:   src/eqf.c
	modified:   src/fp.c
	modified:   src/z2.c
2020-07-26 20:40:54 -04:00
Nick Briggs
832f76f56b Take NOETHER out of SunOS5 (Solaris) configuration so the network is accessible.
Fix ldeether.c main program so that if NOETHER is present without removing the dlpi.o dependency it still links.

	modified:   inc/version.h
	modified:   src/ldeether.c
2020-07-26 20:35:18 -04:00
Nick Briggs
a60e33bc17 Document options required for gcc and Developer Studio 12.6 C compilers
set default to "cc" (Studio C compiler) for now.

	modified:   bin/makefile-sunos5.sparc-x
2020-07-26 20:31:04 -04:00
Nick Briggs
0ced73e7fa Clean up defines to better match x86 Solaris version where applicable
modified:   makefile-sunos5.sparc-x
2020-07-11 07:30:57 -07:00
Nick Briggs
3ee93a8ab5 Add sunos5 related build directories to the .gitignore 2020-07-16 20:47:39 -07:00
Nick Briggs
2a79b5e782 Turn down the compiler warnings for normal builds on macOS
Separate out the DEBUGFLAGS for compilation
Add ldex to the default targets
2020-07-16 20:41:50 -07:00
Nick Briggs
e74ca5795c Ensure that "cleanup" target removes ldex and ldeether executables as well as lde
modified:   bin/makefile-tail
2020-07-16 16:43:21 -07:00
Nick Briggs
e03a513727 Add more debugging output when opcode tracing is enabled.
modified:   src/xc.c
2020-07-16 16:40:37 -07:00
Nick Briggs
a3a14577be Ensure that on Sun systems s_char type is signed char now that char is otherwise forced to be unsigned.
modified:   inc/version.h
2020-07-16 16:37:42 -07:00
Nick Briggs
bfd17d1ef5 More systems that need to include unistd.h
modified:   src/unixcomm.c
2020-07-15 21:48:06 -07:00
Nick Briggs
aa4496943f Include header for time() for all appropriate systems
modified:   src/unixfork.c
2020-07-15 18:59:24 -07:00
Nick Briggs
3bf5c3b720 vfork() is deprecated, use fork() instead.
modified:   src/uraid.c
2020-07-15 15:30:31 -07:00
Nick Briggs
3d828625df Remove special assembly optimization that was only applicable to SPARC systems.
modified:   bin/makefile-sunos5.386-x
2020-07-15 15:01:00 -07:00
Nick Briggs
a6e09351d6 Turn off compiling for ethernet interface in SunOS5 by default until the rest of the system works
modified:   inc/version.h
2020-07-15 14:56:40 -07:00
Nick Briggs
c11f44d926 Add makefile section for SunOS5 (currently aimed at Solaris 10/11) on generic 386
The code compiles, but the emulator is not yet functional

	new file:   makefile-sunos5.386-x
2020-07-15 14:32:23 -07:00
Nick Briggs
9fc2752790 Changes necessary to compile for OS5 (Solaris 10/11) when -DSYSVONLY is removed from the compilation flags.
modified:   src/dsk.c
	modified:   src/ldeether.c
	modified:   src/main.c
	modified:   src/timer.c
	modified:   src/ufs.c
	modified:   src/unixfork.c
	modified:   src/vmemsave.c
	modified:   src/xrdopt.c
2020-07-14 20:05:32 -07:00
Nick Briggs
55e39453f5 Remove dependency on "externs.h"
Add necessary forward declaration for savestr()

	modified:   src/dlpi.c
2020-07-14 14:23:08 -07:00
Nick Briggs
9772948e31 Change default to build 64-bit binaries for compatability with macOS Catalina and forward
modified:   bin/makefile-darwin.386-x
2020-07-13 19:19:51 -07:00
Nick Briggs
dfd73dee71 Merge branch 'master' of ssh://192.168.42.74/Users/briggs/Projects/maiko 2020-07-10 00:23:16 -07:00
Nick Briggs
ffc8f06fc3 Solaris has moved from being SYSVONLY to not so. We still need sys/fcntl.h though.
modified:   src/ldsout.c
2020-07-12 18:10:24 -07:00
Nick Briggs
82090e5c3d Go with the more BSD flavor of Solaris and don't redefine index/rindex/bcopy/etc
modified:   inc/version.h
2020-07-12 18:03:54 -07:00
Nick Briggs
2f8789f423 Don't redefine MAXNAMLEN if it previously been defined by the system
modified:   inc/locfile.h
2020-07-12 18:02:06 -07:00
Nick Briggs
123520adf8 define symbols are OS5/OS4 not SUNOS5/SUNOS4
modified:   ../inc/os.h
2020-07-12 17:01:16 -07:00
Nick Briggs
6aa938d453 Relocate MAXNAMLEN definition to proper home in locfile.h
Remove selection of SYSVONLY for macOS and FreeBSD compilation (they are BSD flavor)

	modified:   inc/locfile.h
	modified:   inc/version.h
2020-07-12 16:04:11 -07:00
Nick Briggs
46c3dc1991 Cleanup choice of valloc/malloc based on OS
Although vmalloc() is deprecated in new code, it exists on a number of OSs.

	modified:   src/ldsout.c
2020-07-12 15:59:25 -07:00
Nick Briggs
13625a34e5 Merge branch 'master' of ssh://192.168.42.74/Users/briggs/Projects/maiko 2020-07-10 00:17:19 -07:00
Nick Briggs
3011fbba0b Merge branch 'master' of ssh://192.168.42.74/Users/briggs/Projects/maiko 2020-07-09 23:14:38 -07:00
Nick Briggs
68eb8f9617 Merge branch 'master' of ssh://192.168.42.74/Users/briggs/Projects/maiko 2020-07-09 22:41:20 -07:00
Nick Briggs
ada566091b Remove conflicting definition for time()
modified:   src/unixfork.c
2020-07-09 10:27:24 -07:00
Nick Briggs
b8c041f5ff Solaris (OS5) requires <string.h>
modified:   src/dir.c
2020-07-09 10:25:15 -07:00
Nick Briggs
28f0087dfc Rewrite perrno() so as not to rely on global error message array, rather using sterror()
modified:   src/perrno.c
2020-07-09 10:19:44 -07:00
Nick Briggs
62b8f46405 Add forward declaration for get_packet()
modified:   src/ether.c
2020-07-09 10:16:41 -07:00
Nick Briggs
311a359c3f Add include files necessary for SunOS5 (Solaris 11) compilation.
Remove incorrect definition of malloc()

	modified:   src/dlpi.c
2020-07-09 03:28:50 -07:00
Nick Briggs
7eca23930b Correct FPtoVP table size error in BIGVM case
The table requires 1 cell (32-bit word) per page, for 256 MB in 512 byte pages.

	modified:   src/ldsout.c
2020-07-08 18:43:00 -07:00
Nick Briggs
ae5eea1a29 Reduce excessive sleep after waiting for a process to exit (1s -> 10us) 2020-07-08 18:40:53 -07:00
Nick Briggs
2563b05dc1 Change to default unsigned char for compilation. Possible after previous fixes to GETBYTE et al. 2018-11-15 16:14:24 -08:00
Nick Briggs
ac6bef0fab GETBYTE macro returns value with signedness of char in BYTESWAP configurations but signedness of argument in non-BYTESWAP ones.
Replace use of GETBYTE macro in Get_SBYTE_PCMAC[01] macros as we cannot rely on passing signed argument type to get signed result.

	modified:   inc/inlineC.h
	modified:   inc/lsptypes.h
2018-11-15 15:57:42 -08:00
Nick Briggs
58c81a37b9 Add missing declaration/initialization of flushing flag required by DBPRINT from dbprint.h
modified:   src/unixfork.c
2018-11-15 15:33:43 -08:00
Nick Briggs
4a01c6c74e Qualified void return declarations are prohibited (e.g., inline const void vs. inline void).
Fix various asm() syntax errors with missing line continuations.

	modified:   inc/inlnPS2.h
2018-11-15 15:22:44 -08:00
Nick Briggs
f853f0e508 Fix problem in compare_lisp_chars where it incremented fat character pointer
by the wrong size unit when comparing a fat pname to a fat string.

	modified:   src/mkatom.c
2018-11-14 16:32:23 -08:00
Nick Briggs
5111d42547 Treat GETBYTE() result as unsigned so it is comparable to the result of GETWORD
when comparing fat and thin strings.

	modified:   src/mkatom.c
2018-11-13 22:57:46 -08:00
Nick Briggs
01c9d5f3c5 Update code for UNIX-GETPARAM for "MACH" and "ARCH" to recognize that a MacOS system is i386.
Clean up nested #ifdef/#else/#endif directives that select a single case to use #elif defined(...)

	modified:   src/uutils.c
2018-05-07 10:58:43 -07:00
Nick Briggs
f85e43804a Tidy up the source to remove forward reference, remove dead code, fix formatting.
modified:   inc/XKeymap.h
	modified:   src/initkbd.c
2018-04-29 19:40:52 -07:00
Nick Briggs
f8a81c329d Correct preloading of Unix username into buffer on byte-swapped system.
Correct potential memory smash if username exceeds allocated space.

	modified:   ../src/initsout.c
2018-04-23 16:56:12 -07:00
Nick Briggs
1a8607d412 Correct calculation of the socklen_t length when bind-ing the AF_UNIX socket,
as some systems have extra bytes in the sockaddr_un that weren't accounted
  for in the original calculation.  Follow the POSIX spec instead.
	modified:   src/unixcomm.c
	modified:   src/unixfork.c
2018-04-15 18:37:19 -07:00
Nick Briggs
69796e34d7 More linux related fixups for string.h.
Fix some type warnings.

	modified:   ../src/dsk.c
	modified:   ../src/fvar.c
	modified:   ../src/ldsout.c
	modified:   ../src/main.c
	modified:   ../src/timer.c
2018-03-27 10:39:23 -07:00
Nick Briggs
8e99402729 Switch to clang as default compiler, show options needed for gcc in comment. 2018-03-27 10:38:12 -07:00
Nick Briggs
91745a1ec0 Pacify pedantic compilers that object to // comments in code claiming to be older standard
modified:   src/gcmain3.c
2018-03-23 14:58:24 -07:00
Nick Briggs
367deb7547 Correct off-by-one error copying C string to Lisp string
modified:   src/uutils.c
2018-03-23 13:24:58 -07:00
Nick Briggs
cd940e4013 Remove unused variable tot_pages
modified:   src/vmemsave.c
2018-03-23 13:21:03 -07:00
Nick Briggs
a7360fd23d ensure that object file directories used in the build exist 2018-03-23 13:19:54 -07:00
Nick Briggs
4342f86d50 cleanup should remove both tstsout.o and setsout.o 2018-03-23 13:19:11 -07:00
Nick Briggs
32651f2f10 Provide correct definition for gcreccell() in gc.h to avoid implicit function definition warnings in gcmain3.c 2018-03-23 12:17:37 -07:00
Nick Briggs
04ea2996e1 When ntend is non-zero it is already a native pointer, not a stack offset 2018-03-23 12:12:55 -07:00
Nick Briggs
89db040213 Remove unused variable temp. 2017-11-22 17:09:39 -08:00
Nick Briggs
a0500627a1 Remove extraneous copy into destination sin_addr from a hostent structure when
value may already have been set up, and hostent may be uninitialized.

	modified:   src/inet.c
2017-07-28 17:52:48 -07:00
Nick Briggs
9529248faa Fix warning for "result" may be used undefined.
modified:   src/miscn.c
2017-07-28 17:35:14 -07:00
Nick Briggs
f328efcd55 Remove unused variables and labels.
modified:   src/bbtsub.c
	modified:   src/fvar.c
	modified:   src/loopsops.c
	modified:   src/mkcell.c
	modified:   src/mvs.c
	modified:   src/return.c
2017-07-20 17:14:59 -07:00
Nick Briggs
c6ed74d94b Remove unused variable.
modified:   ../inc/bb.h
2017-07-18 19:02:25 -07:00
Nick Briggs
55ffcb9066 Remove unused variables.
modified:   bbtsub.c
2017-07-18 19:01:27 -07:00
Nick Briggs
ffff6ee267 Remove unused variable declarations.
modified:   array.c
	modified:   array3.c
	modified:   car-cdr.c
	modified:   chardev.c
	modified:   conspage.c
	modified:   ldeboot.c
	modified:   sxhash.c
	modified:   unixfork.c
2017-07-18 19:00:36 -07:00
Nick Briggs
1da1a2cf10 Fix formatting in comment. inc/lspglob.h 2017-07-18 18:29:55 -07:00
Nick Briggs
4e2a0bc6ed Fix format incompatabilities in dbgtool.c. Use %p for pointers. 2017-07-18 14:56:40 -07:00
Nick Briggs
b6540a95ef Remove declarations for unused variables in xlspwin.c 2017-07-16 11:15:23 -07:00
Nick Briggs
8fa956e3fb Add commentary on the NIT packet filter. 2017-07-05 16:44:48 -07:00
Nick Briggs
e22e45b8f6 include unistd.h for getpid/read/close in inet.c 2017-07-04 15:12:43 -07:00
Nick Briggs
415a2192de Add missing type specifiers which defaulted to 'int'.
modified:   ../src/bbtsub.c
	modified:   ../src/ldeboot.c
	modified:   ../src/lineblt8.c
	modified:   ../src/loopsops.c
2017-07-04 14:12:01 -07:00
Nick Briggs
c06ba98144 Create bbtsub.h to declare functions defined in bbtsub.c
Update files that depend on bbtsub functions to include bbtsub.h
Declare as static all functions in bbtsub.c that are not needed externally.
Add dependencies to makefile-tail.

	new file:   ../inc/bbtsub.h
	modified:   ../src/bbtsub.c
	modified:   ../src/colorbltfns.c
	modified:   ../src/draw.c
	modified:   ../src/misc7.c
	modified:   ../src/rawcolor.c
	modified:   ../src/subr.c
2017-07-03 16:29:06 -07:00
Nick Briggs
b6bd2ed29f Create storage.h to declare functions defined in storage.c
Update files that depend on storage functions to include storage.h
Declare as static all functions in storage.c that are not needed externally.
Add dependencies to makefile-tail.

	modified:   makefile-tail
	new file:   ../inc/storage.h
	modified:   ../src/allocmds.c
	modified:   ../src/gchtfind.c
	modified:   ../src/llstk.c
	modified:   ../src/main.c
	modified:   ../src/storage.c
	modified:   ../src/subr.c
2017-07-02 21:21:50 -07:00
Nick Briggs
45a547e088 Add include for stdlib.h, reorder functions to avoid implicit function declaration error for imod64bit() 2017-06-30 20:41:59 -07:00
Nick Briggs
cd437f0fc5 Update dependencies in makefile-tail for chardev.h and dspsubrs.h 2017-06-30 20:37:21 -07:00
Nick Briggs
d0fac53d10 Fixups for functions defined by dspsubrs.c to dspsubrs.h. Update subr.c and gcr.c 2017-06-30 20:31:53 -07:00
Nick Briggs
3517321b20 Fixups for functions defined by chardev.c in chardev.h. Update subr.c 2017-06-30 20:23:46 -07:00
Nick Briggs
5d8c90cf18 Fix up for inc/ufs.h.
Add return.c external functions to inc/return.h (previously only macros) and update
    makefile-tail and relevant files.

	modified:   makefile-tail
	modified:   ../inc/return.h
	new file:   ../inc/ufs.h
	modified:   ../src/bbtsub.c
	modified:   ../src/dir.c
	modified:   ../src/dsk.c
	modified:   ../src/intcall.c
	modified:   ../src/subr.c
	modified:   ../src/ufs.c
	modified:   ../src/vmemsave.c
	modified:   ../src/xc.c
2017-06-30 20:10:38 -07:00
Nick Briggs
35b4ad4350 Fix ups for new llstk.h.
modified:   bin/makefile-darwin.386-x
	modified:   bin/makefile-tail
	new file:   inc/llstk.h
	modified:   src/gcfinal.c
	modified:   src/hardrtn.c
	modified:   src/llstk.c
	modified:   src/uraid.c
	modified:   src/xc.c
	modified:   src/xc.c.orig
2017-06-30 17:42:46 -07:00
Nick Briggs
b7b658e8d3 Create dir.h to declare functions defined in dir.c
Update files that depend on dir functions to include dir.h
Declare as static all functions in dir.c that are not needed externally.
Add dependencies to makefile-tail.

	modified:   bin/makefile-tail
	new file:   inc/dir.h
	modified:   src/dir.c
	modified:   src/dsk.c
	modified:   src/main.c
	modified:   src/subr.c
	modified:   src/vmemsave.c
2017-06-30 15:48:18 -07:00
Nick Briggs
693e2392ca Fix parameter types and format strings.
modified:   src/unixcomm.c
2017-06-30 15:21:16 -07:00
Nick Briggs
730ff30b86 Create unixfork.h to declare functions defined in unixfork.c
Update files that depend on unixfork functions to include unixfork.h
Declare as static all functions in unixfork.c that are not needed externally.
Add dependencies to makefile-tail.

	modified:   makefile-tail
	new file:   ../inc/unixfork.h
	modified:   ../src/ldeboot.c
	modified:   ../src/main.c
	modified:   ../src/unixfork.c
2017-06-30 15:10:52 -07:00
Nick Briggs
16583b3b53 Fix signature of qsort comparison function.
modified:   src/vmemsave.c
2017-06-30 12:42:59 -07:00
Nick Briggs
06cc0316a0 Fix implicit declarations of library functions due to missing include string.h.
modified:   ../src/gcarray.c
	modified:   ../src/initkbd.c
	modified:   ../src/uraid.c
	modified:   ../src/uutils.c
2017-06-30 12:33:41 -07:00
Nick Briggs
2f0aa254aa Create dsk.h to declare functions defined in dsk.c
Update files that depend on dsk functions to include dsk.h
Declare as static all functions in dsk.c that are not needed externally.
Add dependencies to makefile.

	modified:   makefile-tail
	new file:   ../inc/dsk.h
	modified:   ../src/dir.c
	modified:   ../src/dsk.c
	modified:   ../src/subr.c
	modified:   ../src/ufs.c
	modified:   ../src/vmemsave.c
2017-06-30 11:53:55 -07:00
Nick Briggs
0371f19167 Create conspage.h to declare functions defined in conspage.c
Update files that depend on conspage functions to include conspage.h
Declare as static all functions in conspage.c that are not needed externally.
Add dependencies to makefile.

	modified:   bin/makefile-darwin.386-x
	modified:   bin/makefile-tail
	new file:   inc/conspage.h
	modified:   src/conspage.c
	modified:   src/mvs.c
	modified:   src/rplcons.c
	modified:   src/xc.c
	modified:   src/z2.c
2017-06-29 22:33:35 -07:00
Nick Briggs
d450521ffd Reformat cell.h 2017-06-29 22:31:11 -07:00
Nick Briggs
cfd0711a73 Create car-cdr.h to declare functions defined in car-cdr.c
Update files that depend on car-cdr functions to include car-cdr.h.
    Add dependencies to makefile.

	modified:   makefile-darwin.386-x
	modified:   makefile-init.386
	modified:   makefile-tail
	new file:   ../inc/car-cdr.h
	modified:   ../src/bbtsub.c
	modified:   ../src/car-cdr.c
	modified:   ../src/dsk.c
	modified:   ../src/gcarray.c
	modified:   ../src/gcrcell.c
	modified:   ../src/kprint.c
	modified:   ../src/loopsops.c
	modified:   ../src/lsthandl.c
	modified:   ../src/mvs.c
	modified:   ../src/storage.c
	modified:   ../src/sxhash.c
	modified:   ../src/vars3.c
	modified:   ../src/xc.c
	modified:   ../src/z2.c
2017-06-29 22:24:33 -07:00
Nick Briggs
7c9b9d22c6 Create uraid.h to declare functions defined in uraid.c.
Update files that depend on these uraid functions to include uraid.h.
Add dependencies to makefile.

	modified:   bin/makefile-tail
	new file:   inc/uraid.h
	modified:   src/common.c
	modified:   src/truecolor.c
	modified:   src/unwind.c
	modified:   src/uraid.c
	modified:   src/uutils.c
2017-06-29 18:31:47 -07:00
Nick Briggs
0445e61fde Add prototypes for flush_display_region...() to display.h
Correct declared argument types in flush_display_region...() to match usage.

	modified:   inc/display.h
	modified:   src/initdsp.c
2017-06-26 21:33:03 -07:00
Nick Briggs
5a520095c2 MacOS doesn't have stime() even though it has many SysV features 2017-06-26 21:32:30 -07:00
Nick Briggs
913a45daf7 Add include unistd.h to various files that need it. 2017-06-26 21:31:23 -07:00
Nick Briggs
7c1e783509 fix missing return type on fork_Unix. Declare time() -- where does it really come from? 2017-06-26 21:29:39 -07:00
Nick Briggs
f319f2edd4 MacOS and FreeBSD (at least on x86) support unaligned fetch.
Clean up (re)definition of getrusage/getpagesize/getwd for POSIX systems"

	modified:   inc/version.h
2017-06-26 21:27:37 -07:00
Nick Briggs
1d818f1ec9 Don't declare getenv explicitly in inc/lispemul.h 2017-06-26 21:24:37 -07:00
Nick Briggs
67ce5bf714 Add makefile for init on (MacOS) x86 system.
Ignore the init.386 directory that "makeright init" will write to.

	modified:   ../.gitignore
	new file:   makefile-init.386
2017-06-25 18:28:39 -07:00
Nick Briggs
e84246e1a8 Clean up compiler options, use gcc89 standard.
Remove extraneous dependencies for assembler optimized code in dispatch

	modified:   bin/makefile-darwin.386-x
2017-06-25 18:22:59 -07:00
Nick Briggs
a0edc850bb Clean up variable setting -- we're running with /bin/sh (not csh) so don't use "set var = value".
modified:   bin/makeright
2017-06-25 18:20:14 -07:00
Nick Briggs
1867f69be9 Use | instead of + when or-ing shifted partial words to encourage
compiler to use roll instruction on x86

	modified:   src/byteswap.c
2017-06-25 18:13:09 -07:00
Nick Briggs
cef5b57a9d Correct spelling of ...visible (was ...vissible) in all source files.
modified:   ../inc/bitblt.h
	modified:   ../inc/devif.h
	modified:   ../src/bitblt.c
	modified:   ../src/dosmouse.c
	modified:   ../src/dspif.c
	modified:   ../src/initdsp.c
	modified:   ../src/keyevent.c
	modified:   ../src/vesafns.asm
	modified:   ../src/vesainit.c
	modified:   ../src/vgainit.c
	modified:   ../src/vmemsave.c
	modified:   ../src/xbbt.c
	modified:   ../src/xc.c
	modified:   ../src/xc.c.orig
	modified:   ../src/xinit.c
	modified:   ../src/xlspwin.c
	modified:   ../src/xscroll.c
	modified:   ../src/xwinman.c
2017-06-22 23:32:22 -07:00
Nick Briggs
afb6ae3397 Remove junk file hasbcopy. 2017-06-22 19:13:18 -07:00
Nick Briggs
91dc1d7410 Fix some files with CRLF (DOS) line endings to have LF (Unix).
modified:   doskbd.c
	modified:   launch.asm
	modified:   lpkit.c
	modified:   lplexyy.c
	modified:   lpytab.c
	modified:   mouseif.c
2017-06-22 19:09:55 -07:00
Nick Briggs
5481a14812 Replace all K&R style function definitions with new-style function definitions.
Add some missing default function result types (int).
Add some missing void result types where appropriate.

	modified:   src/Cldeetr.c
	modified:   src/atom.c
	modified:   src/bbtsub.c
	modified:   src/bitblt.c
	modified:   src/byteswap.c
	modified:   src/chardev.c
	modified:   src/chatter.c
	modified:   src/colorbltfns.c
	modified:   src/common.c
	modified:   src/dir.c
	modified:   src/dlpi.c
	modified:   src/doskbd.c
	modified:   src/dosmouse.c
	modified:   src/draw.c
	modified:   src/dsk.c
	modified:   src/dspsubrs.c
	modified:   src/ejlisp.c
	modified:   src/ether.c
	modified:   src/imagefile.c
	modified:   src/imagefile2.c
	modified:   src/inet.c
	modified:   src/initdsp.c
	modified:   src/initkbd.c
	modified:   src/kbdsubrs.c
	modified:   src/ldeboot.c
	modified:   src/llcolor.c
	modified:   src/llstk.c
	modified:   src/loader.c
	modified:   src/loopsops.c
	modified:   src/lpdual.c
	modified:   src/lpmain.c
	modified:   src/lpread.c
	modified:   src/lptran.c
	modified:   src/lpwrite.c
	modified:   src/main.c
	modified:   src/misc7.c
	modified:   src/mkatom.c
	modified:   src/mnwevent.c
	modified:   src/mnxmeth.c
	modified:   src/mouseif.c
	modified:   src/ocr.c
	modified:   src/ocrproc.c
	modified:   src/oether.c
	modified:   src/oldeether.c
	modified:   src/osmsg.c
	modified:   src/picture.c
	modified:   src/rawcolor.c
	modified:   src/rawrs232c.c
	modified:   src/rpc.c
	modified:   src/rs232c.c
	modified:   src/socdvr.c
	modified:   src/socket.c
	modified:   src/testdsp.c
	modified:   src/testtool.c
	modified:   src/timeoday.c
	modified:   src/timeofday.c
	modified:   src/timer.c
	modified:   src/truecolor.c
	modified:   src/tty.c
	modified:   src/ufn.c
	modified:   src/ufs.c
	modified:   src/unixcomm.c
	modified:   src/unixfork.c
	modified:   src/unwind.c
	modified:   src/uraid.c
	modified:   src/vesainit.c
	modified:   src/vgainit.c
	modified:   src/vmemsave.c
	modified:   src/xcursor.c
	modified:   src/xinit.c
	modified:   src/xlspwin.c
	modified:   src/xmkicon.c
	modified:   src/xrdopt.c
	modified:   src/xwinman.c
2017-06-22 17:31:40 -07:00
Nick Briggs
b578b38c78 Include unistd.h for lseek() and friends.
Convert from K&R style function definition.

	modified:   src/ldsout.c
2017-06-21 17:58:22 -07:00
Nick Briggs
f4c3e56a82 Reduce verbosity of opcode tracing so that trace files are more manageable size.
modified:   src/xc.c
2017-06-14 18:06:04 -07:00
Nick Briggs
97d4ba3a0e Announce uRaid entry on stderr in case stdout has been redirected
to collect trace output.  Also fflush() stdout & stderr
	 so that we see any buffered output when we enter.

	modified:   src/common.c
2017-06-14 18:03:35 -07:00
Nick Briggs
ac43bc3755 DBPRINT macro does not accept a FILE* as an argument. It expands to printf().
modified:   src/vmemsave.c
2017-06-14 17:59:59 -07:00
Nick Briggs
e360a64c42 Have "a" (GETTOPVAL) and "d" (GETDEFCELL) commands announce the atom index
of the atom they are working on.

	modified:   src/uraid.c
2017-06-14 17:58:20 -07:00
Nick Briggs
ef3fbc29fc Add extern declaration for "flushing", a flag to enable/disable calls to fflush(stdout)
after each call to printf() in the debug/tracing code.  Too frequent calls slow things down.

	modified:   inc/dbprint.h
	modified:   src/main.c
2017-06-14 17:53:13 -07:00
Nick Briggs
467d33d913 makefile cleanup target should also remove lde executable. 2017-06-09 14:08:39 -07:00
Nick Briggs
8d42e7791f Merge branch 'freebsd' 2017-06-08 11:23:40 -07:00
Nick Briggs
208bce9b40 Use unsigned instead of int where, on modern systems, socklen_t would be appropriate. 2017-06-08 11:21:23 -07:00
Nick Briggs
eae092e02b Initialize keystring as empty string.
Declare help string as const.
Print the helpstring through a %s format rather than using it directly.
Don't bother to check the address of allocated keystring for NULL.

	modified:   main.c
2017-06-08 08:46:54 -07:00
Nick Briggs
224e6478bd Fix warning for comment within comment.
modified:   vmemsave.c
2017-06-08 08:24:41 -07:00
Nick Briggs
04b0b3ee0b Add new include file xscroll.h defining the Scroll functions implemented in xscroll.c
and used in xwinman.c
Update function declarations from K&R style to new style.
Fix incorrect argument counts for some procedure calls.

	new file:   ../inc/xscroll.h
	modified:   xscroll.c
	modified:   xwinman.c
2017-06-07 23:53:03 -07:00
Nick Briggs
9ea244b927 Use correct type (unsigned) for message length.
modified:   rpc.c
2017-06-07 21:21:15 -07:00
Nick Briggs
2c3fb229d1 Add braces to suppress dangling else warning.
modified:   vars3.c
2017-06-07 20:54:52 -07:00
Nick Briggs
3d47027d31 Clean up error message for case where sysout is not integral number of pages.
Correct format string (%lx) for size of argument (long).

	modified:   ldsout.c
2017-06-07 20:50:30 -07:00
Nick Briggs
ce13dce279 Convert 0x%x to %p where appropriate.
modified:   llstk.c
2017-06-07 20:40:43 -07:00
Nick Briggs
6595e9f7b1 Add braces to suppress dangling else warning.
modified:   inc/tosfns.h
2017-06-07 20:39:27 -07:00
Nick Briggs
25b0a24e3f Convert from K&R style parameter declaration to modern.
modified:   keyevent.c
2017-06-07 20:18:47 -07:00
Nick Briggs
154d07edce Remove unused argument from printf().
modified:   initkbd.c
2017-06-07 20:11:57 -07:00
Nick Briggs
1b7a7fc6fc Correct format strings and arguments.
modified:   gcarray.c
2017-06-07 20:09:11 -07:00
Nick Briggs
f4f9118a7c Add casts to match calculations to format specifier.
modified:   gccode.c
2017-06-07 20:03:31 -07:00
Nick Briggs
4fe917e2d8 Fix unsequenced modification and access to 'addr'
Fix incorrect format string for type, replacing 0x%x with %p.

	modified:   gcfinal.c
2017-06-07 19:59:00 -07:00
Nick Briggs
9510746af4 Add comment regarding return from NewEntry macro.
modified:   gchtfind.c
2017-06-07 19:57:40 -07:00
Nick Briggs
409f1f5987 Add missing comment closing delimiter to suppress warning for nested comments.
modified:   gcr.c
2017-06-07 18:37:15 -07:00
Nick Briggs
e2264ff1f9 Add braces to suppress warning for dangling else clause.
modified:   gcoflow.c
2017-06-07 18:33:53 -07:00
Nick Briggs
0dc8820060 Add "l" qualifiers to printf format strings for long types.
modified:   dspif.c
2017-06-07 17:51:48 -07:00
Nick Briggs
de2ae84bfc Explicitly cast cursor bitmap to char * to match XCreatePixmapFromBitmapData
modified:   xcursor.c
2017-06-07 17:42:50 -07:00
Nick Briggs
118a3e7750 Correct signedness of window parameters used in XParseGeometry.
Signed x, y, Unsigned width, height.

	modified:   xinit.c
	modified:   xlspwin.c
	modified:   xrdopt.c
2017-06-07 17:19:02 -07:00
Nick Briggs
1dadac1888 Clean up types (long unsigned int => unsigned long).
Add "l" qualifiers to printf format strings for long types.
Rewrite input string handling in keymaker.c to get rid of unsafe gets().
2017-06-07 16:58:45 -07:00
Nick Briggs
ac563a69f3 Replace 0x%x with %p for pointer output in error messages. %p arrived in C89. 2017-06-07 14:33:31 -07:00
Nick Briggs
4eaf562a8a Add parentheses to correct interpretation of word-alignment check due to operator precedence confusion. 2017-06-07 14:21:10 -07:00
Nick Briggs
cea2223dae Convert to modern parameter declaration style. 2017-06-07 12:08:23 -07:00
Nick Briggs
24d210f8d3 Initialize various X structures to 0 as not all fields are explicitly set. Remove PPosition from size hints as we don't set position. 2017-06-07 12:07:23 -07:00
Nick Briggs
b647f69497 Add missing include stdio.h, only required if DEBUG or TRACE is defined, but doesn't hurt. 2017-06-07 12:03:28 -07:00
Nick Briggs
b033302d2a Remove duplicate #defines for items that are in display.h 2017-06-07 12:00:08 -07:00
Nick Briggs
06b9d1fc1f Reformat at width=120, seems to work better for initialization tables. 2017-06-06 17:25:11 -07:00
Nick Briggs
b6c93b9039 Reformat XKeymap.h 2017-06-06 16:25:12 -07:00
Nick Briggs
9f01c92438 Fix erroneous assignment instead of comparison in if-expression. 2017-05-29 12:13:35 -07:00
Nick Briggs
9911a80bef Fix warning for /* within comment block 2017-05-29 11:57:59 -07:00
Nick Briggs
193d1ce6c2 Handle missing sysout name as intended. 2017-05-29 11:52:26 -07:00
Nick Briggs
fac5b4d4b0 References to 'isfinite()' require #include <math.h> 2017-05-28 21:42:38 -07:00
Nick Briggs
203d02caed Correct unsequenced modification and access to 'base' 2017-05-28 21:38:51 -07:00
Nick Briggs
fe2014d064 Prefer non-deprecated isfinite() over finite() for FP result check. 2017-05-28 19:47:30 -07:00
Nick Briggs
e08d3ce887 Wrap assignments used as if-condition in parens to suppress warning. 2017-05-28 19:46:39 -07:00
Nick Briggs
eb4337fdc2 Restore signal handler setup. 2017-05-28 19:38:08 -07:00
Nick Briggs
a6f00921ca condition and increment reversed in for-loop. 2017-05-28 19:35:13 -07:00
Nick Briggs
349b2566da Fix UDP send case to handle errors correctly whether BYTESWAP is defined or not (like TCP send) 2017-05-28 19:29:59 -07:00
Nick Briggs
156c3292f8 Reformat all C source files with Clang-format in Google style w/ 100 col width. 2017-05-28 18:08:18 -07:00
Nick Briggs
691645d048 Fix missing return types on functions, convert some functions with always ignored results to void. 2017-05-28 15:08:42 -07:00
Nick Briggs
65ddb5a968 Add force flag to cleanup rm command, not everything may be present when we clean up. 2017-05-28 15:06:28 -07:00
Nick Briggs
cb285809a1 Add -Wall to default compiler options on FreeBSD. 2017-05-28 15:05:51 -07:00
Nick Briggs
0272578b69 Ignore *.core files 2017-05-28 14:53:02 -07:00
Nick Briggs
ce2fa3a119 Cleanup warnings for missing/wrong include files 2017-05-25 15:48:08 -07:00
Nick Briggs
e859670886 correct signal handler type for MacOS and FreeBSD int_timer_service. 2017-05-25 13:10:43 -07:00
Nick Briggs
a8fe2094fe FreeBSD now uses dirent.h rather than sys/dir.h 2017-05-25 13:09:39 -07:00
Nick Briggs
02569edbe0 First cleanup to get to compiling (warnings, no errors) FreeBSD 2017-05-25 12:51:47 -07:00
Nick Briggs
be2101ac49 FreeBSD has just plain <termios.h> 2017-05-24 21:00:10 -07:00
Nick Briggs
4e6bbcbc1d Use C-style comments only. 2017-05-24 19:19:34 -07:00
Nick Briggs
60374cf5cb Ignore FreeBSD build directories 2017-05-24 19:16:06 -07:00
Nick Briggs
e311f51fdb FreeBSD behaves similarly to MacOS for tcgetattr/tcsetattr 2017-05-24 19:15:12 -07:00
Nick Briggs
15d00637fd Correct return type of lcfuncall to LispPTR. Remove call to DOSTACKOVERFLOW which can't be called in function that is not void return type. 2017-05-24 18:09:21 -07:00
Nick Briggs
8adfe96bd2 Add check for defined(WAITINT) to control whether wait status is int * for cases where SYSVONLY isn't appropriate 2017-05-24 18:02:35 -07:00
Nick Briggs
0557f1a4cd Reformat with clang-format to improve readability.
Add forward declaration for ccfuncall changing to void type.
Change bitbltsub return type to void to be consistent with usage.
Change bltchar return type to void to be consistent with usage.
Change newbltchar return type to void to be consistent with usage. XXX: alternative version not updated yet.
Change tedit_bltchar return type to void to be consistent with usage.
2017-05-24 17:48:23 -07:00
Nick Briggs
254193baab Add missing void declaration. 2017-05-24 17:32:41 -07:00
Nick Briggs
08227e1ea2 Add missing void declaration. 2017-05-24 17:31:13 -07:00
Nick Briggs
05c508f879 Add missing void declaration. Remove extraneous return() values in void functions. 2017-05-24 17:30:39 -07:00
Nick Briggs
5856367d22 Add missing void declaration. 2017-05-24 17:29:50 -07:00
Nick Briggs
d5ece9ccd5 Add missing void declaration. 2017-05-24 17:29:28 -07:00
Nick Briggs
32ebf5c823 Rearrange code to avoid forward references. Add missing void declarations. Add missing parentheses around macro parameter uses. 2017-05-24 17:29:03 -07:00
Nick Briggs
e5dbbe0f12 Add missing void declaration. 2017-05-24 17:26:12 -07:00
Nick Briggs
b636b2ad45 Rearrange code to avoid forward references. Add missing void declarations. 2017-05-24 17:25:43 -07:00
Nick Briggs
1cc7617978 Add missing return type. 2017-05-24 17:24:11 -07:00
Nick Briggs
569d1187d6 Rearrange code to avoid forward references. Add missing void declarations. Add parentheses to suppress warning for use of assignment in if-condition. 2017-05-24 17:23:34 -07:00
Nick Briggs
ba246fa721 Add parens to suppress warning about use of assignment in if-condition 2017-05-24 17:22:03 -07:00
Nick Briggs
72c8cd14af MacOS and FreeBSD have similar configurations, define WAITINT because status uses int status now. 2017-05-24 17:20:23 -07:00
Nick Briggs
5412639397 Initial version of makefile middle for FreeBSD on 386 with X windows. 2017-05-24 17:18:58 -07:00
Nick Briggs
7ef083b39b Remove unnecessary AIX define from MacOS version define. 2017-05-24 17:18:05 -07:00
Nick Briggs
115a7d9756 Add missing void declarations. 2017-05-24 15:40:44 -07:00
Nick Briggs
5595f8e4b0 Add missing void declarations. Rearrange code to avoid forward references 2017-05-24 15:40:30 -07:00
Nick Briggs
27dc6eb849 Add missing void declarations. Rearrange code to avoid forward references 2017-05-24 15:40:03 -07:00
Nick Briggs
28887f01c8 Add missing argument in trim_finfo_highest() call. 2017-05-24 15:38:02 -07:00
Nick Briggs
e716766e30 Include stdlib.h for malloc. Don't try to use valloc() on MacOS 2017-05-24 15:37:03 -07:00
Nick Briggs
0d856f3bdc Add missing void declarations. Ensure no attempt to return value from void functions. Rearrange code to avoid forward references 2017-05-24 15:35:37 -07:00
Nick Briggs
3b9d0c19ba Add missing void declarations. Ensure no attempt to return value from void functions. 2017-05-24 15:34:13 -07:00
Nick Briggs
5665ed91d7 MacOS does not need sys/vfs.h included. 2017-05-24 15:33:11 -07:00
Nick Briggs
3a2fbd1412 MacOS does not need sys/vfs.h included. 2017-05-24 15:32:53 -07:00
Nick Briggs
8d8ec278f4 Don't try to declare malloc(), include stdlib.h 2017-05-24 15:32:12 -07:00
Nick Briggs
063659e840 Add missing void declarations. Reorganize code to avoid forward references. MacOS does not need sys/vfs.h included. 2017-05-24 15:31:15 -07:00
Nick Briggs
52f025bb43 Don't use Streams S_INPUT ioctl on MacOS 2017-05-24 15:29:44 -07:00
Nick Briggs
552bb8e1dc Add missing void types. Rearrange code to avoid forward references. Fix incorrect XEvent type passed to Set_BitGravity() 2017-05-24 15:24:20 -07:00
Nick Briggs
2bf281cefb Clean up \#ifdefs. Add entry for FPTEST/FPCLEAR for MacOS and FreeBSD 2017-05-24 15:22:05 -07:00
Nick Briggs
e0195ec664 Rearrange code to avoid forward references. Fix missing void types. PAGE_SIZE collides with system definitions on some systems, rename it. 2017-05-24 15:20:42 -07:00
Nick Briggs
5193937cac Fix stray entry in documentation 2017-05-23 23:28:33 -07:00
Nick Briggs
59090b4a3c Add FreeBSD to the recognized set of OSs 2017-05-23 15:40:42 -07:00
Nick Briggs
3f54356d24 Remove some empty junk files with .c.X extension 2017-05-22 16:06:25 -07:00
Nick Briggs
b47f4be12c Remove an old editor backup file. 2017-05-22 16:03:51 -07:00
Nick Briggs
944083e433 MacOS(darwin) has seteuid() and getrusage()/getpagesize()/getwd() so don't #define them 2017-05-22 15:55:10 -07:00
Nick Briggs
3841aadba3 Parenthesize constant expression defines to avoid later operator precedence warnings/errors. 2017-05-22 15:15:08 -07:00
Nick Briggs
f6a6440ef4 Try different optimization flags, correct DFLAGS, remove -lcrypt from LDFLAGS 2017-05-21 17:37:27 -07:00
Nick Briggs
2d61ab2af5 Don't include -L$(LIBDIR) in RFLAGS, it is not needed during compilation 2017-05-21 17:36:15 -07:00
Nick Briggs
271b27fbed Fix typo in flags definition 2017-05-21 14:46:44 -07:00
Nick Briggs
215800f498 Correct syntax of test command expression 2017-05-21 14:31:04 -07:00
Nick Briggs
f624adc6c6 Set up .gitignore file 2017-05-21 14:07:56 -07:00
Nick Briggs
fe88618d12 Remove some old editor backup files and a stray object file. 2017-05-21 14:06:50 -07:00
Nick Briggs
25fb46e31d Add missing include for string.h and stdlib.h 2017-05-20 15:25:59 -07:00
Nick Briggs
fce205c378 Fix warning for %d used for long integer, and missing string.h include 2017-05-20 15:25:00 -07:00
Nick Briggs
6782d343cc Fix warning for comment inside comment 2017-05-20 15:23:28 -07:00
Nick Briggs
478e89cc68 recognize darwin (MacOS) as osversion and add initial makefile based on Linux 2017-05-19 17:36:24 -07:00
Nick Briggs
5a702e808a Patches that made it possible to compile on MacOS X as of Nov 13, 2011. 2015-04-20 21:14:32 -07:00
585 changed files with 55531 additions and 91020 deletions

96
.clang-format Normal file
View File

@@ -0,0 +1,96 @@
---
Language: Cpp
BasedOnStyle: Google
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
...

18
.github/workflows/Dockerfile_builder vendored Executable file
View File

@@ -0,0 +1,18 @@
#*******************************************************************************
#
# Dockerfile to build image with all the tools to build Maiko
#
# Copyright 2023 by Interlisp.org
#
# Frank Halasz 2023-02-21
#
# ******************************************************************************
FROM ubuntu:22.04
SHELL ["/bin/bash", "-c"]
USER root:root
# Install build tools
RUN apt-get update && apt-get install -y make clang libx11-dev gcc
USER root
WORKDIR /root
ENTRYPOINT /bin/bash

34
.github/workflows/Dockerfile_maiko vendored Executable file
View File

@@ -0,0 +1,34 @@
#*******************************************************************************
#
# Dockerfile to build Maiko for Linux to be used by buildRelease github action
# The output of this is intended to be a directory in the github workspace
# file system it is not intended to be a useable Docker image.
#
# Copyright 2023 by Interlisp.org
#
# Frank Halasz 2023-02-21
#
# ******************************************************************************
FROM ghcr.io/interlisp/maiko-builder
ARG INSTALL_LOCATION=/usr/local/interlisp/maiko
SHELL ["/bin/bash", "-c"]
# Copy over / clean maiko repo
COPY . ${INSTALL_LOCATION}
# Build maiko
RUN cd ${INSTALL_LOCATION}/bin \
&& ./makeright x cleanup \
&& ./makeright x \
&& if [ "$(./machinetype)" = "x86_64" ]; then \
./makeright init; \
fi
# Build specially for WSL1 by "fooling" a linux build
RUN cd ${INSTALL_LOCATION}/bin \
&& arch="$(./machinetype)" \
&& if [ "$arch" = "x86_64" ] || [ "$arch" = "aarch64" ]; then \
export LDEARCH="${arch}-microsoft-wsl1" \
&& ./makeright x cleanup \
&& ./makeright x \
&& ./makeright init \
; \
fi

65
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: Build
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Install X11 dependencies on MacOS
if: ${{ runner.os == 'macOS'}}
run: brew install --cask xquartz
- name: Build
working-directory: bin
run: ./makeright x
#
# Commented out because the RPi is not online at this time (6 July 2021)
#
# build-pi:
# runs-on: [self-hosted, linux, ARM]
# if: ${{ github.repository == 'Interlisp/maiko' }}
# steps:
# - uses: actions/checkout@v3
# - name: Build
# working-directory: bin
# run: ./makeright x
build-cmake:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v3
- name: Show CMake version
run: cmake --version
- name: Install X11 dependencies on MacOS
if: ${{ runner.os == 'macOS'}}
run: brew install --cask xquartz
- name: Install SDL2 dependencies on MacOS
if: ${{ runner.os == 'macOS'}}
run: brew install sdl2
- name: Install SDL dependency on Ubuntu
if: ${{ runner.os == 'Linux'}}
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

87
.github/workflows/buildBuilderImage.yml vendored Normal file
View File

@@ -0,0 +1,87 @@
#*******************************************************************************
# buildBuilderImage.yml
#
# Workflow to build a multiarch Docker image that includes all of the tools for
# building maiko for linux. Intended to be used (exclusively?) by the github
# actions that build maiko releases - e.g., buildRelease.yml.
#
# The purpose is to make the maiko github actions quicker and less resource
# consuming by not hving to intll the tools every time and instead just reuse
# this Docker image.
#
#
# Copyright 2023 by Interlisp.org
#
# Frank Haasz 2023-02-21
#
# ******************************************************************************
name: 'Build/Push Builder Image'
# Run this workflow on ...
on: workflow_dispatch
defaults:
run:
shell: bash
jobs:
buildBuilder:
runs-on: ubuntu-latest
steps:
# Checkout maiko
- name: Checkout maiko
uses: actions/checkout@v3
# Setup docker environment variables
- name: Setup Docker Environment Variables
id: docker_env
run: |
DOCKER_REGISTRY="ghcr.io"
DOCKER_NAMESPACE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
DOCKER_REPO=${DOCKER_REGISTRY}/${DOCKER_NAMESPACE}/maiko-builder
DOCKER_TAGS="${DOCKER_REPO}:latest"
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
echo "DOCKER_TAGS=${DOCKER_TAGS}" >> ${GITHUB_ENV}
# Setup the Docker Machine Emulation environment.
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Setup the Docker Buildx funtion
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
# Login to ghcr.io
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Do the Docker Build using the Dockerfile_builder in the repository we
# checked out. Push the result to ghcr.io.
#
- name: Build Docker Images for Push to GHCR
if: ${{ true }}
uses: docker/build-push-action@v4
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
context: ./.github/workflows
file: ./.github/workflows/Dockerfile_builder
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Push the result to DockerHub
push: true
tags: ${{ env.DOCKER_TAGS }}
######################################################################################

594
.github/workflows/buildRelease.yml vendored Normal file
View File

@@ -0,0 +1,594 @@
#*******************************************************************************
# buidRelease.yml
#
# Workflow to build a Maiko release that is pushed to github.
# For linux: release assets are built/pushed for X86_64, aarch64 and arm7vl.
# For macOS: release assets are built/pushed for X86_64 and aarch64 as well as
# a set of universal binaries.
# For Windows: not supported
#
# Note release pushed to github automatically includes source code assets
# in tar and zip formats.
#
# 2022-01-16 by Frank Halasz based on earlier workflow called buildDocker.yml
# Updated 2023-06-06: Remove docker image push; increase build efficeincy for linux
#
# Copyright 2022-2023 by Interlisp.org
#
#
# ******************************************************************************
name: 'Build/Push Release'
# Run this workflow on ...
on:
workflow_dispatch:
inputs:
draft:
description: "Mark this as a draft release"
type: choice
options:
- 'false'
- 'true'
force:
description: "Force build even if build already successfully completed for this commit"
type: choice
options:
- 'false'
- 'true'
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
outputs:
successful:
description: "'True' if maiko build completed successully"
value: ${{ jobs.complete.outputs.build_successful }}
inputs:
draft:
description: "Mark this as a draft release"
required: false
type: string
default: 'false'
force:
description: "Force build even if build already successfully completed for this commit"
required: false
type: string
default: 'false'
defaults:
run:
shell: bash
# 3 separate jobs here that can run in parallel
#
# 1. Linux: Build a multiplatform Linux Docker file system (not saved) and use
# results to build/push Linux release assets.
#
# 2. MacOs: Build maiko for MacOS (x86_64, aarch64, and universal) then create
# and push release assets.
#
# 3. Windows: Build maiko for cygwin and SDL (x86_64). Build is done within the
# cygwin-maiko-builder Docker image by building a new docker files system (and
# not a docker container) which is used to build/push Windows(cygwin) assets.
#
jobs:
######################################################################################
# Regularize the inputs so they can be referenced the same way whether they are
# the result of a workflow_dispatch or a workflow_call
inputs:
runs-on: ubuntu-latest
outputs:
draft: ${{ steps.one.outputs.draft }}
force: ${{ steps.one.outputs.force }}
linux: ${{ steps.one.outputs.linux }}
macos: ${{ steps.one.outputs.macos }}
windows: ${{ steps.one.outputs.windows }}
steps:
- id: one
run: >
if [ '${{ toJSON(inputs) }}' = 'null' ];
then
echo "workflow_dispatch";
echo "draft=${{ github.event.inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ github.event.inputs.force }}" >> $GITHUB_OUTPUT;
else
echo "workflow_call";
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
fi;
echo "linux=true" >> $GITHUB_OUTPUT;
echo "macos=true" >> $GITHUB_OUTPUT;
echo "windows=true" >> $GITHUB_OUTPUT;
######################################################################################
# Use sentry-action to determine if this release has already been built
# based on the latest commit to the repo
sentry:
needs: inputs
runs-on: ubuntu-latest
outputs:
release_not_built: ${{ steps.check.outputs.release_not_built }}
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
# Check if build already run for this commit
- name: Build already completed?
id: check
continue-on-error: true
uses: ./../actions/check-sentry-action
with:
tag: "release_docker"
######################################################################################
# Linux: build and push multi-platform docker image for Linux
# Use docker images to create and push release assets to github
linux:
needs: [inputs, sentry]
if: |
needs.inputs.outputs.linux == 'true'
&& (
needs.sentry.outputs.release_not_built == 'true'
|| needs.inputs.outputs.force == 'true'
)
runs-on: ubuntu-22.04
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
# Checkout the branch
- name: Checkout
uses: actions/checkout@v4
# Setup release tag
- name: Setup Release Tag
id: tag
uses: ./../actions/release-tag-action
# Setup docker environment variables
- name: Setup Docker Environment Variables
id: docker_env
run: |
DOCKER_NAMESPACE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "DOCKER_NAMESPACE=${DOCKER_NAMESPACE}" >> ${GITHUB_ENV}
DOCKER_IMAGE=${DOCKER_NAMESPACE}/${{ steps.tag.outputs.repo_name }}
DOCKER_TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${RELEASE_TAG#*-}"
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "docker_tags=${DOCKER_TAGS}" >> $GITHUB_OUTPUT
# Setup the Docker Machine Emulation environment.
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Setup the Docker Buildx funtion
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
# Do the Docker Build using the Dockerfile in the repository we
# checked out. Save the results in a directory under /tmp to be used
# for creating release tars. Does not creatre a docker image and does not
# push anything to Docker Hub.
#
# NOTE: THE ACTUAL MAIKO BUILD (FOR LINUX) HAPPENS HERE - I.E., IN THE
# DOCKER BUILD CALL. BUILD COMMANDS ARE SPECIFIED IN THE
# Dockerfile, NOT HERE IN THE WORKFLOW.
#
- name: Build Docker Image and Save It Locally
uses: docker/build-push-action@v4
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
BUILD_DATE=${{ steps.docker_env.outputs.build_time }}
RELEASE_TAG=${{ steps.tag.outputs.release_tag }}
context: .
file: ./.github/workflows/Dockerfile_maiko
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Put the results out to the local file system
outputs: type=local,dest=/tmp/docker_images
tags: ${{ steps.docker_env.outputs.docker_tags }}
# Use docker results to create releases for github.
# Docker results are in /tmp/docker_images. One subdir for each platform.
- name: Make release tars for each platform
env:
RELEASE_TAG: ${{ steps.tag.outputs.release_tag }}
run: |
mkdir -p /tmp/release_tars
for OSARCH in \
"linux.x86_64:linux_amd64" \
"linux.aarch64:linux_arm64" \
"linux.armv7l:linux_arm_v7" \
"wsl1.x86_64:linux_amd64" \
"wsl1.aarch64:linux_arm64" \
; \
do \
pushd /tmp/docker_images/${OSARCH##*:}/usr/local/interlisp >/dev/null ; \
/usr/bin/tar -c -z \
-f /tmp/release_tars/${RELEASE_TAG}-${OSARCH%%:*}.tgz \
maiko/bin/osversion \
maiko/bin/machinetype \
maiko/bin/config.guess \
maiko/bin/config.sub \
maiko/${OSARCH%%:*}/lde* \
; \
popd >/dev/null ; \
done
# Push Release to github
- name: Push the release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts:
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.x86_64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.aarch64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-wsl1.x86_64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-wsl1.aarch64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.armv7l.tgz
tag: ${{ steps.tag.outputs.release_tag }}
draft: ${{ needs.inputs.outputs.draft }}
token: ${{ secrets.GITHUB_TOKEN }}
######################################################################################
# MacOS: build for MacOS (x86_64, aarch64, universal) and use results to
# create and push release assets to github
macos:
needs: [inputs, sentry]
if: |
needs.inputs.outputs.macos == 'true'
&& (
needs.sentry.outputs.release_not_built == 'true'
|| needs.inputs.outputs.force == 'true'
)
runs-on: macos-latest
steps:
# Checkout the branch
- name: Checkout
uses: actions/checkout@v4
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
# Setup release tag
- name: Setup Release Tag
id: tag
uses: ./../actions/release-tag-action
# Uninstall exisitng X11 stuff preconfigured on runner then install correct X11 dependencies
- name: Unistall X components already on the runner
run: |
brew uninstall --ignore-dependencies --force libxft
brew uninstall --ignore-dependencies --force libxrender
brew uninstall --ignore-dependencies --force libxext
brew uninstall --ignore-dependencies --force libx11
brew uninstall --ignore-dependencies --force xorgproto
brew uninstall --ignore-dependencies --force libxdmcp
brew uninstall --ignore-dependencies --force libxau
- name: Install X11 dependencies on MacOS
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download XQuartz-2.8.5 --repo XQuartz/XQuartz --pattern XQuartz-2.8.5.pkg
sudo installer -pkg ./XQuartz-2.8.5.pkg -target /
# Install SDL dependencies
- name: Install SDL2 dependencies on MacOS
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download release-2.30.11 --repo libsdl-org/SDL --pattern SDL2-2.30.11.dmg
hdiutil attach SDL2-2.30.11.dmg
sudo ditto /Volumes/SDL2/SDL2.framework /Library/Frameworks/SDL2.framework
hdiutil detach /Volumes/SDL2/
# Build maiko
- name: Build ldeinit
working-directory: ./bin
run: |
export LDEARCH=x86_64-apple-darwin
./makeright init
export LDEARCH=aarch64-apple-darwin
./makeright init
mkdir -p ../darwin.universal
exe=ldeinit
lipo -create \
-arch arm64 ../darwin.aarch64/${exe} \
-arch x86_64 ../darwin.x86_64/${exe} \
-output ../darwin.universal/${exe}
- name: Build lde, ldex, & ldesdl
run: |
mkdir build
cd build
# -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
cmake .. \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-DMAIKO_DISPLAY_SDL=2 \
-DMAIKO_DISPLAY_X11=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
for exe in lde ldex ldesdl
do
lipo ${exe} -output ../darwin.x86_64/${exe} -extract x86_64
lipo ${exe} -output ../darwin.aarch64/${exe} -extract arm64
cp -p ${exe} ../darwin.universal/${exe}
done
# Create release tar for github.
- name: Make release tar(s)
env:
RELEASE_TAG: ${{ steps.tag.outputs.release_tag }}
run: |
mkdir -p /tmp/release_tars
cd ${GITHUB_WORKSPACE}/../
for arch in x86_64 aarch64 universal
do
tar -c -z \
-f /tmp/release_tars/${RELEASE_TAG}-darwin.${arch}.tgz \
maiko/bin/osversion \
maiko/bin/machinetype \
maiko/bin/config.guess \
maiko/bin/config.sub \
maiko/darwin.${arch}/lde*
done
# Push Release
- name: Push the release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts:
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.x86_64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.aarch64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.universal.tgz
tag: ${{ steps.tag.outputs.release_tag }}
draft: ${{ needs.inputs.outputs.draft }}
token: ${{ secrets.GITHUB_TOKEN }}
######################################################################################
# Windows: build for Windows-Cygwin via Docker build and use results to
# create and push release assets to github
windows:
needs: [inputs, sentry]
if: |
needs.inputs.outputs.windows == 'true'
&& (
needs.sentry.outputs.release_not_built == 'true'
|| needs.inputs.outputs.force == 'true'
)
runs-on: windows-2022
defaults:
run:
shell: powershell
steps:
# setup git to not mess up line endings
- name: git config
run: git config --global core.autocrlf input
# Retrieve Cygwin setup and install cygwin
- name: Install cygwin
id: cygwin
run: |
wget https://cygwin.com/setup-x86_64.exe -OutFile setup-x86_64.exe
Unblock-File setup-x86_64.exe
Start-Process setup-x86_64.exe -Wait -ArgumentList @("--root", ".\cygwin", "--quiet-mode", "--no-admin", "--wait", "--no-shortcuts", "--no-write-registry", "--verbose", "--site", "https://mirrors.kernel.org/sourceware/cygwin/", "--packages", "nano,binutils,make,cmake,gcc,clang")
cygwin\bin\bash -login -c 'sed -i -e "s/^none/#none/" /etc/fstab; echo "none / cygdrive binary,posix=0,user 0 0" >>/etc/fstab'
# Retrieve SDL2 and install in cygwin
- name: Install SDL2
id: sdl2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download 2.26.5 --repo interlisp/cygwin-sdl --pattern *.tgz --output .\cygwin\sdl2.tar.gz
cygwin\bin\bash -login -c 'cd /; tar xzf sdl2.tar.gz'
# Checkout the branch
- name: Checkout
uses: actions/checkout@v4
with:
path: cygwin\maiko
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: |
mv ./Actions_${{ github.sha }}/actions ../actions
rm -recurse -force ./Actions_${{ github.sha }}
# Setup release tag
- name: Setup Release Tag
id: tag
uses: ./../actions/release-tag-action
with:
path: cygwin/maiko
# Build maiko TODO-cleanup
- name: Build Cygwin-SDL Maiko
run: |
cygwin\bin\bash -login -c 'cd /maiko/bin && ./makeright sdl cleanup && ./makeright sdl'
cygwin\bin\bash -login -c 'mkdir /tmp/maiko; mkdir /tmp/maiko/bin; mkdir /tmp/maiko/cygwin.x86_64'
cygwin\bin\bash -login -c 'cp /maiko/bin/osversion /tmp/maiko/bin; cp /maiko/bin/machinetype /tmp/maiko/bin'
cygwin\bin\bash -login -c 'cp /maiko/bin/config.guess /tmp/maiko/bin; cp /maiko/bin/config.sub /tmp/maiko/bin'
cygwin\bin\bash -login -c 'cp /maiko/cygwin.x86_64/* /tmp/maiko/cygwin.x86_64; cp /usr/local/bin/SDL2.DLL /tmp/maiko/cygwin.x86_64'
cygwin\bin\bash -login -c 'chmod +x /tmp/maiko/bin/*; chmod +x /tmp/maiko/cygwin.x86_64/*'
cygwin\bin\bash -login -c 'echo lde > /tmp/maiko/cygwin.x86_64/lde.exe.local; echo ldesdl > /tmp/maiko/cygwin.x86_64/ldesdl.exe.local'
cygwin\bin\bash -login -c 'mkdir -p /tmp/release_tars'
cygwin\bin\bash -login -c 'tar -c -z -C /tmp -f /tmp/release_tars/${{ steps.tag.outputs.release_tag }}-cygwin.x86_64.tgz maiko'
# Push Release to github
- name: Push the release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts:
cygwin/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-cygwin.x86_64.tgz
tag: ${{ steps.tag.outputs.release_tag }}
draft: ${{ needs.inputs.outputs.draft }}
token: ${{ secrets.GITHUB_TOKEN }}
######################################################################################
# Emscripten: build and push Maiko compiled for Emscripten (to run Maiko in browser)
emscripten:
needs: [inputs, sentry]
if: |
needs.inputs.outputs.linux == 'true'
&& (
needs.sentry.outputs.release_not_built == 'true'
|| needs.inputs.outputs.force == 'true'
)
runs-on: ubuntu-latest
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
# Install SDL2
- name: Install SDL2
run: |
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y libsdl2-dev libsdl2-2.0-0
# Install Emscripten SDK
- name: Install Empscripten
working-directory: ../
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
CWD="$(pwd)"
echo "${CWD}" >> ${GITHUB_PATH}
echo "${CWD}/upstream/emscripten" >> ${GITHUB_PATH}
echo "${CWD}/upstream/emscripten/tools" >> ${GITHUB_PATH}
echo "${CWD}/node/$(ls -d node/*64bit | tail -1)/bin" >> ${GITHUB_PATH}
# Checkout the maiko branch
- name: Checkout
uses: actions/checkout@v4
# Setup release tag
- name: Setup Release Tag
id: tag
uses: ./../actions/release-tag-action
# Compile maiko using Emscripten (no load build)
- name: Compile Maiko using Emscripten
working-directory: ./bin
run: |
./makeright wasm_nl
cd ../emscripten.wasm_nl
tar -c -z -f ../${{ steps.tag.outputs.release_tag }}-emscripten.tgz *
# Push Release to github
- name: Push the release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{ steps.tag.outputs.release_tag }}-emscripten.tgz
tag: ${{ steps.tag.outputs.release_tag }}
draft: ${{ needs.inputs.outputs.draft }}
token: ${{ secrets.GITHUB_TOKEN }}
######################################################################################
# Use set-sentry-action to determine set the sentry that says this release has
# been successfully built
complete:
runs-on: ubuntu-latest
outputs:
build_successful: ${{ steps.output.outputs.build_successful }}
needs: [inputs, sentry, linux, macos, windows, emscripten]
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
# Set sentry
- name: Is build for this commit already completed?
id: set
uses: ./../actions/set-sentry-action
with:
tag: "release_docker"
- name: Output
id: output
run: |
echo "build_successful=true" >> $GITHUB_OUTPUT
######################################################################################

38
.gitignore vendored Normal file
View File

@@ -0,0 +1,38 @@
# Object files
*.o
# Editor backups and recovery files
*~
\#*#
.DS_Store
# build directories
build/**
cmake-build-*/**
.idea/
*.m68k-x/**
*.m68k/**
*.386-sdl/**
*.386-x/**
*.386/**
*.ppc-x/**
*.ppc/**
*.sparc-x/**
*.sparc/**
*.x86_64-x/**
*.x86_64-sdl/**
*.x86_64/**
*.wasm/**
*.wasm-wasm/**
*.wasm_nl/**
*.wasm_nl-wasm_nl/**
*.armv7l-x/**
*.armv7l/**
*.aarch64-x/**
*.aarch64-sdl/**
*.aarch64/**
init.386/**
*.universal/**
# core files
core
*.core
*.swp

531
CMakeLists.txt Normal file
View File

@@ -0,0 +1,531 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.15)
PROJECT(maiko C)
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
SET(CMAKE_C_STANDARD 99)
IF(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_ID MATCHES "GNU")
IF(UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
SET(CMAKE_C_FLAGS "-fdiagnostics-color=always ${CMAKE_C_FLAGS}")
ENDIF()
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
ENDIF()
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
ENDIF()
find_program(
CLANG_TIDY_EXE
NAMES "clang-tidy" "clang-tidy16" "clang-tidy15" "clang-tidy14" "clang-tidy13" "clang-tidy12" "clang-tidy11" "clang-tidy10"
DOC "Path to clang-tidy executable"
)
IF (CLANG_TIDY_EXE)
IF (NOT CMAKE_CROSSCOMPILING)
# There are many many warnings for strcpy instances to deal with,
# but suppress it for now so that other issues are more obvious
#
SET(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE} -checks=-*,cert-*,clang-analyzer-security.*,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-security.insecureAPI.bzero -header-filter=.*)
ENDIF()
ENDIF()
INCLUDE(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(m fmod "" NEED_LIB_M)
IF(NEED_LIB_M)
SET(MAIKO_LIBRARIES m)
ENDIF()
SET (MAIKO_RELEASE 351 CACHE STRING "Release version to build. Release: 115, 200, 201, 210, 300, 350, 351")
SET_PROPERTY(CACHE MAIKO_RELEASE PROPERTY STRINGS 115 200 201 210 300 350 351)
MESSAGE("-- Configured for release ${MAIKO_RELEASE}")
SET(MAIKO_DEFINITIONS
"-DRELEASE=${MAIKO_RELEASE}"
)
SET(MAIKO_INIT_DEFINITIONS
"-DRELEASE=${MAIKO_RELEASE}" "-DINIT" "-DNOVERSION"
)
OPTION(MAIKO_DISPLAY_X11 "Use X11 for display." ON)
SET(MAIKO_DISPLAY_SDL OFF CACHE STRING "Use SDL for display. Version: OFF, 2, 3")
SET_PROPERTY(CACHE MAIKO_DISPLAY_SDL PROPERTY STRINGS OFF 2 3)
IF(MAIKO_DISPLAY_X11)
FIND_PACKAGE(X11 REQUIRED)
SET(MAIKO_DISPLAY_X11_DEFINITIONS
"-DXWINDOW"
)
SET(MAIKO_DISPLAY_X11_LIBRARIES X11::X11)
SET(MAIKO_DISPLAY_X11_SRCS
src/xbbt.c
src/xcursor.c
src/xinit.c
src/xlspwin.c
src/xmkicon.c
src/xrdopt.c
src/xscroll.c
src/xwinman.c
)
SET(MAIKO_DISPLAY_X11_HDRS
inc/xbbtdefs.h
inc/xbitmaps.h
inc/xcursordefs.h
inc/xdefs.h
inc/xinitdefs.h
inc/XKeymap.h
inc/xlspwindefs.h
inc/xmkicondefs.h
inc/xrdoptdefs.h
inc/xscrolldefs.h
inc/xwinmandefs.h
)
MESSAGE("-- Configured for X11 display")
ENDIF()
IF(MAIKO_DISPLAY_SDL STREQUAL "2")
FIND_PACKAGE(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
SET(MAIKO_DISPLAY_SDL_DEFINITIONS
"-DSDL=2"
)
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS SDL2::Headers)
SET(MAIKO_DISPLAY_SDL_LIBRARIES SDL2::SDL2)
SET(MAIKO_DISPLAY_SDL_SRCS
src/sdl.c
)
SET(MAIKO_DISPLAY_SDL_HDRS
inc/sdldefs.h
)
MESSAGE("-- Configured for SDL2 display")
ELSEIF(MAIKO_DISPLAY_SDL STREQUAL "3")
FIND_PACKAGE(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
SET(MAIKO_DISPLAY_SDL_DEFINITIONS
"-DSDL=3"
)
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS SDL3::Headers)
SET(MAIKO_DISPLAY_SDL_LIBRARIES SDL3::SDL3)
SET(MAIKO_DISPLAY_SDL_SRCS
src/sdl.c
)
SET(MAIKO_DISPLAY_SDL_HDRS
inc/sdldefs.h
)
MESSAGE("-- Configured for SDL3 display")
ENDIF()
# according to: https://cmake.org/pipermail/cmake/2016-October/064342.html
# the following 2 lines should produce a dropdown-box in the cmake-gui
# but this will happen only after running the command line version of cmake,
# possibly after "clearing the cache" (i.e. starting with a fresh build directory)
SET(MAIKO_NETWORK_TYPE NONE CACHE STRING "Type of networking to use: one of: NONE, SUN_DLPI, SUN_NIT, NETHUB")
SET_PROPERTY(CACHE MAIKO_NETWORK_TYPE PROPERTY STRINGS NONE SUN_DLPI SUN_NIT NETHUB)
# configure networking implementation to use
IF(MAIKO_NETWORK_TYPE STREQUAL "NETHUB")
LIST(APPEND MAIKO_DEFINITIONS "-DMAIKO_ENABLE_NETHUB")
MESSAGE("-- Configured for NETHUB network support")
ELSEIF(MAIKO_NETWORK_TYPE STREQUAL "SUN_DLPI")
LIST(APPEND MAIKO_DEFINITIONS "-DMAIKO_ENABLE_ETHERNET -DUSE_DLPI")
MESSAGE("-- Configured for (SunOS) DLPI networking")
ELSEIF(MAIKO_NETWORK_TYPE STREQUAL "SUN_NIT")
LIST(APPEND MAIKO_DEFINITIONS "-DMAIKO_ENABLE_ETHERNET -DUSE_NIT")
MESSAGE("-- Configured for (SunOS) NIT networking")
ELSEIF(NOT MAIKO_NETWORK_TYPE STREQUAL "NONE")
MESSAGE(WARNING "Invalid option given for MAIKO_NETWORK_TYPE, must be one of:\nNONE, SUN_DLPI, SUN_NIT, NETHUB")
ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
LIST(APPEND MAIKO_DEFINITIONS
"-DOS5"
)
LIST(APPEND MAIKO_INIT_DEFINITIONS
"-DOS5"
)
ENDIF()
IF(APPLE)
# Suppress "has no symbols" warnings when building static libraries on macOS:
# https://stackoverflow.com/questions/4929255/building-static-libraries-on-mac-using-cmake-and-gcc/33067191#33067191
SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
ENDIF()
# These don't build on Linux. Some are for SunOS and DOS. Others ... ?
SET(BAD_SRCS
src/atom.c
src/chatter.c
src/codeconv.c
src/codetbl.c
src/doscomm.c
src/doskbd.c
src/dosmouse.c
src/ejlisp.c
src/imagefile2.c
src/imagefile.c
src/kbdif.c
src/lpdual.c
src/lpkit.c
src/lplexyy.c
src/lpmain.c
src/lpread.c
src/lpsolve.c
src/lptran.c
src/lpwrite.c
src/lpytab.c
src/mnwevent.c
src/mnxmeth.c
src/picture.c
src/rawcolor.c
src/rawrs232c.c
src/rs232c.c
src/truecolor.c
src/vesainit.c
src/vgainit.c
)
SET(MAIKO_SRCS
src/allocmds.c
src/arithops.c
src/arrayops.c
src/asmbbt.c
src/bbtsub.c
src/bin.c
src/binds.c
src/bitblt.c
src/blt.c
src/byteswap.c
src/car-cdr.c
src/chardev.c
src/common.c
src/conspage.c
src/dbgtool.c
src/dir.c
src/dlpi.c
src/draw.c
src/dsk.c
src/dspif.c
src/dspsubrs.c
src/eqf.c
src/ether_common.c
src/ether_sunos.c
src/ether_nethub.c
src/findkey.c
src/foreign.c
src/fp.c
src/fvar.c
src/gc2.c
src/gcarray.c
src/gc.c
src/gccode.c
src/gcfinal.c
src/gchtfind.c
src/gcmain3.c
src/gcoflow.c
src/gcr.c
src/gcrcell.c
src/gcscan.c
src/gvar2.c
src/hardrtn.c
src/inet.c
src/initdsp.c
src/initkbd.c
src/initsout.c
src/intcall.c
src/kbdsubrs.c
src/keyevent.c
src/kprint.c
src/ldsout.c
src/lineblt8.c
src/lisp2c.c
src/llcolor.c
src/llstk.c
src/loopsops.c
src/lowlev1.c
src/lowlev2.c
src/lsthandl.c
src/misc7.c
src/miscn.c
src/mkatom.c
src/mkcell.c
src/mouseif.c
src/mvs.c
src/osmsg.c
src/perrno.c
src/return.c
src/rpc.c
src/rplcons.c
src/shift.c
src/storage.c
src/subr0374.c
src/subr.c
src/sxhash.c
src/testtool.c
src/timer.c
src/tty.c
src/typeof.c
src/ubf1.c
src/ubf2.c
src/ubf3.c
src/ufn.c
src/ufs.c
src/unixcomm.c
src/unwind.c
src/uraid.c
src/usrsubr.c
src/uutils.c
src/vars3.c
src/vmemsave.c
src/xc.c
src/z2.c
)
SET(MAIKO_HDRS
inc/address.h
inc/adr68k.h
inc/allocmdsdefs.h
inc/arithopsdefs.h
inc/arith.h
inc/arrayopsdefs.h
inc/array.h
inc/bb.h
inc/bbtsubdefs.h
inc/bindefs.h
inc/bindsdefs.h
inc/bitbltdefs.h
inc/bbtmacro.h
inc/bltdefs.h
inc/byteswapdefs.h
inc/car-cdrdefs.h
inc/cell.h
inc/chardevdefs.h
inc/commondefs.h
inc/conspagedefs.h
inc/dbgtooldefs.h
inc/dbprint.h
inc/debug.h
inc/devconf.h
inc/devif.h
inc/dirdefs.h
inc/display.h
inc/dld.h
inc/dlpidefs.h
inc/drawdefs.h
inc/dskdefs.h
inc/dspdata.h
inc/dspifdefs.h
inc/dspsubrsdefs.h
inc/emlglob.h
inc/eqfdefs.h
inc/etherdefs.h
inc/fast_dsp.h
inc/findkeydefs.h
inc/foreigndefs.h
inc/fpdefs.h
inc/fvardefs.h
inc/gc2defs.h
inc/gcarraydefs.h
inc/gccodedefs.h
inc/gcdata.h
inc/gcdefs.h
inc/gcfinaldefs.h
inc/gchtfinddefs.h
inc/gcmain3defs.h
inc/gcoflowdefs.h
inc/gcrcelldefs.h
inc/gcrdefs.h
inc/gcscandefs.h
inc/gvar2defs.h
inc/hardrtndefs.h
inc/ifpage.h
inc/inetdefs.h
inc/initatms.h
inc/initdspdefs.h
inc/initkbddefs.h
inc/initsoutdefs.h
inc/inlineC.h
inc/inln68k.h
inc/inlndos.h
inc/inlnPS2.h
inc/inlnSPARC.h
inc/intcalldefs.h
inc/iopage.h
inc/kbdif.h
inc/kbdsubrsdefs.h
inc/keyboard.h
inc/keyeventdefs.h
inc/keysym.h
inc/kprintdefs.h
inc/ldeXdefs.h
inc/ldsoutdefs.h
inc/lineblt8defs.h
inc/lisp2cdefs.h
inc/lispemul.h
inc/lispmap.h
inc/lispver1.h
inc/lispver2.h
inc/llcolordefs.h
inc/lldsp.h
inc/llstkdefs.h
inc/locfile.h
inc/loopsopsdefs.h
inc/lowlev1defs.h
inc/lowlev2defs.h
inc/lpdefs.h
inc/lpglob.h
inc/lpglobl.h
inc/lpkit.h
inc/lppatch.h
inc/lpproto.h
inc/lspglob.h
inc/lsptypes.h
inc/lsthandldefs.h
inc/maindefs.h
inc/medleyfp.h
inc/misc7defs.h
inc/miscndefs.h
inc/miscstat.h
inc/mkatomdefs.h
inc/mkcelldefs.h
inc/mnxdefs.h
inc/mvsdefs.h
inc/my.h
inc/MyWindow.h
inc/nfsfh.h
inc/nfswatch.h
inc/opcodes.h
inc/os.h
inc/osmsgdefs.h
inc/osmsgprint.h
inc/perrnodefs.h
inc/picture.h
inc/pilotbbt.h
inc/print.h
inc/rawrs232c.h
inc/retmacro.h
inc/returndefs.h
inc/rpcdefs.h
inc/rplconsdefs.h
inc/rs232c.h
inc/shiftdefs.h
inc/stack.h
inc/storagedefs.h
inc/stream.h
inc/subr0374defs.h
inc/subrdefs.h
inc/subrs.h
inc/sxhashdefs.h
inc/testtooldefs.h
inc/timeout.h
inc/timerdefs.h
inc/tos1defs.h
inc/tosfns.h
inc/tosret.h
inc/typeofdefs.h
inc/ubf1defs.h
inc/ubf2defs.h
inc/ubf3defs.h
inc/ufsdefs.h
inc/unixcommdefs.h
inc/unixfork.h
inc/unwinddefs.h
inc/uraiddefs.h
inc/uraidextdefs.h
inc/usrsubrdefs.h
inc/uutilsdefs.h
inc/vars3defs.h
inc/version.h
inc/vmemsavedefs.h
inc/xcdefs.h
inc/z2defs.h
)
ADD_CUSTOM_COMMAND(OUTPUT vdate.c
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/mkvdate > vdate.c
DEPENDS ${MAIKO_SRCS} ${MAIKO_HDRS} ${MAIKO_DISPLAY_X11_SRCS} ${MAIKO_DISPLAY_X11_HDRS} ${MAIKO_DISPLAY_SDL_SRCS} ${MAIKO_DISPLAY_SDL_HDRS}
)
ADD_EXECUTABLE(lde src/ldeboot.c src/unixfork.c)
TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(lde PRIVATE inc)
IF(MAIKO_DISPLAY_X11)
# Tell it that the X11 launcher is available.
TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DISPLAY_X11_DEFINITIONS})
# This is needed so that it can call XOpenDisplay.
TARGET_LINK_LIBRARIES(lde X11::X11)
ENDIF()
IF(MAIKO_DISPLAY_SDL)
# Tell it that the SDL launcher is available.
TARGET_COMPILE_DEFINITIONS(lde PRIVATE ${MAIKO_DISPLAY_SDL_DEFINITIONS})
ENDIF()
ADD_EXECUTABLE(ldeether src/ldeether.c src/dlpi.c)
TARGET_COMPILE_DEFINITIONS(ldeether PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(ldeether PRIVATE inc)
IF(MAIKO_DISPLAY_X11)
ADD_EXECUTABLE(ldex
src/main.c
vdate.c
${MAIKO_SRCS}
${MAIKO_HDRS}
${MAIKO_DISPLAY_X11_SRCS}
${MAIKO_DISPLAY_X11_HDRS}
)
TARGET_COMPILE_DEFINITIONS(ldex PRIVATE ${MAIKO_DEFINITIONS} ${MAIKO_DISPLAY_X11_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(ldex PRIVATE inc)
TARGET_LINK_LIBRARIES(ldex ${MAIKO_LIBRARIES} ${MAIKO_DISPLAY_X11_LIBRARIES})
ADD_EXECUTABLE(ldeinit
src/main.c
vdate.c
${MAIKO_SRCS}
${MAIKO_HDRS}
${MAIKO_DISPLAY_X11_SRCS}
${MAIKO_DISPLAY_X11_HDRS}
)
TARGET_COMPILE_DEFINITIONS(ldeinit PRIVATE ${MAIKO_INIT_DEFINITIONS} ${MAIKO_DISPLAY_X11_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(ldeinit PRIVATE inc)
TARGET_LINK_LIBRARIES(ldeinit ${MAIKO_LIBRARIES} ${MAIKO_DISPLAY_X11_LIBRARIES})
ENDIF()
IF(MAIKO_DISPLAY_SDL)
ADD_EXECUTABLE(ldesdl
src/main.c
vdate.c
${MAIKO_SRCS}
${MAIKO_HDRS}
${MAIKO_DISPLAY_SDL_SRCS}
${MAIKO_DISPLAY_SDL_HDRS}
)
TARGET_COMPILE_DEFINITIONS(ldesdl PRIVATE ${MAIKO_DEFINITIONS} ${MAIKO_DISPLAY_SDL_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(ldesdl PRIVATE inc)
TARGET_INCLUDE_DIRECTORIES(ldesdl PRIVATE ${MAIKO_DISPLAY_SDL_INCLUDE_DIRS})
IF(APPLE)
IF(MAIKO_DISPLAY_SDL STREQUAL "3")
#
# Until CMake properly supports .xcframeworks, https://gitlab.kitware.com/cmake/cmake/-/issues/25998
# we need to manually set the RPATH to produce a working executable
#
MESSAGE("-- Applying fixup for macOS RPATH for SDL3.xcframework")
SET_PROPERTY(TARGET ldesdl APPEND PROPERTY BUILD_RPATH "/Library/Frameworks/SDL3.xcframework/macos-arm64_x86_64")
#
ENDIF()
ENDIF()
TARGET_LINK_LIBRARIES(ldesdl ${MAIKO_LIBRARIES} ${MAIKO_DISPLAY_SDL_LIBRARIES})
ENDIF()
ADD_EXECUTABLE(mkvdate src/mkvdate.c)
TARGET_COMPILE_DEFINITIONS(mkvdate PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(mkvdate PRIVATE inc)
ADD_EXECUTABLE(setsout src/setsout.c src/byteswap.c)
TARGET_COMPILE_DEFINITIONS(setsout PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(setsout PRIVATE inc)
ADD_EXECUTABLE(tstsout src/tstsout.c src/byteswap.c)
TARGET_COMPILE_DEFINITIONS(tstsout PRIVATE ${MAIKO_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(tstsout PRIVATE inc)

76
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at medley-owners@googlegroups.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
Copyright Venue (Wayne Booth Marci, Estate of John Sybalsky) and Interlisp contributers.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

5
NOTICE Normal file
View File

@@ -0,0 +1,5 @@
Many thanks to Wayne Booth Marci, who inherited the rights of Venue,
including the copyright of works identified as Copyright Venue.
Permission to release these files with the open source MIT License
has been granted.

55
README.md Normal file
View File

@@ -0,0 +1,55 @@
# Maiko
Maiko is the implementation of the Medley Interlisp virtual machine for a
byte-coded Lisp instruction set, and some low-level functions for
connecting Lisp to a display (via X11 or SDL), the local filesystem,
and a network subsystem.
For an overview, see [Medley Interlisp Introduction](https://interlisp.org/medley/using/docs/medley/).
See [the Medley repository](https://github.com/Interlisp/medley) for
* [Issues](https://github.com/Interlisp/medley/issues) (note that maiko issues are there too)
* [Discussions](https://github.com/Interlisp/medley/discussions) (Q&A, announcements, etc)
* [Medley's README](https://github.com/Interlisp/medley/blob/master/README.md)
Bug reports, feature requests, fixes and improvements, support for additional platforms and hardware are all welcome.
## Development Platforms
Development has been primarily on macOS, FreeBSD, and Linux, with testing on Solaris and Windows.
Processor architectures i386, x86\_64, arm64, arm7l, and SPARC.
## Building Maiko
### Building with make
Building requires a C compiler (`clang` preferred), either `make` or `CMake`, and X11 client libraries (`libx11-dev`), or SDL2. For example, using `make` and X11:
``` sh
$ sudo apt update
$ sudo apt install clang make libx11-dev
```
```
$ cd maiko/bin
$ ./makeright x
```
* The build will (attempt to) detect the OS-type and cpu-type. It will build binaries `lde` and `ldex` in `../`_`ostype.cputype`_ (with .o files in `../`_`ostype.cputype-x`_. For example, Linux on a 64-bit x86 will use `linux.x86_64`, while macOS 11 on a (new M1) Mac will use `darwin.aarch64`.
* If you prefer `gcc` over `clang`, you will need to edit the makefile fragment for your configuration (`makefile-ostype.cputype-x`) and comment out the line (with a #) that defines `CC` as `clang` and uncomment the line (delete the #) for the line that defines `CC` as `gcc`.
### Building with CMake
We provide a `CMakeLists.txt` which provides mostly matching build capabilities to the `make` setup.
CMake options are provided to control the configuration of the Maiko executables:
* MAIKO\_DISPLAY\_SDL: [OFF], 2, 3 - selects display subsystem SDL of version specified
* MAIKO\_DISPLAY\_X11: [ON], OFF - selects X11 display subsystem
* MAIKO\_NETWORK\_TYPE: [NONE], SUN\_DLPI, SUN\_NIT, NETHUB - network subsystem access
* MAIKO_RELEASE: [351], various - see `maiko/inc/version.h`
While SDL3 is selectable, the Maiko code has not yet been updated to work with the SDL3 API.
### Building For macOS
* Building/running on macOS requires either an X server and X client libraries or the SDL2 library.
An X-server for macOS (and X11 client libraries) can be freely obtained at https://www.xquartz.org/releases
The SDL library is freely available from https://libsdl.org

View File

@@ -1,78 +0,0 @@
#! /bin/sh
# First line invokes Bourne shell
# ============================================================================
# ABSTRACT:
# Bourne script for checking/generating checksums for files contained
# in a specific Medley release directory. Should normally be invoked
# by ldechecksum and expects the calling script to be connected to
# the medley installation directory. Also, expects the directory
# <medleydir>checksumdir to exist. "< W > ..." warning and "< E > ..."
# error messages will be issued.
#
# SYNOPSIS:
# checksum -cg dir
#
# -c generates a FOO.check file and compares it to FOO.sum.
# -g generates a FOO.sum file.
# NOTE: One of -c or -g is required.
# dir the name of the Medley release directory containing files
# for which checksum checking/generating will be performed.
#
# CHANGES:
# 05-05-89 Carl Gadener : added "trap" to delete created file if
# interrupted. Also "FOO.check" files are now
# deleted after being used.
# 12-14-88 Carl Gadener : Had to rewrite it for Bourne shell because
# the "foreach" loop in csh doesn't accept
# enough args.
# ============================================================================
#
if test $# -lt 2
then
echo "Usage: checksum -cg dir"
exit 2
else
case $1 in
-c) suffix="check"
operation="Verifying"
;;
-g) suffix="sum"
operation="Generating checksum for"
;;
*) echo "Usage: checksum -cg dir"
exit 2 ;;
esac
fi
if test -d $2
then
resultdir=`pwd`/checksumdir
resultfile=`echo "$2" | sed s/\\\//-/g`
# If interrupted be sure to delete created file
trap "/bin/rm -f $resultdir/$resultfile.$suffix ; exit" 1 2 3 15
cd $2
echo "$operation: $2"
echo "Checksum for directory: $2" > $resultdir/$resultfile.$suffix
echo "" >> $resultdir/$resultfile.$suffix
for file in `/bin/ls -FL | /bin/grep -v "/" `
do
echo "E > `sum $file` $file" >> $resultdir/$resultfile.$suffix
done
if test "$1" = "-c" # Verifying
then
/bin/diff $resultdir/$resultfile.sum \
$resultdir/$resultfile.check | grep "<"
# Remove check-file after check has been done
/bin/rm -f $resultdir/$resultfile.check
fi
else
echo "< W > `pwd`/$2 : Directory not installed"
fi

View File

@@ -1,88 +0,0 @@
January 19, 1989
===========================================================================
CHECKSUM CONTROL FOR FILES UNDER MEDLEY
===========================================================================
If you encounter inexplicable problems shortly after you install Medley,
they may be due to files being corrupted. We recommend that you verify the
checksums of your installed files.
===========================================================================
DESCRIPTION
===========================================================================
The script generates checksum files named FOO.check and compares them to
the released FOO.sum residing in the /checksumdir subdirectory. The
checksum script reports inconsistent files, the correct checksum values for
the files, and an error message. The checksum of individual files can be
verified with the UNIX command "sum filename".
===========================================================================
COMMANDS
===========================================================================
ldechecksum [-cg] medleydir [ dir | dirgroup ]
-c Generates checksums for your installed files and compares
them with correct values. This is the default action.
-g Generates checksums for the files specified.
medleydir Name of the Medley installation directory. Usually its
/usr/local/lde.
dir Any specific directory residing under medleydir. Only
relative pathnames with respect to medleydir are accepted.
dirgroup The directory group, either all (the default) or lisp,
which includes the X/install.sunos3, X/install.sunos4,
X/lisplibrary and X/lispsysouts directories.
===========================================================================
OUTPUT
===========================================================================
As it begins checking each directory, the script prints a message
in the form:
Checking directory: /usr/local/lde/subdir
Error and warning messages may be one of two forms:
< E > 32711 49 4045XLPSTREAM.DFASL
indicates that file 4045XLPSTREAM.DFASL is erroneous or does not
reside in the directory. The correct checksum of 32711, together
with the size (49kbytes) of the file, are shown.
< W > /usr/local/lde/fonts/display/chinese : Directory not installed
indicates that Chinese fonts were not installed or were removed
after Medley was installed.
===========================================================================
EXAMPLES:
===========================================================================
prompt% ldechecksum /usr/local/lde
All files in the installed Medley directories in /usr/local/lde are
checked.
prompt% ldechecksum /usr/local/somedir/lde lisp
This example checks all files in:
/usr/local/somedir/lde/install.sunos3
/usr/local/somedir/lde/install.sunos4
/usr/local/somedir/lde/lisplibrary
/usr/local/somedir/lde/lispsysouts
prompt% cd /usr/local/lde
prompt% ldechecksum -c . fonts/display
This example checks only the display font directories. The period
(.) is used because you are positioned under the current Medley
installation directory.

View File

@@ -1,67 +0,0 @@
January 19, 1989
======================================================================
HOW TO GENERATE CHECKSUMFILES FOR MEDLEY
======================================================================
===========================================================================
COMMANDS
===========================================================================
ldechecksum [-cg] medleydir [ dir | dirgroup ]
-c Generates checksums for your installed files and compares
them with correct values. This is the default action.
-g Generates checksums for the files specified.
medleydir Name of the Medley installation directory. Usually its
/usr/local/lde.
dir Any specific directory residing under medleydir. Only
relative pathnames with respect to medleydir are accepted.
dirgroup The directory group, either all (the default) or lisp,
which includes the X/install.sunos3, X/install.sunos4,
X/lisplibrary and X/lispsysouts directories.
===========================================================================
REQUIREMENTS
===========================================================================
Before generating checksumfiles, make sure that the subdirectory
"checksumdir" resides under the local Medley directory (normally
/usr/local/lde/checksumdir).
Make also sure that a copy of the scripts "ldechecksum" and "checksum"
reside under the subdirectory "checksumdir".
NOTE: Don't forget to give the "-g" parameter to generate the
checksumfiles.
======================================================================
EXAMPLES
======================================================================
prompt% ldechecksum -g /usr/local/lde
All checksumfiles for the Medley directories residing in
/usr/local/lde will be generated
prompt% ldechecksum /usr/local/somedir/lde lisp
This example generates checksumfiles for all files in:
/usr/local/somedir/lde/install.sunos3
/usr/local/somedir/lde/install.sunos4
/usr/local/somedir/lde/lisplibrary
/usr/local/somedir/lde/lispsysouts
prompt% cd /usr/local/lde
prompt% ldechecksum -c . fonts/display
This example only generates checksumfiles for the display font
directories. The period (.) is used because you are positioned
under the current Medley installation directory.

View File

@@ -11,55 +11,22 @@ Flag Name Meaning/Usage
_________ ________________________________________________________
BYTESWAP Used when compiling for a hardware architecture that has
byte-swapped words and word-swapped 32-bit cells, e.g. 80386.
SYSVSIGNALS True when compiling on a system that requires the use of
SYSV (rather than BSD) signal-handling code (just MIPS & ISC
for 486, now).
SYSVONLY True when compiling on a system that has little or no
BSD support (the ISC unix for 486, or MIPS). E.g. gettimofday
is missing.
I386 True if compiling for the Sun386i (not just any 80386);
used because the 386i's display controller is odd.
OS4 True if compiling for SunOS 4.x
AIX
NOPIXRECT Used to suppress pixrect/pixwin options when they're not
needed or not available. True if XWINDOW is.
AIX True if compiling for AIX
_I386 True if compiling for PS/2 under AIX (not our flag)
AIXPS2 True if compiling for PS/2 under AIX (our flag)
APOLLO True if compiling for the Apollo
sparc True if we're compiling on a SPARC machine.
mc68020 True if we're compiling on a Motorola 680x0 machine.
sun3 We're compiling for a Sun-3.
HP9000 We're compiling on an HP9000 RISC machine.
HPUX We're compiling for HP-UX
RS6000 We're compiling for the RS/6000 processor.
DEC3100 We're compiling for the DECStation 3100.
RISCOS We're compiling for the MIPS RISCstation under RISCOS.
UNSAFE If true, enables the "fast" version of 68020 opcodes.
NOASM If true, suppress any attempt to include assembler
versions of things in the emulator. In 'lispemul.c',
if this is true, disables:
SUN3_OS3_IL
SUN3_OS4_IL
SUN4_OS4_IL
OPDISP
NATIVETRAN
UNSAFE
PROFILE
and enables NOASMFNCALL
C_ONLY
SUN4_OS4_IL Try assembler peephole optimizations for SPARC & SunOS4.x
SUN3_OS3_IL Try assembler peephole optimizations for 68K & SunOS 3.x
SUN3_OS4_IL Try assembler peephole optimizations for 68K & SunOS 4.x
SUN3_OS3_OR_OS4_IL Try asm optimizations for 68K & either sunOS. This is
turned on whenever either of SUN3_OS3_IL or SUN3_OS4_IL is on.
OPDISP Use "fast-opcode-dispatch" macros
SPARCDISP Use fast-opcode-dispatch macros on SPARC
HPTIMERBUG True if we must compile in the patch around the HPUX
timer-resetting bug for Series 700.
@@ -72,7 +39,6 @@ DEBUG Used when debugging, to enclose trace and dump code.
dbprint.h for the definition.
TRACE
TRACE2
TRASE
OPTRACE If true, the dispatch loop prints the PC & opcode each time thru
FNTRACE If true, you see the name of each function called.
STACKCHECK If true, you see unusual cases of stack manipulation
@@ -86,15 +52,13 @@ PROFILE If true, the profiling control code is enabled. You must
CHECK
FSBCHECK If true, you see a trace of large free stack blocks when
the stack is manipulated; was used for debugging stack code.
FSMESSAGE If true, prints a message telling you about the hard links
it makes (in support of version numbering), as it makes them.
WINDOW
INIT Used when compiling an emulator to build a loadup. Use it
to dike out code that deals with network initialization, e.g.
MYOPTRACE Used to check the stack's validity on each opcode execution.
Requires NOASM, and the absence of SUN..._IL and SPARCDISP &c.
Requires NOASM
PCTRACE When true, compiles in a 100-long ring buffer that holds the
last 100 PCs, Function-blocks, and Opcodes executed. "pccounter"
@@ -111,9 +75,6 @@ DISPLAYBUFFER 10/3/89 JDS -- enables the experimental code for copying
Meant for supporting mono mode on a CG6 with no single-bit
bitplane. 1/22/91 JDS: This is now the standard flag for
compiling for color displays.
FSERROR Enables the emulator's returning Unix error codes for
{DSK} & {UNIX} operations, so Lisp can decode them and
give better indication of problems. FEATURE STANDARD IN 1.1
WINDOW
FLIPCURSOR If true, the "sandbar" line in the cursor will get flipped
by the C stack-frame-moving code, just as it does on a D
@@ -122,10 +83,8 @@ ORG_FILPCORSORBAR If true, you get the pixwin version of cursor changing;
otherwise, it gets done by direct writes into the display
region.
OLD_CURSOR If true, uses the pixwin cursor code (e.g., win_setcursor);
otherwise, uses the direct-write technique.
NATIVETRAN If true, code to support the native-code translator is
included in the emulator. This feature was never released,
and most such code is probably obsolete.
otherwise, uses the direct-write technique. This is only needed
for SUNDISPLAY.
OS4_TYPE4BUG If true, includes the patches around SunOS 4.0.x's failure
to tell you you've got a Type-4 keyboard.
ALLDIRSEARCH CURRENTLY HARD DISABLED IN directory.c; looks like it
@@ -150,22 +109,13 @@ RECLAIMINC If true, then the RECLAIMCELL opcode calls gcreclaimcell in
and is not in any system. Probably fairly easy to debug??
KB_SUN4 The kbd type for the Type-4 keyboard. Defined only because
older OS versions of the compiler don't define it automatically.
FUJI If true, and you don't set the LDEKBDTYPE environment variable,
you'll get a nasty message asking you to set it before
running lisp. Otherwise, you'll default to a type-3 kbd.
FLTINT If true, use the floating-point exception interrupts to detect
errors and overflows on FP operations. The interrupt sets a
global error flag. Otherwise, calls library routines to see
the condition code from each operation. For SPARCs, it's not
clear that the interrupt trick works, because of code re-
arrangement by the C compiler.
BUFFER Used (apparently) only in testdisplay.c to decide if it should
read the sysout directly, or buffer each page.
IFPAGE_DEFINED Used in .h files to prevent redefinition of Interface page.
IOPAGE_DEFINED " for IO page definition.
NOWAY Used to dike out C definitions of RPLACA and RPLACD in the
file car-cdrmacro.h
XWINDOW True if compiling for an X-windows emulator.
BIGATOMS True if this emulator will support 3-byte symbols, instead of
@@ -174,9 +124,37 @@ BIGATOMS True if this emulator will support 3-byte symbols, instead of
NEWBITBLT True if we want to use assembler BITBLT code, rather than
have code created inline by macro calls.
USE_DLPI True if the ethernet API is via the SysV Data Link Provider
Interface. Solaris uses DLPI.
USE_NIT True if the ethernet API is via the Network Interface Tap.
SunOS uses NIT.
PKTFILTER True if the ethernet packets are to be filtered before being
passed to the Lisp ethernet handler. Available on Sun systems
for both the NIT and DLPI cases.
MAIKO_ENABLE_NETHUB enables the support for Dodo Nethub networking for Dodo
XNS services, see documentation: using-dodo-networking-with-maiko.md
(implicitely disables USE_DLPI and USE_NIT)
MAIKO_EMULATE_TIMER_INTERRUPTS enables emulation of recurring timer interrupts for
platforms where SIGVTALRM/ITIMER_VIRTUAL or SIGALRM/ITIMER_REAL
do not work as expected (like cygwin)
timer is emulated by signaling an interrupt after a number of
executed instructions, by default 20.000 instructions, this can be
overriden by defining MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN
with the number of instructions between 2 interrupts
additionally this adds the command line arguments -intr-emu-insns
for overriding the compiled in instruction interval
(not working if OPDISP (fast opcode dispatch) is used)
MAIKO_EMULATE_ASYNC_INTERRUPTS same as MAIKO_EMULATE_TIMER_INTERRUPTS, but also
signals an I/O interrupt after each instruction interval
bitbltsub.c:#ifdef GETBASE
testdisplay.c:#ifdef NOTUSED
uraid.c:#ifdef ETHERINT
bitblt.c:#ifndef COLOR
bitbltsub.c:#ifndef prropstyle
lispmap.h:#ifdef MEDLEY

2101
bin/config.guess vendored

File diff suppressed because it is too large Load Diff

2679
bin/config.sub vendored

File diff suppressed because it is too large Load Diff

BIN
bin/dir.o

Binary file not shown.

View File

@@ -1,631 +0,0 @@
AFLAGS = /T
ARCHFILES = dosmouse.obj doskbd.obj vesafns.obj vesainit.obj vgainit.obj kbdif.obj
ADMINFILES = makefile mkvdate.c optck.c
LPFILES = lpmain.obj lpread.obj lpsolve.obj lpwrite.obj lpdual.obj lptran.obj
KEY = keytstno.obj
CFLAGS = -DBIGATOMS -DNEW_STORAGE -DDOS -DBYTESWAP -DKBINT -DFSERROR -DNOPIXRECT \
-DNOFORN -DNOETHER -DNOVERSION -DLPSOLVE -g
LDFLAGS = -g graphics.lib binmode.lib mouse.lib
RM = del
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c hacks.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c keylib.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c keytstno.c keytst.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c find-dsp.l dsphack.l xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arith2.obj hacks.obj lowlev2.obj subr0374.obj arith3.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj arith4.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj keylib.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(KEY) $(COLORFILES) $(ARCHFILES) $(LPFILES)
HFILES = address.h adr68k.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bitblt.h debug.h devconf.h dspdata.h ether.h fast_dsp.h fp.h gc.h hdw_conf.h initatms.h inlinec.h keyboard.h lispver1.h lispver2.h lldsp.h locfile.h mouseif.h my.h opcodes.h osmsg.h pilotbbt.h print.h profile.h return.h stack.h stream.h subrs.h sysatms.h timeout.h tos1defs.h tosfns.h tosret.h vmemsave.h xdefs.h xbitmaps.h xkeymap.h
bigvm:
CFLAGS = $(CFLAGS) -DBIGVM -DNEWCDRCODRING
make -f foot emul.exe
emul.exe : $(OFILES)
@ echo $** > linkopts
@ echo $(CFLAGS) > copts
$(RM) vdate.c
$(CC) @copts @linkopts $(LDFLAGS) /e$@
del linkopts
del copts
@ echo "Executable is now named '$@'"
main.o : lispemul.h address.h lsptypes.h adr68k.h stack.h lspglob.h lispmap.h ifpage.h iopage.h return.h debug.h profile.h
.SUFFIXES .exe .lib .c .obj .c .asm .s .c
medley.exe: launch.obj
TLINK launch,medley
launch.obj: launch.asm
# xc.obj: xc.s
# tasm /ml xc.s
#
#xc.s: xc.c
# rsh sparky (cd /users/nilsson/curr ; gcc-make $* )
vdate.obj : mkvdate.exe
mkvdate > vdate.c
$(CC) vdate.c -c $@
mkvdate.exe : ../src/mkvdate.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/mkvdate.c
del copts
xc.obj : ../src/xc.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/xc.c -I ../inc -c $@
del copts
lpmain.obj : ../src/lpmain.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lpmain.c -I ../inc -c $@
del copts
lpsolve.obj : ../src/lpsolve.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lpsolve.c -I ../inc -c $@
del copts
lpread.obj : ../src/lpread.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lpread.c -I ../inc -c $@
del copts
lptran.obj : ../src/lptran.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lptran.c -I ../inc -c $@
del copts
lpdual.obj : ../src/lpdual.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lpdual.c -I ../inc -c $@
del copts
lpwrite.obj : ../src/lpwrite.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lpwrite.c -I ../inc -c $@
del copts
conspage.obj : ../src/conspage.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/conspage.c -I ../inc -c $@
del copts
keytstno.obj : ../src/keytstno.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/keytstno.c -I ../inc -c $@
del copts
dosmouse.obj : ../src/dosmouse.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dosmouse.c -I ../inc -c $@
del copts
doskbd.obj : ../src/doskbd.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/doskbd.c -I ../inc -c $@
del copts
vesafns.obj : ../src/vesafns.asm
tasm /ml ..\src\vesafns.asm
vesainit.obj : ../src/vesainit.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/vesainit.c -I ../inc -c $@
del copts
vgainit.obj : ../src/vgainit.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/vgainit.c -I ../inc -c $@
del copts
kbdif.obj : ../src/kbdif.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/kbdif.c -I ../inc -c $@
del copts
gcoflow.obj : ../src/gcoflow.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcoflow.c -I ../inc -c $@
del copts
shift.obj : ../src/shift.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/shift.c -I ../inc -c $@
del copts
dbgtool.obj : ../src/dbgtool.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dbgtool.c -I ../inc -c $@
del copts
gcr.obj : ../src/gcr.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcr.c -I ../inc -c $@
del copts
gcrcell.obj : ../src/gcrcell.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcrcell.c -I ../inc -c $@
del copts
llstk.obj : ../src/llstk.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/llstk.c -I ../inc -c $@
del copts
gcscan.obj : ../src/gcscan.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcscan.c -I ../inc -c $@
del copts
loopsops.obj : ../src/loopsops.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/loopsops.c -I ../inc -c $@
del copts
storage.obj : ../src/storage.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/storage.c -I ../inc -c $@
del copts
allocmds.obj : ../src/allocmds.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/allocmds.c -I ../inc -c $@
del copts
dir.obj : ../src/dir.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dir.c -I ../inc -c $@
del copts
gvar2.obj : ../src/gvar2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gvar2.c -I ../inc -c $@
del copts
lowlev1.obj : ../src/lowlev1.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lowlev1.c -I ../inc -c $@
del copts
subr.obj : ../src/subr.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/subr.c -I ../inc -c $@
del copts
arith2.obj : ../src/arith2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/arith2.c -I ../inc -c $@
del copts
hacks.obj : ../src/hacks.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/hacks.c -I ../inc -c $@
del copts
lowlev2.obj : ../src/lowlev2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lowlev2.c -I ../inc -c $@
del copts
subr0374.obj : ../src/subr0374.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/subr0374.c -I ../inc -c $@
del copts
arith3.obj : ../src/arith3.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/arith3.c -I ../inc -c $@
del copts
doscomm.obj : ../src/doscomm.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/doscomm.c -I ../inc -c $@
del copts
hardrtn.obj : ../src/hardrtn.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/hardrtn.c -I ../inc -c $@
del copts
lsthandl.obj : ../src/lsthandl.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lsthandl.c -I ../inc -c $@ -Le
del copts
sxhash.obj : ../src/sxhash.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/sxhash.c -I ../inc -c $@
del copts
arith4.obj : ../src/arith4.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/arith4.c -I ../inc -c $@
del copts
draw.obj : ../src/draw.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/draw.c -I ../inc -c $@
del copts
main.obj : ../src/main.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/main.c -I ../inc -c $@
del copts
testtool.obj : ../src/testtool.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/testtool.c -I ../inc -c $@
del copts
array.obj : ../src/array.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/array.c -I ../inc -c $@
del copts
dsk.obj : ../src/dsk.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dsk.c -I ../inc -c $@
del copts
inet.obj : ../src/inet.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/inet.c -I ../inc -c $@
del copts
misc7.obj : ../src/misc7.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/misc7.c -I ../inc -c $@
del copts
timer.obj : ../src/timer.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/timer.c -I ../inc -c $@
del copts
array2.obj : ../src/array2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/array2.c -I ../inc -c $@
del copts
dspif.obj : ../src/dspif.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dspif.c -I ../inc -c $@
del copts
initdsp.obj : ../src/initdsp.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/initdsp.c -I ../inc -c $@
del copts
miscn.obj : ../src/miscn.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/miscn.c -I ../inc -c $@
del copts
typeof.obj : ../src/typeof.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/typeof.c -I ../inc -c $@
del copts
array3.obj : ../src/array3.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/array3.c -I ../inc -c $@
del copts
initkbd.obj : ../src/initkbd.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/initkbd.c -I ../inc -c $@
del copts
ubf1.obj : ../src/ubf1.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ubf1.c -I ../inc -c $@
del copts
array4.obj : ../src/array4.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/array4.c -I ../inc -c $@
del copts
dspsubrs.obj : ../src/dspsubrs.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dspsubrs.c -I ../inc -c $@
del copts
initsout.obj : ../src/initsout.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/initsout.c -I ../inc -c $@
del copts
mkatom.obj : ../src/mkatom.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/mkatom.c -I ../inc -c $@
del copts
ubf2.obj : ../src/ubf2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ubf2.c -I ../inc -c $@
del copts
array5.obj : ../src/array5.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/array5.c -I ../inc -c $@
del copts
eqf.obj : ../src/eqf.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/eqf.c -I ../inc -c $@
del copts
intcall.obj : ../src/intcall.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/intcall.c -I ../inc -c $@
del copts
mkcell.obj : ../src/mkcell.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/mkcell.c -I ../inc -c $@
del copts
ubf3.obj : ../src/ubf3.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ubf3.c -I ../inc -c $@
del copts
array6.obj : ../src/array6.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/array6.c -I ../inc -c $@
del copts
ether.obj : ../src/ether.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ether.c -I ../inc -c $@
del copts
ufn.obj : ../src/ufn.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ufn.c -I ../inc -c $@
del copts
atom.obj : ../src/atom.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/atom.c -I ../inc -c $@
del copts
findkey.obj : ../src/findkey.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/findkey.c -I ../inc -c $@
del copts
kbdsubrs.obj : ../src/kbdsubrs.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/kbdsubrs.c -I ../inc -c $@
del copts
mouseif.obj : ../src/mouseif.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/mouseif.c -I ../inc -c $@
del copts
ufs.obj : ../src/ufs.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ufs.c -I ../inc -c $@
del copts
bbtsub.obj : ../src/bbtsub.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/bbtsub.c -I ../inc -c $@
del copts
foreign.obj : ../src/foreign.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/foreign.c -I ../inc -c $@
del copts
keyevent.obj : ../src/keyevent.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/keyevent.c -I ../inc -c $@
del copts
unixcomm.obj : ../src/unixcomm.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/unixcomm.c -I ../inc -c $@
del copts
bin.obj : ../src/bin.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/bin.c -I ../inc -c $@
del copts
fp.obj : ../src/fp.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/fp.c -I ../inc -c $@
del copts
keylib.obj : ../src/keylib.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/keylib.c -I ../inc -c $@
del copts
binds.obj : ../src/binds.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/binds.c -I ../inc -c $@
del copts
fvar.obj : ../src/fvar.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/fvar.c -I ../inc -c $@
del copts
mvs.obj : ../src/mvs.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/mvs.c -I ../inc -c $@
del copts
unwind.obj : ../src/unwind.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/unwind.c -I ../inc -c $@
del copts
bitblt.obj : ../src/bitblt.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/bitblt.c -I ../inc -c $@
del copts
gc.obj : ../src/gc.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gc.c -I ../inc -c $@
del copts
uraid.obj : ../src/uraid.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/uraid.c -I ../inc -c $@
del copts
blt.obj : ../src/blt.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/blt.c -I ../inc -c $@
del copts
gc2.obj : ../src/gc2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gc2.c -I ../inc -c $@
del copts
kprint.obj : ../src/kprint.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/kprint.c -I ../inc -c $@
del copts
osmsg.obj : ../src/osmsg.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/osmsg.c -I ../inc -c $@
del copts
usrsubr.obj : ../src/usrsubr.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/usrsubr.c -I ../inc -c $@
del copts
byteswap.obj : ../src/byteswap.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/byteswap.c -I ../inc -c $@
del copts
gcarray.obj : ../src/gcarray.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcarray.c -I ../inc -c $@
del copts
perrno.obj : ../src/perrno.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/perrno.c -I ../inc -c $@
del copts
uutils.obj : ../src/uutils.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/uutils.c -I ../inc -c $@
del copts
carcdr.obj : ../src/carcdr.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/carcdr.c -I ../inc -c $@
del copts
asmbbt.obj : ../src/asmbbt.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/asmbbt.c -I ../inc -c $@
del copts
gccode.obj : ../src/gccode.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gccode.c -I ../inc -c $@
del copts
vars3.obj : ../src/vars3.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/vars3.c -I ../inc -c $@
del copts
gcfinal.obj : ../src/gcfinal.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcfinal.c -I ../inc -c $@
del copts
ldsout.obj : ../src/ldsout.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/ldsout.c -I ../inc -c $@
del copts
return.obj : ../src/return.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/return.c -I ../inc -c $@
del copts
vmemsave.obj : ../src/vmemsave.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/vmemsave.c -I ../inc -c $@
del copts
chardev.obj : ../src/chardev.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/chardev.c -I ../inc -c $@
del copts
gchtfind.obj : ../src/gchtfind.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gchtfind.c -I ../inc -c $@
del copts
lineblt8.obj : ../src/lineblt8.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lineblt8.c -I ../inc -c $@
del copts
rpc.obj : ../src/rpc.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/rpc.c -I ../inc -c $@
del copts
common.obj : ../src/common.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/common.c -I ../inc -c $@
del copts
gcmain3.obj : ../src/gcmain3.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/gcmain3.c -I ../inc -c $@
del copts
lisp2c.obj : ../src/lisp2c.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/lisp2c.c -I ../inc -c $@
del copts
rplcons.obj : ../src/rplcons.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/rplcons.c -I ../inc -c $@
del copts
z2.obj : ../src/z2.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/z2.c -I ../inc -c $@
del copts

Binary file not shown.

View File

@@ -1,4 +0,0 @@
%%
^[#][Ee][Nn][Dd][Ii][Ff][ \t]+[0-9,a-z,A-Z \t|_&]+$ {printf("#endif /* %s */\n", &yytext[7]);};
^[#][Ee][Ll][Ss][Ee][ \t]+[0-9,a-z,A-Z \t|_&]+$ {printf("#else /* %s */\n", &yytext[6]);};
%%

View File

@@ -1,4 +0,0 @@
#! /bin/csh
foreach f (*)
if ( -w $f) echo $f
end

View File

@@ -1,68 +0,0 @@
#!/usr/local/bin/perl
# $Id: fixid,v 1.1 1999/01/03 04:00:20 sybalsky Exp $ #
#************************************************************************/
#* */
#* (C) Copyright 1999 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
######################################################################
# #
# FIXID -- fix up the ID comment and static in source files #
# #
######################################################################
$file = shift;
chomp $file;
printf "File is %s.\n", $file;
open IN, "<" . $file;
open OUT, ">".$file.".new";
## Copy the first two lines of the file (ID comment & static)
$line = <IN>;
printf OUT "%s", $line;
$line = <IN>;
printf OUT "%s", $line;
## Now copy the rest of the file, omitting any line with a (#)
## in it (the likeliest ID Comment/static contents for SCCS.
$line = <IN>;
while ( $line )
{
if ( $line =~ /\(#\)/ )
{
printf "Omitting line: %s", $line;
}
else
{
printf OUT "%s", $line;
}
$line = <IN>;
}
close IN;
close OUT;
## Save the original file, and put the "fixed" on in its place.
`mv $file $file.orig`;
`mv $file.new $file`;

View File

@@ -1,38 +0,0 @@
#!/usr/local/bin/perl
$file = shift;
chomp $file;
printf "File is %s.\n", $file;
open IN, "<" . $file;
open OUT, ">".$file.".new";
$line = <IN>;
printf OUT "%s", $line;
$line = <IN>;
printf OUT "%s", $line;
$line = <IN>;
while ( $line )
{
if ( $line =~ /\(#\)/ )
{
printf "Omitting line: %s", $line;
}
else
{
printf OUT "%s", $line;
}
$line = <IN>;
}
close IN;
close OUT;
`mv $file $file.orig`;
`mv $file.new $file`;

View File

@@ -1,758 +0,0 @@
#! /bin/sh
# ============================================================================
# Changes:
# ============================================================================
# SYNOPSYS:
# install-medley
#
# Utility used for installation and upgrading of the medley system.
# The utility will infer as much as possible about the host and network,
# but will prompt for answers when needed.
#
# ============================================================================
# What is the application to be installed
APPLICATION="Medley 2.0"
SHAREDIR=/usr/share/lde
LOCALDIR=/usr/local/lde
INSTALLDIR=$LOCALDIR
TAPEDEV=/dev/rst0
#************************************************************
#********* Changes below this point should normally *********
#********* not be required *********
#************************************************************
# What we normally recommend to install (marked with 'x')
# COLORP and X11P versions are deduced if possible
SYSOUTP=x
MONOP=x
DISPLAYFONTP=x
LIBRARYP=x
# All sizes in MB
SYSOUTSIZE=5.1
MONOSIZE=0.5
COLORSIZE=0.5
X11SIZE=0.6
XNSSIZE=0.1
LIBRARYSIZE=3
DISPLAYFONTSIZE=5.5
INTERPRESSFONTSIZE=1.5
CHECKSUMSIZE=0.1
OBJECTSIZE=0.6
# All the files for each group
SYSOUTFILES="./lispsysouts"
CHECKSUMFILES="./checksumdir"
LIBRARYFILES="./lisplibrary ./clos"
DISPLAYFONTFILES="./fonts/display"
INTERPRESSFONTFILES="./fonts/interpress ./fonts/press"
LOCALHOST=`/bin/hostname`
scriptName=`/bin/basename $0`
# Send out a message when interrupted
trap 'echo "
Aborted..."; exit' 2
#-----------------------------------------------------------
#----------------------- PROCEDURES ------------------------
exitScript () {
echo "$scriptName: $1"
exit
} # exitScript
ask(){
# Ask a question=$1 and use default=$2 if no answer is given. If arg $3
# is specified, it will be considered the opposite of $2. Return 0 if
# default is used, 1 otherwise. 'answer' can be used as a global variable
echo -n "$1 ${2:+[$2]}: "
answer=`/bin/line`
if [ $# -gt 2 ]
then until [ "$answer" = "" -o "$answer" = "$2" -o "$answer" = "$3" ];
do echo "Please type '$2' or '$3'."
echo -n "$1 $2: "
answer=`/bin/line`
done
fi
# Note the "-" in the argument below. test will not behave well with some
# of the shell escape characters otherwise.
[ "-${answer:=$2}" = "-$2" ]
} # ask
menuInstructions () {
echo "<--------------------> Menu Instructions <-------------------->
- Only options marked with an 'x' will be installed. They are
initally based on inferred information, recommendations and answers
to questions.
- To select additional options, at the prompt enter at least as
many characters as needed to make the selection unique, e.g.,
'XN' for XNS. To select all options, enter 'All'.
- To deselect an option already marked with an 'x', at the prompt
enter at least as many characters as needed to make the
selection unique. To deselect all options, enter 'None'.
"
ask "Continue?" "y"
} # menuInstructions
welcome() {
/usr/ucb/clear
echo "
<----------> Welcome to the $APPLICATION Installation Utility <---------->
Utility is used to install or upgrade a $APPLICATION system. It will try to infer
as much information as possible about your system, but you will be prompted
for specific information when it is not able to infer it automatically.
Recommended options are initially filled in, but you can change them at
any time using the Installation Options Menu.
"
menuInstructions
} # welcome
scriptMessage () {
MESSAGE="************************** $1 ***************************
$2
************************************************************"
} # scriptMessage
setOSType () {
# Pass it OS versions and it will set the OSVERSION variable
while [ $# != 0 ]
do case "$1" in
3|3.[245]) OS3P=x ;;
4|4.0|4.0.*) OS4P=x ;;
4.1|4.1.*) OS41P=x ;;
*) echo " Should not happen: OStype $1 invalid" ;;
esac
shift
done
OSVERSION="${OS3P:+3} ${OS4P:+4} ${OS41P:+4.1}"
} # setOSType
askOSVersion(){
# Prompt user for the correct OS-version
MESSAGE="$1"
unset menuloop1
while [ ${menuloop1:-notdone} = notdone ]
do /usr/ucb/clear
echo "
<---------------> OS Options Menu <--------------->
${OS3P:--} 3.X - SunOS 3.2 3.4 3.5
${OS4P:--} 4.0 - SunOS 4.0 4.0.X
${OS41P:--} 4.1 - SunOS 4.1 4.1.X
All - Mark all options
None - Unmark all options
Continue installation
${MESSAGE:+
$MESSAGE}"
unset MESSAGE
ask "Select" "Continue"
case "$answer" in
3|3.[X245])
if [ "$OS3P" != "x" ]
then OS3P=x
else unset OS3P
fi ;;
4.0|4.0.*)
if [ "$OS4P" != "x" ]
then OS4P=x
else unset OS4P
fi ;;
4.1|4.1.*)
if [ "$OS41P" != "x" ]
then OS41P=x
else unset OS41P
fi ;;
[aA]*) OS3P=x ; OS4P=x ; OS41P=x ;;
[nN]*) unset OS3P OS4P OS41P ;;
[cC]*|"") menuloop1=done ;;
*) MESSAGE="Invalid reply: $answer" ;;
esac
done
OSVERSION="${OS3P:+3} ${OS4P:+4} ${OS41P:+4.1}"
} # askOSVersion
checkInstallPoint () {
# Uses INSTALLDIR to determine if it is possible to make an
# installation. INSTDIRERRP is just used to return result of operation and
# to signal an error message. EXISTSP is used to avoid repetitive messages.
unset INSTDIRERRP
if [ -f "$INSTALLDIR" ]
then scriptMessage "ERROR" "A file with the same name already exists: $INSTALLDIR
Select the 'Directory' command and make a change."
INSTDIRERRP=x
elif [ -d "$INSTALLDIR" -a ! -w "$INSTALLDIR" ]
then scriptMessage "ERROR" "Write permission denied for directory: $INSTALLDIR
Select the 'Directory' command and make a change."
INSTDIRERRP=x
elif [ ! -d "$INSTALLDIR" ]
then /bin/mkdir -p $INSTALLDIR 1>/dev/null 2>/dev/null
if [ $? = 0 ]
then EXISTSP=x
else scriptMessage "ERROR" "Could not create: $INSTALLDIR - Permission denied
Select the 'Directory' command and make a change."
INSTDIRERRP=x
fi
elif [ -d "$INSTALLDIR" -a ${EXISTSP:--} = - ]
then scriptMessage "WARNING" "Directory already exists: $INSTALLDIR
If this is the location of a previous $APPLICATION installation,
\"$scriptName\" may overwrite some of the old files."
EXISTSP=x
fi
[ ${INSTDIRERRP:--} = - ]
} # checkInstallPoint
mountTape () {
unset TAPEMOUNTEDP
while [ ${TAPEMOUNTEDP:--} = - ]
do if [ "$1" = "$LOCALHOST" ]
then mt -f $TAPEDEV status 2>&1 | /bin/egrep -s "no sense"
else /usr/ucb/rsh "$1" mt -f $TAPEDEV status 2>&1 | /bin/egrep -s "no sense"
fi
if [ $? != 0 ]
then echo "ERROR. Tape not mounted or mounted improperly."
ask "Please insert installation tape in the tape drive. Done?" "y"
else TAPEMOUNTEDP=x
fi
done
} # mountTape
checkTape () {
if [ "$1" = "$LOCALHOST" ]
then echo -n "Looking for a local tape drive on $1 ..."
mt -f $TAPEDEV status 2>&1 | /bin/egrep -s "no sense|not ready|no tape loaded"
if [ $? = 0 ]
then echo " Found"
TAPEHOST="$LOCALHOST"
else echo " Not found"
echo "'$LOCALHOST' does not seem to have a tape drive."
fi
else /usr/etc/ping "$1" 10 1>/dev/null 2>/dev/null
if [ $? = 0 ]
then echo -n "Looking for a remote tape drive on $1 ..."
/usr/ucb/rsh "$1" mt -f $TAPEDEV status 2>&1 | /bin/egrep -s "no sense|not ready|no tape loaded"
if [ $? = 0 ]
then echo " Found"
TAPEHOST="$1"
else echo " Not Found"
echo "'$1' does not seem to have a tape drive."
fi
else echo "Could not connect to '$1' or host unknown."
fi
fi
} # checkTape
inferConfiguration () {
# Infers as much as possible the type of configuration on the host
# or network. Will ask when not able to determine something.
# Try to infer Os type
if [ -f /etc/motd ]
then OSVERSION=`sed -e '1s/.*Release \(...\).*/\1/' -e '1q' < /etc/motd`
setOSType $OSVERSION
else askOSVersion "Please specify the SunOS version you are running."
fi
# Is it necessary to install 'ldemulti'
/bin/egrep -s "cgthree0|cgsix0" /var/adm/messages
if [ $? = 0 ]
then COLORP=x
fi
# Is X-windows installed on this host
if [ -d /usr/bin/X11 -o -d /usr/local/X11 ]
then X11P=x
fi
checkTape $LOCALHOST
while [ ${TAPEHOSTP:--} = - ]
do
if [ ${TAPEHOST:--} = - ]
then
# Host is networked
ask "Name of a host with a tape drive"
checkTape "$answer"
fi
if [ "${TAPEHOST:+-}" = - ]
then if ask "Insert installation tape in tape drive of $TAPEHOST. Ready?" "y"
then TAPEHOSTP=x
mountTape "$TAPEHOST"
else unset TAPEHOST
fi
fi
done
} # inferConfiguration
emulatorSpace () {
# Figure out according to selections what the real space requirements
# are for the emulator. Sets the variables RMONOSIZE, RCOLORSIZE, RX11SIZE
# for later usage
RMONOSIZE=0
RCOLORSIZE=0
RX11SIZE=0
if [ ${MONOP:--} != - ]
then for x in $OSVERSION
do RMONOSIZE=`echo $MONOSIZE ${OBJECTP:+"+ $OBJECTSIZE"} + $RMONOSIZE | /bin/bc`
done
fi
if [ ${COLORP:--} != - ]
then for x in $OSVERSION
do RCOLORSIZE=`echo $COLORSIZE ${OBJECTP:+"+ $OBJECTSIZE"} + $RCOLORSIZE | /bin/bc`
done
fi
if [ ${X11P:--} != - ]
then for x in $OSVERSION
do RX11SIZE=`echo $X11SIZE ${OBJECTP:+"+ $OBJECTSIZE"} + $RX11SIZE | /bin/bc`
done
fi
} # emulatorSpace
showInstallMenu () {
# Will do different calculations depending on $1. If no argument is
# given, it will only redisplay the Installation Options Menu.
if [ $# -ge 1 ]
then if [ "$1" = available -o $# -gt 1 ]
then if checkInstallPoint
then calculateSpace available
fi
fi
if [ "$1" = required -o $# -gt 1 ]
then calculateSpace required
fi
if [ "${EXISTSP:+-}" = - ]
then sufficientSpaceP
fi
fi
/usr/ucb/clear
echo "
<---------------> Installation Options Menu <-------------->
------------------------ Emulators -------------------------
For one or several OS versions (At least one of monochrome,
color, or X11-version is required for new installations).
${MONOP:--} Monochrome ${MONOP:+- $RMONOSIZE MByte}
${COLORP:--} Color ${COLORP:+- $RCOLORSIZE MByte}
${X11P:--} X11-version ${X11P:+- $RX11SIZE MByte}
${XNSP:--} XNS ${XNSP:+- $XNSSIZE MByte }- allows handling of the XNS protocol.
${OBJECTP:--} Object files - allows linking of Medley to other software.
OS version - Change versions. Selected: $OSVERSION
-------------------------- Fonts ---------------------------
${DISPLAYFONTP:--} Display ${DISPLAYFONTP:+- $DISPLAYFONTSIZE MByte }(recommended)
${INTERPRESSFONTP:--} Interpress ${INTERPRESSFONTP:+- $INTERPRESSFONTSIZE MByte}
------------ Sysout, Library & Checksum files -------------
${SYSOUTP:--} Sysout ${SYSOUTP:+- $SYSOUTSIZE MByte} (required for new installations).
${LIBRARYP:--} Library modules ${LIBRARYP:+- $LIBRARYSIZE MByte }(recommended)
${CHECKSUMP:--} Checksum files ${CHECKSUMP:+- $CHECKSUMSIZE MByte}
------------------------- Commands -------------------------
Directory - Change the installation directory.
-- Current: $INSTALLDIR
-- Disk-space(KByte) Available:${AVAILABLESPACE:----} Needed:$DISKSPACE
!<Unix command> - Execute a Unix command.
? or Help - Show menu instructions.
Redraw - Redisplay this menu.
All - Mark all options.
None - Unmark all options.
Continue installation.
Quit installation.
${MESSAGE}"
} # showInstallMenu
getInstallOptions() {
# General menu for selecting what to install
showInstallMenu required available
menuloop3=notdone
while [ "$menuloop3" = notdone ]
do if [ "${INSTDIRERRP:+-}" = - ]
then ask "Select" "Directory"
unset INSTDIRERRP
else ask "Select" "Continue"
fi
unset MESSAGE
case "$answer" in
[sS]*) if [ "$SYSOUTP" != "x" ]
then SYSOUTP=x
else unset SYSOUTP
fi
showInstallMenu required ;;
[mM]*) if [ "$MONOP" != "x" ]
then MONOP=x
else unset MONOP
fi
showInstallMenu required ;;
[cC][oO][lL]*)
if [ "$COLORP" != "x" ]
then COLORP=x
else unset COLORP
fi
showInstallMenu required ;;
[xX][1]*)
if [ "$X11P" != "x" ]
then X11P=x
else unset X11P
fi
showInstallMenu required ;;
[xX][nN]*)
if [ "$XNSP" != "x" ]
then XNSP=x
else unset XNSP
fi
showInstallMenu required ;;
[oO][bB]*)
if [ "$OBJECTP" != "x" ]
then OBJECTP=x
else unset OBJECTP
fi
showInstallMenu required ;;
[oO][sS]*)
askOSVersion "Please specify changes you wish to make."
showInstallMenu required ;;
[dD][iI][sS]*)
if [ "$DISPLAYFONTP" != "x" ]
then DISPLAYFONTP=x
else unset DISPLAYFONTP
fi
showInstallMenu required ;;
[iI]*) if [ "$INTERPRESSFONTP" != "x" ]
then INTERPRESSFONTP=x
else unset INTERPRESSFONTP
fi
showInstallMenu required ;;
[lL]*) if [ "$LIBRARYP" != "x" ]
then LIBRARYP=x
else unset LIBRARYP
fi
showInstallMenu required ;;
[cC][hH]*)
if [ "$CHECKSUMP" != "x" ]
then CHECKSUMP=x
else unset CHECKSUMP
fi
showInstallMenu required ;;
[dD][iI][rR]*)
ask "Where do you want to install $APPLICATION?" "$INSTALLDIR"
INSTALLDIR="$answer"
unset EXISTSP
showInstallMenu available ;;
!?*) eval `echo "$answer" | /bin/sed -e s/\\!//` ;;
\?|[hH]*) menuInstructions ; showInstallMenu ;;
[rR]*) showInstallMenu ;;
[aa]*) SYSOUTP=x ; MONOP=x ; COLORP=x ; X11P=x ; XNSP=x
OBJECTP=x ; DISPLAYFONTP=x ; INTERPRESSFONTP=x
LIBRARYP=x ; CHECKSUMP=x ; showInstallMenu required ;;
[nN]*) unset SYSOUTP MONOP COLORP X11P XNSP OBJECTP DISPLAYFONTP INTERPRESSFONTP LIBRARYP CHECKSUMP
showInstallMenu required ;;
[cC][oO][nN]*|"")
if [ ${SYSOUTP:--} = - -a ${MONOP:--} = - -a \
${COLORP:--} = - -a ${X11P:--} = - -a \
${DISPLAYFONTP:--} = - -a ${INTERPRESSFONTP:--} -a \
${LIBRARYP:--} = - -a ${CHECKSUMP:--} = - -a \
${OBJECTP:--} = - -a ${XNSP:--} = - ]
then scriptMessage "ERROR" "It doesn't make sense not installing anything.
Please select an option to install"
elif [ \( ${MONOP:--} != - -o ${COLORP:--} != - -o \
${X11P:--} != - \) -a ${OS3P:--} = - -a \
${OS4P:--} = - -a ${OS41P:--} = - ]
then scriptMessage "ERROR" "You have to select a SunOS version in order to install an emulator."
elif checkInstallPoint
then if sufficientSpaceP
then menuloop3=done
fi
fi
echo "$MESSAGE" ;;
[qQ]*) exitScript "Aborted ..." ;;
*) echo "Invalid reply: $answer" ;;
esac
done
} # getInstallOptions
calculateSpace(){
# Calculate either available space for chosen installation point or required
# space for selected options. $1 is used to determine what to calculate.
if [ "$1" = required ]
then emulatorSpace
REQUIREDSPACE=`echo ${SYSOUTP:+"$SYSOUTSIZE +"} \
${LIBRARYP:+"$LIBRARYSIZE +"} \
${DISPLAYFONTP:+"$DISPLAYFONTSIZE +"} \
${INTERPRESSFONTP:+"$INTERPRESSFONTSIZE +"} \
${CHECKSUMP:+"$CHECKSUMSIZE +"} \
${XNSP:+"$XNSSIZE +"} \
"$RMONOSIZE + $RCOLORSIZE + $RX11SIZE" | /bin/bc`
DISKSPACE=`echo $REQUIREDSPACE "*" 1024 | /bin/bc`
else DF=`/bin/df $INSTALLDIR 2>/dev/null| egrep -v Filesystem`
if [ "$DF" != "" ]
then FILESYSTEM=`echo $DF | /bin/awk '{print $6}'`
AVAILABLESPACE=`echo $DF | /bin/awk '{print $4}'`
else unset AVAILABLESPACE
fi
fi
}
sufficientSpaceP () {
# Check if there is enough space in FILESYSTEM to make install
unset MISSINGSPACE
if [ "$DISKSPACE" -ge "$AVAILABLESPACE" ]
then MISSINGSPACE=`echo $DISKSPACE - $AVAILABLESPACE | /bin/bc`
scriptMessage "ERROR" "There is not enough disk-space in file system: $FILESYSTEM
Additional space needed: ($MISSINGSPACE Kbytes)
To complete installation, select the 'Directory' command and
make a change, or deselect some of the selected options."
INSTDIRERRP=x
fi
[ "$DISKSPACE" -lt "$AVAILABLESPACE" ]
}
tapeCommand() {
# Tape commands are $1 = 'rewind' and 'fsf 1' and
# $2 is the message to print out if given.
if [ $# -gt 1 ]
then echo -n "$2"
fi
if [ "$TAPEHOST" = `/bin/hostname` ]
then /bin/mt -f /dev/nrst0 $1 # local tape drive
else /usr/ucb/rsh -n "$TAPEHOST" /bin/mt -f /dev/nrst0 $1 # remote host
fi
if [ $? = 0 -a $# -gt 1 ]
then echo " Done"
fi
}
collectEmulatorFiles () {
EMULATORFILES="$EMULATORFILES $*"
}
extract() {
# Extract from tape
# Print message
echo -n "Extracting: $1 ..."
shift
if [ "$TAPEHOST" = `/bin/hostname` ]
then /bin/dd if=/dev/nrst0 bs=256b 2>/dev/null | /bin/tar xBipfb - 256 $*
else /usr/ucb/rsh -n "$TAPEHOST" /bin/dd if=/dev/nrst0 bs=256b 2>/dev/null | /bin/tar xBipfb - 256 $*
fi
if [ $? != 0 ]
then echo " Not extracted !"
else echo " Done"
fi
}
extractFilesP () {
# Returns true if either of the file arguments passed are to be
# extracted. It is used to avoid unnecessary skips and searches on the tape.
unset EXTRACTP
while [ ${EXTRACTP:--} = - -a $# != 0 ]
do case "$1" in
File3) EXTRACTP=${MONOP:-${COLORP:-${X11P:-${XNSP:-${OBJECTP:--}}}}} ;;
File4) EXTRACTP=${LIBRARYP:--} ;;
File5) EXTRACTP=${SYSOUTP:-${CHECKSUMP:--}} ;;
File6) EXTRACTP=${DISPLAYFONTP:-${INTERPRESSFONTP:--}} ;;
*)
exitScript "Help! Should not happen: extractFilesP $1 " ;;
esac
shift
done
[ ${EXTRACTP:--} != - ]
}
performInstall () {
# The actual tar of the tape. There are 5 files on the tape.
# File 1 Contains this script 'install-medley' (Skip past it)
# File 2 Contains the 'medley' script (always extracted)
# File 3 Contains the emulator files for the supported OS-versions
# (executables, objectfiles and makefile)
# File 4 Contains Lisp Library files
# File 5 Contains Lisp Sysouts and checksumfiles
# File 6 Contains Font files (Display and Interpress)
cd $INSTALLDIR
tapeCommand rewind "Positioning media ..."
tapeCommand 'fsf 1'
extract "medley startup script" ./medley
if extractFilesP File3
then EMULATORFILES=""
for OS in $OSVERSION
do collectEmulatorFiles ${MONOP:+"./install.sunos$OS/ldesingle ${OBJECTP:+./install.sunos$OS/ldesingle.o}"} ${COLORP:+"./install.sunos$OS/ldemulti ${OBJECTP:+./install.sunos$OS/ldemulti.o}"} ${X11P:+"./install.sunos$OS/ldex ${OBJECTP:+./install.sunos$OS/ldex.o}"} ${XNSP:+"./install.sunos$OS/ldeether ${OBJECTP:+./install.sunos$OS/ldeether.c}"} ${OBJECTP:+"./install.sunos$OS/makefile ./install.sunos$OS/usersubrs.c"}
if [ "${MONOP:+-}" = - -o "${COLORP:+-}" = - -o "${MULTI:+-}" = - ]
then EMULATORFILES="./install.sunos$OS/lde $EMULATORFILES"
fi
done
extract "emulator files for OS versions: $OSVERSION" $EMULATORFILES
elif extractFilesP File4 File5 File6
then tapeCommand 'fsf 1' "Skipping: emulator files ..."
fi
if extractFilesP File4
then extract "library files" ${LIBRARYP:+$LIBRARYFILES}
elif extractFilesP File5 File6
then tapeCommand 'fsf 1' "Skipping: library files ..."
fi
if extractFilesP File5
then extract "${SYSOUTP:+sysout }${CHECKSUMP:+checksum }files" ${SYSOUTP:+$SYSOUTFILES} ${CHECKSUMP:+$CHECKSUMFILES}
elif extractFilesP File6
then tapeCommand 'fsf 1' "Skipping: ${SYSOUTP:+sysout }${CHECKSUMP:+checksum }files ..."
fi
if extractFilesP File6
then extract "${DISPLAYFONTP:+display }${INTERPRESSFONTP:+interpress }font-files" ${DISPLAYFONTP:+$DISPLAYFONTFILES} ${INTERPRESSFONTP:+$INTERPRESSFONTFILES}
fi
tapeCommand rewind "Done extracting files. Rewinding media ..."
}
updateFile() {
# Will create a copy of file $1 into $1.orig
# Will then replace $* with $2 from file $1.orig into file $1
FILE=$1
CHANGES="$*"
TO=$2
if [ ! -f "$FILEDIR/$FILE.orig" ]
then /bin/cp $FILE $FILE.orig
fi
echo -n "Updating: $FILE ... "
for CHANGE in CHANGES
do
/bin/sed -e 1,'$'s/$CHANGE/$TO/ <$FILE.orig >$FILE
done
if [ $? = 0 ]
then echo -n "Done - "
else echo "An error occured while trying to update: $FILE"
fi
echo "Original in: $FILE.orig ..."
}
updateFiles(){
# Will update 'site-init' and 'medley' by replacing all ocassions of
# $SHAREDIR or $LOCALDIR to $INSTALLDIR
if ask "Do you wish to update the files 'site-init' and 'medley'
with respect to the installation directory: $INSTALLDIR" "y" "n"
then CHANGEDIR1=`echo $SHAREDIR | /bin/sed -e 's/\//\\\\\//g'`
CHANGEDIR2=`echo $LOCALDIR | /bin/sed -e 's/\//\\\\\//g'`
NEWDIR=`echo $INSTALLDIR | /bin/sed -e 's/\//\\\\\//g'`
FILEDIR="$INSTALLDIR/`/bin/basename $LIBRARYFILES`"
if [ ${LIBRARYP:--} != - -a -d "$FILEDIR" ]
then cd "$FILEDIR"
if [ -f "$FILEDIR/site-init" ]
then
updateFile site-init "$NEWDIR" "$CHANGEDIR1" "$CHANGEDIR2"
elif [ -f "$FILEDIR/site-init.lisp" ]
then
cp site-init.lisp site-init
updateFile site-init "$NEWDIR" "$CHANGEDIR1" "$CHANGEDIR2"
else echo "Could not find: $FILEDIR/site-init"
fi
else echo "$FILEDIR/site-init not installed."
fi
if [ -f "$INSTALLDIR/medley" ]
then cd "$INSTALLDIR"
updateFile medley "$NEWDIR" "$CHANGEDIR1" "$CHANGEDIR2"
else echo "Could not find: $INSTALLDIR/medley"
fi
fi
}
#------------------------------------------------------------
# ********** Main procedure starts here. **********
#------------------------------------------------------------
welcome
inferConfiguration
unset answer
while [ ${answer:--} != y ]
do getInstallOptions
ask "Ready to make installation in: $INSTALLDIR" "y" "n"
done
performInstall
updateFiles
exitScript "Installation of $APPLICATION completed."

View File

@@ -1,362 +0,0 @@
;************************************************************************
;* *
;* l a u n c h . a s m *
;* *
;* This is the launcher for Medley on DOS. It: *
;* *
;* * Looks for and validates any -m memsize argument on the *
;* command line. Only values in the range 8 - 32 are allowed. *
;* *
;* * Loads the real Medley emulator, emul.exe, from the same *
;* directory that the launcher came from. *
;* *
;* * Sets the Intel DOS Extender's profile to the requested *
;* memory size + 3Mb (to allow for the emulator, internal *
;* data areas, etc.) *
;* *
;* * Set the termination address in the child process's PSP, *
;* so control returns to the launcher when Medley terminates. *
;* *
;* * Jumps to the emulator's start address. *
;* *
;* * Upon return, just terminates cleanly. *
;* *
;* [We could perhaps do some diagnosis here of error returns?] *
;* *
;* *
;* *
;************************************************************************
;************************************************************************/
;* */
;* (C) Copyright 1993, 1994 Venue. All Rights Reserved. */
;* Manufactured in the United States of America. */
;* */
;* The contents of this file are proprietary information */
;* belonging to Venue, and are provided to you under license. */
;* They may not be further distributed or disclosed to third */
;* parties without the specific permission of Venue. */
;* */
;************************************************************************/
.model small
.386p
.stack 100h
.data
align 8
;********************************************************
;* Parameter block for INT 214B, that loads medley.exe *
;********************************************************
envseg DW 0 ; environment (0 = copy mine)
cmdip DW ? ; command-line-tail pointer
cmdcs DW ?
fcb1 DD ? ; dummy first FCB to fill in
fcb2 DD ? ; " 2nd FCB, not here in DOS 4.01???
stk DD ? ; SS:SP for emul.exe, filled in by loader
csip DD ? ; start addr for emul.exe, filled in by loader
retad DD FAR PTR myret ; cs:ip return address, to put in
; child PSP, so we get control back.
;* Error messages, misc strings, and work areas*
align 8
memval dd 0
errstg DB 'ERROR: Couldn''t free excess storage.',13,10,'$'
noload db 'ERROR: Loading emulator failed: $'
loaded db 'LOAD SUCCESSFUL.',13,10,'$'
nominfo db 'ERROR: -m must be followed by a number 8 - 64.',13,10,'$'
badexe db 'ERROR: emul.exe is corrupted.',13,10,'$'
emulpath DB 'emul.exe',0 ; name of the real emulator.
mflag db '-m' ; to search for -m/-M in cmd line
mmflag db '-M'
profile db 'PRO' ; to find the DOS extender profile
cmdline db 128 dup (?) ; hold the cmd line tail for real emulator
;* Error-message table for failures loading emul.exe
align 2
errtbl dw OFFSET ng0msg ; 0 = unknown failure
dw OFFSET ng1msg ; 1 = "invalid function"
dw OFFSET ng2msg ; 2 = file not found
dw OFFSET ng3msg ; 3 = path not found
dw OFFSET ng4msg ; 4 = too many open files
dw OFFSET ng5msg ; 5 = access denied
dw OFFSET ng0msg ; 6 = not possible error
dw OFFSET ng0msg ; 7 = not possible error
dw OFFSET ng8msg ; 8 = insufficient storage
dw OFFSET ng0msg ; 9 = not possible
dw OFFSET ngamsg ; A = bad environment
dw OFFSET ngbmsg ; B = bad format (corrupt .exe?)a
ng0msg db 'Unknown problem',13,10,'$'
ng1msg db 'Invalid Function',13,10
db 'Make sure you are running DOS 4.0 or later.',13,10,'$'
ng2msg db 'File not found.',13,10
db 'CD to proper directory, or set PATH.',13,10,'$'
ng3msg db 'Path not found.',13,10
db 'CD to proper directory, or set PATH.',13,10,'$'
ng4msg db 'Too many files open.',13,10
db 'Shut down some TSRs that have file open?',13,10,'$'
ng5msg db 'Access denied.',13,10
db 'Make sure of your access rights to emul.exe?',13,10,'$'
ng8msg db 'Not enough memory.',13,10
db 'Shut down some TSR applications?',13,10,'$'
ngamsg db 'Environment corrupt.',13,10
db 'Check using SET; You may need to re-boot.',13,10,'$'
ngbmsg db 'EXE file corrupted.',13,10,'$'
db 'You may need to restore from backup or re-install.',13,10,'$'
.code
;************************************************************************
;* *
;* M A C R O S *
;* *
;* prints Given a string ptr in DX, print it to the display. *
;* *
;* kill Exit cleanly, using INT 21/4C *
;* *
;************************************************************************
prints macro text
mov dx, OFFSET text
mov ah,9
int 21h
endm
kill macro
mov ah,4ch
int 21h
endm
;************************************************************************
;* *
;* M A I N E N T R Y *
;* *
;* *
;* *
;* *
;* *
;************************************************************************
PUBLIC main
main PROC NEAR
mov ax,ds ; Save memory-block start for freeing
mov es,ax ; excess memory in a bit.
mov ax,@data ; DS points to start of data segment
mov ds,ax
mov cmdcs, ax ; Copy the command line for the emulator
mov cmdip, OFFSET cmdline
mov di, OFFSET cmdline
mov cx,128
mov bx,es
mov dx,ds
mov es,dx
mov ds,bx
mov si,80h
rep
movsb
mov es,bx ; Free the excess memory that DOS gives
mov ds,dx ; us (we need it for the emulator)
mov ax,4a00h
mov bx,090h ; We only need 900h bytes for this program
int 21h
jnc freeok
prints errstg ; Couldn't free spare space; punt.
kill
;************************************************
;* Search the command line for -m or -M *
;************************************************
freeok:
mov di,81h ; start of command line tail
mov si, OFFSET mflag
mov cx, 2
mov bx,81h
add bl,es:[80h]
m1lp: call strcmp
je fndm
add di, 1
cmp di, bx
jl m1lp
mov di,81h ; start of command line tail
mov si, OFFSET mmflag
m2lp: call strcmp
je fndm
add di, 1
cmp di, bx
jl m2lp
mov memval,02400000h ; memory value not set--use 35MB total.
jmp doload
fndm: add di,2 ; Found "-m". Now look for a number
cmp di,bx ; (Make sure it's not end of line)
jnl nogoodm
ok1:
mov edx, 0 ; Holds the memory-requirement value
mov ax,0 ; holds characters as we read
;************************************************
;* Skip over spaces/tabs before any number *
;************************************************
skiplp:
mov al, es:[di]
inc di
cmp al, 20h ; spaces
je skiplp
cmp al, 09h ; tabs
je skiplp
cmp di,bx ; make sure we're still in the string
jle cnvst ; Yup, we've got the first char, so enter
; the conversion loop part-way down.
nogoodm:
prints nominfo ; no arg to -m, or it's bad; Punt.
kill
;********************************************************
; Convert the numeric argument to -m; result in edx. *
;********************************************************
cnvlp: mov al,es:[di]
add di, 1
cnvst: cmp al, 30h
jl endcnv
cmp al, 39h
jg endcnv
sub al, 30h
imul dx, 10
add dx, ax
jmp cnvlp
endcnv:
cmp edx,0 ; if still 0, no valid chars!
je nogoodm
cmp edx, 8 ; must be in the range [8, 32]
jl nogoodm
cmp edx,64
jg nogoodm
add edx, 3 ; add 3mb for data areas, etc, and
sal edx, 20 ; convert to megabytes
mov memval, edx ; save memory requested
;************************************************
;* Load the real emulator .EXE file, emul.exe *
;************************************************
doload: mov dx, OFFSET emulpath
mov ax, seg envseg
mov es, ax
mov bx, OFFSET envseg
mov ax,4b01h ; load-don't-start
int 21h
jnc loadok
add ax,ax
mov si,ax
prints noload
mov bx,OFFSET errtbl
mov dx,ds:[bx+si]
mov ah,9
int 21h
kill
loadok: ; Load succeeded.
mov ah,51h ; get PSP address for child
int 21h
mov es, bx ; get segment for DI addressing
; mov cx,128 ; copy the command line tail
; mov di,80h ; (which appears to be flaky in DOS 4)
; mov si, offset cmdline
; rep
; movsb
mov eax,retad
mov dword ptr es:[+0ah], eax ; set up return address.
cmp memval, 0 ; If no -m value given, just
je dorun ; go start the emulator.
mov di,0 ; Search for the Intel Extender's PROFILE
mov si, OFFSET profile ; (see extender.h)
mov cx, 3 ; (length is 3 bytes)
srchlp: call strcmp
je gotprof ; found the profile; fix it.
add di, 1
cmp di, 2048
jle srchlp
prints badexe ; No extender profile, so the emulator
kill ; EXE must be corrupt. Punt.
gotprof:
mov eax,memval ; Fill in the memory requirement.
mov es:[di+1bch], eax
;********************************************************
;* *
;* Set up the stack seg/pointer & start medley. *
;* *
;********************************************************
dorun: lss sp,stk ; load stack SS & SP regs
mov ax, es ; copy PSP ptr to ax & ds, since some
mov bx, ds ; code expects it in both places.
mov fs,bx ; Also, copy DS to FS, so we still have
mov ds,ax ; a base for the indirect jump . . .
jmp fs:[csip] ; to start-of-medley.
myret: kill ; we get back here, so quit gracefully.
main endp
;************************************************************************/
;* */
;* s t r c m p */
;* */
;* Compare [ds]di and es:[si] for (CX) characters. If the */
;* strings are equal, the Zero flag is set when this returns. */
;* */
;* All registers are preserved. */
;* */
;************************************************************************/
strcmp proc near
cld
push di
push si
push cx
repe
cmpsb
pop cx
pop si
pop di
ret
strcmp endp
END

View File

@@ -1,170 +0,0 @@
#! /bin/sh
# First line invokes Bourne shell
# ============================================================================
# ABSTRACT:
# Bourne script for checking/generating checksums files for the
# Medley release. The script will generate a checksum-file for each
# release directory, containing the corresponding checksums for all
# files residing in the directory. The files having incorrect
# checksums will be reported with a message. The checksum-files will
# be put under:
# <medleydir>/checksumdir (Normally /usr/local/lde/checksumdir).
#
#
# SYNOPSIS:
# ldechecksum [-cg] medleydir [ dir | dirgroup ]
#
# -c compare checksumfiles "FOO.check" with "FOO.sum" (default).
# -g generate checksumfiles "FOO.sum".
# medleydir is the name of the Medley installation directory (normally
# is "/usr/local/lde").
# dir can be any specific directory residing under medleydir. Only
# relative pathnames with respect to medleydir are accepted.
# dirgroup can be either "all" (default), "fonts" or "lisp" which
# means the "install.sunosX", "lisplibrary" and "lispsysouts"
# directories.
#
# CHANGES:
# 08-23-90 Carl Gadener : Added install.sunos4.1
# 05-05-89 Carl Gadener : Added lispusers as an option
# 03-30-89 Carl Gadener : Added fonts and fonts/press
# 01-19-89 Carl Gadener : Parameter "medleydir" is now mandatory. Also
# check that "checksum" files were installed.
# 12-22-88 Carl Gadener : Compressed the big "case $dirspec" statement
# 12-15-88 Carl Gadener : Rewrote it for Bourne shell due to limitation
# factors in CSH
# 12-12-88 Carl Gadener & Larry Harada : Creation of script
# ============================================================================
#
# First case statement checks arguments to ldechecksum
case $# in
0) echo "Usage: ldechecksum [ -cg ] medleydir [ dir | dirgroup ] "
exit 1 ;;
1) case $1 in
-*) echo "Usage: ldechecksum [ -cg ] medleydir [ dir | dirgroup ] "
exit 1 ;;
*) arg="-c"
medleydir=$1
dirspec=all
break ;;
esac ;;
[23])
case $1 in
-[cg]) arg=$1
medleydir=$2
if test $# = 3
then
dirspec=$3
else
dirspec=all
fi
break ;;
-*) echo "Usage: ldechecksum [ -cg ] medleydir [ dir | dirgroup ] "
exit 1 ;;
*) arg="-c"
medleydir=$1
if test $# = 2
then
dirspec=$2
else
echo "Unexpected arg: $3"
exit 1
fi
break ;;
esac ;;
*) echo "Usage: ldechecksum [ -cg ] medleydir [ dir | dirgroup ] "
exit 1 ;;
esac
# Checking if the Medley directory exists
if test -d $medleydir
then
cd $medleydir
# Checking that script is correctly installed
if test -d checksumdir \
-a -f checksumdir/ldechecksum \
-a -f checksumdir/checksum
then
lispdirs="install.sunos3 install.sunos4 install.sunos4.1 lisplibrary lispsysouts"
fonts="JIS1 JIS2 chinese miscellaneous presentation printwheel \
publishing"
if test $arg = "-g"
then
operation="Generating"
else #$arg = "-c"
operation="Verifying"
fi
case $dirspec in
all)
checksumdir/ldechecksum $arg `pwd` lisp
checksumdir/ldechecksum $arg `pwd` fonts/display
checksumdir/ldechecksum $arg `pwd` fonts/interpress
checksumdir/ldechecksum $arg `pwd` fonts/press
;;
lisp)
echo "----------------------------------------------------"
echo "$operation checksums for Lisp directories"
echo "----------------------------------------------------"
for file in $lispdirs
do
checksumdir/checksum $arg $file
done
;;
fonts)
checksumdir/ldechecksum $arg `pwd` fonts/display
checksumdir/ldechecksum $arg `pwd` fonts/interpress
checksumdir/ldechecksum $arg `pwd` fonts/press
;;
fonts/display | \
fonts/interpress)
fonttype=`basename $dirspec`
echo "----------------------------------------------------"
echo "$operation checksums for $fonttype font directories"
echo "----------------------------------------------------"
for file in $fonts
do
checksumdir/checksum $arg $dirspec/$file
done
;;
# All Medley directories at the "lowest" level
install.sunos3 | \
install.sunos4 | \
install.sunos4.1 | \
lisplibrary | \
lispsysouts | \
lispusers | \
fonts/display/JIS1 | \
fonts/display/JIS2 | \
fonts/display/chinese | \
fonts/display/miscellaneous | \
fonts/display/presentation | \
fonts/display/printwheel | \
fonts/display/publishing | \
fonts/interpress/JIS1 | \
fonts/interpress/JIS2 | \
fonts/interpress/chinese | \
fonts/interpress/miscellaneous | \
fonts/interpress/presentation | \
fonts/interpress/printwheel | \
fonts/interpress/publishing | \
fonts/press)
checksumdir/checksum $arg $dirspec
;;
*) echo "$dirspec : No such directory/grouping under `pwd`"
exit 1 ;;
esac
else
echo "`pwd`/checksumdir : No such directory or script incorrectly installed"
exit 1
fi
else
echo "$medleydir : No such directory"
exit 1
fi

View File

@@ -8,11 +8,6 @@
#* (C) Copyright 1989-92 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
# This is to make the %$#@! Apollo cc happy
@@ -24,9 +19,9 @@ FPFLAGS =
# Now share the same ldesingle with COLOR(CG4)/MONO Suns
# If you load MAIKOCOLOR.LCOM etc., you can use color functions
# for bigatom work, removed -DSPARCDISP -DSUN4_OS4_IL
DFLAGS = -DINIT -DKBINT -DFSERROR -DOS4 -DOS4_TYPE4BUG -DCOLOR \
-DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER -DFORKCOMM \
-DBIGATOMS -DNOASM -DNOFORN -DRELEASE=210 # -DNOVERSION -DRELEASE=201
DFLAGS = -DINIT -DKBINT -DOS4 -DOS4_TYPE4BUG -DCOLOR \
-DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER \
-DNOASM -DRELEASE=210 # -DNOVERSION -DRELEASE=201
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
#-Dsparc?
@@ -44,7 +39,7 @@ default: ../$(OSARCHNAME)/$(LDENAME)
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
@@ -97,7 +92,7 @@ $(OBJECTDIR)xc.s3: $(OBJECTDIR)xc.s2 $(INLINE)
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h

View File

@@ -6,7 +6,7 @@ OEXT = .o
OPTFLAGS = -O2
DISPOPTFLAGS = -O
FPFLAGS = -f68881
DFLAGS = -DKBINT -DNEW_STORAGE -DFSERROR -DOPDISP -DUNSAFE -DSUN3_OS3_IL -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOPDISP -DSUN3_OS3_IL -DNEWBITBLT -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
BITBLTFILE = $(OBJECTDIR)bitblt68K.o
@@ -20,11 +20,11 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -11,7 +11,7 @@ DISPOPTFLAGS = -O
FPFLAGS = -f68881
# DISPLAYBUFFER for Color Sparcstation code testing
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DKBINT -DFSERROR -DOPDISP -DUNSAFE -DSUN3_OS3_IL -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOPDISP -DSUN3_OS3_IL -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
@@ -26,13 +26,13 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncallmacro.h $(INCDIR)inlinedefsC.h \
$(INCDIR)inlinedefs68K.h \
$(INCDIR)inlinedefsSPARC.h $(INCDIR)fastdispatch.h \
$(INCDIR)fastinlinedefs68K.h $(INCDIR)profile.h
$(INCDIR)fastinlinedefs68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -25,8 +25,7 @@ XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
XFLAGS = -DXWINDOW
# This is to make the %$#@! Apollo cc happy
OEXT = .o
@@ -34,13 +33,13 @@ OEXT = .o
OPTFLAGS = -O2
DISPOPTFLAGS = -O
FPFLAGS = -f68881
DFLAGS = -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DSUN3_OS3_IL -DNEWBITBLT -DLOGINT $(XFLAGS) -DFORKCOMM -DBIGATOMS
DFLAGS = -DOPDISP -DSUN3_OS3_IL -DNEWBITBLT -DLOGINT $(XFLAGS)
LDFLAGS = -lX11 -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
BITBLTFILE = $(OBJECTDIR)bitblt68K.o
OBJECTDIR = ../sunos3.mc68020-x/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -48,11 +47,11 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -6,7 +6,7 @@ OEXT = .o
OPTFLAGS = -O2
FPFLAGS =
# JRB - I'm not 100% sure about these flags; someone should check...
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DFLTINT -DSPARCDISP -DOS4_TYPE4BUG -DOLD_CURSOR -DSUNDISPLAY -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DFLTINT -DSPARCDISP -DOS4_TYPE4BUG -DOLD_CURSOR -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
#-Dsparc?
INLINE = $(SRCDIR)dispSPARC.il
@@ -22,7 +22,7 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \

View File

@@ -5,12 +5,12 @@ OEXT = .o
#For debugging
OPTFLAGS = -g
FPFLAGS =
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DFLTINT -DNOASM -DOS4 -DI386 -DBYTESWAP -DCHECK -DLOGINT -DSUNDISPLAY -DFORKCOMM
DFLAGS = -DKBINT -DFLTINT -DNOASM -DOS4 -DI386 -DCHECK -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp386i.il
OBJECTDIR = ../sunos4.i386/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
COLORFILES = $(OBJECTDIR)colorbltfns.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -21,14 +21,14 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncallmacro.h $(INCDIR)inlineC.h \
$(INCDIR)n_op_inlineC.h $(SRCDIR)disp386i.il \
$(INCDIR)dummy_entries.h \
$(INCDIR)inline386i.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc -c -O -Qproduce .s $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.s
#run c compiler to produce first pass assembly

View File

@@ -6,13 +6,13 @@ OEXT = .o
OPTFLAGS = -O
DISPOPTFLAGS = -O
FPFLAGS =
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DI386 -DBYTESWAP -DCHECK -DLOGINT -DDISPLAYBUFFER -DSUNDISPLAY -DNEWBITBLT -DOPDISP -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOS4 -DI386 -DCHECK -DLOGINT -DDISPLAYBUFFER -DSUNDISPLAY -DNEWBITBLT -DOPDISP
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp386i.il
BITBLTFILE=$(OBJECTDIR)bitblt386i.o
OBJECTDIR = ../sunos4.i386-multi/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
COLORFILES = $(OBJECTDIR)colorbltfns.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -23,13 +23,13 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
$(OBJECTDIR)xc.s: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(SRCDIR)disp386i.il \
$(INCDIR)inline386i.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc -c -O -Qproduce .s $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.s
#run c compiler to produce first pass assembly

View File

@@ -10,7 +10,7 @@ FPFLAGS = -f68881
# [I remove DISPLAYBUFFER option .
# You may run 'makeright multi'. -osamu '90/02/07]
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOPDISP -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
@@ -25,12 +25,12 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -11,7 +11,7 @@ DISPOPTFLAGS = -O
FPFLAGS = -f68881
# DISPLAYBUFFER for Color Sparcstation code testing
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOPDISP -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
@@ -26,13 +26,13 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -25,8 +25,7 @@ XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
XFLAGS = -DXWINDOW
# This is to make the %$#@! Apollo cc happy
OEXT = .o
@@ -38,14 +37,14 @@ FPFLAGS = -f68881
# [I remove DISPLAYBUFFER option .
# You may run 'makeright x'. -osamu '90/02/27]
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT $(XFLAGS) -DFORKCOMM -DBIGATOMS
DFLAGS = -DOPDISP -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT $(XFLAGS)
LDFLAGS = -lX11 -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
BITBLTFILE = $(OBJECTDIR)bitblt68K.o
OBJECTDIR = ../sunos4.mc68020-x/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -53,12 +52,12 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -9,7 +9,7 @@ DISPOPTFLAGS = -g
FPFLAGS =
# Now share the same ldesingle with COLOR(CG4)/MONO Suns
# If you load MAIKOCOLOR.LCOM etc., you can use color functions
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DCOLOR -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DFORKCOMM -DBIGATOMS -DNOEUROKBD
DFLAGS = -DKBINT -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DCOLOR -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DNOEUROKBD
LDFLAGS = -lsuntool -lsunwindow -lpixrect -ldld -lc -lm
# SPARC Assemble optimize check
DFLAGS:sh += optck.sh ; true
@@ -28,7 +28,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \

View File

@@ -6,7 +6,7 @@ OEXT = .o
OPTFLAGS = -g
FPFLAGS =
# For COLOR, Add COLOR, remove OLD_CURSOR
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DFLTINT -DCOLOR -DNEWBITBLT -DSUNDISPLAY -DLOGINT -DFORKCOMM
DFLAGS = -DKBINT -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DFLTINT -DCOLOR -DNEWBITBLT -DSUNDISPLAY -DLOGINT
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
# SPARC Assemble optimize check
DFLAGS:sh += optck.sh ; true
@@ -26,7 +26,7 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)Cldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \

View File

@@ -14,7 +14,7 @@ FPFLAGS =
# Now share the same ldemulti for Mono-Medley & Color-Medley
# If you load MAIKOCOLOR.LCOM etc., you can use color functions
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DCOLOR -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER -DFORKCOMM -DBIGATOMS -DNOEUROKBD
DFLAGS = -DKBINT -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DCOLOR -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER -DNOEUROKBD
LDFLAGS = -lsuntool -lsunwindow -lpixrect -ldld -lc -lm
# SPARC Assemble optimize check
DFLAGS:sh += optck.sh ; true
@@ -34,7 +34,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \

View File

@@ -1,10 +1,5 @@
# Options for SunOS4, SPARC and X-Window
CLXFLAGS = -DCLX -DTCP_NODELAY
CLXFILES = $(OBJECTDIR)socket.o \
$(OBJECTDIR)socdvr.o
XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
@@ -28,11 +23,9 @@ XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Xsubwin.o \
$(OBJECTDIR)Xcolor.o \
$(OBJECTDIR)Xwinman.o \
$(CLXFILES)
$(OBJECTDIR)Xwinman.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION) $(CLXFLAGS)
XFLAGS = -DXWINDOW
# This is to make the %$#@! Apollo cc happy
OEXT = .o
@@ -41,7 +34,7 @@ OPTFLAGS = -g
DISPOPTFLAGS = -g
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DOLD_CURSOR -DNEWBITBLT -DLOGINT $(XFLAGS) -DFORKCOMM -DBIGATOMS -DNOEUROKBD
DFLAGS = -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DOLD_CURSOR -DNEWBITBLT -DLOGINT $(XFLAGS) -DNOEUROKBD
LDFLAGS = -lX11 -lpixrect -lc -lm -ldld
LDELDFLAGS = -Bstatic -lX11 -lpixrect -Bdynamic -lc -lm
# SPARC Assemble optimize check
@@ -63,7 +56,7 @@ default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
@@ -114,7 +107,7 @@ $(OBJECTDIR)xc.o: $(OBJECTDIR)xc.s3
#$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h #$(INCDIR)address.h \
# $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
# $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatms.h $(INCDIR)gc.h \
# $(INCDIR)initatms.h $(INCDIR)gcdata.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosret.h \
# $(INCDIR)tosfns.h $(INCDIR)inlineC.h

View File

@@ -5,12 +5,12 @@ OEXT = .o
#For debugging
OPTFLAGS = -g
FPFLAGS =
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DFLTINT -DNOASM -DOS4 -DI386 -DBYTESWAP -DCHECK -DLOGINT -DSUNDISPLAY -DFORKCOMM
DFLAGS = -DKBINT -DFLTINT -DNOASM -DOS4 -DI386 -DCHECK -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp386i.il
OBJECTDIR = ../sunos4.i386/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
COLORFILES = $(OBJECTDIR)colorbltfns.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -21,14 +21,14 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncallmacro.h $(INCDIR)inlineC.h \
$(INCDIR)n_op_inlineC.h $(SRCDIR)disp386i.il \
$(INCDIR)dummy_entries.h \
$(INCDIR)inline386i.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc -c -O -Qproduce .s $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.s
#run c compiler to produce first pass assembly

View File

@@ -6,7 +6,7 @@ OEXT = .o
OPTFLAGS = -O -traditional
DISPOPTFLAGS = -O -traditional
FPFLAGS =
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DI386 -DBYTESWAP -DCHECK -DLOGINT -DDISPLAYBUFFER -DSUNDISPLAY -DNEWBITBLT -DOPDISP -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOS4 -DI386 -DCHECK -DLOGINT -DDISPLAYBUFFER -DSUNDISPLAY -DNEWBITBLT -DOPDISP
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp386i.il
BITBLTFILE=$(OBJECTDIR)bitblt386i.o
@@ -14,7 +14,7 @@ CC=gcc
AS=/users/sybalsky/gcc/gas/gas-1.35/a386
OBJECTDIR = ../sunos4.i386-multi/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
COLORFILES = $(OBJECTDIR)colorbltfns.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -25,13 +25,13 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
$(OBJECTDIR)xc.s: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(SRCDIR)disp386i.il \
$(INCDIR)inline386i.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc -c -O -Qproduce .s $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.s
#run c compiler to produce first pass assembly

View File

@@ -10,7 +10,7 @@ FPFLAGS = -f68881
# [I remove DISPLAYBUFFER option .
# You may run 'makeright multi'. -osamu '90/02/07]
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOPDISP -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
@@ -25,12 +25,12 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -11,7 +11,7 @@ DISPOPTFLAGS = -O
FPFLAGS = -f68881
# DISPLAYBUFFER for Color Sparcstation code testing
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOPDISP -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DDISPLAYBUFFER
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
INLINE = $(SRCDIR)disp68K.il
@@ -26,13 +26,13 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -25,8 +25,7 @@ XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
XFLAGS = -DXWINDOW
# This is to make the %$#@! Apollo cc happy
OEXT = .o
@@ -38,7 +37,7 @@ FPFLAGS = -f68881
# [I remove DISPLAYBUFFER option .
# You may run 'makeright x'. -osamu '90/02/27]
# NEWBITBLT for assembler version of bitblt.
DFLAGS = -DFSERROR -DNEW_STORAGE -DOPDISP -DUNSAFE -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT $(XFLAGS) -DFORKCOMM -DBIGATOMS
DFLAGS = -DOPDISP -DOS4 -DSUN3_OS4_IL -DOS4_TYPE4BUG -DNEWBITBLT -DLOGINT $(XFLAGS)
LDFLAGS = -lX11 -lpixrect -lc -lm
LDELDFLAGS = -Bstatic -lX11 -lpixrect -Bdynamic -lc -lm
@@ -46,7 +45,7 @@ INLINE = $(SRCDIR)disp68K.il
BITBLTFILE = $(OBJECTDIR)bitblt68K.o
OBJECTDIR = ../sunos4.mc68020-x/
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
@@ -54,12 +53,12 @@ $(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)inline68K.h \
$(INCDIR)inlineSPARC.h $(INCDIR)fast_disp.h \
$(INCDIR)fastinline68K.h $(INCDIR)profile.h
$(INCDIR)fastinline68K.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -6,11 +6,6 @@
#* (C) Copyright 1989-95 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
#
@@ -40,7 +35,7 @@ FPFLAGS =
#
DEBUGFLAGS = # -DNOASM -DSTACKCHECK -DFNSTKCHECK
MACHINEFLAGS = -DOS4 -DOS4_TYPE4BUG -DCOLOR -DSUNDISPLAY \
-DNEWBITBLT -DLOGINT -DFORKCOMM
-DNEWBITBLT -DLOGINT
FEATUREFLAGS = # -DLPSOLVE -DXMAS
INLINEFLAGS = # -DSPARCDISP -DSUN4_OS4_IL
@@ -48,7 +43,7 @@ INLINEFLAGS = # -DSPARCDISP -DSUN4_OS4_IL
DFLAGS = $(DEBUGFLAGS) \
$(MACHINEFLAGS) \
$(INLINEFLAGS) \
-DKBINT -DFSERROR -DNEW_STORAGE \
-DKBINT \
-DRELEASE=350
LDFLAGS = -L$(LIBDIR) -lsuntool -lsunwindow -lpixrect -ldld -lc -lm
@@ -69,7 +64,7 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
@@ -122,7 +117,7 @@ $(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \
$(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h

View File

@@ -17,7 +17,7 @@ OPTFLAGS = -O2
FPFLAGS =
# Now share the same ldesingle with COLOR(CG4)/MONO Suns
# If you load MAIKOCOLOR.LCOM etc., you can use color functions
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DCOLOR -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DFORKCOMM -DBIGATOMS
DFLAGS = -DKBINT -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DCOLOR -DNEWBITBLT -DLOGINT -DSUNDISPLAY
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
#-Dsparc?
INLINE = $(SRCDIR)dispSPARC.il
@@ -34,7 +34,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \

View File

@@ -6,7 +6,7 @@ OEXT = .o
OPTFLAGS = -g
FPFLAGS =
# For COLOR, Add COLOR, remove OLD_CURSOR
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DFLTINT -DCOLOR -DNEWBITBLT -DSUNDISPLAY -DLOGINT -DFORKCOMM
DFLAGS = -DKBINT -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DFLTINT -DCOLOR -DNEWBITBLT -DSUNDISPLAY -DLOGINT
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
#-Dsparc?
@@ -24,7 +24,7 @@ default : $(OBJECTDIR)lde $(OBJECTDIR)Cldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \

View File

@@ -8,11 +8,6 @@
#* (C) Copyright 1989-98 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
CC = gcc
@@ -46,14 +41,14 @@ FPFLAGS =
#
#DEBUGFLAGS = -DNOASM -DSTACKCHECK -DFNSTKCHECK
MACHINEFLAGS = -DOS4 -DOS4_TYPE4BUG -DCOLOR -DDISPLAYBUFFER -DSUNDISPLAY \
-DNEWBITBLT -DLOGINT -DFORKCOMM
-DNEWBITBLT -DLOGINT
INLINEFLAGS = # -DSPARCDISP -DSUN4_OS4_IL
DFLAGS = $(DEBUGFLAGS) \
$(MACHINEFLAGS) \
$(INLINEFLAGS) \
-DKBINT -DFSERROR -DNEW_STORAGE \
-DKBINT \
-DNOVERSION -DRELEASE=350
LDFLAGS = -L$(LIBDIR) -lsuntool -lsunwindow -lpixrect -ldld -lc -lm
@@ -73,7 +68,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
@@ -127,7 +122,7 @@ $(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \
$(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h

View File

@@ -17,7 +17,7 @@ FPFLAGS =
# Removed for debug: -DSPARCDISP -DSUN4_OS4_IL
# Added for debug: -DFNSTKCHECK -DMYOPTRACE -DOPTRACE -DNOASM
#
DFLAGS = -DKBINT -DFSERROR -DNEW_STORAGE -DOS4 -DOS4_TYPE4BUG -DCOLOR -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DSPARCDISP -DSUN4_OS4_IL -DBIGATOMS -DFORKCOMM
DFLAGS = -DKBINT -DOS4 -DOS4_TYPE4BUG -DCOLOR -DDISPLAYBUFFER -DNEWBITBLT -DLOGINT -DSUNDISPLAY -DSPARCDISP -DSUN4_OS4_IL
LDFLAGS = -lsuntool -lsunwindow -lpixrect -lc -lm
#-Dsparc?
INLINE = $(SRCDIR)dispSPARC.il
@@ -34,7 +34,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
@@ -87,7 +87,7 @@ $(OBJECTDIR)xc.o: $(OBJECTDIR)xc.s3
#$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h# $(INCDIR)address.h \
# $(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
# $(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatoms.h $(INCDIR)gc.h \
# $(INCDIR)initatoms.h $(INCDIR)gcdata.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
# $(INCDIR)tosfuncall.h $(INCDIR)inlineC.h

View File

@@ -1,11 +1,5 @@
# Options for SunOS4, SPARC and X-Window
# CLXFLAGS = -DTCP_NODELAY
#CLXFILES = $(OBJECTDIR)socket.o \
# $(OBJECTDIR)socdvr.o
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
@@ -18,8 +12,7 @@ XFILES = $(OBJECTDIR)xmkicon.o \
CC = gcc
XVERSION = XV11R4
XFLAGS = -DXWINDOW -DNOPIXRECT -D$(XVERSION) # $(CLXFLAGS)
XFLAGS = -DXWINDOW -DNOPIXRECT
# This is to make the %$#@! Apollo cc happy
OEXT = .o
@@ -36,7 +29,7 @@ FPFLAGS =
#DEBUGFLAGS = -DNOASM -DSTACKCHECK -DFNSTKCHECK
MACHINEFLAGS = -DOS4 -DOS4_TYPE4BUG -DOLD_CURSOR -DNOPIXRECT \
-I$(OPENWINHOME)/include \
-DNEWBITBLT -DLOGINT -DFORKCOMM -DLOCK_X_UPDATES
-DNEWBITBLT -DLOGINT -DLOCK_X_UPDATES
INLINEFLAGS = # -DSPARCDISP -DSUN4_OS4_IL
@@ -44,7 +37,7 @@ DFLAGS = $(DEBUGFLAGS) \
$(MACHINEFLAGS) \
$(INLINEFLAGS) \
$(XFLAGS) \
-DKBINT -DFSERROR -DNEW_STORAGE \
-DKBINT \
-DNOVERSION -DRELEASE=200
@@ -67,7 +60,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
@@ -120,7 +113,7 @@ $(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \
$(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h

View File

@@ -25,21 +25,20 @@ XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
XFLAGS = -DXWINDOW
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DOLD_CURSOR \
-DFORKCOMM -DNEWBITBLT -DLOGINT -DBIGATOMS $(XFLAGS)
DFLAGS = -DOS4 -DSPARCDISP -DSUN4_OS4_IL -DOS4_TYPE4BUG -DOLD_CURSOR \
-DNEWBITBLT -DLOGINT $(XFLAGS)
LDFLAGS = -lX11 -lpixrect -lc -lm
# -Dsparc?
INLINE = $(SRCDIR)dispSPARC.il
BITBLTFILE = $(OBJECTDIR)bitbltSPARC.o
BYTESWAPFILES = $(OBJECTDIR)byteswapfns.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
OBJECTDIR = ../$(RELEASENAME)/
@@ -51,7 +50,7 @@ default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h $(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)initatoms.h $(INCDIR)gcdata.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \

View File

@@ -9,16 +9,21 @@
# #
#########################################################################
os=`./config.guess`
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
os=${LDEARCH:-`$SCRIPTPATH/config.guess`}
# o/s switch block
case "$os" in
m68k-*) echo m68k ;;
sparc-*) echo sparc ;;
alpha-*) echo alpha ;;
i*86-*-*) echo 386 ;;
armv7l-*-*) echo armv7l ;;
aarch64-*-*) echo aarch64 ;;
x86_64-apple-darwin15*) echo 386 ;;
x86_64-*) echo x86_64 ;;
powerpc-*) echo ppc ;;
amd64-*) echo x86_64 ;;
esac
### Don't leave the variables set.
unset os

View File

@@ -1,19 +0,0 @@
#!/bin/sh
os=`./config.guess`
# o/s switch block
case "$os" in
sparc-sun-sunos*) echo sunos4 ;;
sparc-sun-solaris1*) echo sunos4 ;;
sparc-sun-solaris2*) echo sunos5 ;;
alpha-dec-osf1) echo osf1 ;;
i386-*-solaris*) echo sunos5 ;;
*-*-linux*) echo linux ;;
*-*-openbsd*) echo openbsd ;;
esac
### Don't leave the variables set.
unset os

View File

@@ -1,120 +0,0 @@
# makeright
# @(#) makeright Version 1.12 (7/18/90).
##***********************************************************************/
## */
## Copyright 1989, 1990 Venue, Fuji Xerox Co., Ltd, Xerox Corp. */
## */
## This file is work-product resulting from the Xerox/Venue */
## Agreement dated 18-August-1989 for support of Medley. */
## */
##***********************************************************************/
#
# Feb. 6 1990 osamu: Add display option
# release option does not support yet.
# Apr.23 1990 osamu: add release option.
#
# Jul 18 1990 JDS: Add 'init' option for making init-loading emulators
#
# usage: makeright [display-option] [other-option]
#
# example: makeright single ; make lde for mmaped displayFB
# makeright multi ; make lde for cg3,cg6
# makeright x ; make lde for X-windows
# makeright color ; make lde with color support in it.
# makeright multi release ; make release version of lde for cg3,cg6
# makeright init ; make lde for loading INIT.DLINIT b/w only
#
# makeright multi requires directory "maiko/${osversion}.${architecture}-multi"
# (ex. maiko/sunos4.sparc-multi)
# object files are stored there.
#
# makeright init requires directory "maiko/init.${architecture}
#
# Note: X11R4 environment link shared libraries.
# lde need X library. If lde links shared libraries,
# X shared libraries are needed at run time.
#
# Hide X shared libraries from link libraries search path.
setenv LD_LIBRARY_PATH /usr/local/lib
set RELDIR = ../RELEASE/
if($1 == "") then
set display=single
else
if($1 == "release") then
switch($2)
case single:
set display = single
breaksw
case multi:
set display = multi
breaksw
case x:
set display = x
breaksw
default:
makeright single release
makeright multi release
makeright x release
exit
breaksw
endsw
else
set display=$1
endif
endif
if( $#argv > 0 ) then
shift
endif
set architecture = dec3100
set osversion = ultrix
switch($display)
case init:
set display = single
set releasename = init.${architecture}
set ldename = ldeinit
breaksw
case single:
set releasename = ${osversion}.${architecture}
set ldename = ldesingle
breaksw
case multi:
set releasename = ${osversion}.${architecture}-${display}
set ldename = ldemulti
breaksw
case x:
set releasename = ${osversion}.${architecture}-${display}
set ldename = ldex
breaksw
default:
echo "display-option: $display is not supported."
exit
breaksw
endsw
set releaseflg = 0
if( "$1" == "release" ) then
set releaseflg = 1
if($display != single) then
if( !(-e usermakefile-${releasename})) then
ln usermakefile-${osversion}.${architecture} usermakefile-${releasename}
endif
endif
else
set releaseflg = 0
endif
set installdir = ${RELDIR}install.${osversion}.${architecture}/
#if($display == single ) then
# set releasename = ${osversion}.${architecture}
#else
# set releasename = ${osversion}.${architecture}-${display}
#endif
echo start making lde for ${releasename}.
# then finally do the make, including the right stuff
# With makefile-tail merged, this should only take ONE make command....
make RELEASENAME=${releasename} INSDIR=${installdir} LDENAME=${ldename} \
OSARCHNAME=${osversion}.${architecture} \
-f makefile-header -f makefile-${releasename} \
-f makefile-tail $*

View File

@@ -1,64 +0,0 @@
# Options for SunOS4, SPARC and X-Window
XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)InitXevent.o \
$(OBJECTDIR)XKbdMouse.o \
$(OBJECTDIR)LispWindow.o \
$(OBJECTDIR)LispXbitblt.o \
$(OBJECTDIR)XKeyboard.o \
$(OBJECTDIR)MakeXicon.o \
$(OBJECTDIR)OpenDisplay.o \
$(OBJECTDIR)ReadXoption.o \
$(OBJECTDIR)XReconfig.o \
$(OBJECTDIR)XScroll.o \
$(OBJECTDIR)Scrollbar.o \
$(OBJECTDIR)XCursor.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Subwindows.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
FPFLAGS =
DFLAGS = -DFSERROR -DAIX -DSYSVONLY -DSYSVSIGNALS -DNOASM -DLOGINT -DNOPIXRECT $(XFLAGS) -DBYTESWAP -DAIXPS2 -DFLTINT -D_I386 -DNOETHER -DFORKCOMM
LDFLAGS = -lX11 -lc -lm -lbsd
INLINE =
BITBLTFILE =
# for the files that need to be included in byte-swapped implementations:
BYTESWAPFILES = $(OBJECTDIR)byteswapfns$(OEXT)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
OPTFLAGS = -O -fstrength-reduce -fcombine-regs
DISPOPTFLAGS = -O -fstrength-reduce -fcombine-regs -finline-functions
CC = /gcc/gcc
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)profile.h
$(CC) $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -1,64 +0,0 @@
# Options for SunOS4, SPARC and X-Window
XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)InitXevent.o \
$(OBJECTDIR)XKbdMouse.o \
$(OBJECTDIR)LispWindow.o \
$(OBJECTDIR)LispXbitblt.o \
$(OBJECTDIR)XKeyboard.o \
$(OBJECTDIR)MakeXicon.o \
$(OBJECTDIR)OpenDisplay.o \
$(OBJECTDIR)ReadXoption.o \
$(OBJECTDIR)XReconfig.o \
$(OBJECTDIR)XScroll.o \
$(OBJECTDIR)Scrollbar.o \
$(OBJECTDIR)XCursor.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Subwindows.o \
$(OBJECTDIR)VideoColor.o \
$(OBJECTDIR)XWindowMgr.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
FPFLAGS =
DFLAGS = -DFSERROR -DAIX -D_BSD -DNOASM -DLOGINT -DNOPIXRECT $(XFLAGS) -DBYTESWAP -DAIXPS2 -DFLTINT -D_I386 -DNOETHER -DFORKCOMM
LDFLAGS = -lX11 -lc -lm -lbsd
INLINE =
BITBLTFILE =
# for the files that need to be included in byte-swapped implementations:
BYTESWAPFILES = $(OBJECTDIR)byteswapfns$(OEXT)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
OPTFLAGS = -O -fstrength-reduce -fcombine-regs
DISPOPTFLAGS = -O -fstrength-reduce -fcombine-regs -finline-functions
CC = gcc
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
$(OBJECTDIR)xc.o : $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emulglobal.h \
$(INCDIR)address.h \
$(INCDIR)address68k.h $(INCDIR)stack.h $(INCDIR)lispglobal.h \
$(INCDIR)lisptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatoms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h $(INCDIR)dbprint.h\
$(INCDIR)tos1defs.h $(INCDIR)tosretmacro.h \
$(INCDIR)tosfuncall.h $(INCDIR)inlineC.h \
$(INCDIR)profile.h
$(CC) $(DISPRFLAGS) $(SRCDIR)xc.c $(INLINE) -o $(OBJECTDIR)xc.o

View File

@@ -1,66 +0,0 @@
# Options for AIX 3.1, IBM RISC System/6000, and X-Windows
DEMO =
EURO =
XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)Xevinit.o \
$(OBJECTDIR)Xkbdmus.o \
$(OBJECTDIR)Xlspwin.o \
$(OBJECTDIR)Xbbt.o \
$(OBJECTDIR)Xkbd.o \
$(OBJECTDIR)Xmkicon.o \
$(OBJECTDIR)Xopendsp.o \
$(OBJECTDIR)Xrdopt.o \
$(OBJECTDIR)Xreconf.o \
$(OBJECTDIR)XScroll.o \
$(OBJECTDIR)Xscrolb.o \
$(OBJECTDIR)XCursor.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Xsubwin.o \
$(OBJECTDIR)Xcolor.o \
$(OBJECTDIR)Xwinman.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O.
#OPTFLAGS = -g
OPTFLAGS = -O
DISPOPTFLAGS = -O
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DAIX -D_BSD -DNOASM -DNOPIXRECT -DNOETHER \
-DRS6000 -DFORKCOMM -DLOGINT -DBIGATOMS -DNOFORN $(DEMO) $(EURO) $(XFLAGS)
LDFLAGS = -lX11 -lc -lm -lbsd
LDELDFLAGS = -lX11 -lc -lm -lbsd
INLINE =
BITBLTFILE =
BYTESWAPFILES = $(OBJECTDIR)byteswap$(OEXT)
OBJECTDIR = ../$(RELEASENAME)/
# don't need ldeether on this machine, so omit it from here:
default : ../$(OSARCHNAME)/lde
# Special rules to create xc.o on IBM RISC-system/6000's:
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
cc $(DISPRFLAGS) $(SRCDIR)xc.c -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o

View File

@@ -0,0 +1,26 @@
# Options for Linux, Intel x86_64 and X-Window
CC = gcc -m64 $(GCC_CFLAGS) -I/usr/local/include
#CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -L/usr/local/lib -lSDL2
#
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,28 @@
# Options for Linux, Intel x86_64 and X-Window
#CC = gcc -m64 $(GCC_CFLAGS)
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

29
bin/makefile-darwin.386-x Normal file
View File

@@ -0,0 +1,29 @@
# Options for MacOS, x86 processor, X windows
CC = clang -m32 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) \
-DRELEASE=$(RELEASE) # -DSTACKCHECK -DFSBCHECK -DPCTRACE
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -0,0 +1,26 @@
# Options for MacOS, arm64 (aka aarch64) processor, SDL
CC = clang -target aarch64-apple-darwin $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -framework SDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -framework SDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2 -F /Library/Frameworks
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -rpath /Library/Frameworks -F /Library/Frameworks -framework SDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,28 @@
# Options for MacOS, arm64 (aka aarch64) processor, X windows
CC = clang -target aarch64-apple-darwin $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

29
bin/makefile-darwin.ppc-x Normal file
View File

@@ -0,0 +1,29 @@
# Options for MacOS, x86 processor, X windows
CC = cc $(GCC_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) \
-DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -0,0 +1,25 @@
# Options for MacOS, x86 processor, SDL
CC = clang -m64 -target x86_64-apple-darwin $(CLANG_CFLAGS)
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -framework SDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -framework SDL3 in LDFLAGS
#
XFILES = $(OBJECTDIR)sdl.o
SDLFLAGS = -DSDL=2 -F /Library/Frameworks
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -rpath /Library/Frameworks -F /Library/Frameworks -framework SDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,29 @@
# Options for MacOS, x86 processor, X windows
CC = clang -target x86_64-apple-darwin $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O1 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,74 +0,0 @@
# Options for Domain/OS, APOLLO Workstation 680x0, and X-Window
CLXFLAGS = -DCLX -DTCP_NODELAY
CLXFILES = $(OBJECTDIR)socket.o \
$(OBJECTDIR)socdvr.o
XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)Xinit.o \
$(OBJECTDIR)Xkbdmus.o \
$(OBJECTDIR)Xlspwin.o \
$(OBJECTDIR)Xbbt.o \
$(OBJECTDIR)Xkbd.o \
$(OBJECTDIR)Xmkicon.o \
$(OBJECTDIR)Xopendsp.o \
$(OBJECTDIR)Xrdopt.o \
$(OBJECTDIR)Xreconf.o \
$(OBJECTDIR)XScroll.o \
$(OBJECTDIR)Xscrolb.o \
$(OBJECTDIR)XCursor.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Xsubwin.o \
$(OBJECTDIR)Xcolor.o \
$(OBJECTDIR)Xwinman.o \
$(CLXFILES)
XVERSION = XV11R4
XFLAGS = -DXWINDOW -DNOPIXRECT -D$(XVERSION) $(CLXFLAGS)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O2.
OPTFLAGS = -g -O -W0,-natural
DISPOPTFLAGS = -g -O -W0,-natural
FPFLAGS =
DFLAGS = -DAPOLLO -DFSERROR -DNEW_STORAGE -DNOFORN \
-DFORKCOMM -DLOGINT -DBIGATOMS $(XFLAGS) \
-DNOETHER -DNOASM -DNOEUROKBD
LDFLAGS = -lX11 -lc -lm
LDELDFLAGS = -lX11 -lc -lm
MAIN = main
INLINE = # $(SRCDIR)dsp68K.il
BITBLTFILE = # $(OBJECTDIR)bbt68k.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde # ../$(OSARCHNAME)/ldeether
# Special rules to create xc.c on Apollo
#run cpp to expand macros
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
$(CC) -c $(DISPOPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
#$(OBJECTDIR)xc.o: $(OBJECTDIR)xc.i $(INCDIR)lispemul.h
# $(CC) -c $(DISPOPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o

47
bin/makefile-dos Executable file → Normal file
View File

@@ -2,30 +2,28 @@ AFLAGS = /T
ARCHFILES = dosmouse.obj doskbd.obj vesafns.obj vesainit.obj vgainit.obj kbdif.obj
ADMINFILES = makefile mkvdate.c optck.c
ADMINFILES = makefile mkvdate.c
LPFILES = lpmain.obj lpread.obj lpsolve.obj lpwrite.obj lpdual.obj lptran.obj
KEY = keytstno.obj
CFLAGS = -DBIGATOMS -DNEW_STORAGE -DDOS -DBYTESWAP -DKBINT -DFSERROR -DNOPIXRECT \
-DNOFORN -DNOETHER -DNOVERSION -DLPSOLVE -g
CFLAGS = -DDOS -DKBINT -DNOPIXRECT \
-DNOVERSION -DLPSOLVE -g
LDFLAGS = -g graphics.lib binmode.lib mouse.lib
RM = del
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arith2.c hacks.c lowlev2.c subr0374.c arith3.c doscomm.c hardrtn.c lsthandl.c sxhash.c arith4.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c keylib.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c keytstno.c keytst.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c find-dsp.l dsphack.l xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk.c gcscan.c loopsops.c storage.c allocmds.c dir.c gvar2.c lowlev1.c subr.c arithops.c lowlev2.c subr0374.c doscomm.c hardrtn.c lsthandl.c sxhash.c draw.c main.c testtool.c array.c dsk.c inet.c misc7.c timer.c array2.c dspif.c initdsp.c miscn.c typeof.c array3.c initkbd.c ubf1.c array4.c dspsubrs.c initsout.c mkatom.c ubf2.c array5.c eqf.c intcall.c mkcell.c ubf3.c array6.c ether.c mkvdate.c ufn.c atom.c findkey.c kbdsubrs.c mouseif.c ufs.c bbtsub.c foreign.c keyevent.c unixcomm.c bin.c fp.c binds.c asmbbt.c fvar.c mvs.c unwind.c bitblt.c gc.c uraid.c blt.c gc2.c kprint.c osmsg.c usrsubr.c byteswap.c gcarray.c perrno.c ldeboot.c ldeether.c uutils.c carcdr.c gccode.c rawcolor.c vars3.c gcfinal.c ldsout.c return.c vmemsave.c chardev.c gchtfind.c lineblt8.c rpc.c xc.c common.c gcmain3.c lisp2c.c rplcons.c z2.c xmkicon.c xbbt.c xinit.c xscroll.c xcursor.c xlspwin.c xrdopt.c xwinman.c dosmouse.c vesafns.asm vesainit.c vgainit.c kbdif.c dspsparc.il copyright launch.asm lpread.c lpsolve.c lpmain.c lpwrite.c lpdual.c lptran.c
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arith2.obj hacks.obj lowlev2.obj subr0374.obj arith3.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj arith4.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj keylib.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(KEY) $(COLORFILES) $(ARCHFILES) $(LPFILES)
OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arithops.obj lowlev2.obj subr0374.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES) $(LPFILES)
HFILES = address.h adr68k.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bitblt.h debug.h devconf.h dspdata.h ether.h fast_dsp.h fp.h gc.h hdw_conf.h initatms.h inlinec.h keyboard.h lispver1.h lispver2.h lldsp.h locfile.h mouseif.h my.h opcodes.h osmsg.h pilotbbt.h print.h profile.h return.h stack.h stream.h subrs.h sysatms.h timeout.h tos1defs.h tosfns.h tosret.h vmemsave.h xdefs.h xbitmaps.h xkeymap.h
HFILES = address.h adr68k.h arithopsdefs.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bbtmacro.h debug.h devconf.h dspdata.h fast_dsp.h gcdata.h initatms.h inlinec.h keyboard.h lispver1.h lispver2.h lldsp.h locfile.h medleyfp.h mouseif.h my.h opcodes.h osmsgprint.h pilotbbt.h print.h retmacro.h stack.h stream.h subrs.h timeout.h tos1defs.h tosfns.h tosret.h xdefs.h xbitmaps.h xkeymap.h
bigvm:
CFLAGS = $(CFLAGS) -DBIGVM -DNEWCDRCODRING
CFLAGS = $(CFLAGS)
make -f foot emul.exe
emul.exe : $(OFILES)
@@ -37,7 +35,7 @@ emul.exe : $(OFILES)
del copts
@ echo "Executable is now named '$@'"
main.o : lispemul.h address.h lsptypes.h adr68k.h stack.h lspglob.h lispmap.h ifpage.h iopage.h return.h debug.h profile.h
main.o : lispemul.h address.h lsptypes.h adr68k.h stack.h lspglob.h lispmap.h ifpage.h iopage.h retmacro.h debug.h
@@ -106,11 +104,6 @@ conspage.obj : ../src/conspage.c
$(CC) @copts ../src/conspage.c -I ../inc -c $@
del copts
keytstno.obj : ../src/keytstno.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/keytstno.c -I ../inc -c $@
del copts
dosmouse.obj : ../src/dosmouse.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/dosmouse.c -I ../inc -c $@
@@ -209,14 +202,9 @@ subr.obj : ../src/subr.c
$(CC) @copts ../src/subr.c -I ../inc -c $@
del copts
arith2.obj : ../src/arith2.c
arithops.obj : ../src/arithops.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/arith2.c -I ../inc -c $@
del copts
hacks.obj : ../src/hacks.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/hacks.c -I ../inc -c $@
$(CC) @copts ../src/arithops.c -I ../inc -c $@
del copts
lowlev2.obj : ../src/lowlev2.c
@@ -229,11 +217,6 @@ subr0374.obj : ../src/subr0374.c
$(CC) @copts ../src/subr0374.c -I ../inc -c $@
del copts
arith3.obj : ../src/arith3.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/arith3.c -I ../inc -c $@
del copts
doscomm.obj : ../src/doscomm.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/doscomm.c -I ../inc -c $@
@@ -254,11 +237,6 @@ sxhash.obj : ../src/sxhash.c
$(CC) @copts ../src/sxhash.c -I ../inc -c $@
del copts
arith4.obj : ../src/arith4.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/arith4.c -I ../inc -c $@
del copts
draw.obj : ../src/draw.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/draw.c -I ../inc -c $@
@@ -459,11 +437,6 @@ fp.obj : ../src/fp.c
$(CC) @copts ../src/fp.c -I ../inc -c $@
del copts
keylib.obj : ../src/keylib.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/keylib.c -I ../inc -c $@
del copts
binds.obj : ../src/binds.c
@ echo $(CFLAGS) > copts
$(CC) @copts ../src/binds.c -I ../inc -c $@

View File

@@ -0,0 +1,40 @@
# Options for Emscripten, WASM and SDL
CC = emcc $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 and -sUSE_SDL=2 in XFLAGS and -sUSE_SDL=2 in LDFLAGS
# For SDL version 3
# -DSDL=3 and -sUSE_SDL=3 in XFLAGS and -sUSE_SDL=3 in LDFLAGS
#
XFLAGS = -DSDL=2 -sUSE_SDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DMAIKO_ENABLE_NETHUB
MEDLEY?=../../medley
SYSOUT?=$(MEDLEY)/loadups/full.sysout
LD = emcc
LDFLAGS = -sUSE_SDL=2 -sASYNCIFY -sALLOW_MEMORY_GROWTH -sEXIT_RUNTIME=1 \
--preload-file $(SYSOUT)@medley/loadups/full.sysout \
--preload-file $(MEDLEY)/loadups/whereis.hash@medley/loadups/whereis.hash \
--preload-file $(MEDLEY)/greetfiles/MEDLEYDIR-INIT.LCOM@usr/local/lde/site-init.lisp \
--preload-file $(MEDLEY)/docs/@medley/docs \
--preload-file $(MEDLEY)/doctools/@medley/doctools \
--preload-file $(MEDLEY)/greetfiles/@medley/greetfiles \
--preload-file $(MEDLEY)/internal/@medley/internal \
--preload-file $(MEDLEY)/sources/@medley/sources \
--preload-file $(MEDLEY)/library/@medley/library \
--preload-file $(MEDLEY)/lispusers/@medley/lispusers \
--preload-file $(MEDLEY)/fonts/@medley/fonts
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldesdl.js

View File

@@ -0,0 +1,29 @@
# Options for Emscripten, WASM and SDL
CC = emcc $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 and -sUSE_SDL=2 in XFLAGS and -sUSE_SDL=2 in LDFLAGS
# For SDL version 3
# -DSDL=3 and -sUSE_SDL=3 in XFLAGS and -sUSE_SDL=3 in LDFLAGS
#
XFLAGS = -DSDL=2 -sUSE_SDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DMAIKO_ENABLE_NETHUB
MEDLEY?=../../medley
SYSOUT?=$(MEDLEY)/loadups/full.sysout
LD = emcc
LDFLAGS = -sUSE_SDL=2 -sASYNCIFY -sALLOW_MEMORY_GROWTH -sEXIT_RUNTIME=1 -sFORCE_FILESYSTEM -sLZ4
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldesdl.js

View File

@@ -0,0 +1,24 @@
# Options for FreeBSD, Intel 386/486 and SDL
CC = clang -m32 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2 -I/usr/local/include
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,27 @@
# Options for FreeBSD, Intel 386/486 and X Windows
CC = clang -m32 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -0,0 +1,24 @@
# Options for FreeBSD, ARM64 and SDL
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2 -I/usr/local/include
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,27 @@
# Options for FreeBSD, ARMv7 and X-Windows
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -0,0 +1,24 @@
# Options for FreeBSD, Intel x86_64 and X-Windows
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2 -I/usr/local/include
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,27 @@
# Options for FreeBSD, Intel x86_64 and X-Windows
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -0,0 +1,25 @@
# Options for Haiku, Intel x86_64 and SDL
CC = gcc -m64 $(GCC_CFLAGS)
# CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lSDL2 -lnetwork
LDELDFLAGS = -lnetwork -lbsd
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -7,16 +7,15 @@ INCDIR = ../inc/
INCLUDEDIR = ../include/
LIBDIR = ../lib
BINDIR = ./
RELDIR = ../RELEASE/
MAIN = _main
RANLIB = ranlib
AR = ar rcv
ANSICC = $(CC)
RM ?= rm -f
# Compiler flags
CLANG_CFLAGS = -std=gnu99 -fno-strict-aliasing
GCC_CFLAGS = -std=gnu99 -fno-strict-aliasing
DEVSTUDIO_CFLAGS = -std=gnu99 -fno-strict-aliasing
# for the files that need to be included in byte-swapped implementations:
BYTESWAPFILES =
SXHASHFILE =
BITBLTFILE =
DLPIFILES =
# for files needed by X windows version
@@ -33,3 +32,5 @@ LDFLAGS =
LDELDFLAGS =
LDEETHERLDFLAGS =
# OSARCHDIR is the os/architecture dir, where executables all go.
OSARCHDIR = ../$(OSARCHNAME)/

View File

@@ -1,93 +0,0 @@
#************************************************************************/
#* */
#* (C) Copyright 1991 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
# Options for HP Series 700 and 800, under HPUX and X-windows
CC = gcc
#XFILES = $(OBJECTDIR)XClose.o \
# $(OBJECTDIR)Cursor.o \
# $(OBJECTDIR)XWindow.o \
# $(OBJECTDIR)DoRing.o \
# $(OBJECTDIR)DoScroll.o \
# $(OBJECTDIR)XEvent.o \
# $(OBJECTDIR)XGravity.o \
# $(OBJECTDIR)XInit.o \
# $(OBJECTDIR)Xevinit.o \
# $(OBJECTDIR)Xkbdmus.o \
# $(OBJECTDIR)Xlspwin.o \
# $(OBJECTDIR)Xbbt.o \
# $(OBJECTDIR)Xkbd.o \
# $(OBJECTDIR)Xmkicon.o \
# $(OBJECTDIR)Xopendsp.o \
# $(OBJECTDIR)Xrdopt.o \
# $(OBJECTDIR)Xreconf.o \
# $(OBJECTDIR)XScroll.o \
# $(OBJECTDIR)Xscrolb.o \
# $(OBJECTDIR)XCursor.o \
# $(OBJECTDIR)XMouse.o \
# $(OBJECTDIR)Xsubwin.o \
# $(OBJECTDIR)Xcolor.o \
# $(OBJECTDIR)Xwinman.o
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O +Obb990 -- latter enables large-file (xc) opt.
OPTFLAGS = -O # +Onolimit
DISPOPTFLAGS = -O # +Onolimit
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DAIX -DFORKCOMM -DLOGINT $(XFLAGS) \
-DHPUX -DNOETHER -DNOPIXRECT -DHP9000 -DHPTIMERBUG \
-DSYSVONLY \
-DNOFORN \
-DRELEASE=201
LDFLAGS = -L/usr/lib/X11R4 -lX11 -lm -lBSD
LDELDFLAGS = $(LDFLAGS)
MAIN = main
# -Dsparc?
INLINE =
BITBLTFILE =
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
# Special rules to create xc.c on HP/Apollo Series 700 or 800
#run cpp to expand macros
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
$(INCDIR)inln68k.h
cc -c $(OPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o

View File

@@ -0,0 +1,28 @@
# Options for MacOS, x86 processor, X windows, for INIT processing
CC = clang -m32 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11/lib -lX11 -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,28 @@
# Options for MacOS, aarch64 processor, X windows, for INIT processing
CC = clang -target aarch64-apple-darwin $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O0 -g3
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,28 @@
# Options for MacOS, x86_64 processor, X windows, for INIT processing
CC = clang -m64 -target x86_64-apple-darwin $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O0 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,27 @@
# Options for FreeBSD, Intel 386/486 and X Windows
CC = clang -m32 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O0 for init
OPTFLAGS = -O0 -g
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,27 @@
# Options for FreeBSD, ARMv7 and X-Windows
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O0 for init
OPTFLAGS = -O0 -g
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,27 @@
# Options for FreeBSD, Intel x86_64 and X-Windows
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O0 for init
OPTFLAGS = -O0 -g
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,29 @@
# Options for Linux, aarch64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,29 @@
# Options for Linux, x86 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,27 @@
# Options for OpenBSD, Intel x86_64 and X-Window
CC = clang -m64 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -I/usr/X11R6/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,64 @@
#************************************************************************/
#* */
#* Makefile for MAKEINIT processing. */
#* */
#* $Id: makefile-init.sparc,v 1.4 2001/12/26 22:17:08 sybalsky Exp $ */
#* */
#************************************************************************/
#************************************************************************/
#* */
#* (C) Copyright 1991,8 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#************************************************************************/
# Options for SPARC under Solaris-2 operating system, X windows.
CC = cc -m32 $(DEVSTUDIO_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -g for MAKEINIT, as it needs debugging often.
OPTFLAGS = -g3 -O0
# Set any debugging options in DEBUGFLAGS. E.g., to enable stack
# checking, use -DSTACKCHECK; to enable the fn-call-time stack
# check, use -DFNSTKCHECK.
DEBUGFLAGS = # -DSTACKCHECK -DFNSTKCHECK
MACHINEFLAGS = -DOS5 -DUSE_DLPI
# The LDEINIT wants to have NOVERSION set, so we don't hang up on
# any change-over in versions.
DFLAGS = -DINIT \
$(XFLAGS) \
$(DEBUGFLAGS) \
$(MACHINEFLAGS) \
-DNOVERSION -DRELEASE=$(RELEASE)
LDFLAGS = -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -lX11 -lc -lm -lsocket -lnsl
LDEETHERLDFLAGS = -lc -lm -lsocket -lnsl
DLPIFILES = $(OBJECTDIR)dlpi.o
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,29 @@
# Options for Windows System for Linux v1, aarch64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,29 @@
# Options for Windows System for Linux v1, Intel x86_64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -1,100 +0,0 @@
#
#
#************************************************************************/
#* */
#* (C) Copyright 1991 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
# Options for SGI Indigo under IRIX operating system, X windows.
XFILES = $(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xwinman.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)kbdif.o \
$(OBJECTDIR)xinit.o
### XFILES used to include:
#XFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)Xkbd.o \
$(OBJECTDIR)Xreconf.o \
$(OBJECTDIR)Xscrolb.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)Xsubwin.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)Xevinit.o \
$(OBJECTDIR)Xkbdmus.o \
$(OBJECTDIR)Xopendsp.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Xcolor.o \
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O
OPTFLAGS = -g
DISPOPTFLAGS = -g
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DAIX -DFORKCOMM -DLOGINT $(XFLAGS) \
-D_IEEE -DINDIGO -DSYSVONLY -DNOETHER -DNOPIXRECT -DSYSVSIGNALS -DNOFORN \
-DNOASM -DBIGATOMS -DINIT -DNOVERSION -DBIGVM -DNEWCDRCODING
LDFLAGS = -L/usr/lib/X11R4 -L/d/scsistr2/guest/gcc2 -lsun -lX11 -lm
LDELDFLAGS = $(LDFLAGS)
# -Dsparc?
CC = cc
RANLIB = touch
MAIN = main
INLINE =
BITBLTFILE =
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
# Special rules to create xc.c on HP/Apollo Series 700 or 800
#run cpp to expand macros
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
$(INCDIR)inln68k.h
$(CC) -c $(DISPOPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
#$(OBJECTDIR)xc.o: $(SRCDIR)xc.i $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
# $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
# $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatms.h $(INCDIR)gc.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosret.h \
# $(INCDIR)tosfns.h $(INCDIR)inlineC.h \
# $(INCDIR)inln68k.h
# $(CC) -c $(DISPOPTFLAGS) $(SRCDIR)xc.i -o $(OBJECTDIR)xc.o

View File

@@ -1,120 +0,0 @@
#************************************************************************/
#* */
#* Makefile for MAKEINIT processing. */
#* */
#* $Id: makefile-init.sparc,v 1.4 2001/12/26 22:17:08 sybalsky Exp $ */
#* */
#************************************************************************/
#************************************************************************/
#* */
#* (C) Copyright 1991,8 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
# Options for SPARC under Solaris-2 operating system, X windows.
CC = gcc
XFILES = $(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xwinman.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)kbdif.o \
$(OBJECTDIR)xinit.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -DXV11R4 -I/usr/openwin/include
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -g for MAKEINIT, as it needs debugging often.
OPTFLAGS = -g3 -O
DISPOPTFLAGS = -g3 -O
MAIN = main
# Set any debugging options in DEBUGFLAGS. E.g., to enable stack
# checking, use -DSTACKCHECK; to enable the fn-call-time stack
# check, use -DFNSTKCHECK.
DEBUGFLAGS = # -DSTACKCHECK -DFNSTKCHECK
MACHINEFLAGS = -DOS5 -DAIX -DUSE_DLPI -DNOPIXRECT \
-I$(OPENWINHOME)/include -DSYSVSIGNALS -DSYSVONLY \
-DOLD_CURSOR -DLOGINT -DFORKCOMM -DLOCK_X_UPDATES
INLINEFLAGS =
FPFLAGS =
# The LDEINIT wants to have NOVERSION set, so we don't hang up on
# any change-over in versions.
DFLAGS = -DINIT \
$(XFLAGS) \
$(DEBUGFLAGS) \
$(MACHINEFLAGS) \
$(INLINEFLAGS) \
-DNOVERSION -DRELEASE=351
LDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl
LDEETHERLDFLAGS = -lc -lm -lsocket -lnsl
# SPARC Assemble optimize check
# DFLAGS:sh += optck.sh ; true
#-Dsparc?
INLINE =
DLPIFILES = $(OBJECTDIR)dlpi.o
OBJECTDIR = ../$(RELEASENAME)/
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
#RANLIB = touch
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
# Special rules to create xc.c with GCC
#run cpp to expand macros
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
$(INCDIR)inln68k.h
$(CC) -c $(DISPOPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
#$(OBJECTDIR)xc.o: $(SRCDIR)xc.i $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
# $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
# $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatms.h $(INCDIR)gc.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosret.h \
# $(INCDIR)tosfns.h $(INCDIR)inlineC.h \
# $(INCDIR)inln68k.h
# $(CC) -c $(DISPOPTFLAGS) $(SRCDIR)xc.i -o $(OBJECTDIR)xc.o

View File

@@ -1,90 +0,0 @@
#
#
#************************************************************************/
#* */
#* (C) Copyright 1991,8 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
# Options for SPARC under Solaris-2 operating system, X windows.
XFILES = $(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xwinman.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)kbdif.o \
$(OBJECTDIR)xinit.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -DXV11R4 -I/usr/openwin/include
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O2.
OPTFLAGS = -g
DISPOPTFLAGS = -g
MAIN = main
FPFLAGS =
DFLAGS = -DINIT -DFSERROR -DNEW_STORAGE -DOS5 -DAIX -DUSE_DLPI \
-DOLD_CURSOR -DLOGINT $(XFLAGS) \
-DNOPIXRECT -DFORKCOMM -DLOCK_X_UPDATES \
-I$(OPENWINHOME)/include -DSYSVSIGNALS -DSYSVONLY \
-DNOVERSION -DRELEASE=350
LDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl
LDEETHERLDFLAGS = -lc -lm -lsocket -lnsl
# SPARC Assemble optimize check
# DFLAGS:sh += optck.sh ; true
#-Dsparc?
INLINE =
DLPIFILES = $(OBJECTDIR)dlpi.o
OBJECTDIR = ../$(RELEASENAME)/
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
CC = gcc
#RANLIB = touch
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
# Special rules to create xc.c with GCC
#run cpp to expand macros
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
$(INCDIR)inln68k.h
$(CC) -c $(DISPOPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
#$(OBJECTDIR)xc.o: $(SRCDIR)xc.i $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
# $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
# $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatms.h $(INCDIR)gc.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosret.h \
# $(INCDIR)tosfns.h $(INCDIR)inlineC.h \
# $(INCDIR)inln68k.h
# $(CC) -c $(DISPOPTFLAGS) $(SRCDIR)xc.i -o $(OBJECTDIR)xc.o

View File

@@ -1,112 +0,0 @@
#
#************************************************************************/
#* */
#* (C) Copyright 1991 Venue. All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#* The contents of this file are proprietary information */
#* belonging to Venue, and are provided to you under license. */
#* They may not be further distributed or disclosed to third */
#* parties without the specific permission of Venue. */
#* */
#************************************************************************/
# Options for SGI Indigo under IRIX operating system, X windows.
ANSICC = gcc
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
OLDXFILES = $(OBJECTDIR)XClose.o \
$(OBJECTDIR)Cursor.o \
$(OBJECTDIR)XWindow.o \
$(OBJECTDIR)DoRing.o \
$(OBJECTDIR)DoScroll.o \
$(OBJECTDIR)XEvent.o \
$(OBJECTDIR)XGravity.o \
$(OBJECTDIR)XInit.o \
$(OBJECTDIR)Xevinit.o \
$(OBJECTDIR)Xkbdmus.o \
$(OBJECTDIR)Xlspwin.o \
$(OBJECTDIR)Xbbt.o \
$(OBJECTDIR)Xkbd.o \
$(OBJECTDIR)Xmkicon.o \
$(OBJECTDIR)Xopendsp.o \
$(OBJECTDIR)Xrdopt.o \
$(OBJECTDIR)Xreconf.o \
$(OBJECTDIR)XScroll.o \
$(OBJECTDIR)Xscrolb.o \
$(OBJECTDIR)XCursor.o \
$(OBJECTDIR)XMouse.o \
$(OBJECTDIR)Xsubwin.o \
$(OBJECTDIR)Xcolor.o \
$(OBJECTDIR)Xwinman.o
LPFILES = $(OBJECTDIR)lpmain.o \
$(OBJECTDIR)lpread.o \
$(OBJECTDIR)lpsolve.o \
$(OBJECTDIR)lpkit.o
# $(OBJECTDIR)lptran.o \
# $(OBJECTDIR)lpdual.o \
# $(OBJECTDIR)lpwrite.o
XVERSION = XV11R4
XFLAGS = -DXWINDOW -D$(XVERSION)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O2 -Olimit 1600
OPTFLAGS = -O2 -Olimit 1600
ANSIOPTFLAGS = -O4
DISPOPTFLAGS = -O2 -Olimit 1600
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DAIX -DFORKCOMM -DLOGINT $(XFLAGS)\
-D_IEEE -DINDIGO -DSYSVONLY -DNOETHER -DNOPIXRECT -DSYSVSIGNALS -DNOFORN \
-DNOASM -DBIGATOMS -DLPSOLVE -DNOVERSION -DBIGVM -DNEWCDRCODING
LDFLAGS = -L/usr/lib/X11R4 -L/d/scsistr2/guest/gcc2 -lX11 -ll -lm -ly -lsun
LDELDFLAGS = $(LDFLAGS)
# -Dsparc?
CC = cc
RANLIB = touch
MAIN = main
INLINE =
BITBLTFILE =
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether
# Special rules to create xc.c on HP/Apollo Series 700 or 800
#run cpp to expand macros
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h \
$(INCDIR)inln68k.h
$(CC) -c $(DISPOPTFLAGS) $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.o
#$(OBJECTDIR)xc.o: $(SRCDIR)xc.i $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
# $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
# $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatms.h $(INCDIR)gc.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosret.h \
# $(INCDIR)tosfns.h $(INCDIR)inlineC.h \
# $(INCDIR)inln68k.h
# $(CC) -c $(DISPOPTFLAGS) $(SRCDIR)xc.i -o $(OBJECTDIR)xc.o

View File

@@ -0,0 +1,25 @@
# Options for Linux, Intel 386/486 and SDL
CC = gcc -m32 $(GCC_CFLAGS)
# CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in XFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in XFLAGS and -lSDL3 in LDFLAGS
#
XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

90
bin/makefile-linux.386-x Executable file → Normal file
View File

@@ -1,6 +1,7 @@
# Options for Linux, Intel 386/486 and X-Window
CC = gcc
CC = gcc -m32 $(GCC_CFLAGS)
# CC = clang -m32 $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
@@ -12,92 +13,15 @@ XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
XVERSION = XV11R4
XFLAGS = -DXWINDOW -DNOPIXRECT -D$(XVERSION) # $(CLXFLAGS)
# This is to make the %$#@! Apollo cc happy
OEXT = .o
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DISPOPTFLAGS = -O2 -g3
FPFLAGS =
DFLAGS = -DFSERROR -DNEW_STORAGE -DLINUX -DAIX -DOLD_CURSOR -DUSETERMIOS \
-DBYTESWAP -DFORKCOMM -DNOFORN -DLOGINT $(XFLAGS) \
-DRELEASE=351 -D__USE_BSD
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lcrypt
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lcrypt
INLINE = # $(SRCDIR)dspSPARC.il
BITBLTFILE = # $(OBJECTDIR)bbtSPARC.o
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde
# Special rules to create xc.c on Sun4
#run cpp to expand macros
#$(OBJECTDIR)xc.i: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h $(INCDIR)address.h \
# $(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
# $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
# $(INCDIR)initatms.h $(INCDIR)gc.h \
# $(INCDIR)arith.h $(INCDIR)stream.h \
# $(INCDIR)tos1defs.h $(INCDIR)tosret.h \
# $(INCDIR)tosfns.h $(INCDIR)inlineC.h \
# $(INCDIR)inln68k.h
# cc -Qproduce .i $(DFLAGS) -I$(INCDIR) $(SRCDIR)xc.c -o $(OBJECTDIR)xc.i
#run c compiler to produce first pass assembly
$(OBJECTDIR)xc.s1: $(OBJECTDIR)xc.i
rm -f $(OBJECTDIR)xc.s1
/lib/ccom - $(FPFLAGS) <$(OBJECTDIR)xc.i >$(OBJECTDIR)xc.s1
#generate C program to remove dispatch loop, optimize
$(OBJECTDIR)dsphack.c: $(SRCDIR)dsphack.lex
rm -f $(OBJECTDIR)dsphack.c
lex -t $(SRCDIR)dsphack.lex > $(OBJECTDIR)dsphack.c
#uses this program to find dispatch
$(OBJECTDIR)find-dsp.c: $(SRCDIR)find-dsp.lex
rm -f $(OBJECTDIR)find-dsp.c
lex -t $(SRCDIR)find-dsp.lex > $(OBJECTDIR)find-dsp.c
$(OBJECTDIR)find-dsp: $(OBJECTDIR)find-dsp.c
cc -o $(OBJECTDIR)find-dsp $(OBJECTDIR)find-dsp.c -ll
$(OBJECTDIR)dispatch-label.c: $(OBJECTDIR)find-dsp $(OBJECTDIR)xc.s1
rm -f $(OBJECTDIR)dispatch-label.c
$(OBJECTDIR)find-dsp < $(OBJECTDIR)xc.s1 >$(OBJECTDIR)dispatch-label.c
$(OBJECTDIR)dsphack: $(OBJECTDIR)dsphack.c $(OBJECTDIR)dispatch-label.c
cc -o $(OBJECTDIR)dsphack $(OBJECTDIR)dispatch-label.c $(OBJECTDIR)dsphack.c -ll
rm -f $(OBJECTDIR)dispatch-label.o $(OBJECTDIR)dsphack.o
$(OBJECTDIR)xc.s2: $(OBJECTDIR)xc.s1 $(OBJECTDIR)dsphack
rm -f $(OBJECTDIR)xc.s2
$(OBJECTDIR)dsphack < $(OBJECTDIR)xc.s1 >$(OBJECTDIR)xc.s2
$(OBJECTDIR)xc.s3: $(OBJECTDIR)xc.s2 $(INLINE)
rm -f $(OBJECTDIR)xc.s3
/usr/lib/inline -i $(INLINE) < $(OBJECTDIR)xc.s2 > $(OBJECTDIR)xc.s3
#$(OBJECTDIR)xc.o: $(OBJECTDIR)xc.s3
# /bin/as -o $(OBJECTDIR)xc.o -O1 $(OBJECTDIR)xc.s3
############
#
# SPECIAL xc.o for debugging
#
############
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \
$(INCDIR)address.h \
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
$(INCDIR)initatms.h $(INCDIR)gc.h \
$(INCDIR)arith.h $(INCDIR)stream.h \
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
$(CC) $(DISPRFLAGS) -UOPDISP $(SRCDIR)xc.c -I$(INCDIR) -o $(OBJECTDIR)xc.o
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -0,0 +1,25 @@
# Options for Linux, ARM64 and SDL
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

Some files were not shown because too many files have changed in this diff Show More