add printers for prompts and with-fluids objects
* libguile/control.c: * libguile/control.h (scm_i_prompt_print): * libguile/fluids.c: * libguile/fluids.h (scm_i_with_fluids_print): * libguile/print.c (iprin1): Add printers for prompts and with-fluids objects.
This commit is contained in:
parent
dec84a0a6e
commit
bbb2ecd1d1
5 changed files with 25 additions and 0 deletions
|
|
@ -273,6 +273,14 @@ SCM_DEFINE (scm_at_abort, "@abort", 2, 0, 0, (SCM tag, SCM args),
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
void
|
||||
scm_i_prompt_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||
{
|
||||
scm_puts ("#<prompt ", port);
|
||||
scm_intprint (SCM_UNPACK (exp), 16, port);
|
||||
scm_putc ('>', port);
|
||||
}
|
||||
|
||||
void
|
||||
scm_init_control (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ SCM_INTERNAL void scm_c_abort (SCM vm, SCM tag, size_t n, SCM *argv,
|
|||
SCM_INTERNAL SCM scm_at_abort (SCM tag, SCM args) SCM_NORETURN;
|
||||
|
||||
|
||||
SCM_INTERNAL void scm_i_prompt_print (SCM exp, SCM port, scm_print_state *pstate);
|
||||
SCM_INTERNAL void scm_init_control (void);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,14 @@ scm_i_dynamic_state_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED
|
|||
scm_putc ('>', port);
|
||||
}
|
||||
|
||||
void
|
||||
scm_i_with_fluids_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
|
||||
{
|
||||
scm_puts ("#<with-fluids ", port);
|
||||
scm_intprint (SCM_UNPACK (exp), 16, port);
|
||||
scm_putc ('>', port);
|
||||
}
|
||||
|
||||
static size_t
|
||||
next_fluid_num ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ SCM_INTERNAL SCM scm_i_make_initial_dynamic_state (void);
|
|||
|
||||
SCM_INTERNAL void scm_i_fluid_print (SCM exp, SCM port, scm_print_state *pstate);
|
||||
SCM_INTERNAL void scm_i_dynamic_state_print (SCM exp, SCM port, scm_print_state *pstate);
|
||||
SCM_INTERNAL void scm_i_with_fluids_print (SCM exp, SCM port, scm_print_state *pstate);
|
||||
SCM_INTERNAL void scm_init_fluids (void);
|
||||
|
||||
#endif /* SCM_FLUIDS_H */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "libguile/chars.h"
|
||||
#include "libguile/continuations.h"
|
||||
#include "libguile/smob.h"
|
||||
#include "libguile/control.h"
|
||||
#include "libguile/eval.h"
|
||||
#include "libguile/macros.h"
|
||||
#include "libguile/procprop.h"
|
||||
|
|
@ -773,6 +774,12 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
|||
case scm_tc7_vm_cont:
|
||||
scm_i_vm_cont_print (exp, port, pstate);
|
||||
break;
|
||||
case scm_tc7_prompt:
|
||||
scm_i_prompt_print (exp, port, pstate);
|
||||
break;
|
||||
case scm_tc7_with_fluids:
|
||||
scm_i_with_fluids_print (exp, port, pstate);
|
||||
break;
|
||||
case scm_tc7_wvect:
|
||||
ENTER_NESTED_DATA (pstate, exp, circref);
|
||||
if (SCM_IS_WHVEC (exp))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue