1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

207 commits

Author SHA1 Message Date
Martin Grabmüller
67e8151b65 * load.c (scm_primitive_load, scm_primitive_load_path),
(scm_sys_search_load_path): Corrected docstrings (file ->
	filename).

	* eval.c (scm_force): Added texinfo markup to docstring.
	(scm_promise_p): Renamed parameter to `obj' to match docstring.

	* debug-malloc.c: Reinserted #include <stdio.h>.
2001-03-12 07:08:46 +00:00
Keisuke Nishida
e0c08f17b1 Use SCM_LISTn instead of scm_listify. 2001-03-11 09:44:08 +00:00
Keisuke Nishida
783e777478 Remove #include <stdio.h>. Add #include <string.h>. 2001-03-09 23:33:41 +00:00
Dirk Herrmann
2ade72d773 * Remove uses of SCM_ASSERT that may result in error messages different
from wrong-type-arg errors.
2001-03-06 01:22:37 +00:00
Marius Vollmer
f1b7a06676 * load.c (load): Use scm_primtive_eval_x instead of scm_i_eval_x. 2001-02-22 20:52:46 +00:00
Martin Grabmüller
d91788cb72 (scm_parse_path, scm_search_path): Added docstrings. 2001-02-16 15:12:26 +00:00
Marius Vollmer
aa767bc58f * modules.h (scm_selected_module, scm_current_module): Renamed
scm_selected_module to scm_current_module to synchronize Scheme
and C names.
(scm_select_module, scm_set_current_module): Likewise.  Changed
all uses.
2001-02-08 18:49:52 +00:00
Dirk Herrmann
13070bd3b0 * Added missing includes of string.h. 2001-01-26 17:30:54 +00:00
Dirk Herrmann
38ae064c6e * Use scm_mem2symbol or scm_str2symbol to create symbol objects. 2000-12-08 17:08:34 +00:00
Dirk Herrmann
34f0f2b8af * Deprecated macros SCM_ROCHARS and SCM_ROUCHARS. 2000-11-22 11:20:03 +00:00
Marius Vollmer
8dc9439fc6 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
version.c, vports.c, weaks.c: Makes sure the snarfer output
inclusion is disabled when the snarfer is run on the file.  Thanks
to Lars J. Aas!

* Makefile.am: Install guile-procedures.txt in version-specific
directory to enable multiple installed guile versions.  Suggested
by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-17 16:25:05 +00:00
Dirk Herrmann
a6d9e5abe5 * Change a couple of functions to accept either symbols or strings only.
* Get rid of remainig uses of SCM_LENGTH etc.
2000-10-30 11:42:26 +00:00
Mikael Djurfeldt
f33b174d0e * load.c (load): Use `scm_selected_module' to compute second arg
to new scm_i_eval_x; Don't call it if module system hasn't booted.
(scm_read_and_eval_x): Deprecated.
#include "modules.h".
2000-08-11 08:43:49 +00:00
Mikael Djurfeldt
f2c9fcb07e Updated copyrights 2000-06-12 12:28:24 +00:00
Dirk Herrmann
9a09deb1c3 * Removed SCM_TRUE_P since it may get confused with !SCM_FALSEP. 2000-06-05 11:39:46 +00:00
Mikael Djurfeldt
a059974535 * Makefile.am (DEFS): Added. automake adds -I options to DEFS,
and we don't want that.
(INCLUDES): Removed all -I options except for the root source
directory and the root build directory.

* *.*: Change includes so that they always use the "prefixes"
libguile/, qt/, guile-readline/, or libltdl/.
(Thanks to Tim Mooney.)
2000-04-21 14:16:44 +00:00
Dirk Herrmann
54778cd312 Lots of fixes to make guile (at some time) compile with strict typing. 2000-04-03 08:47:51 +00:00
Michael Livshin
89e00824a0 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 19:01:16 +00:00
Dirk Herrmann
ba11fd4cb6 Only include root.h where it is actually needed. 2000-03-18 08:44:04 +00:00
Dirk Herrmann
7ab3fdd51f Only include strings.h where it is actually needed. 2000-03-17 18:11:58 +00:00
Greg J. Badros
b6791b2e94 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
displaying the expected type.  Use SCM_LISTn in a couple places
instead of scm_cons-ing by hand.

