<http://www.gnu.org/licenses/>.
*/
+#include "atom.h"
#include "print.h"
#include "object.h"
}
}
+static void
+print_uvector_body (const uvector_object * o)
+{
+ const uv_val *p = UV_VAL (o->val.body);
+ if (!p)
+ return;
+ pool_object x;
+ x.type = utype (o);
+ x.rest = 0;
+ if (o->val.len)
+ {
+ x.val = p[0];
+ print_object ((object *) & x);
+ }
+ for (uint32_t i = 1; i < o->val.len; i++)
+ {
+ printf (" ");
+ x.val = p[i];
+ print_object ((object *) & x);
+ }
+}
+
static void
print_list_body (const list_object * o)
{
print_vector_body (&o->vector);
printf ("]");
break;
+ case EVALTYPE_OBLIST:
+ // for now, handle non-primtype print as special case
+ printf ("#OBLIST ");
+ // FALLTHROUGH
+ case EVALTYPE_UVECTOR:
+ printf ("![");
+ print_uvector_body (&o->uvector);
+ printf ("!]");
+ break;
+ case EVALTYPE_ATOM:
+ printf ("%s", atom_pname (o->atom));
+ break;
default:
+ fprintf (stderr, "Tried to print the unprintable: 0x%x\n", o->type);
assert (0 && "I don't know how to print that");
}
}