core: Reenable full printing of lists.

* src/lib.c (display_helper): Reenable full printing of lists.
This commit is contained in:
Jan Nieuwenhuizen 2018-04-21 08:54:14 +02:00
parent 4b6d11e990
commit 82db3a941a
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 4 additions and 11 deletions

View File

@ -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);