* __scm.h: Added SCM_ASSERT_TYPE macro.

* validate.h, scm_validate.h: Added the former, as a renamed
version of the latter with SCM_ASSERT_TYPE used in
SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)

* Makefile.am: Rename scm_validate.h to validate.h.

* *.c, *.h: Include validate.h, not scm_validate.h (old name's
prefix was superfluous).
2000-03-03 00:09:54 +00:00
Greg J. Badros
2de14ecd1c Patch from Dirk Hermann:
* list.c: Put some variable initialization code at the point of
declaration; Added a comment for list*; Formatting changes.

* load.c: use SCM_NNULLP to make sure the end of a list is not
reached yet.
2000-01-20 20:59:33 +00:00
Mikael Djurfeldt
b380b88547 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
   keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
   objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
   ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
   stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
   symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
   weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
Greg J. Badros
5d2d2ffca7 * dynl.c, feature.c, filesys.c, fports.c, list.c, load.c,
net_db.c, sort.c, stacks.c, unif.c: Use SCM_WTA, SCM_MISC_ERROR
where possible.

* symbols.c (scm_sysintern0): Fixed the function name in a
scm_misc_error invocation.

* print.c (scm_simple_format): Do not need SCM_COERCE_SUBSTR, and
use scm_return_first to ward off latent GC bug that Mikael caught.

