On Fri, 13 Aug 2010, Tom Schneider wrote:
John:
It turns out that backspace isn't always CTRL-H. I don't know what it is on MacOS, but on many UNIX platforms, the default backspace character is CTRL-? (changeable with a terminal setting). This is probably not something you want to specify directly on the UNIX side (I assume that MacOS X behaves like other UNIX variants in this regard); rather, you would want your program to look up the terminal setting for backspace and use that (no, I don't know how to do that in GPC, sorry to say).
On my command line on Mac OS X, control-H and the delete key work just fine. They stop working when the GPC compiled program runs. Also, I want to avoid having to modify my programs or they would break on other systems.
Control-? does not work inside the inout program or on the Mac OS X command line.
I found the solution! On the Mac in the ~/.cshrc (or a sourced file from there) include:
stty erase ^h
That does the job and control-h and delete now work inside the GPC compiled program.
Tom
Yep, it's a terminal setting (that's what stty does).
--------------------------| John L. Ries | Salford Systems | Phone: (619)543-8880 x107 | or (435)867-8885 | --------------------------|