core: Reenable full printing of lists.
* src/lib.c (display_helper): Reenable full printing of lists.
This commit is contained in:
parent
4b6d11e990
commit
82db3a941a
15
src/lib.c
15
src/lib.c
|
@ -57,7 +57,7 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p)
|
|||
case TCLOSURE:
|
||||
{
|
||||
fputs ("#<closure ", fd);
|
||||
//display_helper (CDR (x), cont, "", fd, 0);
|
||||
display_helper (CDR (x), cont, "", fd, 0);
|
||||
fputs (">", fd);
|
||||
break;
|
||||
}
|
||||
|
@ -100,22 +100,15 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p)
|
|||
{
|
||||
if (!cont)
|
||||
fputs ("(", fd);
|
||||
if (CAR (x) == cell_closure)
|
||||
fputs ("*closure* ", fd);
|
||||
else
|
||||
if (CAAR (x) == cell_closure)
|
||||
fputs ("(*closure* ...) ", fd);
|
||||
else
|
||||
if (CAR (x) == cell_circular)
|
||||
if (CAR (x) == cell_circular
|
||||
&& CADR (x) != cell_closure)
|
||||
{
|
||||
fputs ("(*circ* . ", fd);
|
||||
int i = 0;
|
||||
x = CDR (x);
|
||||
while (x != cell_nil && i++ < 10)
|
||||
{
|
||||
g_depth = 1;
|
||||
display_helper (CAAR (x), 0, "", fd, write_p); fputs (" ", fd);
|
||||
//fdisplay_ (CAAR (x), fd, write_p); fputs (" ", fd);
|
||||
fdisplay_ (CAAR (x), fd, write_p); fputs (" ", fd);
|
||||
x = CDR (x);
|
||||
}
|
||||
fputs (" ...)", fd);
|
||||
|
|
Loading…
Reference in New Issue