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

275 commits

Author SHA1 Message Date
Marius Vollmer
645e38d9ac * boot-9.scm (define-public): Removed spurious call to
`interaction-evironment'.
(define-public, defmacro-public): Use `export' instead of explicit
module magic.
(eval-when): New macro.
(define-module, use-modules, use-syntax, export): Use it to
restrict the use of these forms to the top level.
(define-public, defmacro-public): Only export binding when on
top-level.
(process-define-module): Call `set-current-module' with the
defined module.
(define-module): Simply call `process-define-module' without any
fuss (but only on top-level).
(named-module-use!): New function.
(top-repl): Do not use `define-module'.  Use equivalent low-level
means instead.
2001-02-13 01:07:45 +00:00
Marius Vollmer
22b3076671 * boot-9.scm (scm-style-repl): Use `primitive-eval' instead of
`eval'.
(define-public): Do not use `eval'.
2001-02-11 18:16:58 +00:00
Dirk Herrmann
e9bab9df3d * Make readline run-time options accessible. 2001-01-26 16:58:48 +00:00
Gary Houston
6d36532c1c * boot-9.scm: don't import (ice-9 rdelim) here. it's done
in C for now.
	* rdelim.scm: export the C primitives too.
	* documentation.scm: use (ice-9 rdelim).

	* filesys.c (scm_link): docstring fix.
	* fports.h (scm_setfileno): obsolete declaration removed.
	* posix.c: bogus popen declaration removed.

	* rdelim.c: new file, split from ioext.c with new proc
	scm_init_rdelim.
	* rdelim.h: new file.
	* Makefile.am: add rdelim.c and related files.
	* init.c: call scm_init_rdelim.  include rdelim.h.
2001-01-24 21:45:09 +00:00
Gary Houston
9d7748147e * rdelim.scm: new file implementing module (ice-9 rdelim).
* ice-9.scm (scm-line-incrementors read-line! read-delimited!
	read-delimited read-line): moved to rdelim.scm.
	scm-line-incrementors is not exported.
	* boot-9.scm: import (ice-9 rdelim) for backwards compatibility,
	for now.
	* lineio.scm: use module (ice-9 rdelim).
	* Makefile.am (ice9_sources): add rdelim.scm.
2001-01-21 22:11:29 +00:00
Dirk Herrmann
1746633025 * Remove calls to symbol-interned? which have always been useless, but now
have become wrong since symbols and bindings are separated.
2000-12-29 15:47:16 +00:00
Dirk Herrmann
6b098fecdc * Lookup 'use-emacs-interface in the-root-module. 2000-12-12 18:10:56 +00:00
Dirk Herrmann
4e15fee80f * Don't use make-shared-substring any more. 2000-11-28 13:40:40 +00:00
Gary Houston
3923fa6d06 * boot-9.scm: values?, get-values, values, call-with-values:
removed.  values and call-with-values are now primitives and
	the other two were only exported by accident.  don't define
	*values-rtd* record type or handle multiple values in
	scm-style-repl.
