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

30 commits

Author SHA1 Message Date
Ludovic Courtès
88cbb42189 Restore signature of `scm_search_path ()' as found in 1.8.
The incompatibly was introduced by
22f4ee4882 ("make primitive-load-path load
compiled files if available").

* doc/ref/api-options.texi (Build Config): Update `search-path'
  documentation.

* libguile/load.c (scm_search_path): Change C prototype to expect only 3
  arguments.  Parse the rest argument accordingly.  Update callers.

* libguile/load.h (scm_search_path): Update accordingly.
2009-11-01 23:29:36 +01:00
Ludovic Courtès
31ab99de56 Restore signature of `scm_primitive_load_path ()' as found in 1.8.
The incompatibility was introduced by
0fb81f95b0 ("add exception_on_error
optional arg to primitive-load-path").

* libguile/load.c (scm_primitive_load_path): Change to take 1 rest
  argument.  Interpret the argument as either a file name (C-level
  backward compatibility with 1.8) or an actual argument list.
  (scm_c_primitive_load_path): Update caller.

* libguile/load.h (scm_primitive_load_path): Update accordingly.

* doc/ref/api-evaluation.texi (Loading): Update documentation of
  `primitive-load-path' and `scm_primitive_load_path ()'.
2009-10-15 01:05:32 +02:00
Andy Wingo
9591a2b016 `load' autocompiles
* libguile/load.h:
* libguile/load.c (scm_sys_warn_autocompilation_enabled): New primitive,
  not exported. Since `load' autocompiles now, it should warn in the
  same way that the bits hardcoded into C warn.
  (scm_try_autocompile): Use scm_sys_warn_autocompilation_enabled.

* module/ice-9/boot-9.scm (autocompiled-file-name): New helper.
  (load): Try autocompiling the argument, if appropriate. Will
  autocompile files passed on Guile's command line. `primitive-load' is
  unaffected.
2009-08-18 11:06:04 +02:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Andy Wingo
0fb81f95b0 add exception_on_error optional arg to primitive-load-path
* libguile/init.c (scm_load_startup_files): Use
  scm_c_primitive_load_path.

* libguile/load.c (scm_primitive_load_path): Add an optional arg,
  exception_on_error, which if #f will cause primitive-load-path to just
  return #f if no file is found. This is to help out the semantics of
  try-module-autoload. We can't just catch misc-error, because loading
  the file could raise any exception.
  (scm_c_primitive_load_path): Add the extra arg to
  scm_primitive_load_path.

* libguile/load.h: Adapt scm_primitive_load_path prototype.

* module/ice-9/boot-9.scm (try-module-autoload): Refactor slightly to be
  clearer.
2009-06-03 22:20:55 +02:00
Andy Wingo
22f4ee4882 make primitive-load-path load compiled files if available
* libguile/load.h: Update scm_search_path prototype.

* libguile/load.c: Include vm.h for load-compiled/vm. Not sure if this is
  bad wrt modularity.
  (scm_c_string_has_an_ext): New private helper.
  (scm_search_path): Add an extra optional arg, `require_exts'; if true,
  require that the returned file name have one of the given extensions.
  Changes the C API, but not the scheme API.
  (scm_sys_search_load_path): Adapt to scm_search_path API change.
  (primitive-load-path): Here is the craziness: load a compiled file if
  found and newer than the corresponding (or not) source file.
  (scm_init_load): Define %load-compiled-extensions as the list of
  extensions denoting compiled files; defaults to '(".go").
2008-09-02 11:00:32 -07:00
Ludovic Courtès
102dbb6f6c Add `SCM_INTERNAL' macro, use it. 2008-05-31 23:21:02 +02:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
7d04d68bf7 (scm_internal_parse_path): Removed.
(scm_parse_path): Use scm_string_split to do the work.
(scm_init_load_path): Use scm_parse_path instead of
scm_internal_parse_path.
(scm_search_path): Rewritten string handling part of the code in
terms of scm_to_locale_stringbuf and so that it is thread safe.
2004-08-10 13:30:12 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Marius Vollmer
33b001fd89 Prefixed each each exported symbol with SCM_API. 2001-11-02 00:19:12 +00:00
Dirk Herrmann
dee01b012c * Removed deprecated stuff.
* Some more renamings to SCM_<filename>_H.
2001-08-31 12:13:50 +00:00
Martin Grabmüller
58ade1022c * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
	feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
	gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
	gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
	guile-func-name-check.in, guile-snarf-docs-texi.in,
	guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
	hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
	objprop.c, objprop.h, options.c, options.h, random.h,
	regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
	strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
	version.c, version.h: Updated copyright notice.
