diff options
author | John Ankarström <john@ankarstrom.se> | 2019-01-10 00:48:07 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2019-01-10 00:48:07 +0100 |
commit | 4de07e4be7aa33f9401de6cf69738230f9741786 (patch) | |
tree | d65ad3076fddbc462f75680214613089441cacdf | |
parent | 68c4e104ba345bd7131dfa404f63e2176bff965e (diff) | |
download | repl-4de07e4be7aa33f9401de6cf69738230f9741786.tar.gz |
comments
-rw-r--r-- | repl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ #include <readline/readline.h> #include <readline/history.h> -void handle_int(int sig) { +void handle_int(int sig) { /* handle ctrl-c */ printf("\n"); rl_on_new_line(); rl_replace_line("", 0); @@ -27,7 +27,7 @@ int main(int argc, char *argv[]) { act.sa_handler = handle_int; sigaction(SIGINT, &act, NULL); - rl_clear_signals(); + rl_clear_signals(); /* tell readline to ignore signals */ while (true) { char *input = readline(prompt); |