|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Xcode debug console vs GNU APL |
Date: | Sat, 24 May 2014 17:08:14 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi Peter,
I believe you are close. I can't tell what happens on your machine; the output below is on mine... If the terminal echoes (which is the default in most shells) then we are probably in cooked mode and input is echoed by the shell: address@hidden:~/projects/juergen/apl-1.3/src$ stty echo address@hidden:~/projects/juergen/apl-1.3/src$ ./apl --rawCIN --noCIN ______ _ __ __ __ ___ ____ __ / ____// | / // / / / / | / __ \ / / / / __ / |/ // / / / / /| | / /_/ // / / /_/ // /| // /_/ / / ___ | / ____// /___ \____//_/ |_/ \____/ /_/ |_|/_/ /_____/ Welcome to GNU APL version 1.3 / 6737 Copyright (C) 2008-2014 Dr. Jürgen Sauermann Banner by FIGlet: www.figlet.org This program comes with ABSOLUTELY NO WARRANTY; for details run: ./apl --gpl. This program is free software, and you are welcome to redistribute it according to the GNU Public License (GPL) version 3 or later. 1+2 3 2+3 5 )off Goodbye. If the terminal does not echo (which can be set with stty in linux) then we get this (same input as above but typed "blindly" including the start of apl with the same command line options (which you cant see because echo if off after stty -echo)): address@hidden:~/projects/juergen/apl-1.3/src$ stty -echo address@hidden:~/projects/juergen/apl-1.3/src$ ______ _ __ __ __ ___ ____ __ / ____// | / // / / / / | / __ \ / / / / __ / |/ // / / / / /| | / /_/ // / / /_/ // /| // /_/ / / ___ | / ____// /___ \____//_/ |_/ \____/ /_/ |_|/_/ /_____/ Welcome to GNU APL version 1.3 / 6737 Copyright (C) 2008-2014 Dr. Jürgen Sauermann Banner by FIGlet: www.figlet.org This program comes with ABSOLUTELY NO WARRANTY; for details run: ./apl --gpl. This program is free software, and you are welcome to redistribute it according to the GNU Public License (GPL) version 3 or later. 3 5 Goodbye. address@hidden:~/projects/juergen/apl-1.3/src$ That is probably what you were looking for. The whole matter is not entirely easy for the following reasons 1. If readline is used then echoing is also influenced by readline in a difficult to predict way. Thus --rawCIN was in principle a good idea. Unfortunately is causes function no_readline() to be used which may or may not work on your box. The reason is that it uses ungetc() to push the prompt back into the input stream which is not guaranteed to work on all systems (some guarantee only one character but not 6 like for the APL prompt). 2. --noCIN suppresses internal echoing of input inside GNU APL. But only for input coming from a script where you normally dont want to see it. So --noCIN without --rawCIN has probably little effect. Echoing of input that is performed outside GNU APL (shell or debugger) cannot be switched of with --noCIN. 3. The GNU debugger gdb seems to have no problems with all this. . Hope this helps, Jürgen |
[Prev in Thread] | Current Thread | [Next in Thread] |