mit-scheme.git
13 years agoMerge branch 'Gtk' into Gtk-Screen
Matt Birkholz [Thu, 9 Jun 2011 17:16:02 +0000 (10:16 -0700)]
Merge branch 'Gtk' into Gtk-Screen

13 years agoMerge branch 'master' into Gtk
Matt Birkholz [Thu, 9 Jun 2011 17:15:43 +0000 (10:15 -0700)]
Merge branch 'master' into Gtk

13 years agoOmit some vestiges in nntp.scm.
Taylor R Campbell [Wed, 8 Jun 2011 18:23:31 +0000 (18:23 +0000)]
Omit some vestiges in nntp.scm.

13 years agoFix order of arguments to HASH-TABLE/MODIFY!.
Taylor R Campbell [Wed, 8 Jun 2011 18:21:07 +0000 (18:21 +0000)]
Fix order of arguments to HASH-TABLE/MODIFY!.

With any luck, nobody was using this except me outside the tree.
And it's not documented, so that nobody character will get what he
deserves.

Before:

   (hash-table/modify! hash-table key
     (lambda ()
       ...
         a gigantic
         heffable hoary herralump of
         an expression
       ...)
     tiny)

After:

   (hash-table/modify! hash-table key tiny
     (lambda ()
       ...
         a gigantic
         heffable hoary herralump of
         an expression
       ...))

13 years agoKludge up wrong-number-of-arguments error parsing for entities.
Taylor R Campbell [Wed, 8 Jun 2011 17:15:40 +0000 (17:15 +0000)]
Kludge up wrong-number-of-arguments error parsing for entities.

Before:

   (min)
   ;The procedure #[compiled-procedure 11 (min "arith" #x16) #x1b1a #x1c8ac2] has been called with 1 argument; it requires at least 2 arguments.

After:

   (min)
   ;The procedure #[arity-dispatched-procedure 11 min] has been called with 0 arguments; it requires at least 1 argument.

Screw cases be damned.

13 years agoFix up bit-indexed integer operations.
Taylor R Campbell [Wed, 8 Jun 2011 15:55:09 +0000 (15:55 +0000)]
Fix up bit-indexed integer operations.

. Fix sense of BIT-SET?.
. Add BIT-CLEAR?, for symmetry.
. Export forgotten TOGGLE-BIT.
. Add some tests for these operations.

13 years agoFix unused binding of 'geom in make-gtk-screen.
Matt Birkholz [Tue, 7 Jun 2011 14:24:41 +0000 (07:24 -0700)]
Fix unused binding of 'geom in make-gtk-screen.

13 years agoMerge branch 'Gtk' into Gtk-Screen
Matt Birkholz [Tue, 7 Jun 2011 14:22:24 +0000 (07:22 -0700)]
Merge branch 'Gtk' into Gtk-Screen

13 years agoRecognize GDK_MOD1_ as the char-bit:meta.
Matt Birkholz [Tue, 7 Jun 2011 14:22:06 +0000 (07:22 -0700)]
Recognize GDK_MOD1_ as the char-bit:meta.

13 years agoMerge branch 'Gtk' into Gtk-Screen
Matt Birkholz [Mon, 6 Jun 2011 15:07:13 +0000 (08:07 -0700)]
Merge branch 'Gtk' into Gtk-Screen

13 years agoTrigger-secondary-gc-daemons! every 100 GCs or so.
Matt Birkholz [Mon, 6 Jun 2011 15:06:58 +0000 (08:06 -0700)]
Trigger-secondary-gc-daemons! every 100 GCs or so.

13 years agoMerge branch 'Gtk' into Gtk-Screen
Matt Birkholz [Mon, 6 Jun 2011 03:45:52 +0000 (20:45 -0700)]
Merge branch 'Gtk' into Gtk-Screen

13 years agoGenericize gdk keysyms; match Edwin's expectations.
Matt Birkholz [Sun, 5 Jun 2011 15:11:39 +0000 (08:11 -0700)]
Genericize gdk keysyms; match Edwin's expectations.

13 years agoFix install; copy make.scm, not load.scm
Matt Birkholz [Fri, 3 Jun 2011 18:42:38 +0000 (11:42 -0700)]
Fix install; copy make.scm, not load.scm

13 years agoReplace .sf and .cbf with compile.scm.
Matt Birkholz [Fri, 3 Jun 2011 00:07:55 +0000 (17:07 -0700)]
Replace .sf and .cbf with compile.scm.

