mes: display: closure names.

* src/lib.c (display_helper): Display closure names.
This commit is contained in:
Jan Nieuwenhuizen 2018-01-14 09:11:19 +01:00
parent 7b8f69972e
commit 63e8b49d9e
1 changed files with 11 additions and 1 deletions

View File

@ -73,7 +73,17 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p)
{
if (!cont) fputs ("(", fd);
if (CAR (x) == cell_circular)
fputs ("*circ* . #-1#", fd);
{
fputs ("(*circ* . ", fd);
int i = 0;
x = CDR (x);
while (x != cell_nil && i++ < 10)
{
fdisplay_ (CAAR (x), fd, write_p); fputs (" ", fd);
x = CDR (x);
}
fputs (" ...)", fd);
}
else
{
if (x && x != cell_nil) fdisplay_ (CAR (x), fd, write_p);