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

1065 Commits

Author SHA1 Message Date
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
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