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

455 Commits

Author SHA1 Message Date
Nick Briggs
081e2288ff
Enable X mouse buttons 6 and 7 for horizontal scrolling. (#367) 2021-03-29 14:03:14 -07:00
Nick Briggs
c4873d0ff8
Improvements to package/atom access in the sysout from maiko C code (#372)
* Display atom name in error message if get_package_atom() fails

* Various fixes to package/atom handling in testtool.c

Remove S_TOPVAL and S_MAKEATOM which only existed to deal with an old issue
with dbx where you supposedly couldn't enter a string with "\" in it.

Remove countchar(), which is functionally identical to  strlen(), and adjust
code that used it.

Adjust return type of MAKEATOM() to be the LispPTR that it should be, instead of int.

Limit find_package_from_name() to examining only the number of entries that are
present in the *PACKAGE-FROM-INDEX* array, instead of walking off the end.

MakeAtom68k() now drops into uraid() if asked to look up an atom that does not exist
(Make... is a misnomer, it will never *make* the atom, only lookup an existing
one)
2021-03-29 14:01:10 -07:00
Nick Briggs
01a8948a7d
Rename _curXXX structures to curXXX to avoid leading underscore (#376) 2021-03-29 12:34:32 -07:00
Nick Briggs
36ccd9a5f5
warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] (#374)
Except where the expansion would be syntactically invalid,
for example "goto macroarg;" detection of which is a bug in clang-tidy,
so warn it off with a NOLINT...(bugprone-macro-parentheses)
2021-03-20 16:31:23 -07:00
Nick Briggs
be4d4c771e
Fix printf format warnings in testtool.c (#369)
Conversion of PC output from octal to hexadecimal will be handled separately as there are multiple places that this change needs to take place.
2021-03-18 15:40:02 -07:00
Nick Briggs
c6a74b2516
XrmParseCommand and XrmMergeDatabases depend on destination database being initialized. (#366) 2021-02-23 01:45:43 +00:00
Bruce Mitchener
d8e063bf02
tidy: Remove last caddr_t. (#365)
This cast isn't needed here and `caddr_t` is obsolete / not POSIX.
2021-02-22 09:45:07 -08:00
Bruce Mitchener
0129b50127
tidy: xrdopt. (#364)
* Remove unused `print_lispusage()`.
* Make some globals into function locals.
* Make the options table into a `static`. It can't be `const`
  because `XrmParseCommand` wants a mutable pointer.
* Remove unused `homeDB`.
* Stop using `caddr_t`, use `XPointer`. `caddr_t` is not POSIX
  and never made it past old obsolete BSD code.
2021-02-22 09:44:43 -08:00
Bruce Mitchener
a64a06466c
tidy: initdsp: Remove some unused globals. (#363) 2021-02-22 09:44:21 -08:00
Bruce Mitchener
ddb1c9f717 tidy: FindAvailablePty.
* Remove unused `Master` argument.
* Update documentation.
* Remove unused `MasterFD` variable in caller.
* Remove `slot` variable in caller and use `Master` in each case.
* Make `FindAvailablePty` a static function.
2021-02-22 11:54:51 +07:00
Nick Briggs
31927cd255
Clean up missing include file when compiling for INIT (#359)
* Compiling for INIT requires an extra include file vs normal.

* Compiling for INIT often includes tracing which also requires additional includes
2021-02-17 11:35:33 -08:00
Nick Briggs
1043a80d1f
Remove unnecessary (re)definitions of TRUE/FALSE (#356) 2021-02-14 16:47:04 -08:00
Nick Briggs
c60b522012
Files should explicitly include the definitions they directly depend on (#355)
... start by fixing the include files and the fallout in C source from
removing includes not directly needed by headers that previously included
them.
2021-02-13 21:41:31 -08:00
Nick Briggs
f019d3ddc2
Compiling with ethernet support requires etherdefs.h in certain places (#354) 2021-02-13 17:22:27 -08:00
Bruce Mitchener
64957b508d
Fix some unused variable warnings. (#352)
Also removes a prototype that wasn't needed.
2021-02-13 09:14:12 -08:00
Nick Briggs
1116ee7b60
Fix missing includes in ldeether.c (#351) 2021-02-13 09:07:21 -08:00
Nick Briggs
3a55f1d132
Missing include of sys/select.h in tty.c (closes Interlisp/medley#186) (#353)
(fix confirmed by original issue reporter)
2021-02-13 16:41:20 +00:00
Nick Briggs
f2ac050e8e
Prevent duplicate printing of info lines in response to -info option (#349)
The X options parser printed the info lines as well as the main options handler.
Add mention of the -info option in the -help usage information.

Fixes Interlisp/medley#41
2021-02-12 08:06:43 -08:00
Nick Briggs
0d7dcc24bd Minor formatting revisions. 2021-02-11 23:35:38 -08:00
Nick Briggs
2a71f330b5 Allocate fptovp table from heap and release it when done 2021-02-11 23:24:25 -08:00
Nick Briggs
1fc0d28167
Fix extra semicolon warnings (#345)
"warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning" [-Wextra-semi-stmt]
occurred 254 times in xc.c when warnings were turned up.

Review this commit with "git diff -w ..." to make it easier to see changes other than indentation caused by
the addition of do { ... } while (0) around many macro definition bodies.
2021-02-10 20:33:54 -08:00
Nick Briggs
c9a0d441c4
Cleanup timer leftovers (#341)
* Remove unnecessary variables and calls during itimer setup.

* Variable referenced from signal handler should be volatile and sig_atomic_t
2021-02-10 13:58:40 -08:00
Bruce Mitchener
015972c05c
Remove Cldeetr.c. (#340)
This was like `ldeether`, but for SunOS4 with a color display. It
isn't needed any longer as on Solaris, we have `ldeether`, no color
display, and that code already works, unlike this one.
2021-02-09 23:14:51 -08:00
Bruce Mitchener
b21aeecf4c
Remove cdrom&cdaudio support code. (#339)
This is not used in Medley (the MISCN-TABLE-LIST doesn't include
the required constants), nor does anything use or reference this
code. It also won't compile as it needs some routines that are
missing from our code.
2021-02-09 20:38:08 -08:00
Bruce Mitchener
78943073c3
Favor C99 inline over __inline__. (#337) 2021-02-08 19:11:31 -08:00
Nick Briggs
2aacca596b
Fix the unixfork/unixcomm code to deal with pid over 65535 (#333)
* ForkUnixShell() can be a static procedure

* Restructure SAFEREAD() to be a little clearer

* Convert unixjob type field defines to an enum and fix related unhandled switch cases.

* Use local declaration of loop variables in for-loop, removing register attributes

* Restructure SAFEREAD() to be a little clearer

* Send and receive 2 additional bytes for pid.

* Prefer standard C99 "inline" over "__inline__" for SAFEREAD
2021-02-08 18:26:56 -08:00
Bruce Mitchener
f0a53302ce
Fix compilation with MAIKO_HANDLE_CONSOLE_MESSAGES. (#332)
* Switch from sgtty over to termios. All of the various
  separate values that were copied individually before
  can now be done at once.
* Fix compilation error with missing `&`.
* Fix compilation error with missing return value.

I haven't tested that this works as I don't know how to do that,
but at least it compiles now.
2021-02-01 06:42:39 +00:00
Bruce Mitchener
275c5b9c13
Clean up MAIKO_HANDLE_CONSOLE_MESSAGES some. (#331)
* `LOGINT` is only useful when `MAIKO_HANDLE_CONSOLE_MESSAGES`
  is set.
* Only define some variables if `MAIKO_HANDLE_CONSOLE_MESSAGES`
  is set. Flag them as static.
* Remove setting `LOGINT` from the build system as it isn't
  needed because we aren't handling console messages.
2021-01-31 21:22:13 -08:00
Bruce Mitchener
70db63449c
Remove support for the Sun386i. (#329)
This was a machine running SunOS 4, which we no longer support.

It had an odd display controller and a compiler with issues that
required workarounds. Those compiler issues aren't an issue in
today's world, so we don't need to keep the workarounds present
for reference.

It had a bit of inline assembly, but that is still present in
other files for other platforms.
2021-01-31 04:02:40 +00:00
Nick Briggs
1f17665741
Fix off-by-one error in clipping_Xbitblt (#327)
The LowerRightX and LowerRightY were calculated as the X and Y coordinates of the
pixel to the right and below the last visible pixel, but are compared with the
last actually visible pixel in the source. They need an extra -1 offset to correct.

Add comments to explain what's going on.  Fix the signature of the function to reflect
that the "dummy" passed for the display region is a pointer not an integer.
2021-01-30 19:03:17 -08:00
Nick Briggs
3764acda85
The MISC7 (FBITMAPBIT) opcode should flush the correct bits to the display (#328)
The MISC7 opcode was not accounting for the offset from the base when
calculating which (16-bit) word should be flushed to the actual display.
2021-01-30 18:42:47 -08:00
Nick Briggs
88cf76e18b
Remove redundant calls to XFlush (#325)
Calls to flush_display_region() are responsible for calling XFlush()
and it is pointless to follow them up with another call.
2021-01-30 18:25:58 -08:00
Nick Briggs
fd19d5273e
Fix missing initialization in int_panic_init() (#324)
panic_action.sa_mask and .sa_flags initialized twice, corresponding fields
in ignore_action not initialized.
2021-01-30 18:11:30 -08:00
Bruce Mitchener
b09663b3e9
Inline swapx and byte_swap_word. (#323)
This lets us remove `SWAP_WORDS` and some bits of assembly.
2021-01-29 23:18:09 -08:00
Bruce Mitchener
0480fee86c
Move opcode_table into read-only storage. (#322) 2021-01-29 22:46:24 -08:00
Bruce Mitchener
40aa5d392d
Remove SwitchDisplay and colordsp. (#317) 2021-01-29 19:56:07 -08:00
Bruce Mitchener
0efeedd6d3
Remove AIX define from Linux, Cygwin, Solaris, OpenBSD. (#320) 2021-01-28 23:04:57 -08:00
Bruce Mitchener
805cb86a06
Remove Bitmap_Pad global. (#318)
Since this is just being used for a 0 value, just use `0`.
2021-01-28 22:52:51 -08:00
Bruce Mitchener
fd62c9ab3a
Remove cursor_source_gc. (#319)
This was only used in commented out code, which is now removed
as well. In that code, it was used to set the function to `GXcopy`,
but it would already have been that as that's the only thing
we set function to.

This also lets us remove the `gcv` code in `xcursor.c`, since
we no longer need those values there.
2021-01-29 06:47:45 +00:00
Bruce Mitchener
405b55509e
mnwevent: Fix copy/paste error in log message. (#316)
This gets it out of search results when looking for getXsignaldata.
2021-01-28 10:21:03 -08:00
Bruce Mitchener
2e83d8e619
Improve tty.c, fix compilation on Cygwin. (#314)
`EXTA` and `PENDIN` are not POSIX, so let's not use them.

Make notes that the baud rate constant mapping comes from DLTTY
and add comments explaining the holes.
2021-01-28 10:20:45 -08:00
Bruce Mitchener
9cac72771f
Remove various unused externs. (#315)
* `cursor_mask_gc` is removed as it isn't used anywhere.
* `IconPixmap` is made into a static in `xmkicon.c` rather than
  being defined in `xlspwin.c`.
2021-01-28 18:11:46 +00:00
Nick Briggs
c054be07ef
Make (another) mask_array const. (#307) 2021-01-27 09:17:47 -08:00
Nick Briggs
100248e7a7
Make the table for reversing bits const (#306) 2021-01-26 20:40:15 -08:00
Nick Briggs
f7113d53ee
Remove provision for offline assembler peephole optimizations on SunOS3/4 (#304)
We no longer need to run a separate peephole optimization pass over the
compiler generated or hand-coded assembler for SunOS3 and SunOS4 on 68K or SPARC

We remove the preprocessor symbols and code controlled by them
	SUN4_OS4_IL
	SUN3_OS3_IL
	SUN3_OS4_IL
and	SUN3_OS3_OR_OS4_IL
2021-01-26 16:44:40 -08:00
Bruce Mitchener
eba664771a
Fix tty.c to compile. (#180)
This removes a bit of the debug info printing, but other than
that, is pretty close to what it was before.

We also now build it in both the make and cmake build systems.
2021-01-26 17:42:17 +00:00
Nick Briggs
9ca86a662f
Remove the check_unix_password functionality from uutils.c (#297)
This code has not worked for a long time.  Most systems now maintain
the password entries so that a password is not accessible through the
getpwent() interface.  The SUBR that calls this interface may be
removed at a future time.
2021-01-25 21:53:36 -08:00
Bruce Mitchener
91ef549b15
Remove some unused DOS defines and variables. (#301) 2021-01-25 21:38:51 -08:00
Bruce Mitchener
f75318cd8c
Move n_mask_array to read-only storage. (#300) 2021-01-25 21:10:04 -08:00
Bruce Mitchener
5b0d3f8cb5
Use FD_CLR when disabling keyboard for SUNDISPLAY. (#299)
In the old code (prior to b234064d), this was:

```
   LispReadFds &= ~(1 << LispWindowFd);
```

This was inadvertently converted to `FD_SET`, but should have
been `FD_CLR`.
2021-01-25 21:05:42 -08:00