categoricals: Improve comments.
[pspp] / src / ui / terminal / terminal-reader.c
index 141474a95bb9f77d18b5178403127cd8c2e5cbe9..0a1337d4ea0f3f8448a3f44df1524c7604825af6 100644 (file)
@@ -38,7 +38,6 @@ static const bool have_readline = true;
 
 #else
 static const bool have_readline = false;
-static int rl_end;
 #endif
 
 
@@ -127,7 +126,7 @@ rl_echo_signal_char (int sig)
   if (0 == tcgetattr (0, &t))
     {
       cc_t c = t.c_cc[VINTR];
-  
+
       if (c >= 0  && c <= 'Z' - 'A')
        fprintf (rl_outstream, "^%c", 'A' + c - 1);
       else
@@ -138,7 +137,7 @@ rl_echo_signal_char (int sig)
     fprintf (rl_outstream, "^C");
 
   fflush (rl_outstream);
-}  
+}
 #endif
 #endif
 
@@ -251,12 +250,12 @@ readline_prompt (enum prompt_style style)
 }
 
 
+#if HAVE_READLINE
 
 static int pfd[2];
 static bool sigint_received ;
 
-
-/* 
+/*
    A function similar to getc from stdio.
    However this one may be interrupted by SIGINT.
    If that happens it will return EOF and the global variable
@@ -306,11 +305,7 @@ interruptible_getc (FILE *fp)
   return c;
 }
 
-
-
-#if HAVE_READLINE
-
-static void 
+static void
 handler (int sig)
 {
   rl_end = 0;
@@ -354,7 +349,7 @@ readline_done (void)
   free (history_file);
 }
 
-/* Prompt the user for a line of input and return it in LINE. 
+/* Prompt the user for a line of input and return it in LINE.
    Returns true if the LINE should be considered valid, false otherwise.
  */
 static bool
@@ -454,9 +449,9 @@ readline_read (struct substring *line, enum prompt_style style)
   fflush (stdout);
   ds_init_empty (&string);
   ds_read_line (&string, stdin, SIZE_MAX);
-  
+
   *line = string.ss;
-  
+
   return false;
 }
 #endif /* !HAVE_READLINE */