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

331 Commits

Author SHA1 Message Date
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
56e7591ada Although an unlikely case, LispNumToCInt() should handle negative SmallP numbers correctly 2023-11-17 13:11:11 -08:00
Nick Briggs
09fae0a3f5 Add file name and line number to debug print output. 2023-11-17 09:41:37 -08:00
Hayley Patton
79a788279b Add Emscripten/WASM support 2023-11-13 15:18:49 +11: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
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
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
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
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
5bd9de5e36 Suppress empty-statement warning for XLOCK/XUNLOCK macro when not doing locking 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
Bruce Mitchener
97bf4961ba
Remove unused struct lbits / LBITS. (#458) 2023-02-26 11:31:44 -08:00
Peter
0e731ce02d Cache cursors for SDL. 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
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
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
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
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
d5490ed807 Rearrange/resize FINFO and FPROP structures to avoid compiler added padding 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
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
6fdb54f2c8 Minor cleanup of some casts. 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
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
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
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
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
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
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
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
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
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