tweak: change mumble answer

This commit is contained in:
NunoSempere 2023-04-30 00:44:26 -04:00
parent 2ffb9e7d82
commit e9a6558d4b
2 changed files with 5 additions and 1 deletions

BIN
mumble

Binary file not shown.

View File

@ -25,6 +25,7 @@ int main(int argc, char** argv)
lispy : /^/ <operator> <expr>+ /$/ ; \ lispy : /^/ <operator> <expr>+ /$/ ; \
", ",
Number, Operator, Expr, Lispy); Number, Operator, Expr, Lispy);
int loop = 1; int loop = 1;
while (loop) { while (loop) {
char* input = readline("mumble> "); char* input = readline("mumble> ");
@ -33,12 +34,15 @@ int main(int argc, char** argv)
loop = 0; loop = 0;
puts(""); puts("");
} else { } else {
printf("You said: %s\n", input); printf("Did you say \"%s\"?\n", input);
add_history(input); add_history(input);
// can't add if input is NULL // can't add if input is NULL
} }
free(input); free(input);
} }
/* Undefine and Delete our Parsers */
mpc_cleanup(4, Number, Operator, Expr, Lispy);
return 0; return 0;
} }