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

788 Commits

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