13 years agoAdded src/gtk-screen/.
Matt Birkholz [Mon, 17 Jan 2011 09:17:43 +0000 (02:17 -0700)]
Added src/gtk-screen/.

* src/Setup.sh: Added gtk-screen to INSTALLED_SUBDIRS.  Added symlink
for lib/gtk-screen.

* src/TAGS: Added gtk-screen/TAGS.

* src/configure.ac: Added gtk-screen/Makefile, conditionally.  Added
gtk-screen to FFIS only because it depends on one.

* src/etc/create-makefiles.sh: Added gtk-screen to BUNDLES.

* src/etc/optiondb.scm: Added option GTK-SCREEN.

* src/gtk-screen/: Makefile-fragment, ed-ffi.scm, gtk-screen-new.pkg,
gtk-screen.cbf, gtk-screen.pkg, gtk-screen.scm, gtk-screen.sf,
make.scm: All new.

13 years agoFixed sit-for on gtk-screens using peek timeout.
Matt Birkholz [Mon, 17 Jan 2011 19:19:12 +0000 (12:19 -0700)]
Fixed sit-for on gtk-screens using peek timeout.

* src/edwin/input.scm (keyboard-peek-no-hang)
(handle-simple-events-until): Added optional "timeout" argument,
implemented with the new handle-simple-events-until procedure.  Pull
the simple event handling out of handle-simple-events' loop to create
simple-event-handled?, and used it to implement
handle-simple-events-until.

* src/edwin/simple.scm (sit-for): Get screens up-to-date first, even
with input pending(?).  Replaced busy loop with optional timeout
argument to keyboard-peek-no-hang.  This processes simple events,
which call update-screens! as necessary.

13 years agoEditor-peek-no-hang timeout. Inferior event hooks.
Matt Birkholz [Mon, 17 Jan 2011 08:56:12 +0000 (01:56 -0700)]
Editor-peek-no-hang timeout.  Inferior event hooks.

Moved the busy-wait loop in keyboard-read-1 into each editor-peek-no-
hang method.  The gtk-screen method can then provide a version that
blocks for the specified timeout.

Added hooks to be called when inferior threads and processes are ready
with input events.

* src/edwin/bufwin.scm: Moved generalization of buffer-window/redraw!
into %clear-window-incremental-redisplay-state! -- the only part not
useful to a gtk-screen.  Genericized it by doing nothing for gtk
screens.

* src/edwin/editor.scm (hook/signal-inferior-thread-output!): Added
this hook so that gtk-screen can get inferior threads to signal the
editor thread with an event other than #f.  The tty screens' innermost
editor mainloops test the inferior-thread-changes? flag and return an
input event; they just need a wake-up.  The gtk-screen substitutes a
procedure that directly queues the input event and thus wakes the
editor thread.

* src/edwin/image.scm (group-line-image!, substring-line-image!): New,
for parsing and imaging lines in one step.

* src/edwin/: edwin.pkg, input.scm (keyboard-peek-busy-no-hang): New.
The common, busy-waiting implementation of peek-no-hang, used in the
various tty screens.

(keyboard-peek-no-hang): The editor-peek-no-hang method now requires a
timeout argument.

(keyboard-read-1): Eliminate the wait loop.  Rely on the editor-peek-
no-hang methods.

* src/edwin/: os2term.scm, tterm.scm, win32.scm, xterm.scm: Use
keyboard-peek-busy-no-hang to implement a timeout argument for the
original editor-peek-no-hang method.

* src/edwin/process.scm (register-process-input): Call the new
hook/inferior-process-output whenever an inferior process goes on the
process-input-queue.  Gtk-screen uses this to queue an input event for
the editor thread, so that it will accept the (all!) inferior process
output.

13 years agoReplaced the screen struct with SOS classes.
Matt Birkholz [Mon, 17 Jan 2011 08:49:44 +0000 (01:49 -0700)]
Replaced the screen struct with SOS classes.

* src/edwin/buffrm.scm (buffer-frame-needs-redisplay?): Punted; not in
use, and the only user of buffer-window/needs-redisplay?.

* src/edwin/bufwfs.scm (draw-region!, %scroll-lines-up)
(%scroll-lines-down): Should only be used in the tty-screen-specific
output optimizer, and thus may use tty-screen-specific procedures.

* src/edwin/bufwin.scm (buffer-window:update-display!): Check that the
:update-display! message is sent to buffer-windows on tty-screens
only.

(buffer-window/direct-update!): Use the new update-screen-window!
generic procedure, which dispatches according to the screen type.
Moved the original, tty-screen-specific code to a new procedure:
update-tty-screen-window!.

