Chris Hanson [Thu, 15 Nov 1990 15:42:35 +0000 (15:42 +0000)]
Change GE and GST to change top-level defaults only if in the
top-level REPL. Eliminate VE, VST, %GE, %VE, %GST, %VST, %IN, %OUT.
Change RE to clobber the reader history with the thing it is
re-evaluating. Change prompt-for-confirmation to print out invalid
characters.
Chris Hanson [Thu, 15 Nov 1990 09:03:12 +0000 (09:03 +0000)]
For cooked input, don't turn on ECHO or CRMOD unless they were on when
Scheme was started. For cooked output, don't turn on OPOST (turn off
LLITOUT) unless it was on (off) when Scheme was started.
Chris Hanson [Thu, 15 Nov 1990 08:43:06 +0000 (08:43 +0000)]
Disable SIGPIPE. This can happen under a variety of circumstances,
and we almost never want Scheme to terminate (a possible exception
being when it happens on stdout). According to HP-UX documentation,
disabling this signal causes the system calls that would have
generated it to return EPIPE instead, which requires no special work
for us to handle.
Chris Hanson [Wed, 14 Nov 1990 13:30:48 +0000 (13:30 +0000)]
Add new primitives to save and restore a string through a
disk-restore. Change `get-unused-command-line' to return the unused
arguments on the first call, and #F on subsequent calls.
Chris Hanson [Wed, 14 Nov 1990 13:26:46 +0000 (13:26 +0000)]
New operations on input-buffer for saving and restoring the contents
of the buffer. These are used by the console input port to preserve
the buffer's contents through a disk-restore.
Chris Hanson [Tue, 13 Nov 1990 08:45:37 +0000 (08:45 +0000)]
* Consolidate command-line option processing. Several new options:
-large, -edwin, -library, -option-summary. Each major option now
has a two-step default: first an environment variable is checked,
and if that doesn't exist, a built-in default is used.
The point of these changes is to permit a Scheme executable program
to have sufficient flexibility that it can be installed at many
sites without modification to the built-in defaults.
* Move all option defaults and option specifications to new file
"option.c".
* New primitive `get-unused-command-line' returns only that part of
the command line that was left unused by the option-processing code.
* Rename `parent_process_is_emacs' to `option_emacs_subprocess'.
* Move all specialized exit handling to "term.c".
* Move several macro defaults from "default.h" to the files in which
they are referenced.
Chris Hanson [Fri, 9 Nov 1990 08:56:28 +0000 (08:56 +0000)]
Change peek-char, read-char, and read-string operations to return EOF
objects when they reach the end of the input region. This is an
incompatible change required by runtime system version 14.101.
Chris Hanson [Fri, 9 Nov 1990 08:44:55 +0000 (08:44 +0000)]
Requires microcode 11.52 or later.
* Reimplement subprocess abstraction to match new microcode support.
* Implement socket abstraction.
* Create new "generic channel" input and output ports. These share
operations with file and console ports.
* Add `buffer-size' and `set-buffer-size' operations to file and
console input ports.
* Add `eof?' operation to file input port.
* Add `channel' operation to file input and output ports.
* Change input and output buffer abstractions to permit a buffer-size
of zero. Input buffer treats this the same as a buffer size of one,
since at least one character of buffering is needed to implement the
peek-char operation.
* Change the peek-char and read-char input port operations to return
an EOF object at end of file, or #F if no characters are available
and the input port is set to non-blocking mode. This is an
incompatible change.
* Change the read-string input port operation to return an EOF object
at end of file. This is an incompatible change.
* Change the read-string and discard-chars input-port operations to
for their input channels into blocking mode.
* Add new channel types: TCP-SERVER-SOCKET and DIRECTORY.
* Change the file-opening code to signal a range error if an attempt
is made to open a channel of type DIRECTORY or UNKNOWN.
* Remove error check from `open-pty-master'; the primitive now takes
care of this.
* Add new operations on PTY masters: pty-master-kill, pty-master-stop,
pty-master-continue, pty-master-interrupt, and pty-master-quit.
* Change the input-buffer abstraction to handle non-blocking channels
correctly.
* Use new microcode primitive `file-mod-time-indirect' to implement
`file-modification-time'.
Chris Hanson [Thu, 8 Nov 1990 11:11:57 +0000 (11:11 +0000)]
* (OS_open_tcp_stream_socket): Change `host' argument to be `char *',
and don't assume that it is the same length as a `long'.
* (OS_get_host_by_name): Change interface to return `char **', and
eliminate `struct host_addresses'. Assume that all addresses are
`sizeof (struct in_addr)' in length.
* (OS_open_server_socket, OS_server_connection_accept): New procedures
support server sockets.
Chris Hanson [Thu, 8 Nov 1990 11:10:56 +0000 (11:10 +0000)]
* (OS_make_subprocess): Permit 0 as environment pointer argument,
meaning use value of `environ'. Fix a couple of bugs in the child
process initialization sequence.
* (OS_process_stop, OS_process_continue): Don't check to see if job
control is available -- just do it.
Chris Hanson [Thu, 8 Nov 1990 11:08:07 +0000 (11:08 +0000)]
* (UX_channel_close_all): Don't signal errors -- this is run when
there is no runtime system to field them, and in any case they can
be safely ignored here.
* (OS_channel_close_on_abort): New utility procedure.
Chris Hanson [Thu, 8 Nov 1990 11:05:26 +0000 (11:05 +0000)]
* (os-job-control?): New primitive tells the runtime system whether or
not the operating system supports job control. This is needed when
hacking subprocesses.
* (open-pty-master): Close the channel if allocation forces GC.
* (pty-master-kill, pty-master-stop, pty-master-continue,
pty-master-interrupt, pty-master-quit): New primitives to send
standard signals down a PTY master.
Chris Hanson [Mon, 5 Nov 1990 11:55:48 +0000 (11:55 +0000)]
* Eliminate obsolete TTY I/O primitives. These have not been used for
several months now.
* If stdin or stdout is a terminal, save its state when entering
Scheme, and restore it when leaving, as is done with the control
terminal. Ignore any attempts to change the state if Scheme is not
in the foreground. This code helps prevent buggy Scheme programs
from screwing up the user's terminal.
* On machines with TERMIOS and BSD_JOB_CONTROL, such as HP-UX, alter
VSUSPC and t_suspc together. Altering one and not the other can
cause the change to be lost.
Chris Hanson [Fri, 2 Nov 1990 04:19:34 +0000 (04:19 +0000)]
Requires microcode 11.50 and runtime 14.100.
* Implementation of update optimizer, and direct use of termcap rather
than the buggy curses.
* Extensive rewrite of display update code. New display update
scrolls lines in some cases, and is tuned to offset the added cost
of running the update optimizer.
* New display update event-tracing facility for debugging.
* If the last line of the buffer is empty, and the previous line is
completely visible, the modeline says that the bottom of the buffer
is visible.
* Editor variables can have value validity tests, which are applied
whenever the variable's value is altered. If the test fails, an
error is signalled, so that user code can depend on the variable's
contents satisfying the validity test.
* `(buffer-point (current-buffer))' now equivalent to
`(current-point)'.
* `window-redraw!' no longer takes a second argument. It's new
meaning is to force the window to be redrawn from scratch, without
affecting the window starting point or cursor position.
* Changed `window-start-index' to `window-start-mark'.
* Change terminal state control to use new I/O port operations that
extract channels, and perform the terminal controls directly on
those channels.
* Internal flag `debug-internal-errors?' facilitates debugging Edwin
if set true. Normally this is false.
* When first starting the editor, the default behavior is to try to
use Scheme's controlling terminal, and if that isn't available, to
use X. If Scheme is started under Emacs, it has no controlling
terminal, and therefore it will use X.
Chris Hanson [Fri, 2 Nov 1990 03:25:13 +0000 (03:25 +0000)]
Requires microcode 11.50 and runtime 14.100.
* Implementation of update optimizer, and direct use of termcap rather
than the buggy curses.
* Extensive rewrite of display update code. New display update
scrolls lines in some cases, and is tuned to offset the added cost
of running the update optimizer.
* New display update event-tracing facility for debugging.
* If the last line of the buffer is empty, and the previous line is
completely visible, the modeline says that the bottom of the buffer
is visible.
* Editor variables can have value validity tests, which are applied
whenever the variable's value is altered. If the test fails, an
error is signalled, so that user code can depend on the variable's
contents satisfying the validity test.
* `(buffer-point (current-buffer))' now equivalent to
`(current-point)'.
* `window-redraw!' no longer takes a second argument. It's new
meaning is to force the window to be redrawn from scratch, without
affecting the window starting point or cursor position.
* Changed `window-start-index' to `window-start-mark'.
* Change terminal state control to use new I/O port operations that
extract channels, and perform the terminal controls directly on
those channels.
* Internal flag `debug-internal-errors?' facilitates debugging Edwin
if set true. Normally this is false.
* When first starting the editor, the default behavior is to try to
use Scheme's controlling terminal, and if that isn't available, to
use X. If Scheme is started under Emacs, it has no controlling
terminal, and therefore it will use X.
Chris Hanson [Fri, 2 Nov 1990 02:07:08 +0000 (02:07 +0000)]
Requires microcode version 11.50 or later.
Many changes to provide for smooth control of terminal state:
* Procedures `make-cmdl' and `push-cmdl' each take additional argument
that specifies how to spawn a child CMDL object -- a good default
for this argument is `make-cmdl'. `make-cmdl' should not be used
except by this "spawning" operation -- always use `(cmdl/spawn-child
cmdl)' to do that. Command loops should be extended to have generic
operations for reading input, evaluating, writing results,
prompting, etc. This would simplify switching between the editor
and user code.
* Command loops now temporarily switch input and output modes of
terminals to appropriate values when doing input or output. Thus
REP loops and the debugger need not worry about what state the
terminal is in -- the user can change it arbitrarily.
* New procedures `input-port/channel' and `output-port/channel' return
a port's underlying channel if known, else #F. This is not yet
completely implemented, but since it is only used for terminals it
is OK for now.
* New procedures `terminal-get-state' and `terminal-set-state' can be
used to save and restore a terminal's state.
Chris Hanson [Thu, 1 Nov 1990 04:33:46 +0000 (04:33 +0000)]
* New primitives `terminal-get-state' and `terminal-set-state' allow
Scheme programs to get an object representing a terminal's state
structure, and to restore the terminal's state from such an object.
* When Scheme is terminated, restore the control terminal state.
Previously this was done only when suspending Scheme.
* On machines that have it, disable `t_dsuspc' (the delayed suspend
character). Save this and any other TIOCGLTC state in the terminal
state structure. Previously POSIX machines ignored this state even
if it was present.
* Change X line scrolling so that it does not clear the region that
the lines are being scrolled out of. The update optimizer will take
care of this if it needs to.
Chris Hanson [Tue, 9 Oct 1990 16:24:53 +0000 (16:24 +0000)]
* The "-in-new-screen" commands have been replaced with
"-other-screen" commands. This is more analogous to the
"-other-window" commands.
* New editor variable `use-multiple-screens', if set true, causes
various window commands to use multiple screens instead of multiple
windows. Affected commands include C-x o, C-M-v, C-x 4, and
commands that pop-up buffers. This needs more work but is an
interesting first cut.
* With multiple X screens, the selected screen is distinguished by
having a cursor -- a screen's cursor is erased when it is
deselected. This is desirable because it is no longer the case that
the selected screen and the focus screen are always the same.
* Modeline formats have been extended to allow procedures as elements.
Such a procedure is called with the modeline's window as an
argument, and is expected to produce another modeline-format element
which is used in its place.
* Selecting a window in a screen other than the selected screen will
also select that screen.
* New procedure `other-screen' will choose a different screen if one
is available.
* New screen operations `screen-scroll-lines-down!' and
`screen-scroll-lines-up!' return a flag saying whether they
performed the scrolling. Redisplay code tries to use them when it
scrolls, and repaints if they don't work. Currently these
operations are implemented for X screens but not for curses.
* The `screen-write-substrings!' operation is now written in terms of
the `screen-write-substring!' operation, so that it need not be
implemented separately for each screen abstraction.
* The display-type abstraction has been redesigned so that it has no
internal state -- the current display type is now part of the editor
structure. Most of the operations have been renamed. The procedure
`editor-display-type' has been eliminated, the procedure
`editor-display-types' now returns display-type objects rather than
their names.
* Each display-type now indicates whether it supports multiple
screens. This information is returned by procedure
`multiple-screens?'.
* The buffer that appears in the typein window when no typein is
occurring is now different than the level-0 typein buffer. This
means that, under normal circumstances, only one typein window shows
the typein buffer when typein is occurring. The previous method of
obscuring the typein buffer with an override message on non-selected
screens is no longer used.
* The file "winmis" has been eliminated.
* The procedure `using-screen' has been eliminated.
Chris Hanson [Tue, 9 Oct 1990 16:23:40 +0000 (16:23 +0000)]
* The "-in-new-screen" commands have been replaced with
"-other-screen" commands. This is more analogous to the
"-other-window" commands.
* New editor variable `use-multiple-screens', if set true, causes
various window commands to use multiple screens instead of multiple
windows. Affected commands include C-x o, C-M-v, C-x 4, and
commands that pop-up buffers. This needs more work but is an
interesting first cut.
* With multiple X screens, the selected screen is distinguished by
having a cursor -- a screen's cursor is erased when it is
deselected. This is desirable because it is no longer the case that
the selected screen and the focus screen are always the same.
* Modeline formats have been extended to allow procedures as elements.
Such a procedure is called with the modeline's window as an
argument, and is expected to produce another modeline-format element
which is used in its place.
* Selecting a window in a screen other than the selected screen will
also select that screen.
* New procedure `other-screen' will choose a different screen if one
is available.
* New screen operations `screen-scroll-lines-down!' and
`screen-scroll-lines-up!' return a flag saying whether they
performed the scrolling. Redisplay code tries to use them when it
scrolls, and repaints if they don't work. Currently these
operations are implemented for X screens but not for curses.
* The `screen-write-substrings!' operation is now written in terms of
the `screen-write-substring!' operation, so that it need not be
implemented separately for each screen abstraction.
* The display-type abstraction has been redesigned so that it has no
internal state -- the current display type is now part of the editor
structure. Most of the operations have been renamed. The procedure
`editor-display-type' has been eliminated, the procedure
`editor-display-types' now returns display-type objects rather than
their names.
* Each display-type now indicates whether it supports multiple
screens. This information is returned by procedure
`multiple-screens?'.
* The buffer that appears in the typein window when no typein is
occurring is now different than the level-0 typein buffer. This
means that, under normal circumstances, only one typein window shows
the typein buffer when typein is occurring. The previous method of
obscuring the typein buffer with an override message on non-selected
screens is no longer used.
* The file "winmis" has been eliminated.
* The procedure `using-screen' has been eliminated.
Chris Hanson [Sun, 7 Oct 1990 13:34:49 +0000 (13:34 +0000)]
Change `xterm-erase-cursor' and `xterm-draw-cursor' primitives to be
direct calls to do exactly that. Add new primitive
`xterm-enable-cursor' which enables or disables the drawing of the
cursor.
Chris Hanson [Sat, 6 Oct 1990 00:16:37 +0000 (00:16 +0000)]
* Add new procedure `window-override-message' that returns the
override message, or #F if none. This is used to implement
`current-message', which operates on the current typein window.
`clear-message!' renamed to `clear-current-message!'.
`set-message!', renamed to `set-current-message!', now accepts #F as
an argument, in which case it acts like `clear-current-message!'.
* Split `select-buffer-in-new-screen' into two parts: a procedure
`make-screen' that generates a new screen, and a call to
`select-screen'. The new procedure `make-screen' replaces the
procedure of the same name which is now considered internal to the
screen abstraction.
* Change `select-screen' not to abort to top level, to run the
`select-buffer-hook', and to transfer the typein override message
from the previously-selected screen to the newly-selected one. The
X screen event handler now does the abort to top level, since it is
still needed in that case.
* Eliminate the typein bufferset -- typein buffers are shared by all
screens. Display of the typein buffers is suppressed in
non-selected screens by a blank override message. This has the
drawback that direct update of the typein window does not work if
there are multiple screens, which makes typein feel sluggish.
* Implement procedures `screen0', `screen1+', `screen-1+', and
`screen+' for moving around the screen list.
* `buffer-list' no longer copies its result -- don't clobber it!
* New procedure `change-selected-buffer' makes the handling of buffer
selection more uniform.
* Eliminate cacheing of `editor-input-port' from "input.scm". Just
extract the input port from `current-editor' every time. Change the
keyboard reader to use `input-port/read-char' instead of
`read-char', since the former is faster.
* Redesign the `button' abstraction to make it cleaner and more
general. Rename the `buttonN-down' and `buttonN-up' variables to
`x-buttonN-down' and `x-buttonN-up'. Change button-handling code so
that up buttons don't beep if they aren't bound to commands.
* Updating of an X screen is now terminated if a non-keypress event
arrives while checking for update preemption. This is done by
throwing out of the update. I believe this test only happens in
places where it is safe to do this.
* Make screen highlight control independent of the screen type.
Change screen abstractions so that screens support two operations,
one to turn on highlighting, and the other to turn it off.
Add checksumming code. Binary files dumped by Psbtobin or fasdump
have checksums in the header. If the checksum field is SHARP_F, the
checksum is ignored on the way in.
Currently bchscheme's fasdump does not dump files with checksums.
This should be fixed.