summaryrefslogtreecommitdiff
path: root/libguile/load.c
AgeCommit message (Collapse)AuthorFilesLines
2001-06-26* Deprecated scm_makfromstr and added scm_mem2string as a replacement.Dirk Herrmann1-4/+3
* Eliminated some potential gc problems. * Eliminated some signedness problems. * Minor changes.
2001-05-26revert the ill-considered part of the 2001-05-24 changesMichael Livshin1-1/+1
2001-05-24* validate.hMichael Livshin1-6/+6
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]): new macros. * unif.h: type renaming: scm_array -> scm_array_t scm_array_dim -> scm_array_dim_t the old names are deprecated, all in-Guile uses changed. * tags.h (scm_ubits_t): new typedef, representing unsigned scm_bits_t. * stacks.h: type renaming: scm_info_frame -> scm_info_frame_t scm_stack -> scm_stack_t the old names are deprecated, all in-Guile uses changed. * srcprop.h: type renaming: scm_srcprops -> scm_srcprops_t scm_srcprops_chunk -> scm_srcprops_chunk_t the old names are deprecated, all in-Guile uses changed. * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c, rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c, vectors.c, vports.c, weaks.c: various int/size_t -> size_t/scm_bits_t changes. * random.h: type renaming: scm_rstate -> scm_rstate_t scm_rng -> scm_rng_t scm_i_rstate -> scm_i_rstate_t the old names are deprecated, all in-Guile uses changed. * procs.h: type renaming: scm_subr_entry -> scm_subr_entry_t the old name is deprecated, all in-Guile uses changed. * options.h (scm_option_t.val): unsigned long -> scm_bits_t. type renaming: scm_option -> scm_option_t the old name is deprecated, all in-Guile uses changed. * objects.c: various long -> scm_bits_t changes. (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to SCM_I_FIXNUM_BIT. * num2integral.i.c: new file, multiply included by numbers.c, used to "templatize" the various integral <-> num conversion routines. * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl): deprecated. (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig, scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big, scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big, scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff, scm_num2size): new functions. * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x * load.c: change int -> size_t in various places (where the variable is used to store a string length). (search-path): call scm_done_free, not scm_done_malloc. * list.c (scm_ilength): return a scm_bits_t, not long. some other {int,long} -> scm_bits_t changes. * hashtab.c: various [u]int -> scm_bits_t changes. scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef). (scm_ihashx): n: uint -> scm_bits_t use scm_bits2num instead of scm_ulong2num. * gsubr.c: various int -> scm_bits_t changes. * gh_data.c (gh_scm2double): no loss of precision any more. * gh.h (gh_str2scm): len: int -> size_t (gh_{get,set}_substr): start: int -> scm_bits_t, len: int -> size_t (gh_<num>2scm): n: int -> scm_bits_t (gh_*vector_length): return scm_[u]size_t, not unsigned long. (gh_length): return scm_bits_t, not unsigned long. * fports.h: type renaming: scm_fport -> scm_fport_t the old name is deprecated, all in-Guile uses changed. * fports.c (fport_fill_input): count: int -> scm_bits_t (fport_flush): init_size, remaining, count: int -> scm_bits_t * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed those prototypes, as the functions they prototype don't exist. * fports.c (default_buffer_size): int -> size_t (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t default_size: int -> size_t (scm_setvbuf): csize: int -> scm_bits_t * fluids.c (n_fluids): int -> scm_bits_t (grow_fluids): old_length, i: int -> scm_bits_t (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int -> scm_bits_t (scm_c_with_fluids): flen, vlen: int -> scm_bits_t * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to the new and shiny SCM_NUM2INT. * extensions.c: extension -> extension_t (and made a typedef). * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so there are no nasty surprises if/when the various deeply magic tag bits move somewhere else. * eval.c: changed the locals used to store results of SCM_IFRAME, scm_ilength and such to be of type scm_bits_t (and not int/long). (iqq): depth, edepth: int -> scm_bits_t (scm_eval_stack): int -> scm_bits_t (SCM_CEVAL): various vars are not scm_bits_t instead of int. (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t i: int -> scm_bits_t * environments.c: changed the many calls to scm_ulong2num to scm_ubits2num. (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t * dynwind.c (scm_dowinds): delta: long -> scm_bits_t * debug.h: type renaming: scm_debug_info -> scm_debug_info_t scm_debug_frame -> scm_debug_frame_t the old names are deprecated, all in-Guile uses changed. (scm_debug_eframe_size): int -> scm_bits_t * debug.c (scm_init_debug): use scm_c_define instead of the deprecated scm_define. * continuations.h: type renaming: scm_contregs -> scm_contregs_t the old name is deprecated, all in-Guile uses changed. (scm_contregs_t.num_stack_items): size_t -> scm_bits_t (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t * continuations.c (scm_make_continuation): change the type of stack_size form long to scm_bits_t. * ports.h: type renaming: scm_port_rw_active -> scm_port_rw_active_t (and made a typedef) scm_port -> scm_port_t scm_ptob_descriptor -> scm_ptob_descriptor_t the old names are deprecated, all in-Guile uses changed. (scm_port_t.entry): int -> scm_bits_t. (scm_port_t.line_number): int -> long. (scm_port_t.putback_buf_size): int -> size_t. * __scm.h (long_long, ulong_long): deprecated (they pollute the global namespace and have little value besides that). (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an SCM handle). (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they exist (for size_t & ptrdiff_t) (scm_sizet): deprecated. * Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-05-15Merge from mvo-vcell-cleanup-1-branch.Marius Vollmer1-6/+6
2001-05-15* Make SCM_DEBUG_CELL_ACCESSES=1 work with GUILE_DEBUG_FREELIST.Dirk Herrmann1-1/+1
2001-03-12 * load.c (scm_primitive_load, scm_primitive_load_path),Martin Grabmüller1-17/+20
(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-11Use SCM_LISTn instead of scm_listify.Keisuke Nishida1-9/+7
2001-03-09Remove #include <stdio.h>. Add #include <string.h>.Keisuke Nishida1-1/+0
2001-03-06* Remove uses of SCM_ASSERT that may result in error messages differentDirk Herrmann1-15/+12
from wrong-type-arg errors.
2001-02-22* load.c (load): Use scm_primtive_eval_x instead of scm_i_eval_x.Marius Vollmer1-8/+1
2001-02-16(scm_parse_path, scm_search_path): Added docstrings.Martin Grabmüller1-2/+11
2001-02-08* modules.h (scm_selected_module, scm_current_module): RenamedMarius Vollmer1-2/+2
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-01-26* Added missing includes of string.h.Dirk Herrmann1-0/+2
2000-12-08* Use scm_mem2symbol or scm_str2symbol to create symbol objects.Dirk Herrmann1-1/+1
2000-11-22* Deprecated macros SCM_ROCHARS and SCM_ROUCHARS.Dirk Herrmann1-5/+5
2000-11-17* alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,Marius Vollmer1-0/+2
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-10-30* Change a couple of functions to accept either symbols or strings only.Dirk Herrmann1-19/+19
* Get rid of remainig uses of SCM_LENGTH etc.
2000-08-11* load.c (load): Use `scm_selected_module' to compute second argMikael Djurfeldt1-5/+15
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-06-12Updated copyrightsMikael Djurfeldt1-1/+1
2000-06-05* Removed SCM_TRUE_P since it may get confused with !SCM_FALSEP.Dirk Herrmann1-1/+1
2000-04-21* Makefile.am (DEFS): Added. automake adds -I options to DEFS,Mikael Djurfeldt1-14/+14
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-03Lots of fixes to make guile (at some time) compile with strict typing.Dirk Herrmann1-6/+5
2000-03-19 * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin1-0/+6
indentation style.
2000-03-18Only include root.h where it is actually needed.Dirk Herrmann1-0/+1
2000-03-17Only include strings.h where it is actually needed.Dirk Herrmann1-0/+1
2000-03-03* error.h, error.c: Added `scm_wrong_type_arg_msg' to supportGreg J. Badros1-1/+1
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-01-20Patch from Dirk Hermann:Greg J. Badros1-4/+4
* 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-18* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,Mikael Djurfeldt1-28/+28
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-11* dynl.c, feature.c, filesys.c, fports.c, list.c, load.c,Greg J. Badros1-2/+1
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* dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,Greg J. Badros1-2/+2
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-05* *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*Greg J. Badros1-10/+10
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05*.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.Greg J. Badros1-9/+9
1999-12-16* coop-threads.c: Remove K&R function headers.Greg J. Badros1-3/+3
* 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-14* backtrace.c (scm_set_print_params_x): Renamed fromGreg J. Badros1-29/+26
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-13* Makefile.am: Fix ETAGS_ARGS to recognize GUILE_PROC,Greg J. Badros1-5/+51
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-12* *.c: Pervasive software-engineering-motivated rewrite ofGreg J. Badros1-56/+59
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-09-12Update copyright years.Jim Blandy1-1/+1
1999-09-03* load.c (scm_search_path): If the filename has any extension atJim Blandy1-61/+84
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-08-29* load.c (scm_search_path): Don't try extensions which already areMikael Djurfeldt1-38/+48
present at the end of the filename. (scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
1999-08-20* load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.Jim Blandy1-12/+0
1998-10-19* __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,Jim Blandy1-1/+1
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-09-06* load.c (swap_port): Make this function static.Jim Blandy1-4/+4
* 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-06-22* load.c (scm_internal_parse_path): Renamed from scm_parse_path.Mikael Djurfeldt1-30/+72
(scm_parse_path, scm_search_path): New Scheme level procedures.
1998-06-18* load.c: #include "dynwind.h";Mikael Djurfeldt1-8/+30
(scm_primitive_load): Use scm_inner_dynamic_wind to update scm_cur_loadp.
1997-10-25* load.c (scm_init_load_path): Check GUILE_LOAD_PATH environmentJim Blandy1-18/+39
variable first; then SCHEME_LOAD_PATH, with a warning message. (scm_parse_path): New function. * script.c: Doc fixes.
1997-09-22* init.c (scm_boot_guile_1): Added scm_init_objects ().Mikael Djurfeldt1-2/+2
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-06-23* Makefile.am (libpath.h): Include the values of all the standardJim Blandy1-0/+21
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-17Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>Tim Pierce1-3/+4
* * 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-05-26* Lots of files: New address for FSF.Jim Blandy1-3/+3
1997-03-08 * strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.Gary Houston1-15/+9
* 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.