1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-15 07:54:13 +00: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
2022-10-11 14:21:55 -07:00
2022-10-11 14:21:55 -07:00
2020-12-29 11:00:24 -08:00

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 with Lisp for access to display (via X11) and disk etc.

For an overview, see Medley Interlisp Introduction.

See the Medley repository for

Bug reports, feature requests, fixes and improvements, support for additional platforms and hardware are all welcome.

Development Platforms

We are developing on FreeBSD, Linux, MacOS, and Solaris currently on arm7l, arm64, PowerPC, SPARC, i386, and x86_64 hardware.

Building Maiko

Building requires clang, make, X11 client libraries (libx11-dev). For example,

$ 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 using 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 for clang and uncomment the line (delete the #) for the line that defines CC for gcc.
  • There is a cmake configuration (TBD To Be Described here).

Building For MacOS

  • Running on MacOS requires an X server, and building on a Mac requires X client libraries. An X-server for MacOS (and X11 client libraries) can be freely obtained at https://www.xquartz.org/releases

Building for Windows 10

Windows 10 currently requires "Docker for Desktop" or WSL2 and a (Windows X-server). See Medley's README for more.

Languages
C 95.6%
Assembly 3.4%
CMake 0.5%
Shell 0.3%
sed 0.2%