* * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Sun, 22 Sep 1996 22:46:31 +0000 (22:46 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Sun, 22 Sep 1996 22:46:31 +0000 (22:46 +0000)
commitc62fbfe1a8bd88a8f8ebee428234a8b33a4fc7e9
treebf1468dbb9db4c2e3700de0e2d1366198410d919
parent9882ea199196202be10bcf4bfbfea3669efae421
* * 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.
libguile/print.c