diff src/input.cc @ 287:6027a905fc06

[project @ 1994-01-13 01:41:00 by jwe]
author jwe
date Thu, 13 Jan 1994 01:42:10 +0000
parents 64b486b19ce4
children 82d30a23c979
line wrap: on
line diff
--- a/src/input.cc
+++ b/src/input.cc
@@ -130,7 +130,7 @@
  * Use GNU readline to get an input line and store it in the history
  * list.
  */
-char *
+static char *
 octave_gets (void)
 {
   if (octave_gets_line != NULL)
@@ -164,10 +164,10 @@
 
       if (echo_input)
 	{
-	  if (!forced_interactive)
+	  if (! forced_interactive)
 	    cout << "+ ";
-	  if (octave_gets_line != (char *) NULL)
-	    cout << octave_gets_line << "\n";
+
+	  cout << octave_gets_line << "\n";
 	}
     }
   return octave_gets_line;
@@ -254,6 +254,14 @@
 
       stashed_line = strsave (buf);
       current_input_line = stashed_line;
+
+      if (echo_input && current_input_line && *current_input_line)
+	{
+	  if (! forced_interactive)
+	    cout << "+ ";
+
+	  cout << current_input_line << "\n";
+	}
     }
   input_line_number++;
   return status;