net.unix-wizards
Neil Rhodes
neil at sdcsvax.UUCP
Wed Feb 19 08:42:28 AEST 1986
I would imagine this bug is present in 4.2BSD as well
Note that this bug causes spell to only check words through the first
.PS < filename
in a file and ignores the rest.
It was real frustrating to find typos in my slides *after* having
run spell.
Subject: deroff can screws up on .PS < filename (pic construct
Index: usr.bin/deroff.c 4.3BSD
Description:
Note that .PS starts a pic macro.
Pic allows
.PS < filename
to include filename (like .so) and in this case doesn't
require a matching .PE
Deroff shouldn't require a matching .PE in this case.
Repeat-By:
Feed the following lines to deroff:
abc
.PS < foobar
def
ghi
Deroff should return:
abc
def
ghi
bug actually returns
abc
Fix:
What follows is a contextual diff
*** /usr/src/usr.bin/deroff.c Mon Dec 9 16:01:47 1985
--- deroff.c Tue Feb 18 14:34:03 1986
***************
*** 922,927 ****
--- 922,934 ----
}
PS()
{
+ for (C ; c == ' ' || c == '\t';C)
+ ; /* skip white space */
+ if (c == '<'){ /* construct is .PS < file -- don't expect
+ a .PE */
+ SKIP;
+ return(0);
+ }
if (!msflag) {
inpic();
} else {
--
Neil Rhodes
UC San Diego
neil at ucsd
{ucbvax,decvax}!sdcsvax!neil
More information about the Comp.unix.wizards
mailing list