diff --git a/src/object.h b/src/object.h index fe4b91f..2d178f0 100644 --- a/src/object.h +++ b/src/object.h @@ -90,6 +90,7 @@ struct Other { char* stringObj(char *dest, const Object *obj); void printList(const Object *list); void printObj(const Object *obj); +void _printObj(const Object *obj, int newline); void debugObj(const Object *obj); void printErr(const Object *obj); diff --git a/src/pebblisp.c b/src/pebblisp.c index 5ba62a0..dbf09fe 100644 --- a/src/pebblisp.c +++ b/src/pebblisp.c @@ -396,8 +396,7 @@ Object print(Object p, Object ignore, struct Environment *env) { p = cloneObject(p); p = eval(&p, env); - printObj(&p); - printf("\n"); + _printObj(&p, 0); return p; } @@ -624,7 +623,8 @@ int readFile(const char *filename, struct Environment *env) { } r = parseEval(page, env); - printAndClean(&r); + cleanObject(&r); + printf("\n"); fclose(input); return 0;