Article View: comp.bugs.4bsd
Article #12024.3bsd /usr/ucb/more outputs spurious NUL character +FIX
From: Mark Plotnick
Date: Wed, 28 Sep 1988 19:28
Date: Wed, 28 Sep 1988 19:28
51 lines
1804 bytes
1804 bytes
On a "crt", when erasing a character in an input line the 4.3BSD 'more'
program winds up writing a NUL after each backspace-space-backspace sequence.
This ordinarily isn't a problem, except on terminals that
display a NUL as a visible character (my terminal prints out
all control characters that aren't part of an escape sequence
as visible characters). Here's a suggested fix. This also applies
to the 'more' on SunOS 4.0.
Mark Plotnick
allegra!mp
RCS file: more.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -r1.1 -r1.2
*** /tmp/,RCSt1008181 Wed Sep 28 15:10:39 1988
--- /tmp/,RCSt2008181 Wed Sep 28 15:10:40 1988
***************
*** 1564,1570 ****
static char CARAT = '^';
#define ERASEONECHAR \
if (docrterase) \
! write (2, BSB, sizeof(BSB)); \
else \
write (2, &BS, sizeof(BS));
--- 1564,1570 ----
static char CARAT = '^';
#define ERASEONECHAR \
if (docrterase) \
! write (2, BSB, strlen(BSB)); \
else \
write (2, &BS, sizeof(BS));
***************
*** 1616,1622 ****
erase (1);
else if (docrtkill)
while (promptlen-- > 1)
! write (2, BSB, sizeof(BSB));
promptlen = 1;
}
sptr = buf;
--- 1616,1622 ----
erase (1);
else if (docrtkill)
while (promptlen-- > 1)
! write (2, BSB, strlen(BSB));
promptlen = 1;
}
sptr = buf;
Technical Details
Message-ID:
<12492@andante.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rutgers!njin!princeton!andante!allegra!mpShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rutgers!njin!princeton!andante!allegra!mp From: mp@allegra.UUCP (Mark Plotnick) Newsgroups: comp.bugs.4bsd Subject: 4.3bsd /usr/ucb/more outputs spurious NUL character +FIX Message-ID: <12492@andante.UUCP> Date: 28 Sep 88 19:28:12 GMT Reply-To: mp@allegra.att.com (Mark Plotnick) Organization: AT&T Bell Laboratories, Murray Hill Lines: 51