Support multiple build variants, add ARM variant
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user