Support multiple build variants, add ARM variant

This commit is contained in:
2022-11-17 22:12:29 -05:00
parent e1048c3ca4
commit 5cf8a55156
2 changed files with 151 additions and 57 deletions

View File

@@ -1,7 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
#ifndef NO_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
#include "uclisp.h"
@@ -71,14 +74,18 @@ int main(int argc, const char **argv) {
if (argc < 2) {
while (1) {
char *line = readline("> ");
char *line = NULL;
#ifndef NO_READLINE
line = readline("> ");
if (line == NULL) {
break;
}
if (strlen(line) > 0) {
add_history(line);
}
#else
// TODO
#endif
struct ucl_object *sexp = ucl_parse(line);
struct ucl_object *result = NULL;
if (sexp->type == UCL_TYPE_ERROR) {