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
Mikael Djurfeldt
aea5b792f7
* symbols.c (scm_gensym): Bugfix. (Thanks to Johannes Hjorth.)
1999-07-08 05:55:34 +00:00
Jim Blandy
3eeba8d4f5
* chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
...
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.
1999-02-06 12:31:04 +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
a8741caa54
* eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
...
net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
argument in call to scm_make_vector.
1998-07-12 00:10:02 +00:00
Tom Tromey
b7f3516f99
* Makefile.in: Rebuilt.
...
* Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
mbstrings.c.
(modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
* unif.c (scm_vector_set_length_x): Don't handle multibyte
strings.
* tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
(scm_tag): Don't handle multibyte strings.
* read.c: Don't include mbstrings.h.
(scm_lreadr): Don't handle multibyte ports.
* kw.c: Don't include mbstrings.h.
* init.c: Don't include mbstrings.h.
(scm_boot_guile_1): Don't init mbstrings module.
* hash.c (scm_hasher): Don't handle mbstrings.
* gscm.c (gscm_run_scm): Don't init mbstrings module.
* gc.c (scm_gc_mark): Don't handle mbstrings.
(scm_gc_sweep): Likewise.
* eval.c (SCM_CEVAL): Don't handle mbstrings.
* eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
* tags.h (SCM_TYP7SD): Removed.
(SCM_TYP7D): Removed.
(scm_tc7_mb_string): Removed.
(scm_tc7_mb_substring): Removed.
* print.c (scm_iprin1): Handle char printing directly. Don't
handle mbstrings.
Don't include "mbstrings.h".
* symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
multi-byte flag.
Don't include "mbstrings.h".
* symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
(SCM_SYMBOL_SLOTS): Define as 4.
(SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
* arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
struct.c, threads.c, throw.c, unif.c, variable.c: Use new
("gen"-less) I/O function names.
* ports.c (scm_add_to_port_table): Don't set port's
representation.
* ports.h (scm_port_representation_type): Removed.
(scm_string_representation_type): Removed.
(struct scm_port_table ): Removed representation field.
(SCM_PORT_REPRESENTATION): Removed.
(SCM_SET_PORT_REPRESENTATION): Removed.
* genio.h: Use new function names.
* genio.c: Don't include "extchrs.h".
(scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
Removed.
(scm_putc, scm_puts, scm_lfwrite): No longer static.
(scm_getc): No longer static; handle line and column changes.
(scm_ungetc): Renamed from scm_gen_ungetc.
(scm_do_read_line): Renamed from scm_gen_read_line.
* libguile.h: Don't include "extchrs.h" or "mbstrings.h"
* extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
1997-10-15 17:18:32 +00:00
Mikael Djurfeldt
1ff4df7a83
* symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
...
scm_gensym): Added prototypes.
* symbols.c (scm_gensym): New function. This will speed up
certain types of applications (such as macro systems) which
generate lots of symbols.
1997-09-01 22:28:49 +00:00
Jim Blandy
82892beda5
* Lots of files: New address for FSF.
1997-05-26 22:34:48 +00:00
Mikael Djurfeldt
b2530d665a
* tags.h (SCM_ECONSP, SCM_NECONSP): Bugfix: Discriminate structs
...
from pairs with a GLOC in the car.
* symbols.c (msymbolize): Bugfix: Also initialize SCM_SYMBOL_HASH,
otherwise `symbol-hash' will behave badly.
(scm_symbol_hash): Bugfix: Must msymbolize if tc7_ssymbol, othwise
we get segmentation fault!
* symbols.c: Added #include "weaks.h". New functions
`builtin-bindings' and `builtin-weak-bindings'. (These will be
moved to an extraneous library when we split libguile.)
1997-03-05 22:49:12 +00:00
Mikael Djurfeldt
77a6036bd1
* symbols.c (msymbolize): Bugfix: Must initialize property list to
...
SCM_EOL.
1997-02-28 23:10:00 +00:00
Mikael Djurfeldt
1dd28b3d65
* symbols.c, symbols.h (scm_symbol_value0): New function. Can be
...
used from C to easily lookup the value of a symbol in the current
module.
1997-02-26 12:08:26 +00:00
Mikael Djurfeldt
5aab5d961c
* symbols.c (scm_sysintern0): New function. Contains the core of
...
old scm_sysintern but doesn't take a second value argument.
(scm_sysintern): Now uses scm_sysintern0.
(scm_sysintern_no_module_lookup): Renamed to
scm_sysintern0_no_module_lookup and doesn't take a second value
argument any longer.
* symbols.h (scm_sysintern0: Added declaration.
* options.c (scm_init_opts): Use scm_sysintern0 instead of
scm_sysintern when interning option keys. Otherwise we risk
destroying the values of already interned variables.
* symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
scheme-level boolean (use SCM_NFALSEP).
* backtrace.c (scm_init_backtrace): Make Scheme-level variable
`the-last-stack'.
(scm_backtrace): New function. (C version of old function from
boot-9.scm) Motivation: Make it possible to display backtraces
without depending on boot-9.scm. (I'm uncertain if this
motivation is good enough...)
* root.h (scm_root_state): Add member the_last_stack_var.
(scm_the_stack_var): Defined to scm_root->the_last_stack_var.
* root.c (mark_root): Mark scm_the_last_stack_var.
* init.c (scm_start_stack): Initialize scm_the_last_stack_var to
SCM_BOOL_F.
1997-02-10 01:01:54 +00:00
Marius Vollmer
9b8d32883e
* symbols.c (scm_sysintern): Renamed to
...
scm_sysintern_no_module_lookup.
(scm_sysintern): New function to take the place of the old
scm_sysintern. It uses the current toplevel lookup closure to give
the symbol its value. This is a temporary hack to put packages
like gtcltk into their own module.
(scm_can_use_top_level_lookup_closure_var): New variable to tell
us whether `scm_top_level_lookup_closure_var' has been initialized
and is usable.
* eval.c (scm_init_eval): Set it.
1997-01-18 11:49:35 +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
Mikael Djurfeldt
49bc24feca
* symbols.c (scm_sym2ovcell): Fixed documentation.
1996-10-14 03:27:11 +00:00
Jim Blandy
1cc91f1b29
* __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
...
arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes. (Patch thanks to Marius
Vollmer.)
1996-10-14 01:33:50 +00:00
Jim Blandy
8ce9450492
* symbols.c (scm_intern_obarray_soft, scm_sysintern): Doc fixes.
...
* symbols.h, tags.h: Doc fixes.
1996-10-11 07:57:35 +00:00
Jim Blandy
3ff63ce645
* symbols.c (scm_intern_obarray_soft): Initialize the new symbol's
...
PROPS slot to '(), not #f; it's an empty alist.
1996-10-03 05:21:21 +00:00
Mikael Djurfeldt
08b5b88cdf
* __scm.h, chars.c, debug.c, eval.c, eval.h, extchrs.c, extchrs.h,
...
fdsocket.c, feature.c, mbstrings.c, mbstrings.h, numbers.c,
numbers.h, print.c, scmhob.h, simpos.h, symbols.c, symbols.h,
tags.h, throw.c, variable.h: Name cleanup. Lots of xxxSCM_yyy
removed. (These were introduced by unsupervised name
substitution.)
1996-09-13 13:31:50 +00:00
Jim Blandy
20e6290e38
C files should #include only the header files they need, not
...
libguile.h (which #includes all the header files); the pointless
recompilation was wasting my time.
* Makefile.in (all .o dependency lists): Regenerated.
* libguile.h: Don't try to get a definition for size_t here...
* __scm.h: Do it here.
* _scm.h: Since this is the internal libguile header, put things
here that all (or a majority) of the libguile files will want.
Don't #include <libguile.h> here; that generates dependencies on
way too much. Instead, get "__scm.h", "error.h", "pairs.h",
"list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h",
"boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and
"async.h".
* alist.c: Get "eq.h", "list.h", "alist.h".
* append.c: Get "append.h", "list.h".
* arbiters.c: Get "arbiters.h", "smob.h".
* async.c: Get "async.h", "smob.h", "throw.h", "eval.h".
* boolean.c: Get "boolean.h".
* chars.c: Get "chars.h".
* continuations.c: Get "continuations.h", "dynwind.h", "debug.h",
"stackchk.h".
* debug.c: Get "debug.h", "feature.h", "read.h", "strports.h",
"continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h",
"genio.h", "throw.h", "eval.h".
* dynwind.c: Get "dynwind.h", "alist.h", "eval.h".
* eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h",
"stackchk.h".
* error.c: Get "error.h", "throw.h", "genio.h", "pairs.h".
* eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h",
"hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h",
"continuations.h", "eq.h", "sequences.h", "alist.h", "append.h",
"debug.h".
* fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h".
* feature.c: Get "feature.h".
* files.c: Get "files.h".
* filesys.c: Get "filesys.h", "smob.h", "genio.h".
* fports.c: Get "fports.h", "markers.h".
* gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h",
"genio.h", "struct.h", "stackchk.h", "stime.h".
* gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h",
"read.h", "strports.h", "tag.h".
* genio.c: Get "genio.h", "chars.h".
* gsubr.c: Get "gsubr.h", "genio.h".
* hash.c: Get "hash.h", "chars.h".
* hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h".
* init.c: Get everyone who has an scm_init_mumble function:
"weaks.h", "vports.h", "version.h", "vectors.h", "variable.h",
"unif.h", "throw.h", "tag.h", "symbols.h", "struct.h",
"strports.h", "strorder.h", "strop.h", "strings.h", "stime.h",
"stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h",
"scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h",
"print.h", "posix.h", "ports.h", "pairs.h", "options.h",
"objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h",
"list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h",
"gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h",
"feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h",
"dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h",
"async.h", "arbiters.h", "append.h", "alist.h".
* ioext.c: Get "ioext.h", "fports.h".
* kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h".
* list.c: Get "list.h", "eq.h".
* load.c: Get "load.h", "eval.h", "read.h", "fports.h".
* mallocs.c: Get "smob.h", "genio.h".
* markers.c: Get "markers.h".
* mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h",
"chars.h".
* numbers.c: Get "unif.h", "genio.h".
* objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h".
* options.c: Get "options.h".
* ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h",
"markers.h", "chars.h", "genio.h".
* posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h",
"read.h", "scmsigs.h", "genio.h", "fports.h".
* print.c: Get "print.h", "unif.h", "weaks.h", "read.h",
"procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h",
"chars.h".
* procprop.c: Get "procprop.h", "eval.h", "alist.h".
* procs.c: Get "procs.h".
* ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h",
"chars.h", "smob.h", "unif.h".
* read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h",
"eval.h", "genio.h", "chars.h".
* root.c: Get "root.h", "stackchk.h".
* scmsigs.c: Get "scmsigs.h".
* sequences.c: Get "sequences.h".
* simpos.c: Get "simpos.h", "scmsigs.h".
* smob.c: Get "smob.h".
* socket.c: Get "socket.h", "feature.h".
* srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h",
"alist.h", "smob.h".
* stackchk.c: Get "stackchk.h", "genio.h".
* stime.c: Get "stime.h"."libguile/continuations.h".
* strings.c: Get "strings.h", "chars.h".
* strop.c: Get "strop.h", "chars.h".
* strorder.c: Get "strorder.h", "chars.h".
* strports.c: Get "strports.h", "print.h", "eval.h", "unif.h".
* struct.c: Get "struct.h", "chars.h".
* symbols.c: Get "symbols.h", "mbstrings.h", "alist.h",
"variable.h", "eval.h", "chars.h".
* tag.c: Get "tag.h", "struct.h", "chars.h".
* throw.c: Get "throw.h", "continuations.h", "debug.h",
"dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h".
* unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h",
"smob.h", "genio.h", "eval.h", "chars.h".
* variable.c: Get "variable.h", "smob.h", "genio.h".
* vectors.c: Get "vectors.h", "eq.h".
* version.c: Get "version.h".
* vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h".
* weaks.c: Get "weaks.h".
1996-09-10 02:26:07 +00:00
Jim Blandy
566011b96d
* symbols.c (scm_strhash): scm_downcase is now a function, not an
...
array; use it appropriately. Since GCC is quite happy to
subscript functions, it never warned us about this; we should use
-Wpointer-arith in the future. I guess we never tested
case-insensitivity.
1996-08-30 03:36:29 +00:00
Gary Houston
95b8881908
portability fixes for header inclusion etc.
1996-08-07 09:46:41 +00:00
Jim Blandy
0f2d19dd46
maintainer changed: was lord, now jimb; first import
1996-07-25 22:56:11 +00:00