[net.bugs.4bsd] /usr/bin/style

rjh@calmasd.UUCP (Bob Hofkin) (04/25/85)

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;;