1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 01:32:24 +02:00
Commit graph

275 commits

Author SHA1 Message Date
Jim Blandy
483f0ecb10 * boot-9.scm: Revert changes to this file from Oct 23. It turns
out to interact badly with the Emacs support and the Tcl/Tk
support.  It's not a high enough priority at the moment to be
worth fixing.  I'm leaving the other readline support in, though.
1997-10-27 07:07:03 +00:00
Jim Blandy
a3cd2b988f Add support for readline function.
* readline.scm: New module.
* boot-9.scm (repl-reader): New function.
(scm-style-repl): Call repl-reader, instead of doing the reading
ourselves.  Remove repl-report-reset; it was never used for
anything.
(top-repl): If we've got the readline primitives, then redefine
repl-reader to use them.
If we've got the readline primitives, import the readline module.
1997-10-23 05:00:55 +00:00
Gary Houston
4bbbcd5c42 * expect.scm: (expect-regexec): new procedure, use it in
expect-strings to fix the => syntax under the new regex system.
	(top): include regex module in define-module statement.
	* (error-catching-loop): new local variable "interactive".  if
	#f, abort terminates the process.
	(set-batch-mode?!, batch-mode?): new closures, defined in
	error-catching-loop.  the names are from scsh.
1997-10-11 20:42:24 +00:00
Marius Vollmer
1c11d900c0 * boot-9.scm (inherit-print-state): If NEW-PORT contains a
print-state, throw it away.
1997-10-06 13:19:47 +00:00
Mikael Djurfeldt
9f9aa47baf 1997-10-03 Mikael Djurfeldt <mdj@nada.kth.se>
* boot-9.scm (struct-layout): Use `vtable-index-layout' instead of
	`0'.

1997-10-02  Mikael Djurfeldt  <mdj@nada.kth.se>

	* boot-9.scm (struct-printer, make-struct-printer,
	set-struct-printer-in-vtable!, *struct-printer*): Removed.
	(record-type-vtable, make-record-type): Don't use make-struct-printer.
	(record-type-vtable): User fields "prpr" (printer is no longer a
	user field).
	(record-type-name, record-type-fields): Decreased slot index by
	one; Use `vtable-offset-user'.
1997-10-03 00:47:48 +00:00
Marius Vollmer
ae335672cb * boot-9.scm (inherit-print-state): New experimental function. 1997-10-02 14:23:50 +00:00
Jim Blandy
a6401ee0f2 Suggestion and script from Maciej Stachowiak:
* boot-9.scm: Split off modules into separate, autoloadable files.
This reduces startup time from 10.5s to 5.5s (user cpu).
* calling.scm, common-list.scm, ls.scm, q.scm, runq.scm,
string-fun.scm: New files, containing stuff that used to be in
boot-9.scm.
* Makefile.am (ice9_sources): List new files here, for
distribution and installation.
* Makefile.in: Regenerated.
1997-09-30 17:16:54 +00:00
Mikael Djurfeldt
2f110c3ce3 * boot-9.scm: Bugfix: Hard-solder the print-option procedure into
the make-options macro so that we needn't refer to a global
symbol.
1997-09-29 01:23:59 +00:00
Mikael Djurfeldt
83b381985d * debug.scm: Moved options interface procedures to boot-9.scm.
* boot-9.scm: Define options interface procedures here instead.
1997-09-28 20:12:17 +00:00
Jim Blandy
af01fdcd21 * boot-9.scm (separate-fields-discarding-char,
separate-fields-after-char, separate-fields-before-char): Call
continuation function, RET, as advertised: with each separated
field a separate argument.

* Makefile.in: Regenerated with automake 1.2a.
1997-09-28 03:09:59 +00:00
Mikael Djurfeldt
534a00990b * slib.scm (slib:load): Export.
* boot-9.scm (in-vicinity): Bugfix: Don't add "/" to an empty
vicinity;
Provide defmacro.
1997-09-20 13:57:22 +00:00
Mikael Djurfeldt
a4f9b1f613 * boot-9.scm (try-module-linked): Try to find module among those already
registered.
(try-module-dynamic-link): Removed the first test which
corresponds to a call to `try-module-linked'.
(resolve-module): Resolve modules in this order: 1. Already
registered modules (for example those which have been statically
linked), 2. Try to autoload an .scm-file, 3. Try to dynamically
link a .so-file.
1997-09-16 21:31:19 +00:00
Mikael Djurfeldt
0a54457d78 * boot-9.scm (keyword->symbol, display-usage-report): Changed
length --> string-length.  (Thanks to Aleksandar Bakic.)
(separate-fields-discarding-char, separate-fields-after-char,
separate-fields-before-char): Bugfix from Maciej Stachowiak
<mstachow@mit.edu>.  Thanks!
1997-09-16 20:35:15 +00:00
Mikael Djurfeldt
11b0526116 * boot-9.scm (keyword->symbol, display-usage-report): Changed
length --> string-length.
1997-09-16 20:16:57 +00:00
Mikael Djurfeldt
24b2aac77c * boot-9.scm (iota): Renamed list-reverse! --> reverse! 1997-09-15 21:43:41 +00:00
Mikael Djurfeldt
7a0ff2f807 * * boot-9.scm (primitive-macro?): New procedure.
* slib.scm: Added hack which transfers syntactic information from
	the builtin variable `define' to the slib version if module (ice-9
	syncase) has been loaded.  This is necessary to get correct
	expansion inside the slib module.

	* psyntax.ss (build-let, build-named-let): New output
	constructors.
	(build-lexical-var): Seed gensym with symbolic name.
	(self-evaluating?): Add keywords among self-evaluating types.
	(let): New core form.
	(if): Removed from core language.
	(or, and, let, cond): Removed syntactic definitions.
	(sc-expand3): New procedure: Expander which takes optional mode
	and eval-syntactic-expanders-when arguments.

	* syncase.scm (psyncomp): New procedure: Recompiles psyntax.pp.
	Should be used inside the (ice-9 syncase) module with (use-syntax
	syncase) and with the current directory containing the psyntax.ss
	source.
	Added hack to transfer syntactic information from the builtin
	variable `define' to the slib version if module (ice-9 slib) has
	been loaded.