* async.c: Use SCM_VALIDATE_ASYNC_COPY one place where it wasn't
used before but should've been.
2000-01-11 23:56:47 +00:00
Greg J. Badros
70d6375376 * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,
net_db.c, read.c, socket.c: Update error messages to use ~A for
%s, ~S for %S to work with new `simple-format' format and be
standardized better.

* print.h, print.c (scm_simple_format): Added `simple-format'
primitive.  It's the old scm_display_error, with ARGS now a rest
parameter, and the destination first instead of last (and a couple
new capabilities inspired by `format' -- #t as destination means
current-output-port, #f means return the formatted text as a
string.

* gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.

* backtrace.c (scm_display_error_message): Rewrote to use
scm_simple_format() procedure.

* __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
2000-01-11 18:48:57 +00:00
Greg J. Badros
3b3b36ddb7 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05 19:25:37 +00:00
Greg J. Badros
a1ec69163d *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE. 2000-01-05 19:05:23 +00:00
Greg J. Badros
0c95b57d77 * coop-threads.c: Remove K&R function headers.
* scm_validate.h: Added SCM_VALIDATE_THREAD.

* *.c: Remove SCM_NIMP(X) when it is an extraneous pre-test given
that SCM_FOOP macros all now include SCM_NIMP in their expansion.
This simplifies lots of code, making it far more readable.
1999-12-16 20:48:05 +00:00
Greg J. Badros
e8e9b690b4 * backtrace.c (scm_set_print_params_x): Renamed from
set_print_params_x.

* guile-doc-snarf.in: Use guile-snarf.awk, not
guile-doc-snarf.awk.  Pass the basename of $filename

* load.h: Added prototypes for scm_sys_library_dir,
scm_sys_site_dir.

* load.c (scm_sys_library_dir, scm_sys_site_dir):  Added these
functions, and took out the old scm_library_dir, scm_site_dir,
scm_pkgdata_dir.  Now the primitives are %package-data-dir
(already existed), %library-dir, and %site-dir.

* debug.c: Use SCM_MISC_ERROR when possible instead of using
s_scm_* in a scm_misc_error() call.

* Makefile.am: Use guile-snarf.awk, not guile-doc-snarf.awk.  Make
using guile-doc-snarf send stdout to $@ to create the .x file like
guile-snarf does.

* guile-snarf.awk.in: Added.
1999-12-14 17:41:59 +00:00
Greg J. Badros
4079f87ed2 * Makefile.am: Fix ETAGS_ARGS to recognize GUILE_PROC,
GUILE_PROC1.  Build guile-procedures.txt, and add that file to
pkgdata_DATA.

* load.c: Added `pkgdata-dir', `site-dir', `library-dir'
primitives.

* guile-doc-snarf.awk: Drop trailing space when no arguments:
e.g., "(foo )" is now "(foo)".

* *.c: moved all the documentation for primitives from
guile-doc/ref/{appendices,posix,scheme}.texi into the source code.
This leaves about half of the primitives undocumented.  Also, all
the markup is currently still texinfo.  I don't have a problem
with texinfo per se, but the markup is not very descriptive or
accurate.
1999-12-13 03:40:23 +00:00
Greg J. Badros
1bbd0b849f * *.c: Pervasive software-engineering-motivated rewrite of
function headers and argument checking.  Switched SCM_PROC,
SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names
later, but was useful to keep old versions around while migrate)
that has docstrings and argument lists embedded in the GUILE_PROC
macro invocations that expand into a function header.  Use lots of
new SCM_VALIDATE_* macros to simplify error checking and reduce
tons of redundancy.  This is very similar to what I did for Scwm.

Note that none of the extraction of the docstrings, nor software
engineering checks of Scwm is yet added to Guile.  I'll work on
that tomorrow, I expect.

* Makefile.am: Added scm_validate.h to modinclude_HEADERS.

* chars.c: Added docstrings for the primitives defined in here.

* snarf.h:  Added GUILE_PROC, GUILE_PROC1.  Added
SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC
still remains for now.  Changed naming convention for the s_foo
string name of the primitive to be s_scm_foo for ease of use with
the macro.

* scm_validate.h: Lots of new SCM_VALIDATE macros to simplify
argument checking through guile.  Maybe some of these should be
folded into the header file for the types they check, but for now
it was easiest to just stick them all in one place.
1999-12-12 02:36:16 +00:00
Jim Blandy
af04791a1a Update copyright years. 1999-09-12 03:58:24 +00:00
Jim Blandy
563841768b * load.c (scm_search_path): If the filename has any extension at
all, ignore the entire list of extensions.  Also, don't check whether
the file is accessible.  If the file exists, accessible or not, we
should return it.  Inaccessible files should cause an error later.
(Thanks to Keisuke Nishida for the suggestions.)
1999-09-03 07:54:06 +00:00
Mikael Djurfeldt
0a74e31d21 * load.c (scm_search_path): Don't try extensions which already are
present at the end of the filename.
(scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
1999-08-29 14:22:29 +00:00
Jim Blandy
0b3b2958a5 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH. 1999-08-20 05:13:01 +00:00
Jim Blandy
7dc6e7547a * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
list.c, list.h, load.c, load.h, mallocs.c, markers.c,
mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
copyright years.
1998-10-19 21:36:50 +00:00
Jim Blandy
c7023c693a * load.c (swap_port): Make this function static.
* load.c (scm_search_path): Make max_path_len and max_ext_len
unsigned, since they're compared against string sizes.
* load.c (init_build_info): Make i unsigned.
1998-09-06 18:15:49 +00:00
Mikael Djurfeldt
04e8fb0adf * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
(scm_parse_path, scm_search_path): New Scheme level procedures.
1998-06-22 09:23:01 +00:00
Mikael Djurfeldt
d7834b915b * load.c: #include "dynwind.h";
(scm_primitive_load): Use scm_inner_dynamic_wind to update
scm_cur_loadp.
1998-06-18 21:53:45 +00:00
Jim Blandy
01cddfc1e8 * load.c (scm_init_load_path): Check GUILE_LOAD_PATH environment
variable first; then SCHEME_LOAD_PATH, with a warning message.
(scm_parse_path): New function.
* script.c: Doc fixes.
1997-10-25 06:53:11 +00:00
Mikael Djurfeldt
0c32d76caf * init.c (scm_boot_guile_1): Added scm_init_objects ().
Added #include "objects.h"

* eval.c (scm_makprom): Added SCM_DEFER_INTS and SCM_ALLOW_INTS.
Add #include "feature.h".

* ports.h (SCM_EOF_OBJECT_P): New macro predicate.
This test is needed at many places in the code and should be
abstracted.  (Motivated by the need of this test in libguiletk.)

* ports.c (scm_eof_object_p), vports.c (sfgetc), strports.c
(scm_eval_string), load.c (scm_primitive_load,
scm_read_and_eval_x), gh_eval.c (gh_eval_str):
Use SCM_EOF_OBJECT_P.

* eval.c (scm_init_eval): Add feature `delay'.
1997-09-22 00:43:52 +00:00
Jim Blandy
e151bee62a * Makefile.am (libpath.h): Include the values of all the standard
Makefile directory variables.  Print a message, but don't print
all the commands.
(versiondat.h): Print a message, but don't print all the commands.
* load.c: #include "alist.h".
(init_build_info): New function.
(scm_init_load): Call it.
* Makefile.in: Regenerated.
1997-06-23 23:48:39 +00:00
Tim Pierce
5540787919 Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
*	* load.c (scm_init_load_path): Append $(datadir)/guile to
	%load-path, so modules do not have to be installed in Guile's
	current version directory.
1997-06-17 19:20:07 +00:00
Jim Blandy
82892beda5 * Lots of files: New address for FSF. 1997-05-26 22:34:48 +00:00
Gary Houston
deca31e173 * strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.
* gdbint.c (gdb_read): update scm_lreadr usage.

	* load.h: update prototypes.

	* load.c (scm_primitive_load, scm_read_and_eval_x,
	scm_primitive_load_path): remove case_insensitive_p, sharp arguments.

	* read.h: add prototype for scm_read_hash_extend.  Change args for
	other prototypes.

	* read.c (scm_read_hash_procedures): new variable.
	(scm_read_hash_extend): new procedure.
	(scm_get_hash_procedure): new procedure.
*	(scm_lreadr): use scm_get_hash_procedure instead of an argument
	for extended # processing.
	(scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen,
	scm_read_token): remove case_i, sharp arguments.  Change callers.

	* read.h (SCM_N_READ_OPTIONS): increase to 3.
	(SCM_CASE_INSENSITIVE_P): define.

	* read.c: add case-insensitive option to scm_read_opts.
*	(scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument
	to determine whether to convert symbol case.
	(default_case_i): definition removed.
	* read.c (scm_read_token): if case_i, downcase ic before doing
	anything with it.
1997-03-08 18:58:24 +00:00
Mikael Djurfeldt
b35d06a4bb * load.c: Added #include "throw.h".
*	* load.c, load.h (scm_read_and_eval_x): New function.
1996-11-02 20:53:42 +00:00
Mikael Djurfeldt
3feedb0011 * load.c, load.h (scm_sys_package_data_dir): New function. 1996-10-30 23:34:33 +00:00
Jim Blandy
26544b963b * * load.c (scm_sys_search_load_path): Search for files under all
extensions listed in the %load-extensions variable.  If FILENAME
	is absolute, return it unchanged, without searching the load path.
*	(scm_loc_load_extensions): New variable, pointing to
	%load-extensions' value cell.
	(scm_init_load): Initialize it, and the value it points to.
	(scm_primitive_load_path): Improve error reporting.

*	* load.c (scm_loc_load_hook): New variable, pointing to value cell
	of new Scheme variable %load-hook.
	(scm_primitive_load): Apply %load-hook to filename.
1996-10-28 23:05:37 +00:00
Gary Houston
523f526658 * load.c: change s_try_load and s_try_load_path to s_primitive_load
and s_primitive_load_path.

* eval.c, load.c, error.c (scm_wta): use scm_misc_error.

* error.h: don't declare error symbols.  prototype for scm_misc_error.

* stackchk.c (scm_stack_overflow_key): defined here instead of in
error.c.

* error.c: use SCM_SYMBOL to set up error keys.
scm_misc_error: new procedure.
1996-10-27 02:38:39 +00:00
Mikael Djurfeldt
25d8012c77 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:29:38 +00:00