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

196 commits

Author SHA1 Message Date
Gary Houston
afe5177e7f * acconfig.h: add HAVE_ARRAYS.
* configure.in: add --disable-arrays option, probably temporary.

	* the following changes allow guile to be built with the array
	"module" omitted.  some of this stuff is just tc7 type support,
	which wouldn't be needed if uniform array types were converted
	to smobs.

	* tag.c (scm_utag_bvect ... scm_utag_cvect): don't define unless
	HAVE_ARRAYS.
	(scm_tag): don't check array types unless HAVE_ARRAYS.

	* sort.c (scm_restricted_vector_sort_x, scm_sorted_p):
	remove the unused array types.
	* (scm_stable_sort, scm_sort): don't support vectors if not
	HAVE_ARRAYS.  a bit excessive.

	* random.c (vector_scale, vector_sum_squares,
	scm_random_solid_sphere_x, scm_random_hollow_sphere_x,
	scm_random_normal_vector_x): don't define unless HAVE_ARRAYS.

	* gh_data.c (makvect, gh_chars2byvect, gh_shorts2svect,
	gh_longs2ivect,	gh_ulongs2uvect, gh_floats2fvect, gh_doubles2dvect,
	gh_uniform_vector_length, gh_uniform_vector_ref):
	don't define unless HAVE_ARRAYS.
	(gh_scm2chars, gh_scm2shorts, gh_scm2longs, gh_scm2floats,
	gh_scm2doubles):
	don't check vector types if not HAVE_ARRAYS.

	* eq.c (scm_equal_p), eval.c (SCM_CEVAL), print.c (scm_iprin1),
	gc.c (scm_gc_mark, scm_gc_sweep), objects.c (scm_class_of):
	don't support the array types unless HAVE_ARRAYS is defined.

	* tags.h: make nine tc7 types conditional on HAVE_ARRAYS.

	* read.c (scm_lreadr): don't check for #* unless HAVE_ARRAYS is
	defined (this should use read-hash-extend).

	* ramap.c, unif.c: don't check whether ARRAYS is defined.

	* vectors.c (scm_vector_set_length_x): moved here from unif.c.  call
	scm_uniform_element_size if HAVE_ARRAYS.
	vectors.h: prototype too.

	* unif.c (scm_uniform_element_size): new procedure.

	* init.c (scm_boot_guile_1): don't call scm_init_ramap or
	scm_init_unif unless HAVE_ARRAYS is defined.

	* __scm.h: don't define ARRAYS.

	* Makefile.am (EXTRA_libguile_la_SOURCES): unif.c and ramap.c
	moved here from	libguile_la_SOURCES.


	* Makefile.am (ice9_sources): add arrays.scm.

	* boot-9.scm: load arrays.scm if 'array is provided.

	* arrays.scm: new file with stuff from boot-9.scm.
1999-11-19 18:16:19 +00:00
Gary Houston
5c11cc9deb * configure.in: check for hstrerror.
* socket.c (scm_htons, scm_ntohs, scm_htonl, scm_ntohl): new
	functions for network data conversion.

	* numbers.c (scm_num2long, scm_num2longlong):
	throw out-of-range instead of wrong-type-arg if appropriate.
	(scm_iint2str): handle -2^31 correctly.
	(scm_num2long): handle -2^31 bignum correctly.
	(scm_num2long_long): rewrite the bigdig case: basically copied
	from scm_num2long.
	numbers.h: (SCM_BITSPERLONGLONG): deleted.

	* unif.c (rapr1): use sprintf instead of intprint for unsigned
	longs: intprint can't cope with large values.

	* numbers.c (scm_num2ulong): check more consistently that the
	input is not negative.  if it is, throw out-of-range instead of
	wrong-type-arg.

	* ramap.c (scm_array_fill_int): don't limit fill to INUM for
	uvect, ivect or llvect.
	Check that fill doesn't overflow short uniform array.

	* __scm.h: add another long to the definition of long_long and
	ulong_long.

	* unif.c (scm_raprin1): use 'l' instead of "long_long" in the
	print representation of llvect.  read can't handle more than
	one character.
	(scm_dimensions_to_uniform_array): make "fill" an optional argument
	instead of a rest argument.

	* tags.h (scm_tc7_llvect): wasn't defined anywhere, so use the free
	tag 29 for now.

	* __scm.h: don't mention LONGLONGS.

	* unif.c, numbers.c, eq.c, gc.c, print.c, eval.c, ramap.c:
	replace LONGLONGS with HAVE_LONG_LONGS as set by configure.

	* net_db.c (scm_inet_aton): throw errors using the misc-error key
	instead of system-error.  inet_aton doesn't set errno.
	system-error isn't right in gethost either, since it's throwing
	the value of h_errno instead of errno. so:
	(scm_host_not_found_key, scm_try_again_key,
	scm_no_recovery_key, scm_no_data_key): new error keys.
	(scm_resolv_error): new procedure, use the new keys.
	(scm_gethost): call scm_resolv_error not scm_syserror_msg.

	* error.c: (various): use scm_cons instead of scm_listify
	to build short lists.

	* boot-9.scm (read-hash-extend to set up arrays): add 'l' for
	long_long uniform vectors.

	* networking.scm (sethostent, setnetent, setprotoent, setservent):
	take an optional argument STAYOPEN.  default is #f.

	* readline.c (scm_init_readline): set rl_readline_name to Guile,
	to allow conditionals in  .inputrc.
