summaryrefslogtreecommitdiff
path: root/libguile/error.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Retire inclusion guard macro SCM_MAGIC_SNARFER.Thien-Thi Nguyen2002-03-141-2/+0
|
* 2001-11-07 Stefan Jahn <stefan@lkcc.org>Stefan Jahn2001-11-071-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Include `win32-socket.o' in the list of object files if networking is enabled on Win32. 2001-11-07 Stefan Jahn <stefan@lkcc.org> * win32-socket.[ch]: New files. Defines Winsock-API error codes and makes them available through Guile. That is because the Winsock-API does not store its errors in `errno' and thus cannot return error messages via `strerror (errno)'. * socket.c (scm_init_socket): Initialize `win32-socket' part here under M$-Windows. * numbers.h: Added missing declaration of `scm_sys_check_number_conversions()'. * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO and use in `(strerror)' and `(system-error)'. * Makefile.am (EXTRA_libguile_la_SOURCES): Added `win32-socket.[ch]' to extra source and header files.
* * error.c, error.h: Made error keys globally accessible.Mikael Djurfeldt2001-09-201-7/+7
| | | | | Applications might want to test for these or use them in a direct call to scm_error.
* * Removed lots of deprecated stuff.Dirk Herrmann2001-08-311-53/+0
|
* Remove "face-lift" comment.Thien-Thi Nguyen2001-07-091-2/+0
|
* * posix.c (getlogin): getlogin() implementation for Windows.Martin Grabmüller2001-07-031-0/+5
| | | | | | | | | * backtrace.c, ioext.c: Include <stdio.h>. * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does exist. * cpp_sig_symbols.in: Added SIGBREAK.
* * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,Keisuke Nishida2001-06-281-13/+13
| | | | | | | | | | | scm_list_n): New functions. (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated. (lots of files): Use the new functions. * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N. * strings.c: #include "libguile/deprecation.h".
* * validate.hMichael Livshin2001-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* * error.c (scm_sysmissing): deprecation expired - removed.Rob Browning2001-04-271-27/+0
|
* Correct, update, improve and clean up a lot of docstrings in order to makeMartin Grabmüller2001-04-031-14/+17
| | | | the documentation much more consistent.
* * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,Dirk Herrmann2001-03-171-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call scm_wrong_type_arg instead. (SCM_WNA): Deprecated. * error.[ch] (scm_wta): Deprecated. * numbers.c (s_i_log): Minor comment fix. * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra, scm_make_shared_array, scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p): Don't use SCM_ASSERT to check for wrong-num-args or misc errors. * unif.c (scm_make_shared_array, scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x): Validate the rest argument (note: this is only done when guile is built with SCM_DEBUG_REST_ARGUMENT=1) (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x): Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS. * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
* * Added function scm_error_num_args_subr.Dirk Herrmann2001-03-171-1/+13
|
* Use SCM_LISTn instead of scm_listify.Keisuke Nishida2001-03-111-5/+4
|
* * _scm.h: Removed #include <errno.h>.Mikael Djurfeldt2001-03-101-3/+2
| | | | | | | | | | | * error.c, net_db.c, putenv.c, stime.c: Removed declaration of errno variable (can be a macro on some systems, for example when using linux libc with threads). * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c, posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c, socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added #include <errno.h> in these 20 out of 100 files.
* * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,Marius Vollmer2000-11-171-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.
* * Change a couple of functions to accept either symbols or strings only.Dirk Herrmann2000-10-301-4/+28
| | | | * Get rid of remainig uses of SCM_LENGTH etc.
* * macros.c: Remove surplus newlines from end of docstrings.Neil Jerram2000-08-111-1/+1
| | | | | | | | | | | | | * list.c (scm_list_tail): Add @deffnx line to docstring for list-cdr-ref. * keywords.c: Docstring improvements in conjunction with new reference manual doc on keywords. * error.c (scm_error_scm): Fix texinfo syntax error in docstring. (@code(~S) should be @code{~S}.) * dynl.c: Remove surplus newlines from end of docstrings.
* * Extend checks performed with SCM_DEBUG_CELL_ACCESSES=1 and make themDirk Herrmann2000-07-131-1/+1
| | | | | | configurable at run-time. * Replace SCM_FREEP by SCM_FREE_CELL_P and scm_gc_heap_lock by scm_gc_running_p (not in all places yet).
* * Re-introduced some symbols as deprecated.Dirk Herrmann2000-06-301-0/+10
|
* * Eliminated use of SCM_ASSERT to check for range errors.Dirk Herrmann2000-06-301-2/+0
| | | | | * Fix some error reporting code in list.c * Added some test cases.
* * Cleaned up memory error signalling.Dirk Herrmann2000-06-291-2/+0
|
* * Wrapped deprecated code between #if (SCM_DEBUG_DEPRECATED == 0) #endif.Dirk Herrmann2000-05-151-0/+6
| | | | * Replace use of deprecated macros SCM_INPORTP, SCM_OUTPORTP, SCM_ICHRP.
* * Makefile.am (DEFS): Added. automake adds -I options to DEFS,Mikael Djurfeldt2000-04-211-8/+8
| | | | | | | | | | 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.)
* * error.c (scm_syserror): save errno before doing anything else,Gary Houston2000-04-041-3/+5
| | | | | since it's used in two expressions and may get mutated (thanks to Dirk Herrmann).
* * error.c (scm_error): Don't try to throw an error ifMikael Djurfeldt2000-03-291-1/+9
| | | | scm_gc_heap_lock is true.
* * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin2000-03-191-0/+6
| | | | indentation style.
* Only include strings.h where it is actually needed.Dirk Herrmann2000-03-171-0/+1
|
* Removed empty file genio.h and references to it.Dirk Herrmann2000-03-171-1/+0
|
* * error.h, error.c: Added `scm_wrong_type_arg_msg' to supportGreg J. Badros2000-03-031-6/+25
| | | | | | | | | | | | | | | | 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).
* * strings.h: don't use SCM_P. don't include <string.h>.Gary Houston2000-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,Mikael Djurfeldt2000-01-181-12/+12
| | | | | | | | | | 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.
* * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,Greg J. Badros2000-01-111-10/+10
| | | | | | | | | | | | | | | | | | | | 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
* * eval.c: define scm_unbound_variable_key ('unbound-variable).Gary Houston2000-01-091-0/+3
| | | | | | | | | | | | | | | | | | scm_lookupcar1: throw an error with key 'unbound-variable instead of 'misc-error when an unbound variable is encountered. * filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select, scm_symlink, scm_readlink, scm_lstat), posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp, scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice, scm_sync), simpos.c (scm_system), stime.c (scm_times, scm_strptime): move the HAVE_XXX feature tests out of the procedure bodies. don't use SCM_SYSMISSING. scm_validate.h (SCM_SYSMISSING): removed. error.h, error.c (scm_sysmissing): comment that this is deprecated. see ChangeLog entry for 1999-12-28.
* * scm_validate.h (SCM_OUT_OF_RANGE): Use scm_out_of_range_pos toGreg J. Badros2000-01-071-0/+11
| | | | | | | | | | | | | | report the position of the argument. * error.h, error.c (scm_out_of_range_pos): Added this function to take extra "pos" argument, the position number of the errant argument. * debug.c: Use SCM_OUT_OF_RANGE instead of scm_out_of_range. * snarf.h: Use SCM_HERE and SCM_INIT as names, not SCM_NOTSNARF and SCM_SNARFING. Also put the %%% in the SCM_INIT since Mikael prefers that and I'm reasonably indifferent.
* * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*Greg J. Badros2000-01-051-5/+5
| | | | macros and SCM_DEFINE macros to match GNU coding standards.
* *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.Greg J. Badros2000-01-051-2/+2
|
* * *.[ch]: Replace SCM_VALIDATE_INT w/ SCM_VALIDATE_INUM forGreg J. Badros2000-01-051-1/+1
| | | | | better consistency with the names of other SCM_VALIDATE_ macros and better conformance to guile naming policy.
* * Makefile.am: Fix ETAGS_ARGS to recognize GUILE_PROC,Greg J. Badros1999-12-131-2/+12
| | | | | | | | | | | | | | | | | | 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.
* * *.c: Pervasive software-engineering-motivated rewrite ofGreg J. Badros1999-12-121-60/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * configure.in: check for hstrerror.Gary Houston1999-11-181-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL toMikael Djurfeldt1999-03-181-1/+1
| | | | | | scm_misc_error when pos is a string. This allows for dispatching arbitrary error messages with one argument via SCM_ASSERT: SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
* * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),Jim Blandy1999-02-061-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eval.c (s_expression, s_test, s_body, s_bindings, s_variable, s_clauses, s_formals): Variables now const. * eval.c (promsmob): Now const. * macros.c (macrosmob): Now const. * smob.c (scm_newsmob): Smobfuns argument now points to const. (freecell, flob, bigob): Now const. * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring), error.c (scm_error, scm_syserror, scm_syserror_msg, scm_num_overflow, scm_out_of_range, scm_wrong_type_arg, scm_memory_error, scm_misc_error, scm_wta), macros.c (scm_make_synt), feature.c (scm_add_feature), filesys.c (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc, scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr), numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long, scm_num2long_long, scm_num2ulong), options.c (scm_options), posix.c (scm_convert_exec_args, environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr), ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c (setzone, restorezone, bdtime2c), strop.c (scm_i_index), strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft, scm_intern_obarray, scm_intern, scm_intern0, scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0, scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument indicating calling subr, error message text, reason for error, symbol name or feature name are now pointer to const. * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const. * procs.c (scm_init_iprocs): iproc argument now points to const. * pairs.c (cxrs): Now const. * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h, numbers.h, options.h, procs.h, ramap.h, read.h, smob.h, strports.h, symbols.h, unif.h: Update variable declarations and function prototypes for above changes. * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link, sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and SYMB now point to const.
* * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,Jim Blandy1998-10-191-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.
* * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.Mikael Djurfeldt1998-01-251-0/+4
|
* * error.c, error.h (scm_error_callback): Removed (see NEWS).Mikael Djurfeldt1997-08-251-5/+0
|
* * errno.h: prototype for scm_strerror.Gary Houston1997-08-231-0/+8
| | | | * error.c (scm_strerror): new procedure.
* * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list ofJim Blandy1997-07-101-2/+2
| | | | | arguments for formatting the error message, not SCM_BOOL_F. I think this is left over from the (eq? '() #f) days.
* * Lots of files: New address for FSF.Jim Blandy1997-05-261-3/+3
|
* Ensure that shared substrings are handled properly when passed toJim Blandy1997-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | a system call or other foreign function. Many thanks to Tim Pierce! * symbols.h (SCM_COERCE_SUBSTR): new macro. * filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink, scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime, scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone, scm_strftime), vports.c (scm_make_soft_port), backtrace.c (scm_display_error_message): use RO macros when strings may be RO. * error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c (scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c (scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime, scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime, scm_strftime), vports.c (scm_make_soft_port): use SCM_COERCE_SUBSTR to make sure shared substrings are null-terminated.
* * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELDGary Houston1997-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wan't defined. Don't include fd.h. * Previously fd.h was regenerated whenever configure was run, forcing a couple of files to be recompiled. * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c. * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER. Check for _fileno as well as _file. Don't output fd.h. * ioext.c: don't fd.h. * acconfig.h: remove duplicate HAVE_FD_SETTER and change the other to FD_SETTER. * Change the stratigy for getting information about errno (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of generating lists of symbols during the build process, which will not always work, include comprehensive lists in the distribution. To help keep the lists up to date, the "check_signals" and "check_errnos" make targets can be used. * configure.in: don't check for a command to extract errno codes. * Makefile.am: update file lists, remove errnos.list and errnos.c targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals, check_errnos targets. (CLEANFILES): remove errnos.c and errnos.list, add cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new * errnos.default: deleted. * cpp_signal.c: new file. * cpp_errno.c: renamed from errnos_get.c. * cpp_err_symbols, cpp_sig_symbols: new files. * cpp_cnvt.awk: renamed from errnos_cnvt_awk. * error.c (scm_init_error): #include cpp_err_symbols instead of errnos.c. * posix.c (scm_init_posix): don't intern signal symbols. #include cpp_sig_symbols.c. * strop.c (scm_i_index): allow the lower bound to be equal to the length of the string, so a null string doesn't always give an error. * posix.h: new prototypes. * posix.c (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig): new functions, as in scsh. They break down process status values as returned by waitpid.