(buffer-window/redraw!): Genericized; moved the tty-screen-specific
code to a new procedure, tty-screen/buffer-window/redraw!.
Non-tty-screen windows just punt.

(buffer-window/set-buffer!): Call update-modified-tick!, else
%window-modified-tick can be #f, causing %notice-window-changes to
complain.  Found when running Edwin interpretively.  The compiled code
had no problem with (fix:> (group-modified-tick group) #f)!

(update-override-string!): Use the tty-screen-specific procedure
tty-screen-get-output-line.  The screen is necessarily a tty-screen
because this procedure is only called by update-buffer-window!, which
is only called by update-tty-screen-window! and
buffer-window:update-display!.

* src/edwin/bufwiu.scm: Genericized the direct-output procedures,
moving their tty-screen-specific code to new procedures named
e.g. tty-screen/buffer-window/direct-output-insert-newline!, which can
safely call e.g. tty-screen-direct-output-move-cursor.  Other types of
screens will, probably, not support direct output.

(buffer-window/needs-redisplay?): Punted; used only by
buffer-frame-needs-redisplay?, which was punted.

* src/edwin/edtfrm.scm (set-editor-frame-size!): Conditionalized a
tiny bit of tty-screen-specific code.

* src/edwin/edwin.pkg: Include SOS.  Renamed several procedures from
screen-... to tty-screen-...  Punted screen-in-update?,
screen-needs-update? and with-screen-in-update?. The "needs-update?"
and "in-update?"  slots are now tty-screen-specific.  Export
tty-screen? for general use.  Export update-screen-window! for use by
buffer-window/direct-update!, and with-tty-screen-in-update for use by
update-tty-screen-window!.  Punted buffer-frame-needs-redisplay?.
Export update-tty-screen-window! so it can be used to implement the
tty-screen method of update-screen-window!.  The method could not be
defined directly in bufwin.scm because define-method means something
different there.

* src/edwin/edwin.sf, src/edwin/make.scm: Load option 'SOS when
syntaxing or loading.

* src/edwin/modwin.scm, src/edwin/utlwin.scm: The :update-display!
message is sent only to windows on tty-screens, so tty-screen-specific
procedures can be used.

* src/edwin/screen.scm: Replaced the screen struct with SOS classes
<screen> and <tty-screen>.  Most of its slots, related to the output
optimizer, went into <tty-screen>, and code using the old
accessor/mutator procedure names was updated.  Some uses moved to
tty-screen-specific methods of new generic procedures like
update-screen!.  Some users, e.g. terminal-output-char, obviously
assume a tty-screen argument.  Others, e.g. screen-move-cursor,
changed their names to show their tty-screen-specificity.  Thus all
users, and users of users, of tty-screen-specific code were updated.

* src/edwin/tterm.scm (scroll-draw-cost): Use tty-screen-specific
procedure tty-screen-line-draw-cost in, which is only used by
console-scroll-lines-up/down!.

13 years agoMerge remote-tracking branch 'origin/master' into Gtk
Matt Birkholz [Thu, 2 Jun 2011 17:11:25 +0000 (10:11 -0700)]
Merge remote-tracking branch 'origin/master' into Gtk

13 years agoImplement BORKED_FENV for i386.
Matt Birkholz [Thu, 2 Jun 2011 05:24:36 +0000 (22:24 -0700)]
Implement BORKED_FENV for i386.

13 years agoCall gdk_threads_enter/leave, and gtk_main.
Matt Birkholz [Thu, 2 Jun 2011 03:57:03 +0000 (20:57 -0700)]
Call gdk_threads_enter/leave, and gtk_main.

13 years agoAlienate the floenv (make it FE_DFL_ENV) outside Scheme.
Matt Birkholz [Thu, 2 Jun 2011 03:54:13 +0000 (20:54 -0700)]
Alienate the floenv (make it FE_DFL_ENV) outside Scheme.

13 years agoDig keysyms out of the C declarations.
Matt Birkholz [Tue, 31 May 2011 01:34:07 +0000 (18:34 -0700)]
Dig keysyms out of the C declarations.

13 years agoGerroff the global TRACE binding; use %trace instead.
Matt Birkholz [Tue, 31 May 2011 01:29:29 +0000 (18:29 -0700)]
Gerroff the global TRACE binding; use %trace instead.

13 years agoUse SHIM_LOADER and SHIM_LIBS in gtk-shim.so rule.
Matt Birkholz [Tue, 31 May 2011 01:23:21 +0000 (18:23 -0700)]
Use SHIM_LOADER and SHIM_LIBS in gtk-shim.so rule.

13 years agoFixed compile-system to use 'dependencies option(!).
Matt Birkholz [Tue, 31 May 2011 01:21:30 +0000 (18:21 -0700)]
Fixed compile-system to use 'dependencies option(!).

13 years agoRe-enable build-ffis; disabled in merge from master.
Matt Birkholz [Tue, 31 May 2011 01:19:09 +0000 (18:19 -0700)]
Re-enable build-ffis; disabled in merge from 

13 years agoTypo.
Matt Birkholz [Tue, 31 May 2011 01:16:24 +0000 (18:16 -0700)]
Typo.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Wed, 25 May 2011 19:54:46 +0000 (19:54 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Joe Marshall [Tue, 24 May 2011 17:15:37 +0000 (10:15 -0700)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoA small simplification.
Joe Marshall [Tue, 24 May 2011 17:15:18 +0000 (10:15 -0700)]
A small simplification.

13 years agoAvoid leaving trailing whitespace on notifications.
Joe Marshall [Tue, 24 May 2011 17:12:35 +0000 (10:12 -0700)]
Avoid leaving trailing whitespace on notifications.

13 years agoCall the procedure in HASH-TABLE/MODIFY! before blocking interrupts.
Taylor R Campbell [Mon, 23 May 2011 15:36:07 +0000 (15:36 +0000)]
Call the procedure in HASH-TABLE/MODIFY! before blocking interrupts.

Previously the interrupt mask during the call to the procedure
depended on whether there was already an entry in the table, which
is silly.

13 years agoMust disable interrupts for SET-ENTRY-DATUM!.
Taylor R Campbell [Mon, 23 May 2011 15:34:10 +0000 (15:34 +0000)]
Must disable interrupts for SET-ENTRY-DATUM!.

It would probably be better to add a DISCRETIONARY-WITH-TABLE-LOCKED
operation to the entry type abstraction, so that the overhead of
blocking interrupts would be incurred only for key&datum-ephemeral
tables, which are the only ones that need it.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Mon, 23 May 2011 14:38:48 +0000 (14:38 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoUse MAKE-STRONG-EQ-HASH-TABLE for SOS's built-in class table.
Taylor R Campbell [Sun, 22 May 2011 21:50:50 +0000 (21:50 +0000)]
Use MAKE-STRONG-EQ-HASH-TABLE for SOS's built-in class table.

Should be ephemeral of some flavour, but we can't do that yet.  See
the comments for details.

13 years agoUse MAKE-STRONG-EQV-HASH-TABLE for Swank inspector parts.
Taylor R Campbell [Sun, 22 May 2011 21:12:18 +0000 (21:12 +0000)]
Use MAKE-STRONG-EQV-HASH-TABLE for Swank inspector parts.

Don't use deprecated MAKE-EQV-HASH-TABLE.

Keys are numbers anyway, so this may as well be strong.

13 years agoMissed a spot in parse.scm: MAKE-EQV-HASH-TABLE is deprecated.
Taylor R Campbell [Sun, 22 May 2011 21:09:16 +0000 (21:09 +0000)]
Missed a spot in parse.scm: MAKE-EQV-HASH-TABLE is deprecated.

Use MAKE-STRONG-EQV-HASH-TABLE here; the keys are numbers anyway.

13 years agoFix HASH-TABLE-UPDATE!/DEFAULT to conform to silly specification.
Taylor R Campbell [Sun, 22 May 2011 20:49:50 +0000 (20:49 +0000)]
Fix HASH-TABLE-UPDATE!/DEFAULT to conform to silly specification.

Add regression tests.

I missed this when I fixed HASH-TABLE-UPDATE! a while ago.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme into Gtk
Matt Birkholz [Sun, 22 May 2011 20:45:25 +0000 (13:45 -0700)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme into Gtk

13 years agoTrying to get FFI test shim to link on Mac OS X.
Matt Birkholz [Wed, 18 May 2011 01:51:12 +0000 (18:51 -0700)]
Trying to get FFI test shim to link on Mac OS X.

Following the linking of microcode modules more closely, including
SHIM_LOADER in the prerequisites for the -shim.so, and the curiously
brief SHIM_LIBS for the LINK_SHIM commandline.  Both are from
microcode/makegen/Makefile.in.in analogs, like MODULE_LIBS.

I'm not sure that this helps the Mac OS X build at all... so I'm
leaving build-ffis (and its test) disabled.

13 years agoFix wait loop logic in synchronous subprocesses.
Taylor R Campbell [Tue, 10 May 2011 16:17:30 +0000 (16:17 +0000)]
Fix wait loop logic in synchronous subprocesses.

Previous trivial tests now pass.

13 years agoAdd some trivial synchronous subprocess tests.
Taylor R Campbell [Tue, 10 May 2011 16:14:57 +0000 (16:14 +0000)]
Add some trivial synchronous subprocess tests.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Mon, 9 May 2011 21:37:52 +0000 (21:37 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoPermit `--constant 0'.
Taylor R Campbell [Mon, 9 May 2011 21:30:19 +0000 (21:30 +0000)]
Permit `--constant 0'.

The band loader figures out the size of the constant space anyway.
Is there ever any reason to use the `--constant' option at all?

13 years agoFix whitespace.
Joe Marshall [Mon, 9 May 2011 19:49:10 +0000 (12:49 -0700)]
Fix whitespace.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Joe Marshall [Mon, 9 May 2011 19:41:54 +0000 (12:41 -0700)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoRemove overly complex code.
Joe Marshall [Mon, 9 May 2011 19:41:32 +0000 (12:41 -0700)]
Remove overly complex code.

13 years agoPrefer (NOT (PAIR? ...)) over (NULL? ...) in unxpth.scm.
Taylor R Campbell [Mon, 9 May 2011 04:14:09 +0000 (04:14 +0000)]
Prefer (NOT (PAIR? ...)) over (NULL? ...) in unxpth.scm.

13 years agoPermit consecutive slashes in Unix namestrings.
Taylor R Campbell [Mon, 9 May 2011 04:05:50 +0000 (04:05 +0000)]
Permit consecutive slashes in Unix namestrings.

POSIX sez it's kosher:

<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_266>

I don't know any Unix that treats two leading slashes differently, so
I won't reject that case.  However, maybe the pathname abstraction
needs to handle it differently if there are such Unices.

13 years agoDon't run build-ffis.
Chris Hanson [Mon, 2 May 2011 05:35:23 +0000 (22:35 -0700)]
Don't run build-ffis.

13 years agoMissed a copyright.
Chris Hanson [Mon, 2 May 2011 03:52:10 +0000 (20:52 -0700)]
Missed a copyright.

13 years agoUpdate version number.
Chris Hanson [Mon, 2 May 2011 03:51:49 +0000 (20:51 -0700)]
Update version number.

13 years agoUpdate copyright years.
Chris Hanson [Mon, 2 May 2011 01:56:20 +0000 (18:56 -0700)]
Update copyright years.

13 years agoUpdate version number.
Chris Hanson [Mon, 2 May 2011 01:49:41 +0000 (18:49 -0700)]
Update version number.

13 years agoUpdate version number.
Chris Hanson [Mon, 2 May 2011 01:49:02 +0000 (18:49 -0700)]
Update version number.

13 years agoUpdate version number.
Chris Hanson [Mon, 2 May 2011 01:46:03 +0000 (18:46 -0700)]
Update version number.

13 years agoInitial revision: imported from cph's private sources.
Chris Hanson [Mon, 2 May 2011 01:43:20 +0000 (18:43 -0700)]
Initial revision: imported from cph's private sources.

13 years agoAdd patterns for ffi documentation.
Chris Hanson [Sun, 1 May 2011 23:37:37 +0000 (16:37 -0700)]
Add patterns for ffi documentation.

13 years agoDon't run "build-ffis"; this rule is broken on Mac OS X.
Chris Hanson [Sun, 1 May 2011 09:07:36 +0000 (02:07 -0700)]
Don't run "build-ffis"; this rule is broken on Mac OS X.

13 years agoRevert misguided change.
Chris Hanson [Sun, 1 May 2011 09:03:47 +0000 (02:03 -0700)]
Revert misguided change.

13 years agoFix configure with host Scheme check disabled.
Taylor R Campbell [Sat, 30 Apr 2011 19:44:58 +0000 (19:44 +0000)]
Fix configure with host Scheme check disabled.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Sat, 30 Apr 2011 19:25:11 +0000 (19:25 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoTighten host Scheme detection in configure script.
Taylor R Campbell [Sat, 30 Apr 2011 19:20:53 +0000 (19:20 +0000)]
Tighten host Scheme detection in configure script.

Now the script requires MIT_SCHEME_EXE to work if it is set, in order
to detect early the legitimate error of setting it wrong.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme into Gtk
Matt Birkholz [Sat, 30 Apr 2011 18:32:38 +0000 (11:32 -0700)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme into Gtk

13 years agoOops, remove ALL "debugging printfs".
Matt Birkholz [Sat, 30 Apr 2011 18:20:19 +0000 (11:20 -0700)]
Oops, remove ALL "debugging printfs".

13 years agoAdded compile-time 'imports option to compile-system.
Matt Birkholz [Sat, 30 Apr 2011 17:43:16 +0000 (10:43 -0700)]
Added compile-time 'imports option to compile-system.

13 years agoCut out the SHELL middleman; use run-synchronous-subprocess.
Matt Birkholz [Sat, 30 Apr 2011 17:41:28 +0000 (10:41 -0700)]
Cut out the SHELL middleman; use run-synchronous-subprocess.

13 years agoUn-distinguish LDFLAGS et al for shims or modules.
Matt Birkholz [Sat, 30 Apr 2011 17:40:09 +0000 (10:40 -0700)]
Un-distinguish LDFLAGS et al for shims or modules.

13 years agoSuppress host Scheme test by default only if lib/all.com exists.
Taylor R Campbell [Sat, 30 Apr 2011 15:37:15 +0000 (15:37 +0000)]
Suppress host Scheme test by default only if lib/all.com exists.

13 years agoMake configure fail if create-makefiles or compiler/configure fails.
Taylor R Campbell [Sat, 30 Apr 2011 15:36:28 +0000 (15:36 +0000)]
Make configure fail if create-makefiles or compiler/configure fails.

13 years agoReflect autoconf invocation in Setup.sh's output.
Taylor R Campbell [Sat, 30 Apr 2011 15:30:20 +0000 (15:30 +0000)]
Reflect autoconf invocation in Setup.sh's output.

13 years agoUpdate terminal drawing operation costs on resize.
Taylor R Campbell [Thu, 28 Apr 2011 22:11:02 +0000 (22:11 +0000)]
Update terminal drawing operation costs on resize.

Fixes random errors during redraw after expanding your terminal.
Evidently nobody uses Edwin in a terminal, at least since I broke
this five years ago...

13 years agoOmit unreferenced GEN-DELIMS in url.scm.
Taylor R Campbell [Thu, 28 Apr 2011 14:34:18 +0000 (14:34 +0000)]
Omit unreferenced GEN-DELIMS in url.scm.

13 years agoCheck whether requested memory size fits in object datum.
Taylor R Campbell [Thu, 28 Apr 2011 05:37:04 +0000 (05:37 +0000)]
Check whether requested memory size fits in object datum.

Do this before even trying to allocate the memory.

13 years agoFix some header files in the FFI.
Taylor R Campbell [Wed, 27 Apr 2011 21:16:04 +0000 (21:16 +0000)]
Fix some header files in the FFI.

13 years agoAvoid GNUism $^ in makefiles.
Taylor R Campbell [Wed, 27 Apr 2011 21:14:55 +0000 (21:14 +0000)]
Avoid GNUism $^ in makefiles.

13 years agoOmit unreferenced variable in COMPILE-SYSTEM.
Taylor R Campbell [Wed, 27 Apr 2011 20:39:07 +0000 (20:39 +0000)]
Omit unreferenced variable in COMPILE-SYSTEM.

13 years agoSimplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP.
Taylor R Campbell [Wed, 27 Apr 2011 20:30:47 +0000 (20:30 +0000)]
Simplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Wed, 27 Apr 2011 19:23:38 +0000 (19:23 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoMore merge cleanup, typos. Simpler build. 20110426-Gtk
Matt Birkholz [Wed, 27 Apr 2011 00:19:08 +0000 (17:19 -0700)]
More merge cleanup, typos.  Simpler build.

Use compile-system's 'dependencies option rather than a gtk-new.pkg
with depends-on package options, to keep the liarc build simple(r).

* src/Makefile.in: Punt conses.png.

* src/cref/butils.scm: for-all?'s arguments are "backward".

* src/cref/: object.scm, redpkg.scm: Punted depends-on.

* src/gtk/Makefile-fragment: compile-liarc-bundle is now handled by
compile-ffi.  Install conses.png.

* src/gtk/Tags.sh: The etags that comes with emacs23 does not like
--langmap, while Exuberant Ctags' etags only complains about --language.

* src/gtk/compile.scm: Re-stated the dependency information.

* src/gtk/: gtk.pkg, gtk-new.pkg: Merged but commented out the new
depends-on package options.

* src/gtk/keys.scm: Pared some entries so the x86-64 assembler does
not die.

* src/runtime/thread-queue.scm: Typo.

13 years agoOops, for-all?'s arguments are "backward".
Matt Birkholz [Tue, 26 Apr 2011 20:09:24 +0000 (13:09 -0700)]
Oops, for-all?'s arguments are "backward".

13 years agoMerge branch 'master' into Gtk
Matt Birkholz [Tue, 26 Apr 2011 18:32:42 +0000 (11:32 -0700)]
Merge branch 'master' into Gtk

13 years agoTurned off c-include-noisily? by default.
Matt Birkholz [Tue, 26 Apr 2011 17:48:28 +0000 (10:48 -0700)]
Turned off c-include-noisily? by default.

Turned it on in the FFI generator.  Use it to suppress the "Loading
gtk-types.bin..." notifications when compiling files that c-include.

13 years agoFixed compile-ffi to use run-shell-command.
Matt Birkholz [Tue, 26 Apr 2011 17:47:42 +0000 (10:47 -0700)]
Fixed compile-ffi to use run-shell-command.

Now sets the working directory and checks make's exit code.

13 years agoIgnore unknown options/descriptions in .pkg files.
Matt Birkholz [Tue, 26 Apr 2011 17:42:52 +0000 (10:42 -0700)]
Ignore unknown options/descriptions in .pkg files.

13 years agoRemoved redundant --preserve-timestamps.
Matt Birkholz [Mon, 25 Apr 2011 20:39:50 +0000 (13:39 -0700)]
Removed redundant --preserve-timestamps.

13 years agoFixed recent enhancement to compile-file.
Matt Birkholz [Mon, 25 Apr 2011 20:00:09 +0000 (13:00 -0700)]
Fixed recent enhancement to compile-file.

13 years agoMerge branch 'master' into Gtk
Matt Birkholz [Wed, 20 Apr 2011 15:45:43 +0000 (08:45 -0700)]
Merge branch 'master' into Gtk

* src/: Makefile.in, Setup.sh, configure.ac, microcode/achost.ac:
Resolved conflicts with the new FFIS build support.

* src/sf/butils.scm: Punt sf-package-set; using new compile-system.

* src/ffi/: ffi.sf, ffi.cbf, compile.scm: Replaced ye ol' .sf and .cbf
files with the new hotness.

13 years agoFix compile-system to load into the correct environment.
Matt Birkholz [Wed, 20 Apr 2011 15:26:08 +0000 (08:26 -0700)]
Fix compile-system to load into the correct environment.

13 years agoNew compile-system procedure. Replaced ffi.sf and ffi.cbf.
Matt Birkholz [Tue, 19 Apr 2011 07:49:14 +0000 (00:49 -0700)]
New compile-system procedure.  Replaced ffi.sf and ffi.cbf.

* src/compiler/base/toplev.scm (compile-file): Only declare
integrate-external when dependencies have no type.  Thus a dependency
on e.g. "gtk-const.bin" might cause the dependent file to be
re-compiled without a spurious warning about a missing .ext file.

* src/cref/: butils.scm, cref.pkg: Added new file butils.scm,
containing a compile-system procedure that applies compile-file to
each file mentioned in a .pkg file.

* src/ffi/: compile.scm, ffi.cbf, ffi.sf: Replaced the old .cbf and
.sf files with a new, modern compile.scm file.

13 years agoFixed ffi/Makefile-fragment install target.
Matt Birkholz [Mon, 18 Apr 2011 15:25:25 +0000 (08:25 -0700)]
Fixed ffi/Makefile-fragment install target.

* src/Setup.sh: Create src/lib/ links to the ffi-test FFI.

* src/ffi/Makefile-fragment: Punt installing the ffi-test FFI, which
is intended for `make check', which developers run in the source tree.
The links in src/lib/ are enough; no need to copy files there.

13 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Mon, 18 Apr 2011 02:33:51 +0000 (02:33 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

13 years agoAdded FFI test.
Matt Birkholz [Mon, 18 Apr 2011 00:08:38 +0000 (17:08 -0700)]
Added FFI test.

* doc/ffi/ffi.texinfo: Punt the Makefile fragments for the example,
and the logic behind the leak-proof malloc/free procedures.

* doc/user-manual/user.texinfo: Needlessly picked some consistency nits.

* src/Clean.sh, src/Setup.sh: Link config.sub and config.guess to
microcode/*, and clean them too.  These scripts are used by
src/configure.ac, which uses AC_CANONICAL_HOST to configure the
compilation and linking of FFIs.

* src/Makefile.in (FFIS, build-ffis): Added FFIS, the list of
configured foreign library interfaces (subdirs).  These are built by
the new build-ffis target, which follows build-bands in most places,
and does `make build' in each ffi subdir.

* src/configure.ac: Added --enable-debugging, FFIS, CCLD, DEFS,
CFLAGS, CPPFLAGS, LDFLAGS, SHIM_CFLAGS and SHIM_LDFLAGS.  Include
microcode/achost.ac.  Added FFIS to the bundles list.

* src/etc/compile.scm (compile-ffi): New.  This procedure arranges to
compile an FFI subdir as a LIARC bundle when LIARC is in use.

* src/etc/functions.sh (maybe_rm): Remove symlinks too.

* src/etc/make-liarc.sh: Added build-ffis after build-bands.

* src/etc/std-makefile-prefix: Added CC, CCLD, DEFS, CFLAGS, CPPFLAGS,
LDFLAGS, COMPILE, LINK, SHIM_CFLAGS, SHIM_LDFLAGS, COMPILE_SHIM and
LINK_SHIM, useful when building a foreign library interface shim.

* src/ffi/.gitignore: Ignore ffi-test-* build products.

* src/ffi/Clean.sh: Punt prhello example.  Clean up ffi-test-* build
products.

* src/ffi/Makefile-fragment: Punt prhello example.  Build and install
an FFI test lib instead.

* src/ffi/: ffi-test.c.stay, ffi-test.cdecl, ffi-test.h: The new test
foreign library and interface.

* src/ffi/: prhello.cdecl, prhello.scm: Removed.  Now in doc/;
replaced in src/ by ffi-test*.*.

* src/microcode/: achost.ac, configure.ac: Moved the host
configuration from configure.ac to the new achost.ac, to share with
src/configure.ac.

* src/runtime/ffi.scm (guarantee-alien, error:not-alien): Use the
standard arglist (object operator), not (operator object #!optional
ctype), and do not loop insisting on a qualifying object.  Integrate
the test, separated from the restart code, which goes in the new,
global error:not-alien procedure.

(guarantee-alien-function, error:not-alien-function): New, like
guarantee-alien and error:not-alien.  Use them in call-alien.

(make-alien-to-free): New, for interfacing to C functions like
malloc() that return something that needs to be freed with free().
Use it in the Scheme malloc procedure, and the test FFI.

* src/runtime/runtime.pkg: Added error:not-alien,
guarantee-alien-function, error:not-alien-function and
make-alien-to-free.

* tests/Clean.sh: New, for cleaning up after tests.

* tests/check.scm: Added tests/ffi/test-ffi.scm.  Hacked handling of
test-flonum-casts.com so that `make check' works on portable C.

* tests/ffi/test-ffi-wrapper.scm: New.  Code that needs to be
syntaxed/compiled as part of the FFI test.

* tests/ffi/test-ffi.scm: New.  A test of the C/Unix FFI.

13 years agoRun Scheme in batch mode in the scripts in src/etc/.
Taylor R Campbell [Sat, 16 Apr 2011 00:40:37 +0000 (00:40 +0000)]
Run Scheme in batch mode in the scripts in src/etc/.

13 years agoMake `--batch-mode' without `--interactive' imply non-interactive.
Taylor R Campbell [Sat, 16 Apr 2011 00:25:41 +0000 (00:25 +0000)]
Make `--batch-mode' without `--interactive' imply non-interactive.

In this case, don't check whether stdin/stdout/stderr are ttys to
determine whether we are interactive.

This keeps `scheme --batch-mode' from futzing with the tty interrupt
characters, so that if you run it from a script, there is no window
during which ^G becomes the terminal's interrupt character and ^C its
quit character.  E.g., if you have set `stty intr ^C', then Scheme
won't interfere with that while you run your script.

13 years agoUse do { ... } while (0) for command macros in uxproc.c.
Taylor R Campbell [Sun, 10 Apr 2011 21:17:29 +0000 (21:17 +0000)]
Use do { ... } while (0) for command macros in uxproc.c.

Omit needless curly braces in subprocess_death.

13 years agoCheck for tcsetpgrp failure.
Taylor R Campbell [Sun, 10 Apr 2011 19:34:53 +0000 (19:34 +0000)]
Check for tcsetpgrp failure.

13 years agoDon't fflush stdout and stderr before forking.
Taylor R Campbell [Sun, 10 Apr 2011 19:31:52 +0000 (19:31 +0000)]
Don't fflush stdout and stderr before forking.

Not necessary; the child will never use them before exec'ing.
The simpler this whole mess can be made, the better...