1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 16:20:17 +02:00

* eval.c, numbers.h, unif.h, smob.h, srcprop.c: Added #include

"print.h"

* arbiters.c (prinarb),
async.c (print_async),
debug.c (prindebugobj, prinmemoized),
eval.c (prinprom, prinmacro),
filesys.c (scm_fd_print, scm_dir_print),
kw.c (print_kw),
mallocs.c (prinmalloc),
numbers.c, numbers.h (scm_floprint, scm_bigprint),
smob.h (scm_smobfuns),
srcprop.c (prinsrcprops),
throw.c (prinjb),
unif.c, unif.h (scm_raprin1, rapr1),
variable.c (prin_var): Changed argument `int writing' to
`scm_print_state *pstate'.
This commit is contained in:
Mikael Djurfeldt 1996-09-22 22:41:10 +00:00
parent 2c36c351d0
commit 1940267936
6 changed files with 36 additions and 22 deletions

View file

@ -68,6 +68,7 @@
#include "procprop.h"
#include "hashtab.h"
#include "hash.h"
#include "print.h"
#ifdef DEBUG_EXTENSIONS
#include "debug.h"
@ -2772,17 +2773,20 @@ scm_makprom (code)
#ifdef __STDC__
static int
prinprom (SCM exp, SCM port, int writing)
prinprom (SCM exp, SCM port, scm_print_state *pstate)
#else
static int
prinprom (exp, port, writing)
prinprom (exp, port, pstate)
SCM exp;
SCM port;
int writing;
scm_print_state *pstate;
#endif
{
int writingp = SCM_WRITINGP (pstate);
scm_gen_puts (scm_regular_string, "#<promise ", port);
scm_iprin1 (SCM_CDR (exp), port, writing);
SCM_SET_WRITINGP (pstate, 1);
scm_iprin1 (SCM_CDR (exp), port, pstate);
SCM_SET_WRITINGP (pstate, writingp);
scm_gen_putc ('>', port);
return !0;
}
@ -2844,15 +2848,16 @@ scm_makmmacro (code)
#ifdef __STDC__
static int
prinmacro (SCM exp, SCM port, int writing)
prinmacro (SCM exp, SCM port, scm_print_state *pstate)
#else
static int
prinmacro (exp, port, writing)
prinmacro (exp, port, pstate)
SCM exp;
SCM port;
int writing;
scm_print_state *pstate;
#endif
{
int writingp = SCM_WRITINGP (pstate);
if (SCM_CAR (exp) & (3L << 16))
scm_gen_puts (scm_regular_string, "#<macro", port);
else
@ -2860,7 +2865,9 @@ prinmacro (exp, port, writing)
if (SCM_CAR (exp) & (2L << 16))
scm_gen_putc ('!', port);
scm_gen_putc (' ', port);
scm_iprin1 (SCM_CDR (exp), port, writing);
SCM_SET_WRITINGP (pstate, 1);
scm_iprin1 (SCM_CDR (exp), port, pstate);
SCM_SET_WRITINGP (pstate, writingp);
scm_gen_putc ('>', port);
return !0;
}

View file

@ -1581,13 +1581,13 @@ scm_number_to_string(x, radix)
SCM_FLOATS or SCM_BIGDIGs conditionals */
#ifdef __STDC__
int
scm_floprint(SCM sexp, SCM port, int writing)
scm_floprint(SCM sexp, SCM port, scm_print_state *pstate)
#else
int
scm_floprint(sexp, port, writing)
scm_floprint(sexp, port, pstate)
SCM sexp;
SCM port;
int writing;
scm_print_state *pstate;
#endif
{
#ifdef SCM_FLOATS
@ -1602,13 +1602,13 @@ scm_floprint(sexp, port, writing)
#ifdef __STDC__
int
scm_bigprint(SCM exp, SCM port, int writing)
scm_bigprint(SCM exp, SCM port, scm_print_state *pstate)
#else
int
scm_bigprint(exp, port, writing)
scm_bigprint(exp, port, pstate)
SCM exp;
SCM port;
int writing;
scm_print_state *pstate;
#endif
{
#ifdef SCM_BIGDIG

View file

@ -45,6 +45,7 @@
#include "libguile/__scm.h"
#include "print.h"
@ -265,8 +266,8 @@ extern SCM scm_divbigint(SCM x, long z, int sgn, int mode);
extern SCM scm_divbigbig(SCM_BIGDIG *x, scm_sizet nx, SCM_BIGDIG *y, scm_sizet ny, int sgn, int modes);
extern scm_sizet scm_iint2str(long num, int rad, char *p);
extern SCM scm_number_to_string(SCM x, SCM radix);
extern int scm_floprint(SCM sexp, SCM port, int writing);
extern int scm_bigprint(SCM exp, SCM port, int writing);
extern int scm_floprint(SCM sexp, SCM port, scm_print_state *pstate);
extern int scm_bigprint(SCM exp, SCM port, scm_print_state *pstate);
extern SCM scm_istr2int(char *str, long len, long radix);
extern SCM scm_istr2flo(char *str, long len, long radix);
extern SCM scm_istring2number(char *str, long len, long radix);

View file

@ -44,13 +44,14 @@
*/
#include "libguile/__scm.h"
#include "print.h"
typedef struct scm_smobfuns
{
SCM (*mark) SCM_P ((SCM));
scm_sizet (*free) SCM_P ((SCM));
int (*print) SCM_P ((SCM exp, SCM port, int writing));
int (*print) SCM_P ((SCM exp, SCM port, scm_print_state *pstate));
SCM (*equalp) SCM_P ((SCM, SCM));
} scm_smobfuns;

View file

@ -51,6 +51,7 @@
#include "hashtab.h"
#include "hash.h"
#include "weaks.h"
#include "print.h"
#include "srcprop.h"
@ -108,17 +109,20 @@ freesrcprops (obj)
#ifdef __STDC__
static int
prinsrcprops (SCM obj, SCM port, int writing)
prinsrcprops (SCM obj, SCM port, scm_print_state *pstate)
#else
static int
prinsrcprops (obj, port, writing)
prinsrcprops (obj, port, pstate)
SCM obj;
SCM port;
int writing;
scm_print_state *pstate;
#endif
{
int writingp = SCM_WRITINGP (pstate);
scm_gen_puts (scm_regular_string, "#<srcprops ", port);
scm_iprin1 (scm_srcprops_to_plist (obj), port, 1);
SCM_SET_WRITINGP (pstate, 1);
scm_iprin1 (scm_srcprops_to_plist (obj), port, pstate);
SCM_SET_WRITINGP (pstate, writingp);
scm_gen_putc ('>', port);
return 1;
}

View file

@ -45,6 +45,7 @@
#include "libguile/__scm.h"
#include "print.h"
typedef struct scm_array
@ -107,7 +108,7 @@ extern SCM scm_string_downcase_x (SCM v);
extern SCM scm_istr2bve (char *str, long len);
extern SCM scm_array_to_list (SCM v);
extern SCM scm_list_to_uniform_array (SCM ndim, SCM prot, SCM lst);
extern int scm_raprin1 (SCM exp, SCM port, int writing);
extern int scm_raprin1 (SCM exp, SCM port, scm_print_state *pstate);
extern SCM scm_array_prototype (SCM ra);
extern void scm_init_unif (void);