* print.h (SCM_PRINT_STATE_P, SCM_COERCE_OPORT): New macros.
authorMarius Vollmer <mvo@zagadka.de>
Thu, 2 Oct 1997 14:55:02 +0000 (14:55 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Thu, 2 Oct 1997 14:55:02 +0000 (14:55 +0000)
commitbb35f3151b168022db4d3a04376182f9604371d5
tree7861980c03f5628eda106cf5e09195b864898930
parentc68296f8fd1787572f24930ebd9b9ca5a28b29fa
* print.h (SCM_PRINT_STATE_P, SCM_COERCE_OPORT): New macros.
(struct scm_print_state) [revealed]: New field.
(scm_print_state_vtable): Make visible to the outside world for
type checking purposes.
(scm_valid_oport_value_p): New prototype.

* print.c (scm_valid_oport_value_p): New function to check whether
a certain value is acceptable as a port argument.
(scm_print_state_vtable): New variable.
(scm_free_print_state): Set `revealed' field to false.
(scm_iprin1): Call user supplied closure printer with
scm_printer_apply.  Print in the traditional way when there isn't
one or when it returns #f.
(scm_prin1, scm_display, scm_write, scm_newline, scm_write_char):
Accept a port/print-state pair in addition to just a port.
(scm_prin1): Don't return the print_state to the pool when it has
been `revealed'.
(scm_printer_apply): Set `revealed' field of print_state to true.
(scm_init_print): Set scm_print_state_vtable.
(print_state_fluid, print_state_fluid_num): Removed.
libguile/print.c
libguile/print.h