Article View: comp.sys.sun
Article #13932Fix to reactive keyboard
From: ROSS
Date: Thu, 22 Feb 1990 21:30
Date: Thu, 22 Feb 1990 21:30
45 lines
1660 bytes
1660 bytes
A recent message on the SUN-SPOTS list mentioned a predictive command line
editor called reactivekbd. I got a copy from the comp.sources.unix
archive at uk.ac.ic.doc.src but when I tried to use it, it core dumped
with a segmentation error. I have traced the error to the routine
Strcpy(a,b) in parse_keys.c where the if statement should have an else
keyword added. The old and new versions of the function are included
below.
*****OLD
Strcpy(a,b)
char *a,*b;
$
while(*b)$
if((*b<32) || (*b==127))$
*a++='';
*a++=(*b==127)?b++,'?':(*b++)+'@';
*a++ = *b++;
*a=0;
*****NEW
Strcpy(a,b)
char *a,*b;
$
while(*b)$
if((*b<32) || (*b==127))$
*a++='';
*a++=(*b==127)?b++,'?':(*b++)+'@';
else
*a++ = *b++;
*a=0;
*****
The program then runs and I personally think is a great utility when you
get used to it. I hope this information helps if anyone else has the same
problem.
Philip Ross
Dept. Biomedical Physics,
Aberdeen University
ROSS@UK.AC.ABDN.BIOMED
Technical Details
Message-ID:
<5247@brazos.Rice.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: ROSS@BIO-MEDICAL-PHYSICS.ABERDEEN.AC.UK Newsgroups: comp.sys.sun Subject: Fix to reactive keyboard Keywords: Software Message-ID: <5247@brazos.Rice.edu> Date: 22 Feb 90 21:30:45 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 45 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 57, message 2