added hcl_walkdic

fixed a bug of not printing the list closer properly in hcl_print().
enhanced error handling
This commit is contained in:
2018-02-12 16:51:38 +00:00
parent 4ddffc101d
commit 2201ee5a94
8 changed files with 815 additions and 748 deletions

View File

@ -296,6 +296,7 @@ next:
* the variable p is */
ps.type = PRINT_STACK_CONS;
ps.obj = HCL_CONS_CDR(cur);
ps.idx = concode; /* this is not an index but use this field to restore concode */
x = push (hcl, &ps);
if (x <= -1) return -1;
@ -309,6 +310,7 @@ next:
resume_cons:
HCL_ASSERT (hcl, ps.type == PRINT_STACK_CONS);
cur = ps.obj; /* Get back the CDR pushed */
concode = ps.idx; /* restore the concode */
if (HCL_IS_NIL(hcl,cur))
{
/* The CDR part points to a NIL object, which