1999-11-18 22:36:28 +00:00
Gary Houston
52cfc69be6 support new configure options: --disable-posix, --disable-net
and --disable-regex.
1999-09-26 16:00:36 +00:00
Mikael Djurfeldt
8087b6be5a * boot-9.scm (before-signal-stack): New fluid.
(top-repl): Set before-signal-stack in the signal handler.
1999-09-16 23:44:33 +00:00
Mikael Djurfeldt
6b64c19b70 * boot-9.scm (make-autoload-interface): Bugfix.
(top-repl): Autoload debugger.
1999-09-12 11:04:57 +00:00
Mikael Djurfeldt
bae971b70c Re-committed this change (got lost in a merge after conflict):
*	* boot-9.scm (top-repl): Use (ice-9 debug) (ice-9 debugger) (ice-9
	session) (ice-9 threads) (ice-9 regex) from guile-user only if
	top-repl is called.  This makes startup time for scripts 30% of
	what it was before...  Removed redundant code for loading of
	readline.
1999-09-12 02:30:47 +00:00
Mikael Djurfeldt
755457ec4a * * boot-9.scm (using-readline?): New procedure: Returns #t if
readline is used by the repl run by this thread.
	(handle-system-error): Print "Backtrace:" before backtrace since
	this is no longer done by display-backtrace.
1999-09-11 18:27:52 +00:00
Marius Vollmer
5b11a9aeaf * boot-9.scm (top-repl): Removed code for ativating readline. 1999-09-11 15:26:20 +00:00
Jim Blandy
4d31f0da8f Delete the test which compares the configuration date of libguile
with the configuration date of ice-9.  This test yields too many
false positives to be helpful.  For example, if you build Guile
for several architectures but have them all share a "share"
directory (which is supposed to work), then all but one
architecture's Guile will complain that the configuration dates
don't match.  Which is true, but indicates nothing wrong.
* boot-9.scm: Delete code which compares ice-9-config-stamp with
libguile-config-stamp.
* version.scm.in: Delete.
* Makefile.am (ice9_generated): Delete.
(subpkgdata_DATA): Remove ice9_generated.
(EXTRA_DIST): Remove version.scm.in.
* Makefile.in: Regenerate.
1999-09-11 15:05:25 +00:00
Mikael Djurfeldt
00b3396830 * * boot-9.scm (top-repl): Use (ice-9 debug) (ice-9 debugger) (ice-9
session) (ice-9 threads) (ice-9 regex) from guile-user only if
	top-repl is called.  This makes startup time for scripts 30% of
	what it was before...  Removed redundant code for loading of
	readline.
