aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index ad9036c..d6d8b1b 100644
--- a/main.c
+++ b/main.c
@@ -14,13 +14,12 @@ int main(int argc, char **argv)
/* Read stdin line by line until exhaustion. */
char *line = NULL;
while ((line = getln(stdin)) != NULL) {
- err = sloth_push(sloth, line[0]);
+ err = sloth_exec_line(sloth, line);
+ free(line);
if (err != NULL) {
fprintf(stderr, "%s\n", err);
break;
}
- sloth_inspect_stack(sloth);
- free(line);
}
/* Free everything. */
getln_cleanup();