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
Matt Birkholz [Sat, 30 Apr 2011 18:20:19 +0000 (11:20 -0700)]
Oops, remove ALL "debugging printfs".
Matt Birkholz [Sat, 30 Apr 2011 17:43:16 +0000 (10:43 -0700)]
Added compile-time 'imports option to compile-system.
Matt Birkholz [Sat, 30 Apr 2011 17:41:28 +0000 (10:41 -0700)]
Cut out the SHELL middleman; use run-synchronous-subprocess.
Matt Birkholz [Sat, 30 Apr 2011 17:40:09 +0000 (10:40 -0700)]
Un-distinguish LDFLAGS et al for shims or modules.
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...
Taylor R Campbell [Thu, 28 Apr 2011 14:34:18 +0000 (14:34 +0000)]
Omit unreferenced GEN-DELIMS in url.scm.
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.
Taylor R Campbell [Wed, 27 Apr 2011 21:16:04 +0000 (21:16 +0000)]
Fix some header files in the FFI.
Taylor R Campbell [Wed, 27 Apr 2011 21:14:55 +0000 (21:14 +0000)]
Avoid GNUism $^ in makefiles.
Taylor R Campbell [Wed, 27 Apr 2011 20:39:07 +0000 (20:39 +0000)]
Omit unreferenced variable in COMPILE-SYSTEM.
Taylor R Campbell [Wed, 27 Apr 2011 20:30:47 +0000 (20:30 +0000)]
Simplify PARSE-PACKAGE-EXPRESSIONS with FILTER-MAP.
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
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.
Matt Birkholz [Tue, 26 Apr 2011 20:09:24 +0000 (13:09 -0700)]
Oops, for-all?'s arguments are "backward".
Matt Birkholz [Tue, 26 Apr 2011 18:32:42 +0000 (11:32 -0700)]
Merge branch 'master' into Gtk
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.
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.
Matt Birkholz [Tue, 26 Apr 2011 17:42:52 +0000 (10:42 -0700)]
Ignore unknown options/descriptions in .pkg files.
Matt Birkholz [Mon, 25 Apr 2011 20:39:50 +0000 (13:39 -0700)]
Removed redundant --preserve-timestamps.
Matt Birkholz [Mon, 25 Apr 2011 20:00:09 +0000 (13:00 -0700)]
Fixed recent enhancement to compile-file.
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.
Matt Birkholz [Wed, 20 Apr 2011 15:26:08 +0000 (08:26 -0700)]
Fix compile-system to load into the correct environment.
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.
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.
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
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.
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/.
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.
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.
Taylor R Campbell [Sun, 10 Apr 2011 19:34:53 +0000 (19:34 +0000)]
Check for tcsetpgrp failure.
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...
Taylor R Campbell [Sun, 10 Apr 2011 19:24:31 +0000 (19:24 +0000)]
Minor cosmetic changes to uxproc.c.
Taylor R Campbell [Sun, 10 Apr 2011 19:21:06 +0000 (19:21 +0000)]
Use the closefrom system call if available to close all fds.
If not available, fall back to fcntl(F_CLOSEM); if that's not
available, fall back to closing all fds up to and including
fcntl(F_MAXFD); if that's not available, fall back to closing all
fds below UX_SC_OPEN_MAX like before.
Each case tested under NetBSD by running runtime/test-process.scm,
evaluating (RUN-SHELL-COMMAND "ls"), and ktracing Scheme during
(RUN-SUBPROCESS-IN-FOREGROUND "/usr/bin/true" '#("true") '#())
with `ktrace -d -i' to make sure that it uses the right sequence of
system calls.
Taylor R Campbell [Sun, 10 Apr 2011 19:04:50 +0000 (19:04 +0000)]
When spawning subprocesses, handle the setpgid race more gracefully.
Taylor R Campbell [Sun, 10 Apr 2011 05:03:06 +0000 (05:03 +0000)]
Add some disparaging comments about my code...yechhh.
Taylor R Campbell [Sun, 10 Apr 2011 05:01:51 +0000 (05:01 +0000)]
Pre-compile the regexps in IMAIL-SUMMARY-MATCH-LINE.
This slightly reduces some of the constant factors in the O(n)-time
(!) operation to expand summary buffers...
Taylor R Campbell [Sat, 9 Apr 2011 23:46:01 +0000 (23:46 +0000)]
Ignore some variables in test-floenv.scm.
Taylor R Campbell [Sat, 9 Apr 2011 22:17:38 +0000 (22:17 +0000)]
Ignore variable I in MAKE-RANDOM-SVL in character set tests.
Taylor R Campbell [Sat, 9 Apr 2011 22:00:26 +0000 (22:00 +0000)]
Fix environment for runtime/test-wttree in tests/check.scm.
Taylor R Campbell [Sat, 9 Apr 2011 21:46:34 +0000 (21:46 +0000)]
Implement `make check' in the top-level makefile.
The implementation is totally kludgey, and the tests take an
unreasonably long time to run (since we've mixed stress tests with
simple tests), but this is better than nothing, and may help to
complement firing up Edwin as the general way to test Scheme.
Taylor R Campbell [Sat, 9 Apr 2011 21:25:55 +0000 (21:25 +0000)]
Refactor microcode/test-flonum-casts.scm into lots of little tests.
Taylor R Campbell [Wed, 6 Apr 2011 02:55:11 +0000 (02:55 +0000)]
Work around brain damage in Linux's madvise.
Taylor R Campbell [Tue, 5 Apr 2011 01:02:32 +0000 (01:02 +0000)]
Fix diagram of memory in memmag.c to reflect Microcode 15.
Taylor R Campbell [Tue, 5 Apr 2011 00:52:36 +0000 (00:52 +0000)]
Add comment about (not) dynamically scoping madvice.
Taylor R Campbell [Tue, 5 Apr 2011 00:33:40 +0000 (00:33 +0000)]
Advise operating system about memory access during GC.
- Expect sequential access to oldspace during gc_scan_oldspace.
- Free heap pages (newspace) before copying tospace over them.
- Free tospace pages after saving tospace.
The OS hooks are implemented only for Unix, in terms of posix_madvise
and madvise. Implementing them for Windows and/or OS/2 is left as an
exercise for the reader.
Taylor R Campbell [Sun, 3 Apr 2011 21:14:59 +0000 (21:14 +0000)]
Use a (hidden) top-level variable for tag in structure predicates.
This allows the predicates to be usefully integrated.
Integrating the predicate and guarantor, and ignoring reference traps
to the tag, measurably improves performance at least of contrived
programs.
Taylor R Campbell [Sun, 3 Apr 2011 17:48:50 +0000 (17:48 +0000)]
Back out recent misguided changes.
It turns out dynamic scope and vi don't work very well.
This also fixes a grammatical error reported to Arthur by an angry
centurion.
Arthur A. Gleckler [Sun, 3 Apr 2011 06:56:59 +0000 (23:56 -0700)]
Fixed bug that caused (load-option 'xml) to fail with this error
message:
;The object #[uri 11 ""], passed as an argument to make-xml-name, is not in the correct range.
The bug was caused by the fix to `->absolute-uri' in change
562020fdf80823b5825ad901e208b10a4d3b058b.
Taylor R Campbell [Fri, 1 Apr 2011 15:11:23 +0000 (15:11 +0000)]
Fix typo in termination message.
Taylor R Campbell [Fri, 1 Apr 2011 15:05:28 +0000 (15:05 +0000)]
Change Edwin's default key bindings to match vi conventions.
All the world is Unix (except for the small irrelevant part in
Redmond that's VMS), so this should improve Edwin's widespread
adoption.
Taylor R Campbell [Fri, 1 Apr 2011 14:30:55 +0000 (14:30 +0000)]
Switch to dynamic scope by default.
Taylor R Campbell [Tue, 29 Mar 2011 00:57:38 +0000 (00:57 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Joe Marshall [Mon, 28 Mar 2011 17:41:18 +0000 (10:41 -0700)]
Add and export GUARANTEE-PROMISE.
Joe Marshall [Thu, 24 Mar 2011 20:48:13 +0000 (13:48 -0700)]
Add numerator->exact and denominator->exact.
Taylor R Campbell [Wed, 23 Mar 2011 04:34:00 +0000 (04:34 +0000)]
When signalling a file open error, read channel type before closing.
Chris Hanson [Sun, 20 Mar 2011 09:26:07 +0000 (02:26 -0700)]
Copy example files to doc/ffi/ directory to avoid relative paths,
which aren't working on my machine.
Chris Hanson [Sun, 20 Mar 2011 09:25:59 +0000 (02:25 -0700)]
Bump version number and current year.
Chris Hanson [Sun, 20 Mar 2011 09:25:38 +0000 (02:25 -0700)]
For some reason, fatal_buf doesn't have a NUL under certain circumstances on my Mac. Instead of calling strlen, do a more careful scan that stops at the end of the buffer.
Chris Hanson [Sun, 20 Mar 2011 05:59:34 +0000 (22:59 -0700)]
Bump version number and current year.
Chris Hanson [Sun, 20 Mar 2011 05:57:05 +0000 (22:57 -0700)]
Update copyright dates in reference headers.
Joe Marshall [Wed, 9 Mar 2011 18:27:42 +0000 (10:27 -0800)]
Add GUARANTEEs for positive, negative, non-positive, and non-negative numbers.
Taylor R Campbell [Sat, 26 Feb 2011 15:13:02 +0000 (15:13 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Joe Marshall [Fri, 25 Feb 2011 20:58:30 +0000 (12:58 -0800)]
Export some predicates.
Taylor R Campbell [Thu, 17 Feb 2011 20:51:56 +0000 (20:51 +0000)]
Fix typo in `mail-relay-service' documentation string.
Taylor R Campbell [Mon, 14 Feb 2011 18:51:08 +0000 (18:51 +0000)]
New (Unix) primitive CHANNEL-FILE-ATTRIBUTES for fstat.
Also, I meant `eastern hemisphere' in the previous commit, unless the
earth's magnetic field has just reversed again...no, wait...
Taylor R Campbell [Mon, 14 Feb 2011 17:39:45 +0000 (17:39 +0000)]
Fix ENCODE-TIME to correctly handle negative time zones.
This bug has been lying here for fifteen years. Obviously we need
more MIT Scheme hackers in the western hemisphere...
All this time and date code desperately needs a lot of automatic
tests, too.
Taylor R Campbell [Tue, 8 Feb 2011 01:19:01 +0000 (01:19 +0000)]
Bump microcode version number.
New primitive NANOTIME-SINCE-UTC-EPOCH, and a bajillion others.
Taylor R Campbell [Mon, 7 Feb 2011 21:49:52 +0000 (21:49 +0000)]
New primitive NANOTIME-SINCE-UTC-EPOCH.
This returns the number of seconds, with at most nanosecond
resolution, that have elapsed since the start of 1972 in UTC.
Representation is fixed-point, stored in a pair given as input.
See the comments in uxenv.c for more details.
Taylor R Campbell [Mon, 24 Jan 2011 14:43:42 +0000 (14:43 +0000)]
Two minor cosmetic changes to runtime/wttree.scm.
Taylor R Campbell [Mon, 24 Jan 2011 14:26:36 +0000 (14:26 +0000)]
Fix wt-tree balancing. Add some trivial tests.
Thanks to Yoichi Hirai and Kazuhiko Yamamoto for analyzing the nature
of the bug and finding a good fix.
The trivial tests are enough to catch trivial errors, and one
manifestation of the balancing bug, but they should be replaced by a
more comprehensive test suite later.
Matt Birkholz [Mon, 17 Jan 2011 01:09:48 +0000 (18:09 -0700)]
Gerroff the global TRACE binding; use %trace instead.
Matt Birkholz [Sun, 16 Jan 2011 08:00:35 +0000 (01:00 -0700)]
Fixed subprocess-wait, without blocking the toolkit.
* doc/gtk/gtk.texinfo, src/gtk/thread.scm, src/gtk/gtk.pkg: Rename
kill-gtk-thread to stop-gtk-thread, and export it to () for easy
emergency(!) use.
* src/gtk/: fix-demo.scm, gobject.scm, swat.scm: Use detach-thread.
* src/gtk/fix-layout.scm: Call gtk_widget_set_size_request; frobbing
GtkWidget requisition no longer (as of 2.22) works. Leave the widget
geometry undefined until the allocation callback can set it.
Added fix-ink-move! methods for image and box inks. These are very
simple methods, much like the method for text inks. Factored them
into a new generic-fix-ink-move! integrable.
* src/gtk/gtk.pkg: Import hook/subprocess-wait and nonblocking/
subprocess-wait, to enable non-blocking "synchronous" subprocesses.
* src/gtk/main.scm: Move startup out of initialize-package!, into
gtk-start, which is now used by make.scm. Thus startup is delayed
from load/compile(!)-time to load-option-time. Use exit- rather than
kill-gtk-thread. Fix type of argument to gtk_time_slice_window.
* src/gtk/make.scm: Use new gtk-start procedure.
* src/gtk/thread.scm: Added exit-gtk-thread and restart-gtk-thread.
* src/microcode/uxio.c (OS_test_select_registry): Fixed to return
SELECT_PROCESS_STATUS_CHANGE (or SELECT_INTERRUPT) instead of 0 when there
is no io (or the registry is empty) BUT pending status changes or
interrupts.
* src/runtime/process.scm (subprocess-wait): Replaced the call to the
process-wait primitive with application of hook/subprocess-wait.
Initialized this new binding to normal/subprocess-wait, which simply
calls the primitive. Implemented an alternative procedure,
nonblocking/subprocess-wait, which uses the new block-on-process-
status-change procedure. Added hook/subprocess-status-change.
* src/runtime/runtime.pkg: Import block-on-process-status-change from
(runtime thread) to (runtime process).
* src/runtime/thread-queue.scm: Added thread-queue/dequeue-no-hang and
thread-queue/dequeue-until, implementing the former in terms of the
latter. Like /peek-until, /dequeue-until does the job, which was
factored out into when-non-empty-before.
* src/runtime/thread.scm: Added block-on-process-status-change. Like
block-on-io-descriptor, it adds current-thread to those waiting on
descriptor 'process-status-change.
Matt Birkholz [Tue, 21 Dec 2010 17:33:34 +0000 (10:33 -0700)]
Now builds on x86_64 and via portable C distribution.
The build process now builds FFIs after it build-bands. An FFI's
"build" target now combines the old "generate" and "build" targets,
and knows from its host whether to compile-liarc-bundle. The
"install" target also knows whether to install-liarc-bundle.
Building the FFIs after build-bands means we can use src/microcode/
scheme and src/lib. Compiling the .scm after building the shim
ensures that the .scm's FFI syntax and the shim are consistent.
* doc/gtk/gtk.texinfo (Installation): Updated, with a section about
building the portable C distribution. Replaced "smallexample" with
"example" because of the former's smaller font.
* src/Makefile.in (build-ffis): This new target is needed in src/etc/
make-liarc.sh, and now appears after build-bands in most contexts.
Moved ffi from LIARC_BOOT_BUNDLES, and FFIS from LIARC_BUNDLES, but
not INSTALLED_SUBDIRS.
* src/configure.ac: Simplified the with-gtk default, which can expect
a host with an FFI after build-bands. Just test for Gtk 2.0 libraries
via pkg-config.
* src/etc/compile.scm (compile-ffi): Use in-liarc; delay C compilation.
* src/etc/make-liarc.sh: Add build-ffis after build-bands.
* src/gtk/Makefile-fragment: Combine generate and build into one, and
use ../microcode/scheme.
* src/gtk/gtk-shim.h: Replace "ulong" with "unsigned long".
* src/gtk/gtkio.c.stay: Make run_gtk's definition agree with its
declaration, and explicitly cast to select_registry_t.
Matt Birkholz [Thu, 16 Dec 2010 23:08:56 +0000 (16:08 -0700)]
Moved src/microcode/prgtkio.c to src/gtk/gtkio.c.
This simplifies the configuration of src/microcode/, removing
conditional references to the Gtks.
* doc/gtk/gtk.texinfo: Fixed the "make clean" suggestion to the proper
"make distclean". Simplified the build instructions, then made them
more novice-friendly, avoiding cautions about writable /usr/local/bin,
etc.
* src/configure.ac: Moved the --with-gtk support back from
microcode/achost.ac, where it is no longer needed.
* src/gtk/.gitignore: Added gtkio.c, a product of gtkio.c.stay.
* src/gtk/Clean.sh: Removed prgtkio.so; added gtkio.c.
* src/gtk/Makefile-fragment: Added gtkio.c, which is not compiled like
a regular shim. It uses the machine's OS interface, and narrowly
avoids including scheme.h.
* src/gtk/gtk-shim.h: Added extern declarations for functions that
used to be Gtk primitives.
* src/gtk/gtk.cdecl: Declare the new functions.
* src/gtk/gtk.sf: There is no prgtkio module, nor gtkio primitives
anymore.
* src/gtk/gtkio.c.stay: This is src/microcode/prgtkio.c with the
primitives turned into simple C functions.
* src/gtk/: main.scm, thread.scm: Replace Gtk primitives with callouts
to their equivalent C functions.
* src/microcode/: configure.ac, achost.ac: Punted --with-gtk.
* src/microcode/makegen/: Makefile.in.in, files-optional.scm: Punted
prgtkio.
* src/microcode/prgtkio.c: Moved to src/gtk/gtkio.c.stay.
* src/microcode/: pruxffi.c, pruxffi.h: Added abort_to_c(), so gtkio.c
does not need prim.h, scheme.h and everything.
Matt Birkholz [Sun, 12 Dec 2010 23:34:18 +0000 (16:34 -0700)]
Added SWAT emulation, just sufficient to run Pole Zero.
Changed scm-layout from an integer-based layout to a fixnum-based
layout called fix-layout. Added a "fix-" prefix to everything that
should be using fixnums. Thus there are many name changes:
scm-layout -> fix-layout
drawing -> fix-drawing
rect -> fix-rect
drawn-item -> fix-ink
I could not resist the brevity of "ink". "Item" is rather vague.
Changes not otherwise mentioned below:
Took care not to define-integrable when parameters are referenced
multiple times. Used integrate-operator instead.
Used guarantee-TYPE procedures rather than check-TYPE converters.
Punted :: for combining type and method names. A hyphen will do.
Used the new ignore declaration.
Punted package initialization declarations in gtk.pkg. Added
`(initialize-package!)' forms at the ends of files as necessary.
Followed the MAKE- convention to name procedures that create demos
or examples.
Signal callbacks now rely on their first parameter, the weakly
held instance, rather than capture it in their closures. The
first argument used to be the toolkit object's address.
* doc/gtk/gtk.texinfo: Incremented the minor VERSION. Moved many
implementation notes to a new Implementation Notes node. Condensed
the chapters about each example into subsections of the Introduction.
Added a subsection about the SWAT emulation. Added an Installation
chapter/node. Generally, re-wrote to the luser perspective. Used the
packaging in gtk.pkg, esp. the lists of names exported to (gtk), to
form a complete, if terse, API Reference. Pulled some luser
documentation out of the Scheme code.
* src/Makefile.in: Added ffi to the LIARC_BOOT_BUNDLES so that gtk can
be compiled during LiarC's bootstrap.
* src/README.txt: Moved gtk to the "miscellaneous extras".
* src/Setup.sh: Added sos to lib/.
* src/configure.ac: Made $with_gtk tri-valued: yes, no, auto. It
defaults to "auto". Moved pkg-config check to src/microcode/
achost.ac. Added gtk to FFIS.
* src/cref/: object.scm, redpkg.scm: Added support for declare forms
at top-level in .pkg files, and depends-on forms in package
descriptions. Added corresponding slots to the package, package-
description, and pmodel structures. A depends-on form lists files (by
default: .ext files) that should be generated before the package is
syntaxed. The top-level declare(s) are applied to all files.
* src/etc/compile.scm: Worked on LiarC support, moving the ffi to the
list of boot dirs. Added a compile-ffi procedure for the build target
of FFI Makefiles like src/gtk/Makefile-fragment.
* src/etc/functions.sh (maybe_rm): Do not skip symlinks.
src/config.sub and src/config.guess were not getting cleaned up. Add
them to FILES so they will be removed.
* src/gtk/: .gitignore, Clean.sh, Makefile-fragment: Added the
swat-pole-zero.scm symlink.
* src/gtk/Makefile-fragment: Use the compile-ffi procedure from
src/etc/compile.scm to compile the Gtk system. Use the host
MIT_SCHEME_EXE to generate the shim. Added a new liarc-build target
that compiles the gtk bundle.
* src/gtk/Includes/: Many useful declarations.
* src/gtk/demo.scm: Renamed "fix-demo.scm".
* src/gtk/ed-ffi.scm: Catch up changes to file packaging.
* src/gtk/fix-demo.scm: Was "demo.scm". Added a spinning arc-ink.
* src/gtk/fix-layout.scm: Was "scm-layout.scm". Many drawn-items were
re-implemented as draw-inks.
* src/gtk/gobject.scm: Added gobject-live?, gobject-unref!,
gdk-window-process-updates guarantee-gdk-window. Arrange for signal
callbacks to hold their instances weakly. Add-gc-cleanup now returns
the weak-pair it is using, so it can be reused by g-signal-connect.
Banish ferror; error will do.
* src/gtk/gtk-ev.scm: Init a ScmWidget's requisition member; it no
longer has a size-request method to do it. Use the new bit?
procedure to test bits in bit masks. Punted the second trace level.
Moved initialization out of make- procedure and into an
initialize-instance method.
* src/gtk/gtk-new.pkg: A temporary copy of gtk.pkg with the new
declare and depends-on expressions.
* src/gtk/gtk-object.scm: Added many new procedures and classes:
gtk-widget-realized?, gtk-widget-get-colormap, gtk-widget-show,
gtk-widget-connect-realize, gtk-bin-child, gtk-container-remove,
gtk-label-set-width-chars, <gtk-check-button>, <gtk-frame>,
gtk-window-set-opacity. Use the new bit? predicate.
Added a set-gtk-object-destroy-callback! procedure for the convenience
of gtk-object initialize-instance methods, for lack of "after" method
combination.
Take care when setting a style's font: copy the new
PangoFontDescription and free the old one.
Made gtk-widget-get-colormap and set-gtk-widget-bg-color! generic
procedures so that fix-layout can override them.
Noted that a gtk-container keeps its children in reverse order.
Centralized maintenance of the list. Operate on it atomically --
without-interrupts for now.
Moved gtk-object initialization from make- procedures to
initialize-instance methods for many widget types, so they can be
subclassed.
* src/gtk/gtk-shim.h: Punted the only method and all of the method
callback ids. The ScmWidget methods are now implemented by signal
callbacks.
* src/gtk/gtk.cdecl: Punted the widget method callbacks and added the
corresponding signal callbacks. Added several other new C function
and callback declarations. Moved some to a new
Includes/gtklabel.cdecl.
* src/gtk/gtk.pkg: Moved package (gtk pango) to earlier in the build.
Eliminated initialization declarations. Added new packages (gtk
swat), (swat) and (swat pole-zero), and many new bindings.
* src/gtk/gtk.scm: Gathered new syntax and fix: definitions for
system-wide use, expecting this file to be loaded at syntax as well as
load time. Added new bit-mask operators: bit-mask, bit-mask-indices,
and bit?. Moved the rect- procedures to fix-layout.scm. Replaced
check-!null with error-if-null. Punted ferror and fwarn. Moved Pango
hacks to pango.scm.
* src/gtk/gtk.sf: Use the new sf-package-set procedure, eliminating
60+ lines largely redundant to the info in gtk.pkg.
* src/gtk/hello.scm: Added an instance parameter to each callback.
* src/gtk/keys.scm: Use the new bit? predicate. Moved documentation
to gtk.texinfo.
* src/gtk/main.scm: Appended call to initialize-package!.
* src/gtk/make.scm: Incremented the Gtk subsystem's minor version number.
* src/gtk/pango-cairo.scm: Punted until real Cairo support is added.
* src/gtk/pango.scm: Added more argument checking, and a
pango-layout-set-font-description procedure. Collected other
Pango-related procedures, e.g. from gtk.scm. Moved luser
documentation to gtk.texinfo.
* src/gtk/scm-layout.scm: Renamed "fix-layout.scm".
* src/gtk/scm-widget.scm: Use g_object_ref_sink on a new ScmWidget.
Added set-scm-widget-set-scroll-adjustments-callback!. Punt method
callbacks. All methods are now implemented by signal callbacks.
* src/gtk/scmwidget.c.stay: Override the realize method, which assumes
the widget has no window. Add a set_scroll_adjustments signal.
* src/gtk/swat.scm: The new SWAT emulator.
* src/gtk/thread.scm: Just signal an error if there are no runnable
threads and no next-scheduled-timeout.
* src/microcode/achost.ac: Added the pkg-config check. Conditionally
add prgtkio.so to MODULE_TARGETS.
* src/microcode/configure.ac: Removed redundant pkg-config check --
redundant now that it is in achost.ac.
* src/microcode/prgtkio.c: The "uxselect.h" header no longer exists.
* src/runtime/ffi.scm: Added guarantee-alien-function and
error:not-alien-function. Fixed guarantee-alien to follow suit.
Added tracing to free-malloced-aliens.
* src/runtime/runtime.pkg: Added package (runtime thread-queue) and
guarantee-alien-function.
* src/runtime/thread-queue.scm: A queue that blocks threads.
* src/sf/: butils.scm, make.scm, sf.pkg: Added the sf-package-set
procedure, which uses CREF.
Matt Birkholz [Thu, 8 Jul 2010 22:06:07 +0000 (15:06 -0700)]
Added scm-layout event handlers and gdk-key support.
A more complete wrapping eliminates the need for c-includes in the
"Hello, World!" example and scm-layout demo.
* doc/gtk/gtk.texinfo: The FFI syntax is no longer used in hello.scm.
* src/gtk/Tags.sh: Fixed the exuberant ctags commandline to avoid
wiping out the Scheme file extensions list, thus punting *.scm.
* src/gtk/demo.scm: Use new callback and event wrappers.
* src/gtk/gtk-object.scm: Use integrate-operator where a parameter is
referenced multiple times.
(gtk-widget-font): Return a PangoFontDescription alien.
(set-gtk-button-clicked-callback!)
(set-gtk-window-delete-event-callback!): More wrapping, to get
C-callback syntax out of hello.scm and demo.scm.
* src/gtk/gtk.pkg: Added keys.scm. Export new callback and event
wrappers to (gtk).
* src/gtk/gtk.sf: Added keys.scm.
* src/gtk/gtk-ev.scm: Punt impish delete_event callback from hello.
* src/gtk/hello.scm: Simplify. Use new wrappers.
* src/gtk/keys.scm: New.
* src/gtk/scm-layout.scm: Punted null-alien in favor of 0. Added an
"event-handlers" vector per widget. Provide specific event handler
setters, which can translate from toolkit to Scheme constants, so the
provided handlers do not need C- syntax.
(scm-layout-event-handler): Handle expose events directly. Lookup the
rest in the event-handlers vector.
Matt Birkholz [Thu, 24 Jun 2010 18:26:26 +0000 (11:26 -0700)]
For Edwin: gtk-widget-font, scm-layout-scroll-step, etc.
* doc/gtk/gtk.texinfo: Followed the example of ffi.texinfo. Added
VERSION. Changed name from "Users'" to "Reference" Manual. Clarified
how to run the examples.
* src/Makefile.in: Use @FFIS@ to init FFIS, allowing gtk to be built
conditionally. Install lib/conses.png only when the Gtk interface is
built.
* src/Setup.sh: The lib/lib/prgtkio.so symlink is no longer needed.
* src/configure.ac: Added support for a --with-gtk option, to
conditionally include Gtk. Added --enable-debugging, needed in
microcode/achost.ac.
* src/gtk/.gitignore: Make git ignore the gtk-shim build byproducts.
* src/gtk/Includes/, src/gtk/gtk.cdecl: Added and deleted various
declarations.
* src/gtk/demo.scm: Renamed the event handler "demo-event-handler".
Added a call to gtk-widget-grab-focus.
* src/gtk/ed-ffi.scm: Added pango.scm.
* src/gtk/gobject.scm: Added punt-gc-cleanup, for alien objects that
can be explicitly destroyed as well as GCed. Allow for C-enum values
that do not fit in a fixnum. Treat them as integers.
* src/gtk/gtk-object.scm: Defined and used gtk-object-flags, despite
their being deprecated. Added peek-gtk-adjustment, for debugging.
Added gtk-widget-queue-draw, -get-pango-context, -create-pango-layout,
-set-size-request.
Added gtk-widget-font, -bg-color, -fg-color, -base-color, and
-text-color, and their setters, mostly from scm-layout.scm.
Added gtk-scrolled-window-set-policy and -set-placement.
Replace guarantee-gtk-window with check-gtk-window. Use
error:wrong-type-argument in the check-TYPE procedures.
Fixed the C types peeked by gtk-window-get-default-size.
* src/gtk/gtk.pkg: Added several new exports, and a new (gtk pango)
package. Moved color and font support from (gtk layout) to (gtk
gtk-object).
* src/gtk/gtk.scm: Added rect-union!. Use integer operators on pixel
coordinates and sizes. Moved most of the Pango code to the new
pango.scm file.
* src/gtk/gtk.sf: Suppress option loading noise. Syntax each file in
its respective package, as its dependencies require.
* src/gtk/hello.scm: Quiet warnings. Punt call to error; keeping it
simple. This code appears in the manual.
* src/gtk/main.scm: Punt private copy of ucode-primitive syntax
transformer.
* src/gtk/pango.scm: New, implementing <pango-layout> as a <gobject>.
* src/gtk/scm-layout.scm: Created a second, "detailed" trace level.
Allow logical device coordinates and sizes to be integers, not just
fixnums. Added set-scm-layout-scroll-step! and scm-layout-realized?.
Init on-screen-area to an un(der)defined rect. Adjust scrollbars only
when realized and necessary.
Moved the color support to gtk-object.scm. None of it depends on
scm-layout anymore -- just gtk-widget. Re-worked the
_get_modifier_style,modify,_modify_style abstraction to accommodate
set-rcstyle-font!.
Combined common scrolling code from set-scm-layout-scroll-pos!,
scm-layout-adjustment-value-changed.
Allow drawing-add-item! to splice in an item just under/before
another, given item.
Keep drawn-item changes (damage old area, move, damage new area)
thread-atomic, else another thread can interfere.
* src/gtk/thread.scm (kill-gtk-thread): Send ONE thread event, and
clear gtk-thread first.
* src/microcode/configure.ac: Put prgtkio.so on MODULE_TARGETS, not
_BASES. The latter does too much.
Matt Birkholz [Sat, 5 Jun 2010 06:37:13 +0000 (23:37 -0700)]
Removed $Id:$ tags.
Matt Birkholz [Sat, 5 Jun 2010 06:29:12 +0000 (23:29 -0700)]
Merge with 9.0.1+FFI.
* doc/gtk/Makefile.in: Set TEXINFO_ROOT.
* doc/gtk/gtk.texinfo: Fix name of shim, and example commandlines.
* src/gtk/Clean.sh: No need to delete conses.png. Clean in ../lib,
not ../lib/lib/.
* src/gtk/Includes/gdkdrawable.cdecl: Punt reserved members. There is
no need to account for all of them. The groveler will use sizeof.
* src/gtk/Makefile-fragment: Punt the lib/lib stuff. The shims do not
have to be in the same directory as the modules. No need to produce
conses.png from conses.png.uu anymore. Separate syntaxing and
compiling (and loading), in the .sf/.cbf/make way.
* src/gtk/Tags.sh: Bloody Exuberant Ctags compatibility.
* src/gtk/conses.png.uu, src/gtk/conses.png: Git can distribute
conses.png.
* src/gtk/: compile.scm, load.scm, gtk.sf, gtk.cbf, make.scm: Separate
syntaxing and compiling (and loading), in the .sf/.cbf/make way.
* src/microcode/configure.ac: Add prgtkio.so to new MODULE_BASES, not
MODULE_TARGETS.
* src/microcode/prgtkio.c: Re-styled -- mainly uncrushing the * operator.
* src/sf/sf.pkg, src/sf/butils.scm: Added sf-with-dependencies.
Matt Birkholz [Thu, 30 Jul 2009 04:36:51 +0000 (21:36 -0700)]
Support scm-layout colors: fg, bg, text and base.
* doc/.gitignore, src/.gitignore, src/TAGS, src/gtk/ed-ffi.scm:
Added the Gtk build products/byproducts, Emacs and Edwin source file
declarations.
* src/gtk/Includes/: gdkcolor.cdecl, gdktypes.cdecl, gdkwindow.cdecl,
gtk.cdecl, gtkrc.cdecl, gtkstyle.cdecl, gtkwidget.cdecl,
gtkwindow.cdecl, pango-layout.cdecl:
Declare additional C functions and constants.
* src/gtk/Makefile-fragment:
Make C-generate products dependent on ALL .cdecl files, including all
of Includes/*.cdecl.
* src/gtk/compile.scm:
Factored some common code into a tricked-out sf procedure: sf+.
* src/gtk/gtk-object.scm:
Added new widget and window functions. Do more argument type
checking.
* src/gtk/gtk.cdecl:
Removed gtk_window_new, gtk_window_set_title and
gtk_window_set_default_size to Includes/gtkwindow.cdecl.
* src/gtk/gtk.pkg:
Export new widget, window and color procedures.
* src/gtk/scm-layout.scm:
Uncomment trace statements; implement trace as a syntactic keyword.
Comment out visual and colormap GdkWindowAttr settings. Added
accessors and mutators for the widget's four GTK_STATE_NORMAL colors.
Matt Birkholz [Fri, 15 May 2009 15:16:36 +0000 (08:16 -0700)]
Fixed gtk-thread crash. Raised pixbuf-loader interface.
* src/.gitignore:
Added exceptions for src/gtk/Clean.sh and src/gtk/Tags.sh.
* src/gtk/gobject.scm:
Wrap <pixbuf-loader>s' GdkPixbufs with a <pixbuf>, a new type of
<gobject> that will free a GdkPixbuf when it is GCed. Provide hooks
so that users of <pixbuf-loader>s do not have to register low-level C
callbacks. Support "late" hooking by cacheing size and pixbuf and
providing them immediately to latecomers. (The update hook, on the
other hand, might never call.) The close hook is run in the loader's
thread (or the latecomer's) after gdk_pixbuf_loader_close has been
closed, and any error status collected.
* src/gtk/: gobject.scm, gtk-object.scm, scm-layout.scm:
Use "cleanup" instead of "finalize" to avoid confusion with Gtk's
notion of finalization. Assume gc-cleanups are without-interrupts.
Do NOT run gc-cleanups in a gc-daemon; run them in gtk-thread. Added
more tracing; named more lambdas.
* src/gtk/gtk.pkg:
Declare new pixbuf-loader interface. Rename (gtk object) package
"(gtk gtk-object)". Punt gobject-finalize! (same as gobject-unref).
Move (gtk main) to load after (gtk gobject), so the gc-cleanup list is
initialized before gtk-thread is launched.
* src/gtk/main.scm:
Added program "name" parameter to gtk-init, to correctly (re)construct
the command line.
* src/gtk/scm-layout.scm:
Use the new pixbuf-loader hooks instead of low-level gsignals.
"%trace" -> "trace" for consistency.
* src/gtk/thread.scm:
Disable interrupts BEFORE calling out with run-gtk as now required by
the FFI. Run gc-cleanups whenever the gc-timestamp increases. Punt
signal-thread-events, which was trouble when run WITH interrupts.
maybe-signal-io-thread-events after run-gtk should be sufficient.
* src/gtk/thread.scm, src/runtime/thread.scm:
"tracing?" -> "trace?" for consistency.
Matt Birkholz [Fri, 15 May 2009 07:09:40 +0000 (00:09 -0700)]
GNOME Toolkit Interface, as released 2009-03-18.
* doc/Makefile.in:
Include gtk in SUBDIRS.
* doc/configure.ac:
Include gtk/Makefile.
* doc/gtk/Makefile.in:
Build the Users' Manual for the GTK.
* doc/gtk/gtk.texinfo:
The Users' Manual for the GTK.
* doc/index.html:
Include mit-scheme-gtk/index.html.
* src/Clean.sh:
Clean up new symlinks config.sub and config.guess, used by
AZ_CANONICAL_HOST in configure.ac.
* src/Makefile.in:
Added new file category "FFIS". Include gtk in FFIS.
`make generate' in FFIS before compiling their Scheme source, so
they can C-include later -- much later.
`make build' in FFIS after dumping the new bands, so the FFIS are
compiled with the shims installed in lib/lib/. The new bands are
not strictly necessary, but they complete lib/lib/, so the
commandline in FFI Makefiles can be this simple:
`../microcode/scheme --library ../lib'.
Added similar commands to the all-liarc target, though I have yet
to build a lairc-based system.
Install conses.png in lib/ for the scm-layout-demo.
* src/README.txt:
Describe gtk as part of the core.
* src/Setup.sh:
Include gtk in INSTALLED_SUBDIRS. Include rcs in OTHER_SUBDIRS,
so `make tags' does not fail.
Symlink to microcode/config.sub and config.guess, so configure.ac
can share with microcode/configure.ac. Create lib/lib/prgtkio.so
and lib/gtk symlinks too.
* src/configure.ac:
Include AC_CANONICAL_HOST and related C compilation variables,
esp. SHIM_CFLAGS and SHIM_LDFLAGS, shared with
microcode/configure.ac via microcode/achost.ac. Echo the
create-makefiles.sh commandline. Generate gtk/Makefile. Added
gtk to liarc BUNDLEs.
* src/etc/create-makefiles.sh:
Include gtk in BUNDLES.
* src/etc/optiondb.scm:
Define loadable option GTK.
* src/etc/std-makefile-prefix:
Added C compilation variables, esp. COMPILE_SHIM and LINK_SHIM.
* src/gtk/Clean.sh:
Clean up after building the shim.
* src/gtk/Includes/: cairo-xlib.cdecl, cairo.cdecl,
gdk-pixbuf-core.cdecl, gdk-pixbuf-loader.cdecl,
gdk-pixbuf.cdecl, gdk.cdecl, gdkcolor.cdecl, gdkcursor.cdecl,
gdkdrawable.cdecl, gdkevents.cdecl, gdkfont.cdecl, gdkgc.cdecl,
gdkkeys.cdecl, gdkkeysyms.cdecl, gdkrgb.cdecl, gdktypes.cdecl,
gdkwindow.cdecl, genums.cdecl, gerror.cdecl, glib.cdecl,
gobject.cdecl, gparam.cdecl, gparamspecs.cdecl, gquark.cdecl,
gsignal.cdecl, gtk.cdecl, gtkadjustment.cdecl, gtkbox.cdecl,
gtkenums.cdecl, gtkobject.cdecl, gtkstyle.cdecl,
gtktypeutils.cdecl, gtkvbox.cdecl, gtkwidget.cdecl, gtype.cdecl,
gtypes.cdecl, gvalue.cdecl, gvaluetypes.cdecl,
pango-context.cdecl, pango-font.cdecl, pango-layout.cdecl,
pango-types.cdecl, pango.cdecl, pangocairo.cdecl:
C declarations corresponding to SOME of
/usr/include/g{lib,tk}-2.0/**/*.h.
* src/gtk/Makefile-fragment:
Generate the gtk shim, and build Scheme code that uses it. Keep
the ScmWidget methods in a .c.stay file so it does not get cleaned
up by `Clean.sh maintainer-clean' nor `Clean.sh c-clean'. Create
conses.png from conses.png.uu because I cannot distribute a binary
in a patchfile.
* src/gtk/Tags.sh:
Include auxiliary ScmWidget code, and NOT gtk-const.scm.
* src/gtk/compile.scm:
Build the GTK system. Expects the shim to be available in ../lib.
* src/gtk/conses.png.uu:
Because I cannot distribute a binary in a patchfile.
* src/gtk/: demo.scm, gtk-ev.scm, hello.scm, pango-cairo.scm:
Peripheral hacks.
* src/gtk/: gobject.scm, gtk-object.scm, gtk.pkg, gtk.scm, load.scm,
main.scm, scm-layout.scm, scm-widget.scm:
The core of the GTK system.
* src/gtk/gtk.cdecl:
The C types and externs needed in the GTK shim.
* src/gtk/gtk-shim.h:
C declarations for gtk-shim.c, gtk-const.c and scmwidget.c. Includes
the ScmWidget and ScmWidgetClass struct declarations.
* src/gtk/scmwidget.c.stay:
ScmWidget methods. The ".stay" suffix keeps this code from being
"cleaned up" by `Clean.sh maintainer-clean' or `Clean.sh c-clean'.
* src/gtk/thread.scm:
The Scheme thread that "runs" the toolkit.
* src/microcode/configure.ac, src/microcode/achost.ac:
Moved the AC_CANONICAL_HOST code from microcode/configure.ac to
microcode/achost.ac, so it can be shared with configure.ac.
Implement a --with-gtk argument.
* src/microcode/makegen/: Makefile.in.in, files-optional.scm:
Added new module prgtkio.so.
* src/microcode/makegen/makeinit.sh:
Use --batch-mode and `mit-scheme' instead of `scheme'.
* src/microcode/osio.h, microcode/prosio.c:
Changed the declarations of OS_select_registry_entry and
arg_select_registry so they can be used in the new prgtkio module.
* src/microcode/prgtkio.c:
The prgtkio module. New primitives that arrange to run Scheme in an
idle task of a GMainLoop.
* src/microcode/utabmd.sh:
Use --batch-mode and `mit-scheme'. Echo the commandline.
* src/microcode/uxio.c:
Added an OS_select_registry_entry function that extracts a file
descriptor and a mode from an indexed registry entry, for prgtkio.
* src/runtime/Makefile-fragment:
Install runtime-*.pkd so lusers can cref imports.
* src/runtime/thread.scm:
Added some tracing, conditioned on a tracing? binding.
Taylor R Campbell [Sat, 15 Jan 2011 04:36:39 +0000 (04:36 +0000)]
Check URI record arguments more carefully in ->MUMBLE-URI.
->ABSOLUTE-URI would formerly accept URI records representing
relative references, even though it would reject their string
representations. Now it rejects both.
Taylor R Campbell [Tue, 4 Jan 2011 03:35:38 +0000 (03:35 +0000)]
Look in /usr/local/share/info for Info files in Edwin by default.
This is where the doc/ makefile actually installs them by default.
Chris Hanson [Fri, 24 Dec 2010 04:57:35 +0000 (20:57 -0800)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/mit-scheme
Chris Hanson [Fri, 24 Dec 2010 04:37:31 +0000 (20:37 -0800)]
Fix floenv issues with MacOSX.
Matt Birkholz [Tue, 21 Dec 2010 17:28:03 +0000 (10:28 -0700)]
FFI support for 64bit architectures.
* src/ffi/generator.scm: Declare long callback IDs, large enough to
avoid truncation warnings when the toolkit type is also large. Use
%ld instead of %d for sizeof and member offsets, and cast them to
long. On x86_64, these have types ulong and long respectively.
* src/microcode/: pruxffi.c, pruxffi.h: (callback_run_kernel)
(callback_run_handler): Declare long callback_id params. Use %ld.
* src/runtime/ffi.scm (radix): Parameterize alien operations to
support 64bit or 32bit addresses.
Joe Marshall [Sat, 18 Dec 2010 01:32:08 +0000 (17:32 -0800)]
Fix tag table entry for flonum for 64-bit platforms.
Joe Marshall [Fri, 17 Dec 2010 23:31:36 +0000 (15:31 -0800)]
Fix copying of ACCESS.
Taylor R Campbell [Fri, 10 Dec 2010 06:46:35 +0000 (06:46 +0000)]
Fix STRIP-SUBJECT-RE on "Re: ".
Taylor R Campbell [Tue, 7 Dec 2010 23:37:59 +0000 (23:37 +0000)]
Fix datime.scm's time formats to accept up to 61 seconds in a minute.
Minutes in any UTC-based time system, which covers every system of
which representations are parsed in datime.scm, can have 59, 60, or
61 seconds; previously we refused to parse representations of the
61st second.
Unfortunately, our notion of `universal time' is still essentially
Common Lisp's ill-specified notion of universal time, and implemented
by POSIX's mind-bogglingly brain-damaged notion of `number of seconds
since the Epoch' which actually means `number of seconds since the
Epoch, minus the number of them that were leap seconds in UTC'.
Taylor R Campbell [Tue, 30 Nov 2010 19:16:08 +0000 (19:16 +0000)]
Fix silly thinko in definition of STRIP-SUBJECT-RE.
Also omit needless unsafe fixnum specialization.
Taylor R Campbell [Wed, 24 Nov 2010 18:29:14 +0000 (18:29 +0000)]
Handle EINTR from opendir.
Taylor R Campbell [Fri, 19 Nov 2010 18:54:11 +0000 (18:54 +0000)]
Fix comment about euclidean division -- r may be zero.
Taylor R Campbell [Fri, 19 Nov 2010 07:24:54 +0000 (07:24 +0000)]
Work around bug in glibc's fegetenv on amd64.
Taylor R Campbell [Fri, 19 Nov 2010 06:49:07 +0000 (06:49 +0000)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Fri, 19 Nov 2010 06:10:27 +0000 (06:10 +0000)]
Replace `masking exceptions' by `trapping exceptions'.
Reversing the sense makes it clearer -- `trap on division by zero' is
a positive request, versus `mask division by zero traps', i.e. `don't
trap on division by zero'. This better reflects the IEEE 754 notion
of actions to take on exceptions. Also, the sense of `mask' is often
confusing (Scheme's `interrupt mask' is not the interrupts that are
masked, but the bit mask of interrupts that are *enabled*; the BSD
fpgetmask and fpsetmask library routines control the bit mask of
floating-point exceptions for which trapping is enabled; but, on the
other hand, a POSIX process's `signal mask' is the set of signals
that are disabled).
Taylor R Campbell [Fri, 19 Nov 2010 05:02:58 +0000 (05:02 +0000)]
Implement a complete set of integer division operator pairs.
Given a numerator n and a denominator d, each operator pair computes
an integral quotient q and the induced remainder r = n - d q such
that |r| < |d|. There are five pairs: ceiling, euclidean, floor,
round, and truncate. Ceiling, floor, round, and truncate compute the
rounded quotient as their names suggest. Euclidean division is floor
division for positive denominators, and ceiling division for negative
denominators, so that it exhibits the stronger property 0 <= r < |d|.
Matt Birkholz [Fri, 12 Nov 2010 21:30:57 +0000 (14:30 -0700)]
Fix example code in "Type and range checking".