1999-09-11 13:35:28 +00:00
Mikael Djurfeldt
defed51763 * boot-9.scm (try-module-autoload): Use %search-load-path. 1999-08-29 14:21:30 +00:00
Mikael Djurfeldt
8a30733e8d * boot-9.scm: Removed old style hooks.
(inherit-print-state): Rwwritten to use port-with-print-state.
1999-08-24 02:22:18 +00:00
Jim Blandy
e8566222c2 Remove support for the #/ path list syntax entirely.
* boot-9.scm (read-path-list-notation,
read-path-list-notation-warning): Deleted.
Don't register read-path-list-notation-warning as a reader for
objects starting with '#/'.
1999-08-20 05:12:43 +00:00
Mikael Djurfeldt
1a961d7ef3 Renamed module-modified! --> module-modified 1999-08-05 17:56:15 +00:00
Mikael Djurfeldt
1777c18bc1 GOOPS needs the observer protocol specified for the new module
system.  Here's a simple version for the old module system:
* boot-9.scm (module-observers, module-weak-observers,
module-observer-id, set-module-observers!,
set-module-observer-id!): New accessors.
(module-type): Added slots `observers',	`weak-observers' and
`observer-id'.
(module-observe, module-observe-weak, module-unobserve,
module-modified!): New procedures.
(module-make-local-var!, module-add!, module-remove!,
module-clear!, module-define!, module-use!): Call module-modified!.
1999-08-05 12:05:57 +00:00
Mikael Djurfeldt
5f5f264287 * boot-9.scm (error-catching-loop): Correct non-RnRS usage of internal
defines.
1999-07-29 18:12:21 +00:00
Jim Blandy
e3306d8063 * boot-9.scm (read-delimited!): Put the terminator in the correct
position.
1999-07-19 08:11:19 +00:00
Mikael Djurfeldt
dd6ba90547 * boot-9.scm (top-repl): Set/clear readline prompts before/after
reading expressions.
1999-06-29 10:35:06 +00:00
Jim Blandy
e13c54c40e * boot-9.scm (top-repl): don't flush all ports at exit.
(error-catching-loop): likewise.
* boot-9.scm (scm-style-repl): -read: don't call
consume-trailing-whitespace if val is eof object.  Allows
exiting repl with single control-D.
* boot-9.scm (error-catching-loop): don't force output within
error catching loop after quit received.
(top-repl): flush all ports when the repl terminates.
* boot-9.scm (error-catching-loop): flush all ports before
primitive exit if non-interactive.
force-output on current-error-port if interactive.
* boot-9.scm (reopen-file): deleted.
* popen.scm (open-output-pipe, open-input-pipe): moved from
boot-9.scm.
* popen.scm: new file.
1999-06-09 12:17:03 +00:00
Mikael Djurfeldt
e69cd299ed * boot-9.scm (iota): replaced by a tail recursive version.
(reverse-iota):  removed.
1999-06-05 05:59:26 +00:00
Jim Blandy
50706e9475 * boot-9.scm (provided?): New function. 1999-05-02 17:27:05 +00:00
Mikael Djurfeldt
87cfc5dace * boot-9.scm: Provide 'values. 1999-04-08 06:06:56 +00:00
Mikael Djurfeldt
7cbaee0c89 * boot-9.scm (process-define-module, use-syntax): Bugfix:
:use-syntax should add syntax to using module, not current module.
(internal-use-syntax): Removed.
1999-03-21 13:04:39 +00:00
Mikael Djurfeldt
432558b9b5 * boot-9.scm (try-load-module): New procedure. Broken out from
resolve-module.
(resolve-module): Bugfix: Make it possible for a module at a
deeper level (x y z) to depend on a module on a higher (x y).
Use try-load-module.
1999-03-19 05:14:09 +00:00
Mikael Djurfeldt
c8eed87557 * boot-9.scm (make-record-type): Use `set-struct-vtable-name!' to
associate a name to the record type descriptor so that the object
system can create a wrapper class for it.
1999-03-14 16:46:04 +00:00
Mikael Djurfeldt
baa47a940d Gragg 1999-03-12 09:53:30 +00:00
Mikael Djurfeldt
edc185c769 * boot-9.scm (set-system-module!): New procedure: Set system/user
status of a module.;
Mark `the-root-module' and `the-scm-module' as system modules.
(process-define-module): Add new keyword :no-backtrace.
* boot-9.scm (environment-module): Bugfixed.
(set-module-eval-closure!): Add a pointer back from the eval
closure to the module.
1999-03-12 09:48:18 +00:00
Mikael Djurfeldt
45a02a29a6 * boot-9.scm (process-define-module): Reverted the change of
1998-11-23 which caused loading of object code if :use-module was
applied to the module itself.
1998-12-14 07:53:32 +00:00
Mikael Djurfeldt
9705d5c2a1 Fix 1998-12-11 05:07:18 +00:00
Mikael Djurfeldt
bf3c93d1ae * boot-9.scm (environment->module): New procedure. 1998-12-11 05:05:43 +00:00
Mikael Djurfeldt
7122506062 * boot-9.scm (process-define-module): Added new specifier
:autoload MODULENAME BINDINGS to the define-module form.
The autoload specifier tells the module system to load the module
MODULENAME at the first occasion that any variable with its name
among BINDINGS is referenced.
(make-autoload-interface): New procedure:  Constructs a stand-in
for the public interface for the module to be autoloaded.
1998-12-01 17:06:34 +00:00
Mikael Djurfeldt
3b3085c692 * boot-9.scm (*suppress-old-style-hook-warning*): Set this to #t
if you don't want the old style hook warnings.
1998-12-01 11:28:24 +00:00
Mikael Djurfeldt
49e5d550cb * boot-9.scm (try-using-libtool-name): Fix check on dlname to make
sure that it isn't empty, as it is when we are only buidling
static libraries.
1998-12-01 07:35:00 +00:00
Mikael Djurfeldt
1f60d9d237 Warn that resolve-module is used by modules.c 1998-11-26 17:56:36 +00:00
Mikael Djurfeldt
04efd24d82 * boot-9.scm: Use run-hook instead of run-hooks everywhere. 1998-11-26 08:31:02 +00:00
Mikael Djurfeldt
d1406b6a40 * boot-9.scm (run-hooks, add-hook!, remove-hook!): Added temporary
code for backward compatibility until people have had time to
adapt to the new hooks.
1998-11-25 15:17:12 +00:00
Mikael Djurfeldt
c04e89c78a Fix 1998-11-23 03:05:57 +00:00
Mikael Djurfeldt
3e3cec458e * boot-9.scm (beautify-user-module!): Beautify also if public
interface is set to the module itself.  In this way we can use
beautify-user-module! to beautify a module prepared for object
code.
(process-define-module): Special case: Try to load object code as
well if a module does :use-module on itself.
* boot-9.scm: Bugfix: Since boot-9.scm is now loaded from
invoke_main_func, we can no longer be sure that all modules have
been registered when boot-9.scm is loaded.
(register-modules): New function: Register and tag modules
registered by scm_register_module_xxx since last call to this
function.  Modules are tagged with the dynamic object passed as
argument.  (Already linked modules should be tagged with #f.)
(init-dynamic-module, link-dynamic-module): Call register-modules
first to register linked modules.
* boot-9.scm (init-dynamic-module): Remove module from
registered-modules as soon as possible in case we are recursively
invoked; Set public interface before doing the dynamic-call.
* boot-9.scm (map-in-order): Removed (replaced by scm_serial_map).
(abort-hook, before-error-hook, after-error-hook,
before-backtrace-hook, after-backtrace-hook, before-read-hook,
after-read-hook, exit-hook): Make hooks with `make-hook'.
* boot-9.scm: Make hooks first class citizens and make them easier
to use from C:
(make-hook, add-hook!, remove-hook!, run-hooks): Moved to
libguile/feature.c.
* boot-9.scm: Added warnings about bindings used in
libguile/modules.c: the-module, set-current-module,
make-modules-in, beautify-user-module!, module-eval-closure.
1998-11-23 02:36:43 +00:00
Mikael Djurfeldt
631c1902df * boot-9.scm: Added warnings about bindings used in
libguile/modules.c: the-module, set-current-module,
make-modules-in, module-eval-closure.
1998-11-22 12:03:34 +00:00
Mikael Djurfeldt
dc61592f84 * boot-9.scm (the-environment): New special form: Returns an
object representing the current local evaluation environment.
This object can be used in `local-eval' and `defined?'.
1998-11-20 17:12:45 +00:00
Mikael Djurfeldt
7398c2c2b5 * boot-9.scm (collect): New syntax. Similar to begin but returns
a list of the results of all forms in the sequence instead of the
result of the last form.
1998-11-12 16:03:11 +00:00
Mikael Djurfeldt
1729d8ff31 * boot-9.scm (values, call-with-values): Moved here from
syncase.scm.
1998-11-10 14:40:28 +00:00
Mikael Djurfeldt
e586be785c * boot-9.scm (readline-options, readline-enable, readline.disable,
readline-set!: New options interface.
1998-11-09 14:26:47 +00:00
Mikael Djurfeldt
4fdf8b2c76 * boot-9.scm: Set the repl start module in `top-repl' instead of
at the end of boot-9.scm.
1998-11-05 14:44:08 +00:00
Mikael Djurfeldt
2055a1bcd3 * boot-9.scm (exit-hook): New hook: Is run at the very end of an
interactive session.
1998-10-31 16:46:55 +00:00
Jim Blandy
9630e974d2 * boot-9.scm, debug.scm, expect.scm, hcons.scm, lineio.scm,
r4rs.scm, slib.scm, threads.scm: Update copyright years.
1998-10-19 21:23:31 +00:00
Jim Blandy
9aca88c39a * boot-9.scm: Don't assume that this file is loaded just before
entering a read-eval-print loop.  Turn code to load (ice-9 emacs)
into...
(load-emacs-interface): New function.
(top-repl): Call it, if use-emacs-interface is defined and true.
At this point, we *do* know we're about to enter a REPL.
1998-10-19 13:49:29 +00:00
Mikael Djurfeldt
c8f11b9756 * boot-9.scm: Added extended read syntax for byte vectors #y(...)
and short vectors #h(...).
1998-10-18 12:41:43 +00:00
Jim Blandy
bf7bc911dd * boot-9.scm (read-path-list-notation-warning): New function:
print a warning the first time we see `#/' notation.
1998-10-09 15:12:51 +00:00
Mikael Djurfeldt
45456413b8 * boot-9.scm (make-options): Bugfix: Changed pair? --> list? in
order to allow the empty list as arg.
(error-catching-loop): Use `with-traps' to create a dynamic
context with traps enabled.
1998-08-21 08:06:03 +00:00