Daniel White [Mon, 2 Jan 2017 14:20:21 +0000 (23:50 +0930)]
Fix deinstall of multiplexer when a default exists.
This copes with a somewhat subtle case where a default exists but the
last generator is removed. By inverting the checks, we can ensure we
only look at the cdr of the generator list when generators is actually a
pair.
The bug was originally exhibited by an error when removing the last
generator with remove-generic-procedure-generator on a generic procedure
with a default generator.
Matt Birkholz [Wed, 23 Nov 2016 17:38:21 +0000 (10:38 -0700)]
microcode (OS_test_select_registry): Check for subprocess status
changes when !blockp and the registry is empty. This is most easily
done in OS_pause, where OS_process_any_status_change (if any) is
available. Thus OS_pause gets a new param BLOCKP.
Matt Birkholz [Thu, 17 Nov 2016 22:12:20 +0000 (15:12 -0700)]
runtime/thread.scm (handle-current-thread-events): Do not warn...
...on stderr when there is no current thread. Handle-current-thread-
events is only used by the after-gc-interrupt-handler, which may run
while there is no current thread.
Matt Birkholz [Thu, 10 Nov 2016 00:15:36 +0000 (17:15 -0700)]
Search the library directory path for the standard library directory
containing lib/ and the built-in object files. Adjust pathname->
standard-uri and standard-uri->pathname to use this directory instead
of the first directory in the path.
When plugins used --prepend-library to test a shared object, C worlds
failed. They could not re-load registered object files, nor load
bundled options. The guarded-system-loader only looked in the first
directory in the path, not the standard library directory.
The busy loop in the keyboard peek-no-hang operation is more expensive
than ever. Replace it with a timer in block-for-event. Cache
current-thread and check that it has not changed before deregistering.
Matt Birkholz [Sun, 31 Jul 2016 18:56:31 +0000 (11:56 -0700)]
x11-screen: Fix selection handling (cut/paste between X windows).
Cut/paste should now work with two minor fixes (typos, really), and
one kludge keeping non-unique alien objects in a weak-eq-hash-table.
The original xds (fixnums) are held as strongly as the new interned
symbols.
The xds were intended to be x-displays? Interned x-display objects
would be more appropriate keys for a weak-eq-hash-table.
Matt Birkholz [Fri, 29 Jul 2016 06:16:06 +0000 (23:16 -0700)]
x11: Fix x-display-process-events to return #f when all events read.
The plugin's version of x_display_process_events will return any
keypress even though some do not translate into any input (e.g. when
it IsModifier). X-display-process-events would return #f in that case
and preview-events think all events were read. Now x-display-process-
events returns #t and preview-events disregards it, continuing to read
events. Many callers must disregard these non-events.
Punt property-notify events in the previewer; do not queue them.
Matt Birkholz [Tue, 26 Jul 2016 22:02:26 +0000 (15:02 -0700)]
Restore interruptibility to Edwin commands when on an X display.
Commit 52eea88 (Do NOT use permanently-register-io-thread-event in
Edwin.) removed too much. Without an IO thread event registered to
preview X events, Edwin cannot be interrupted by a ^G key press.
Restore X event previewing using a custom, "permanently" registered IO
thread event that always consumes some input before re-registering
(i.e. withOUT the reading-event? variable that caused the spinning
previously). Now X events are read only in the previewer (and
wait-for-event). Keyboard operations only process queued events. And
the queue is used only by the previewer or with thread events (the
previewer) blocked.
Remove deregister-all-events from cmdl/start so that the "non-
permanent" IO thread event registered by the grab-editor wrapper is
not undone when the editor command level is started. Reversing the
order ("grab" the editor INSIDE the command level) makes the wrapper's
special operations unavailable when the command level is made. If
there is need for the aggressive decoupling of command levels as
rendered by deregister-all-events (which nevertheless did NOT remove
"permanent" IO event registrations), some mechanism will be needed to
set up the previewer after the command level is entered.
Matt Birkholz [Tue, 7 Jun 2016 22:10:58 +0000 (15:10 -0700)]
x11/x11base.scm: Fix argument checking in x-get-window-property, ...
... x-change-property, x-delete-property and x-select-input. Add
similar checking to x-set-select-owner, x-convert-selection, and
x-send-selection-notify.
Matt Birkholz [Fri, 27 May 2016 01:32:06 +0000 (18:32 -0700)]
New plugins x11 and x11-screen, to replace the x11 μmodule.
The "new" code is a translation of the x11 μmodule and associated
runtime Scheme code. The C code consing Scheme objects was translated
into Scheme/FFI code parsing C data. This removed the Scheme-specific
C code except for many calls to error_external_return, which are now
error status returns. Most of the error checking is intact. All C
data structures used by Scheme are protected from leaking by "GC
cleanups".
Matt Birkholz [Wed, 25 May 2016 22:09:45 +0000 (15:09 -0700)]
runtime/option.scm (library-file?): Search for the .scm file.
Library-file? is applied to optiondb pathnames with no type, but
system-library-pathname only searches for a matching type. Add a
"scm" type when searching the path and strip it again when looking for
a loadable.
Matt Birkholz [Fri, 29 Apr 2016 18:38:21 +0000 (11:38 -0700)]
runtime/ffi.scm: Avoid swapping threads during callbacks.
Block thread events during callouts.
Replace the callback error restart with an error handler that just
returns 0 from the callback. Until the debugger can run without-
interrupts (blocking for console IO instead of suspending for an IO
thread event) it may not run during a callback.
Chris Hanson [Sat, 23 Apr 2016 02:53:51 +0000 (19:53 -0700)]
Refactor merge-uris to simplify.
No longer requires an absolute base URI or defaults.
Returns an absolute URI if either base URI or defaults are absolute.
Otherwise returns a relative URI.
Matt Birkholz [Mon, 11 Apr 2016 15:53:58 +0000 (08:53 -0700)]
plugin Makefile.ams (tags): Punt ALL sources in TAGS.
Putting ALL Scheme source in TAGS allows tags-query-replace to find
all references, but drives etags a bit batty. M-x grep is more all-
inclusive anyway (e.g. finding references in documentation).
Matt Birkholz [Mon, 11 Apr 2016 04:19:44 +0000 (21:19 -0700)]
plugin Makefile.ams (dist): Add missing files to EXTRA_DIST.
Fix ./fix-tags.sh to take the package name as an argument, to support
building the dist in strangely named directories like mit-scheme-
blowfish-0.1/. Add a missing dependency of stamp-scheme on the .pkg
file.