1997-09-10 20:07:04 +00:00
Mikael Djurfeldt
d43f8c9708 * emacs.scm (emacs-load): Added new parameter `module'.
* syncase.scm (putprop, getprop): Modified to use the object
properties of the variable object corresponding to the symbol;
This way we can ride on the mechanisms of the module system.
Changed `builtin-variable' calls to `define-public' calls.
Setup the hooks sc-expand and sc-interface.

* boot-9.scm (sc-interface, sc-expand): New builtin variables.
(set-current-module): Switch to and from sc-expand as
scm:eval-transformer when going into and out of modules using
syncase macros.
(module-use!): Set scm:eval-transformer to sc-expand when adding
the syncase interface.
1997-09-05 01:21:02 +00:00
Mikael Djurfeldt
e672f1b55a * boot-9.scm (gensym): Removed (replaced by primitive).
(obarray-gensym): Rewritten to use `gensym'.
(gentemp): Rewritten to use `gensym'.
1997-09-01 22:27:58 +00:00
Gary Houston
6afcd3b2b6 * stime.h: prototype for scm_times.
* stime.c (scm_times): new procedure.
* ioext.c (scm_fseek): if the first argument is a file descriptor
call lseek.
(scm_ftell): if the first argument is a file descriptor call lseek
(sic).
* filesys.h: prototypes for scm_open_fdes, scm_fsync.
* filesys.c (scm_chmod): if the first argument is a file descriptor,
call fchmod.
(scm_chown): if the first argument is a port or file descriptor,
call fchown.
(scm_truncate_file): new procedure.
Add DEFER/ALLOW INTS to a few other procedures.
(scm_fsync): new procedure.
(scm_open_fdes): new procedure.
(scm_open): use scm_open_fdes.  If mode isn't specified, 666 will
now be used.
(scm_fcntl): the first argument can now be a file descriptor.  The
third argument is now optional.

* posix.c (scm_execl, scm_execlp): make the filename argument
compulsory, since omitting it causes SEGV.
(scm_sync): return unspecified instead of #f.
(scm_execle): new procedure.
(environ_list_to_c): new procedure.
(scm_environ): use environ_list_to_c.  disable interrupts.
(scm_convert_exec_args): take pos and subr arguments and
improve error checking.

* boot-9.scm: define tms accessors: clock, utime, stime, cutime,
cstime.
1997-08-16 18:48:44 +00:00
Mikael Djurfeldt
096d5f90c3 * slib.scm (slib:load): Use load-from-path instead of
primitive-load-path so that backtraces get narrowed properly at
the top.