2001-07-19 21:08:49 +00:00
Marius Vollmer
c519b27251 (scm_c_primitive_load,
scm_c_primitive_load_path): New.
2001-06-29 23:13:43 +00:00
Mikael Djurfeldt
f2c9fcb07e Updated copyrights 2000-06-12 12:28:24 +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
Greg J. Badros
7866a09b5b * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
added append docs from R4RS.

* strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
Thanks Dirk Hermann!

* chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR.  Thanks Dirk Hermann!

* *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
Drop use of SCM_P for function prototypes... assume an ANSI C
compiler.  Thanks Dirk Hermann!
2000-03-02 20:54:43 +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
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
Mikael Djurfeldt
f9bb0fe1a3 * load.h (scm_internal_parse_path, scm_parse_path,
scm_search_path): Declared.
1998-06-22 09:22:38 +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
19a18b54db * * load.c, load.h (scm_read_and_eval_x): New function. 1996-11-02 20:53:47 +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
b9d5d65460 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
from scm_sys_try_load and scm_sys_try_load_path.  The Scheme name
of scm_primitive_load_path was also changed to
"primitive-load-path", from "%try-load-path".  Callers changed.
We'd like to respect the convention that a function named
"try-mumble" should behave just like the function called "mumble",
but return #f instead of signalling some error.
* load.h: Rename prototypes.
1996-10-15 22:30:48 +00:00
Jim Blandy
3e8a29f5f5 Use SCM_P instead of PROTO; the latter intrudes on the user's
namespace.
* params.h: Deleted; definition of SCM_P moved to...
* __scm.h: ... here, where it replaces PROTO macro.
* libguile.h, smob.h: Don't #include "params.h".
* continuations.c, error.h, feature.h, gc.c, gc.h, init.h, load.h,
smob.h: Fix prototypes accordingly.
* Makefile.in: Update dependencies.
(inner_h_files): Remove params.h.
1996-09-10 19:22:40 +00:00
Jim Blandy
5e044c02d3 * eq.h, files.h, hashtab.h, load.h, mallocs.h, scmsigs.h,
simpos.h: #include "libguile/__scm.h".
1996-09-10 19:08:54 +00:00
Jim Blandy
68ec6062ce Move code to initialize and search %load-path from ice-9 to C
code, so we can use the load-path to find the ice-9 boot code;
this makes it easier to run Guile without installing it.  See
corresponding changes in guile/Makefile.in.
* feature.c: Move stuff concerned with the load path to load.c.
(scm_compiled_library_path): Deleted.
Don't #include libpath.h here.
* feature.h: Don't mention scm_compiled_library_path.
* load.c: #include "libpath.h" here, as well as <sys/types.h>,
<sys/stat.h>, and <unistd.h> (if present).
(R_OK): #define if the system hasn't deigned to.
(scm_loc_load_path): New variable.
(scm_init_load_path, scm_sys_search_load_path,
scm_sys_try_load_path): New functions.
(scm_init_load): Initialize scm_loc_load_path to point to the
value cell of the Scheme %load-path variable.
* load.h: Add declarations for scm_sys_search_load_path,
scm_sys_try_load_path.
* init.c: Call scm_init_load_path.
* Makefile.in (feature.o, load.o): Dependencies updated.

* load.c, load.h: Rewrite using PROTO macro.
1996-09-05 16:51:34 +00:00
Jim Blandy
0f2d19dd46 maintainer changed: was lord, now jimb; first import 1996-07-25 22:56:11 +00:00