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

322 commits

Author SHA1 Message Date
Marius Vollmer
c4f37e8038 * print.c (scm_iprin1): Enter printed structures into the print
state as nested data while they are printed.
(print_state_fluid, print_state_fluid_num): New variables.
(scm_init_print): Initialize them.
(scm_iprin): If print_state_fluid carries a print_state, use that
instead of creating a new one.
(scm_printer_apply, apply_stub, struct apply_data): New
definitions to help with calling printer functions written in
Scheme.
* print.h (scm_printer_apply): New prototype.
1997-07-27 09:08:38 +00:00
Marius Vollmer
bafcafb270 * struct.c (scm_struct_ref, scm_struct_set_x): Use
scm_struct_i_n_words to get the number of fields, not
-scm_struct_n_extra_words.

On the route to fancier struct printing:
* struct.c (scm_print_struct): New function to print a structure.
Include "genio.h" to support it.  This function doesn't do
anything interesting right now, but I think it should be here
anyway.
* struct.h: Include "print.h" and add prototype for
scm_print_struct.
* print.c (scm_iprin1): Call scm_print_struct instead of trying to
print structures ourself.
1997-06-03 21:49:52 +00:00
Jim Blandy
82892beda5 * Lots of files: New address for FSF. 1997-05-26 22:34:48 +00:00
Jim Blandy
1e598865e9 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
throw.c: Update copyright years; these files have been worked on
significantly in 1997, but only had copyright years for 1996.
Also, change name of copyright holder on some from Mikael
Djurfeldt to Free Software Foundation; he has signed papers
assigning the changes to the FSF.
1997-05-16 09:14:28 +00:00
Mikael Djurfeldt
9fbaf27ccb * print.c (scm_iprin1): Limit number of vector elements printed
according to pstate->length.
1997-03-11 15:02:29 +00:00
Mikael Djurfeldt
f843a84c09 * print.c: Put #ifdef GUILE_DEBUG around `current-pstate'. 1997-03-08 14:45:01 +00:00
Jim Blandy
805df3e8af I think the Sun compiler has chosen a perverse way to interpret
ANSI declarations combined with K&R definitions.  We'll
appease it a little bit.  But when it invades France, we fight.
* print.c (scm_iprlist): Change 'tlr' argument to an int.
* print.h (scm_iprlist): Here too.
* numbers.c (scm_divbigdig): Change definition to match
declaration in numbers.h.
* unif.c (scm_makflo): Change definition to match declaration in
unif.h.
1997-01-07 23:42:35 +00:00
Jim Blandy
4dc2435aef In some cases, the code is fine, but GCC isn't smart enough to
figure that out; this usually happens when one variable is only
initialized and used when a particular condition holds true, and
we know that condition will never change within a given invocation
of the function.  In this case, we simply initialize the variables
to placate the compiler, hopefully to a value which will cause a
crash if it is ever actually used.
* print.c (scm_iprin1): Initialize mw_pos.
* read.c (scm_lreadrecparen): Initialize tl2, ans2.
* throw.c (scm_ithrow): Initialize dynpair.
* unif.c (scm_uniform_vector_ref): Initialize cra.
* struct.c (init_struct): Initialize prot.
* mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
1996-12-18 21:42:09 +00:00
Mikael Djurfeldt
bf685b6d20 * print.c (make_print_state, grow_print_state), print.h: Modified
the print state representation: Don't use a tail array for
recording of circular references.  Resizing of the print state
structure invalidates the print state pointer.  To avoid passing
around an indirect print state reference to all printing
functions, we instead let the print state reference a resizable
vector.
1996-10-15 03:40:21 +00:00
Mikael Djurfeldt
2dfc85c018 *** empty log message *** 1996-10-14 20:29:16 +00:00
Mikael Djurfeldt
698c029502 * print.c (scm_free_print_state): Cleanup print state before
returning it to pool.  It is better to do it here than in
scm_prin1 since scm_prin1 is called often.

* print.c (make_print_state): Bugfix: Initialize pstate->ceiling.

* print.c: New functions: scm_make_print_state,
scm_free_print_state.
1996-10-14 03:26:13 +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
Mikael Djurfeldt
2fab3faadb * print.c (scm_iprlist): Bugfix: Added SCM_ECONSP tests in hare
and tortoise scanning loop.
1996-10-03 11:37:38 +00:00
Mikael Djurfeldt
c62fbfe1a8 * * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
references now have a new appearance which is more compact and
	also gives a clue about what the target of the reference is.
	By setting parameters in the print state, more fancy printing can
	be achieved.  This is used by the (not yet commited) backtrace
	code.

	* print.c: Added #include "struct.h".  Removed function
	scm_prlist.

	* print.c (scm_prin1): Print states are now allocated when calling
 	scm_prin1 and then passed around to all printing functions as an
 	argument.  A cache `print_state_pool' enables reuse of print
 	states.
	(scm_make_print_state): New function.
	(scm_iprin1): Adaption to print states.
	(scm_iprlist): An initial "hare and tortoise" scan brings down
	time complexity to O (depth * N).  (Better time complexity will be
	achieved when the printing code is completely rewritten.)

	* print.c, print.h: Closures now print like #<procedure foo (x)>.
	People who whish to see the source can do `(print-enable 'source)'.
	Removed #ifdef DEBUG_EXTENSIONS.
1996-09-22 22:46:31 +00:00
Mikael Djurfeldt
84f6a34a80 * print.c, print.h: Closures now print like #<procedure foo (x)>.
People who whish to see the source can do `(print-enable 'source)'.
Removed #ifdef DEBUG_EXTENSIONS.
1996-09-19 14:17:01 +00:00
Mikael Djurfeldt
dbef8851ac * print.c: Added #include "alist.h" 1996-09-18 19:35: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
Mikael Djurfeldt
a51ea417ba * print.c: Added code for detection of circular references during
printing.  (init_ref_stack, grow_ref_stack): New functions.  Added
a hook for printing of closures (accessible via print options).
This leads to a split of calls to scm_iprin1 into two classes:
elementary print operations (e. g. the code which prints a smob)
still use scm_iprin1 while top level calls (like scm_display) use
scm_prin1.  scm_prin1 begins by clearing the data structure used
to record reference information.
1996-09-12 23:43:47 +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
Mikael Djurfeldt
b7ff98ddd6 * eval.c, print.h, print.c, read.h, read.c: Modifications to
run-time options.
1996-08-23 01:20:34 +00:00
Mikael Djurfeldt
e6e4c9af39 * * print.c: New procedure: scm_print_options 1996-08-20 17:11:03 +00:00
Jim Blandy
0f2d19dd46 maintainer changed: was lord, now jimb; first import 1996-07-25 22:56:11 +00:00