* boot-9.scm (top-repl): Save stack already in signal handler in
order to narrow it correctly.
(save-stack): Adjust narrowing tag for the top of load-stacks.
1997-08-14 18:24:46 +00:00
Gary Houston
7a6f1ffa10 * ioext.h: fix up prototypes.
* ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
Scheme name is now dup->fdes.
(scm_dup_to_fdes): make the second argument optional and
fold in the functionality of scm_primitive_dup.
(scm_primitive_dup): deleted.
* fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
* fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
ultrix are defined.  Use setvbuf instead of setbuf.
(scm_setvbuf): new procedure.
(scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
(scm_setfileno): moved from ioext.c.
(scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
(top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.

* boot-9.scm (move->fdes, dup->port): use dup->fdes, not primitive-dup.
(dup->fdes): deleted, now done in C.
1997-07-29 02:21:08 +00:00
Gary Houston
956055a9d6 * boot-9.scm (setenv): new procedure, scsh compatible. 1997-07-26 20:37:05 +00:00
Marius Vollmer
8a6a86714b * boot-9.scm (with-fluids): New macro to go with the
builtin `with-fluids*'.
1997-07-26 20:03:23 +00:00
Mikael Djurfeldt
8309a10d87 * boot-9.scm: If using emacs interface, enable backtraces
automatically.
1997-07-23 18:15:37 +00:00
Gary Houston
e38303a26d * ioext.h: removed scm_duplicate_port prototype.
* ioext.c (scm_primitive_dup2): return the new file descriptor
instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
is convenient.
(scm_fdopen): bug fix: don't try to make port unbuffered until its
stream has been set.
(scm_duplicate_port): deleted, there's now an implementation in
boot-9.scm.
(scm_primitive_dup2): do nothing if newfd == oldfd.

* boot-9.scm (dup->port, dup->inport, dup->outport, dup->fdes,
dup, fdes->inport, fdes->outport, port->fdes): new procedures.
(duplicate-port): was a C primitive, now it's here.
(move->fdes): allow the first argument to be a file descriptor.
Return the modified port or file descriptor (was unspecified.)
1997-07-21 08:52:26 +00:00
Jim Blandy
4cd2a3e684 Changes to compile under gnu-win32, from Marcus Daniels:
* boot-9.scm (load-user-init): If HOME is unset, provide
a default of /.
1997-07-11 05:41:24 +00:00
Jim Blandy
3c5af9ef9b * boot-9.scm (define-public): Changed to accomodate Hobbit. 1997-07-11 05:13:59 +00:00
Jim Blandy
8bb7330c9c * boot-9.scm, debug.scm, hcons.scm, lineio.scm, mapping.scm,
poe.scm, slib.scm, tags.scm, threads.scm: Use normal list
notation, instead of #/ notation.
1997-06-24 16:26:27 +00:00
Jim Blandy
fb6d10650f Fix inconsistencies in parsing of #/ style lists.
* boot-9.scm (read-path-list-notation): New function.
(parse-path-symbol): Deleted.  Replaced by above.
Plug in read-path-list-notation as the parser for #/ lists,
instead of the anonymous lambda form calling parse-path-symbol.
(Thanks to Maurizio Vitale.)
1997-06-24 03:30:11 +00:00
Jim Blandy
f244dee1a1 Revert Marcus's changes; will re-apply when we get papers. 1997-06-24 02:16:31 +00:00
Jim Blandy
eda764e9d4 Changes to compile under gnu-win32, from Marcus Daniels:
* boot-9.scm (load-user-init): If HOME is unset, provide
a default of /.
1997-06-24 01:44:58 +00:00
Jim Blandy
75fd4fb691 * boot-9.scm (make-list): Remove the definition of this function
from the (ice-9 common-list) module; make the `init' argument
optional in the	scm module's definition, to match the deleted
definition.  Harmony reigneth?  (Thanks to Bernard URBAN.)
1997-06-23 23:44:20 +00:00
Jim Blandy
9946dd45a4 Try to detect when people are using one version of libguile and a
different version of ice-9.  People have been skewing things and
sending in bug reports.
* version.scm.in: New file, which the configure script munges to
produce version.scm, which contains the ice-9 config stamp.
* boot-9.scm: Compare the libguile and ice-9 config stamps;
display a warning if the two are different.
* Makefile.am: Install version.scm, but don't distribute it.
Distribute version.scm.in, but don't install it.
* Makefile.in: Regenerated.
1997-06-22 23:46:41 +00:00
Jim Blandy
52c5a23aed * boot-9.scm (struct-printer): Fix off-by-one error in range
check.  Correctly check for struct printer tag.

* boot-9.scm (with-regexp-parts): Comment this out.  It has no
users in the core, and relies on mildly hairy details of the old
regexp interface.

* boot-9.scm (ipow-by-squaring, butlast): Fix uses of outdated
function names.

* boot-9.scm (with-excursion-getter-and-setter, q-rear): Doc
fixes.
1997-06-13 05:50:49 +00:00
Marius Vollmer
755da2fc99 * boot-9.scm (struct-printer): Bugfix: Check the layout of the
vtable and not the one of the struct.
1997-06-06 15:14:55 +00:00
Marius Vollmer
fa7e927466 * boot-9.scm (struct-layout, %struct-printer-tag, struct-printer,
make-struct-printer, set-struct-printer-in-vtable!): New bindings
to support printing of structures.
(record-type-vtable, make-record-type): Add slot to hold printing
function and initialize it with something appropriate.  Removed
commented out printing code.
(record-type-name, record-type-fields): Adjusted slot offsets.
(%print-module): Reduce argument list to "mod" and "port".
1997-06-04 22:39:09 +00:00
Gary Houston
e1a191a8ca * scmsigs.h, async.h: updated.
* _scm.h: if HAVE_RESTARTS is defined then don't use a SYSCALL
loop.

* posix.c (scm_uname): interpret only negative values as an error.
Solaris normally returns a positive value.

* script.c (scm_compile_shell_switches): if we are not going into
an interactive repl, set scm_mask_ints to zero so that asyncs can
run.

* simpos.c (scm_system):  don't ignore/unignore signals around
the "system" call.

* posix.c (scm_open_pipe): don't ignore/unignore signals around
the "popen" call.

* init.c (scm_boot_guile_1): don't call scm_init_signals, it's
done in boot-9.scm instead.

* scmsigs.c, async.c: Major rewriting of signal handling code.
(scm_sigaction): new procedure.
(scm_sleep): don't wrap sleep in SCM_SYSCALL, it would mess up the
timing.
(scm_raise): return unspecified, throw error on failure.

* boot-9.scm: signal-handler, alarm-thunk: removed.
don't define ticks-interrupt etc.
top-repl: install signal handlers for SIGINT, SIGFPE, SIGSEGV, SIGBUS
during call to scm-style-repl.

* acconfig.h: mention HAVE_RESTARTS.
* configure.in: check for sigaction and restartable system calls.
1997-05-31 19:02:38 +00:00
Jim Blandy
05817d9e0e * regex.scm: Add a module declaration. Use DEFINE-PUBLIC everywhere.
* boot-9.scm: If the `regex' feature is present, use the module
(ice-9 regex).
1997-05-29 02:47:14 +00:00
Jim Blandy
1532804164 * COPYING, boot-9.scm, debug.scm, emacs.scm, expect.scm, gtcl.scm,
gwish.scm, hcons.scm, lineio.scm, mapping.scm, nonblocking.scm,
oldprint.scm, poe.scm, r4rs.scm, source.scm, tags.scm, test.scm,
threads.scm: New address for FSF.
1997-05-26 22:26:48 +00:00
Jim Blandy
5aa7fe691e doc fix 1997-05-15 21:22:25 +00:00
Jim Blandy
3a3e9e09b8 * boot-9.scm (eval-string): Function deleted; it was already
implemented in C, so there's no point in making a divergable copy
here.
1997-05-15 02:01:08 +00:00
Gary Houston
1fbc60b2c3 * boot-9.scm (error-catching-loop): don't read a line from
current input when quit is encountered, the previous change
fixes this too.
1997-05-13 04:46:16 +00:00
Jim Blandy
480977d064 * boot-9.scm (scm-style-repl): After reading an expression,
consume any trailing newline (perhaps preceded by whitespace), to
avoid screwing up GDB.  More detail in comments.
1997-05-13 00:02:05 +00:00
Marius Vollmer
6b8561828b * boot-9.scm (link-dynamic-module): Do not catch errors from
dynamic-link and dynamic-call.  When the shared library exists it is
now assumed to be suitable for a dynamic C module.
1997-04-30 13:35:11 +00:00
Marius Vollmer
89da903671 * boot-9.scm (process-use-modules): New function to support the
use-modules macro
(use-modules): throw an error iff one of the
requested modules can't be found.
1997-04-29 18:22:54 +00:00
Gary Houston
3be7701343 * boot-9.scm: don't define timer-thunk or gc-thunk. 1997-04-29 08:15:55 +00:00
Jim Blandy
ef00e7f466 * boot-9.scm (eval-string, command-line, load-user-init): New
functions.
1997-04-19 13:04:38 +00:00
Gary Houston
6549522160 * boot-9.scm (log10): defined. 1997-04-12 19:47:09 +00:00
Gary Houston
708bf0f343 * expect.scm (expect-select): correct the millisecond timeout
arithmetic (from Marko.Kohtala@ntc.nokia.com).
	* boot-9.scm (open-input-pipe, open-output-pipe): defined here
	instead of in libguile.
	(tm:sec etc.) new accessors for broken-down time.
	(set-tm:sec etc.) new setters for broken-down time.
1997-04-05 21:58:35 +00:00
Gary Houston
9337637f9a * boot-9.scm (netent:addrtype, servent:port): added missing
procedures.
(netent:net, servent:proto): repaired.
(utsname:sysname etc.): new accessors for uname.
* boot-9.scm (sockaddr:fam, sockaddr:path, sockaddr:addr,
sockaddr:port): new functions.
1997-03-29 18:38:21 +00:00