Thank you Jürgen.

I'm not sure values > 1 are working properly, but maybe that's just my
system. I've set it to 1 anyways.

As for the output messages, I suggest the attached changes, because 1)
readline is already ending CIN on Ctrl-D, so we don't need to output
another endl; 2) that "*** end of input" can be silenced with uprefs.silent
;-)

Tobia
Index: src/Command.cc
===================================================================
--- src/Command.cc	(revision 516)
+++ src/Command.cc	(working copy)
@@ -1120,7 +1120,6 @@
 Command::cmd_OFF(int exit_val)
 {
    cleanup(true);
-   COUT << endl;
    if (!uprefs.silent)   COUT << "Goodbye." << endl;
    exit(exit_val);
 }
Index: src/LineInput.cc
===================================================================
--- src/LineInput.cc	(revision 516)
+++ src/LineInput.cc	(working copy)
@@ -727,8 +727,7 @@
             {
               if (control_D_count >= control_D_count)
                  {
-                   CIN << endl;
-                   COUT << "      *** end of input" << endl;
+                   if (!uprefs.silent) COUT << "      *** end of input" << endl;
                    Thread_context::kill_pool();
                    Command::cmd_OFF(2);   // exit()s
                    return;  // not reached
@@ -736,7 +735,6 @@
             }
          else if (control_D_count < 5)
             {
-              CIN << endl;
               COUT << "      ^D or end-of-input detected ("
                    << control_D_count << "). Use )OFF to leave APL!"
                    << endl;
@@ -750,8 +748,7 @@
               // of 10 ms or faster. That looks like end-of-input rather
               // than ^D typed by the user. Abort the interpreter.
               //
-              CIN << endl;
-              COUT << "      *** end of input" << endl;
+              if (!uprefs.silent) COUT << "      *** end of input" << endl;
               Thread_context::kill_pool();
               Command::cmd_OFF(2);   // exit()s
               return;  // not reached

Reply via email to