From gossip.pyramid.com!uunet!gatech!destroyer!ubc-cs!yking Mon Aug 31 11:27:20 PDT 1992
Article: 1933 of rec.juggling
Newsgroups: rec.juggling
Path: gossip.pyramid.com!uunet!gatech!destroyer!ubc-cs!yking
From: yking@cs.ubc.ca (Yossarian Yggy King)
Subject: SSS problem -- "-p" option
Message-ID: <1992Aug31.174530.4157@cs.ubc.ca>
Keywords: bug fix
Sender: usenet@cs.ubc.ca (Usenet News)
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Mon, 31 Aug 92 17:45:30 GMT
Lines: 36


I just got email from someone who has made me realize that I
owe an apology to whoever (sorry, I forget) said that the -p
option wasn't working for them. There is actually a conflict
between "-p" and other options that start with a "p" (like
-pagesize etc.) The reason I didn't notice it before is that
if the number of cycles for a pattern segment is specified,
as in the four cycles of "-p4" then there's no problem, and
I guess this is the only testing I did (oops).
	Anyways, the fix (one fix, other work too) is to use the
following in the read_comline() procedure:

		/* Read a pattern if the switch is either
		   exactly "-p" or "-p" followed by a digit
		   or just a digit */
	else if (
	   (mystrnicmp(av[arg],"-p",2) == 0 && strlen(av[arg]) == 2)
	|| (mystrnicmp(av[arg],"-p",2) == 0 && ISDIGIT(av[arg][2]))
	|| ISDIGIT(av[arg][0]))

which just makes sure that the "-p" is not matched if there
is more to the word. (Another solution is to move the check
for -p below the check for other "p" options, but the order-
dependency is a little ugly.)
	If you're worried about making the change yourself,
then hold off a couple days and get a new copy of sss.c from
the ftp site ... I'll put it there soon and report when it's
ready. The other alternative is just to use -p1 (or whatever)
in place of -p.
	Again, I apologize to the person who's complaint I
dismissed last time, and thanks to Mike Hatalski for pointing
out the problem in a way that my feeble mind managed to comprehend.
--
Yggy King	| "Outside of a dog, a book is a person's best friend;	
UBC Comp Sci	|     inside of a dog, it's too dark to read."
B.C., Canada	|		    --Groucho Marx


