Move definition of handler inside the #ifdef HAVE_READLINE
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 19 Oct 2015 13:23:23 +0000 (15:23 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 19 Oct 2015 13:23:23 +0000 (15:23 +0200)
src/ui/terminal/terminal-reader.c

index 96a69d7bc452ab6e934270d850168b264924907f..f0017cbb546a7ae63ef2ffebcd8c2d87793d8019 100644 (file)
@@ -256,15 +256,6 @@ readline_prompt (enum prompt_style style)
 static int pfd[2];
 static bool sigint_received ;
 
-static void 
-handler (int sig)
-{
-  rl_end = 0;
-
-  write (pfd[1], "x", 1);
-  rl_echo_signal_char (sig);
-}
-
 
 /* 
    A function similar to getc from stdio.
@@ -320,6 +311,16 @@ interruptible_getc (FILE *fp)
 
 #if HAVE_READLINE
 
+static void 
+handler (int sig)
+{
+  rl_end = 0;
+
+  write (pfd[1], "x", 1);
+  rl_echo_signal_char (sig);
+}
+
+
 static void
 readline_init (void)
 {