Bugs in pprintall


#1

There look to be two bugs related to ‘pprintall’:

  1. Documentation: the syntax: (pprintall item [stream] ) refers to an item argument, but the function only takes an optional stream. (Copy/paste bug from the documentation for pprint?)

  2. In the implementation, fn_pprintall, the final else branch sends the output to pserial rather than the stream pfun - the results are somewhat puzzling, depending on the current contents of the image:

if (consp(val) && symbolp(car(val)) && builtin(car(val)->name) == LAMBDA) {
  superprint(cons(bsymbol(DEFUN), cons(var, cdr(val))), 0, pfun);
#if defined(CODESIZE)
} else if (consp(val) && car(val)->type == CODE) {
  superprint(cons(bsymbol(DEFCODE), cons(var, cdr(val))), 0, pfun);
#endif
} else {
  superprint(cons(bsymbol(DEFVAR), cons(var, cons(quote(val), NULL))), 0, pserial);
}

Thanks.


#2

Thank you very much for reporting the bugs. I’ve corrected the documentation error, and will fix the bug in pprintall next release.