mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
* 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:
parent
1940267936
commit
9882ea1991
9 changed files with 65 additions and 60 deletions
|
@ -58,19 +58,19 @@ static long scm_tc16_arbiter;
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
prinarb (SCM exp, SCM port, int writing)
|
||||
prinarb (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
prinarb (exp, port, writing)
|
||||
prinarb (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "#<arbiter ", port);
|
||||
if (SCM_CAR (exp) & (1L << 16))
|
||||
scm_gen_puts (scm_regular_string, "locked ", port);
|
||||
scm_iprin1 (SCM_CDR (exp), port, writing);
|
||||
scm_iprin1 (SCM_CDR (exp), port, pstate);
|
||||
scm_gen_putc ('>', port);
|
||||
return !0;
|
||||
}
|
||||
|
|
|
@ -302,13 +302,13 @@ scm_deliver_signal (num)
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
print_async (SCM exp, SCM port, int writing)
|
||||
print_async (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
print_async (exp, port, writing)
|
||||
print_async (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "#<async ", port);
|
||||
|
|
|
@ -143,17 +143,20 @@ long scm_tc16_memoized;
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
prinmemoized (SCM obj, SCM port, int writing)
|
||||
prinmemoized (SCM obj, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
prinmemoized (obj, port, writing)
|
||||
prinmemoized (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, "#<memoized ", port);
|
||||
scm_iprin1 (scm_unmemoize (obj), port, 1);
|
||||
SCM_SET_WRITINGP (pstate, 1);
|
||||
scm_iprin1 (scm_unmemoize (obj), port, pstate);
|
||||
SCM_SET_WRITINGP (pstate, writingp);
|
||||
scm_gen_putc ('>', port);
|
||||
return 1;
|
||||
}
|
||||
|
@ -379,11 +382,13 @@ long scm_tc16_debugobj;
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
prindebugobj (SCM obj, SCM port, int writing)
|
||||
prindebugobj (SCM obj, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
prindebugobj (writing)
|
||||
SCM obj, SCM port, int writing;
|
||||
prindebugobj (pstate)
|
||||
SCM obj;
|
||||
SCM port;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "#<debug-object ", port);
|
||||
|
|
|
@ -240,13 +240,13 @@ long scm_tc16_fd;
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
scm_fd_print (SCM sexp, SCM port, int writing)
|
||||
scm_fd_print (SCM sexp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
scm_fd_print (sexp, port, writing)
|
||||
scm_fd_print (sexp, port, pstate)
|
||||
SCM sexp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "#<fd ", port);
|
||||
|
@ -872,13 +872,13 @@ scm_sys_closedir (port)
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
scm_dir_print (SCM sexp, SCM port, int writing)
|
||||
scm_dir_print (SCM sexp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
scm_dir_print (sexp, port, writing)
|
||||
scm_dir_print (sexp, port, pstate)
|
||||
SCM sexp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_prinport (sexp, port, "directory");
|
||||
|
|
|
@ -63,13 +63,13 @@ free_kw (obj)
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
prin_kw (SCM exp, SCM port, int writing)
|
||||
prin_kw (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
prin_kw (exp, port, writing)
|
||||
prin_kw (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, ":", port);
|
||||
|
|
|
@ -53,13 +53,13 @@ fmalloc(ptr)
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
prinmalloc (SCM exp, SCM port, int writing)
|
||||
prinmalloc (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
prinmalloc (exp, port, writing)
|
||||
prinmalloc (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts(scm_regular_string, "#<malloc ", port);
|
||||
|
|
|
@ -92,13 +92,13 @@ freejb (jbsmob)
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
printjb (SCM exp, SCM port, int writing)
|
||||
printjb (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
printjb (exp, port, writing)
|
||||
printjb (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "#<jmpbuffer ", port);
|
||||
|
|
|
@ -2287,15 +2287,15 @@ l2ra (lst, ra, base, k)
|
|||
|
||||
#ifdef __STDC__
|
||||
static void
|
||||
rapr1 (SCM ra, scm_sizet j, scm_sizet k, SCM port, int writing)
|
||||
rapr1 (SCM ra, scm_sizet j, scm_sizet k, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static void
|
||||
rapr1 (ra, j, k, port, writing)
|
||||
rapr1 (ra, j, k, port, pstate)
|
||||
SCM ra;
|
||||
scm_sizet j;
|
||||
scm_sizet k;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
long inc = 1;
|
||||
|
@ -2310,12 +2310,12 @@ tail:
|
|||
{
|
||||
SCM_ARRAY_BASE (ra) = j;
|
||||
if (n-- > 0)
|
||||
scm_iprin1 (ra, port, writing);
|
||||
scm_iprin1 (ra, port, pstate);
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
{
|
||||
scm_gen_putc (' ', port);
|
||||
SCM_ARRAY_BASE (ra) = j;
|
||||
scm_iprin1 (ra, port, writing);
|
||||
scm_iprin1 (ra, port, pstate);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2326,14 +2326,14 @@ tail:
|
|||
for (i = SCM_ARRAY_DIMS (ra)[k].lbnd; i < SCM_ARRAY_DIMS (ra)[k].ubnd; i++)
|
||||
{
|
||||
scm_gen_putc ('(', port);
|
||||
rapr1 (ra, j, k + 1, port, writing);
|
||||
rapr1 (ra, j, k + 1, port, pstate);
|
||||
scm_gen_puts (scm_regular_string, ") ", port);
|
||||
j += inc;
|
||||
}
|
||||
if (i == SCM_ARRAY_DIMS (ra)[k].ubnd)
|
||||
{ /* could be zero size. */
|
||||
scm_gen_putc ('(', port);
|
||||
rapr1 (ra, j, k + 1, port, writing);
|
||||
rapr1 (ra, j, k + 1, port, pstate);
|
||||
scm_gen_putc (')', port);
|
||||
}
|
||||
break;
|
||||
|
@ -2350,21 +2350,21 @@ tail:
|
|||
goto tail;
|
||||
default:
|
||||
if (n-- > 0)
|
||||
scm_iprin1 (scm_uniform_vector_ref (ra, SCM_MAKINUM (j)), port, writing);
|
||||
scm_iprin1 (scm_uniform_vector_ref (ra, SCM_MAKINUM (j)), port, pstate);
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
{
|
||||
scm_gen_putc (' ', port);
|
||||
scm_iprin1 (scm_cvref (ra, j, SCM_UNDEFINED), port, writing);
|
||||
scm_iprin1 (scm_cvref (ra, j, SCM_UNDEFINED), port, pstate);
|
||||
}
|
||||
break;
|
||||
case scm_tc7_string:
|
||||
if (n-- > 0)
|
||||
scm_iprin1 (SCM_MAKICHR (SCM_CHARS (ra)[j]), port, writing);
|
||||
if (writing)
|
||||
scm_iprin1 (SCM_MAKICHR (SCM_CHARS (ra)[j]), port, pstate);
|
||||
if (SCM_WRITINGP (pstate))
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
{
|
||||
scm_gen_putc (' ', port);
|
||||
scm_iprin1 (SCM_MAKICHR (SCM_CHARS (ra)[j]), port, writing);
|
||||
scm_iprin1 (SCM_MAKICHR (SCM_CHARS (ra)[j]), port, pstate);
|
||||
}
|
||||
else
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
|
@ -2408,12 +2408,12 @@ tail:
|
|||
{
|
||||
SCM z = scm_makflo (1.0);
|
||||
SCM_FLO (z) = ((float *) SCM_VELTS (ra))[j];
|
||||
scm_floprint (z, port, writing);
|
||||
scm_floprint (z, port, pstate);
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
{
|
||||
scm_gen_putc (' ', port);
|
||||
SCM_FLO (z) = ((float *) SCM_VELTS (ra))[j];
|
||||
scm_floprint (z, port, writing);
|
||||
scm_floprint (z, port, pstate);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2423,12 +2423,12 @@ tail:
|
|||
{
|
||||
SCM z = scm_makdbl (1.0 / 3.0, 0.0);
|
||||
SCM_REAL (z) = ((double *) SCM_VELTS (ra))[j];
|
||||
scm_floprint (z, port, writing);
|
||||
scm_floprint (z, port, pstate);
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
{
|
||||
scm_gen_putc (' ', port);
|
||||
SCM_REAL (z) = ((double *) SCM_VELTS (ra))[j];
|
||||
scm_floprint (z, port, writing);
|
||||
scm_floprint (z, port, pstate);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2438,13 +2438,13 @@ tail:
|
|||
SCM cz = scm_makdbl (0.0, 1.0), z = scm_makdbl (1.0 / 3.0, 0.0);
|
||||
SCM_REAL (z) = SCM_REAL (cz) = (((double *) SCM_VELTS (ra))[2 * j]);
|
||||
SCM_IMAG (cz) = ((double *) SCM_VELTS (ra))[2 * j + 1];
|
||||
scm_floprint ((0.0 == SCM_IMAG (cz) ? z : cz), port, writing);
|
||||
scm_floprint ((0.0 == SCM_IMAG (cz) ? z : cz), port, pstate);
|
||||
for (j += inc; n-- > 0; j += inc)
|
||||
{
|
||||
scm_gen_putc (' ', port);
|
||||
SCM_REAL (z) = SCM_REAL (cz) = ((double *) SCM_VELTS (ra))[2 * j];
|
||||
SCM_IMAG (cz) = ((double *) SCM_VELTS (ra))[2 * j + 1];
|
||||
scm_floprint ((0.0 == SCM_IMAG (cz) ? z : cz), port, writing);
|
||||
scm_floprint ((0.0 == SCM_IMAG (cz) ? z : cz), port, pstate);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2455,13 +2455,13 @@ tail:
|
|||
|
||||
#ifdef __STDC__
|
||||
int
|
||||
scm_raprin1 (SCM exp, SCM port, int writing)
|
||||
scm_raprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
int
|
||||
scm_raprin1 (exp, port, writing)
|
||||
scm_raprin1 (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
SCM v = exp;
|
||||
|
@ -2480,7 +2480,7 @@ tail:
|
|||
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "<enclosed-array ", port);
|
||||
rapr1 (exp, base, 0, port, writing);
|
||||
rapr1 (exp, base, 0, port, pstate);
|
||||
scm_gen_putc ('>', port);
|
||||
return 1;
|
||||
}
|
||||
|
@ -2554,7 +2554,7 @@ tail:
|
|||
#endif /*SCM_FLOATS*/
|
||||
}
|
||||
scm_gen_putc ('(', port);
|
||||
rapr1 (exp, base, 0, port, writing);
|
||||
rapr1 (exp, base, 0, port, pstate);
|
||||
scm_gen_putc (')', port);
|
||||
return 1;
|
||||
}
|
||||
|
@ -2664,13 +2664,13 @@ scm_init_unif ()
|
|||
|
||||
#ifdef __STDC__
|
||||
int
|
||||
scm_raprin1 (SCM exp, SCM port, int writing)
|
||||
scm_raprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
int
|
||||
scm_raprin1 (exp, port, writing)
|
||||
scm_raprin1 (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -62,13 +62,13 @@ free_var (obj)
|
|||
|
||||
#ifdef __STDC__
|
||||
static int
|
||||
prin_var (SCM exp, SCM port, int writing)
|
||||
prin_var (SCM exp, SCM port, scm_print_state *pstate)
|
||||
#else
|
||||
static int
|
||||
prin_var (exp, port, writing)
|
||||
prin_var (exp, port, pstate)
|
||||
SCM exp;
|
||||
SCM port;
|
||||
int writing;
|
||||
scm_print_state *pstate;
|
||||
#endif
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, "#<variable ", port);
|
||||
|
@ -79,10 +79,10 @@ prin_var (exp, port, writing)
|
|||
if (SCM_CAR (val_cell) != SCM_UNDEFINED)
|
||||
{
|
||||
scm_gen_puts (scm_regular_string, " name: ", port);
|
||||
scm_iprin1 (SCM_CAR (val_cell), port, writing);
|
||||
scm_iprin1 (SCM_CAR (val_cell), port, pstate);
|
||||
}
|
||||
scm_gen_puts (scm_regular_string, " binding: ", port);
|
||||
scm_iprin1 (SCM_CDR (val_cell), port, writing);
|
||||
scm_iprin1 (SCM_CDR (val_cell), port, pstate);
|
||||
}
|
||||
scm_gen_putc('>', port);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue