summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--repl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/repl.c b/repl.c
index 4269f8e..d179429 100644
--- a/repl.c
+++ b/repl.c
@@ -18,26 +18,31 @@ repl(void)
choicestack = nil;
goalstack = nil; /* should free old choicestack and goalstack */
int success;
+ int firsttime = 1;
FindMore:
success = evalquery(query, &bindings);
+ if(firsttime){
+ print(" ");
+ firsttime = 0;
+ }
if(success == 0)
- print("false.\n");
+ print(" false.\n");
else{
if(bindings == nil)
- print("true.\n");
+ print(" true");
else{
while(bindings){
print(" %S = %S%s",
bindings->name,
prettyprint(bindings->value, 0, 0, 0),
- bindings->next ? " ,\n" : "");
+ bindings->next ? ",\n " : "");
bindings = bindings->next;
}
}
if(choicestack != nil){
- print(" ");
+ print("\n");
if(parsefindmore(fd) == L';'){
- print(";\n");
+ print(";");
goto FindMore;
}else
print(".\n");