aboutsummaryrefslogtreecommitdiff
path: root/src/calculer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/calculer.c')
-rw-r--r--src/calculer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/calculer.c b/src/calculer.c
index 6ed5983..0c9fe8b 100644
--- a/src/calculer.c
+++ b/src/calculer.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <time.h>
-#include <readline/readline.h>
+#include "linenoise.h"
static int lower = 0;
static int upper = 100;
@@ -67,6 +67,7 @@ main(void)
int x, y, res;
char *input;
+ srand(time(NULL));
logfile = fopen("./calculer.log", "a");
assert(logfile);
@@ -78,7 +79,7 @@ main(void)
res = x+y;
assert(!measure_after(measure_data));
sprintf(prompt, "%d + %d = ", x, y);
- input = readline(prompt);
+ input = linenoise(prompt);
if (strcmp(input, "q") == 0)
{