2000-11-26 18:28:57 +00:00
Mikael Djurfeldt
82b3d7781f * boot-9.scm: Removed comment. (Thanks to Brad Knotwell.) 2000-09-20 16:50:18 +00:00
Mikael Djurfeldt
484cd65682 * boot-9.scm (gentemp): Moved to symbols.c. 2000-09-12 05:45:26 +00:00
Marius Vollmer
2d55a919c3 * boot-9.scm (make-object-property): New function. 2000-09-03 20:20:19 +00:00
Mikael Djurfeldt
06f0414c85 * boot-9.scm (make-record-type): Use `string-append' instead of
`symbol-append'.
(symbol-append): Map `symbol->string' on
args.
(obarray-symbol-append, obarray-gensym): Simply removed.  I don't
think I'll announce this in NEWS even.  One of the functions never
even worked...  /mdj.
(find-and-link-dynamic-module, keyword->symbol): Use
`symbol->string'.
(try-module-autoload, process-define-module): Rewrote using R5RS
semantics.
2000-08-27 03:20:19 +00:00
Mikael Djurfeldt
d7faeb2ee9 * boot-9.scm (record-constructor, record-accessor,
record-modifier, scm-style-repl): Add second arg to eval.
(read-hash-extend #\.): Ditto.  (This is actually a bugfix!)
(eval-in-module): Redefined to be eval and deprecated.
2000-08-11 08:45:35 +00:00
Mikael Djurfeldt
44484f52b3 * boot-9.scm (scm-style-repl): Print multiple values on successive
lines.
* boot-9.scm (process-define-module): Bugfix: Make sure that
exports are done *after* all used interfaces has been added.
2000-08-11 00:44:49 +00:00
Dirk Herrmann
2238100586 * In expt, return exact results when possible. 2000-07-13 14:47:32 +00:00
Dirk Herrmann
2451150282 * Fixed expt for the case of negative integer exponents. 2000-07-12 07:38:06 +00:00
Mikael Djurfeldt
a473feada1 * boot-9.scm (process-define-module): Bugfix: Only check the CDR
for export args.
2000-07-01 17:01:22 +00:00
Mikael Djurfeldt
bd0fb3cfbf * boot-9.scm: Turned the-module', *top-level-lookup-closure*',
and `scm:eval-transformer' into fluids.
2000-06-21 02:46:44 +00:00
Mikael Djurfeldt
90847923a4 * boot-9.scm (purify-module!, module-export!): New procedures.
(export): Rewritten using `module-export!'.
(process-define-module): New define-module options: pure, export.
See NEWS.
2000-06-21 01:16:45 +00:00
Mikael Djurfeldt
d5504515e3 * boot-9.scm (make-autoload-interface): Set init value for uses to
'() instead of #f.
(make-modules-in): Name modules with their real (= full) names.
(the-root-module, the-scm-module): Named `(guile)' instead of
`the-root-module'.
(the-scm-module): Set kind to 'interface.
2000-06-11 18:29:57 +00:00
Mikael Djurfeldt
cb546c61ba * boot-9.scm (error-catching-loop): Inform about debugger on error. 2000-06-05 00:31:24 +00:00
Mikael Djurfeldt
6906bd0d7a * boot-9.scm (scm-module-closure): New procedure: Was previously
anonymous.  Now needed in modules.c.
(make-module): Use `standard-eval-closure' to create the eval
closure.
2000-06-04 01:34:27 +00:00
Gary Houston
1f08acd9ee 2000-05-14 Gary Houston <ghouston@arglist.com>
* boot-9.scm (load-user-init): rewritten.  first work out the home
	directory and then try to open the file (previously it could try
	to open a file in more than one place).  catch exceptions when
	trying to get a directory from the user database.  don't check
	that ~/.guile is not a directory before trying to load it (a lack
	of ~/.guile is not a crime, but if the file is not valid for any
	reason then primitive-load will raise an error).
2000-05-14 22:15:13 +00:00
Dirk Herrmann
5ea6d5318a * abs no longer accepts complex numbers as parameter. 2000-05-11 15:51:56 +00:00
Greg J. Badros
5b52885cda * boot-9.scm: Drop unused definition of sfx function -- thanks
Dirk Hermann!
2000-03-02 20:44:19 +00:00
Gary Houston
bd9e24b301 * strings.h: don't use SCM_P. don't include <string.h>.
* error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.

	* strings.c (scm_string_ref): make the 2nd argument compulsory.
	previously it defaulted to zero for no good reason that I can see.
	use a local variable for SCM_INUM (k).  replace
	SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.

	(scm_makfromstr): cosmetic changes.

	(scm_string): Accept only chars in the list, not strings, for
	conformance to R5RS (particularly for list->string, which is
	supposed to be the inverse of string->list.)  remove
	SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
	scm_makstr handles the cell allocation.  when reporting wrong-type
	arg, don't report the position as 1.

	* posix.c (scm_init_posix): intern PIPE_BUF if it's defined.

	* boot-9.scm (find-and-link-dynamic-module): pass strings, not symbols,
	to string-append.
2000-01-31 18:29:56 +00:00
Greg J. Badros
8641dd9e73 * boot-9.scm expect.scm, syncase.scm: Switch to new style
`simple-format' message strings: substitute ~A for %s, and ~S for
%S.

* boot-9.scm:  Added (define format simple-format) to expose that
primitive via the simpler name until format.scm is loaded.
2000-01-11 18:52:25 +00:00
Marius Vollmer
352d134ce5 * boot-9.scm (try-using-libtool-name): Do not bother to look
inside libtool ".la" file, dynamic-link does this for us now.
2000-01-10 00:33:39 +00:00
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