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

954 Commits

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