/usr/bin/style
Bob Hofkin
rjh at calmasd.UUCP
Fri Apr 26 04:29:58 AEST 1985
Description:
style permits output of long (-l flag) or complicated (-r flag)
sentences. It barfs if you put both flags in a single request.
Repeat-By:
Take any text file, say FOO. Issue the command
style -l 20 -r 12 FOO
You will get an error message from deroff, and style aborts.
Fix: The problem is a "for" loop in the style script. The -l and -r
flags take an additional numeric parameter which isn't skipped
by the for.
The simplest fix (I don't claim to be a great shell wizard) is
a switch to the "while" construct. I had to change references
of $i to $1. This diff should do:
19,20c19,20
< while true;
< do case $1 in
---
> for i in $*
> do case $i in
37c37
< -*) echo unknown style flag $1; exit;;
---
> -*) echo unknown style flag $i; exit;;
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list