[comp.windows.x] wscrawl compiling problem

pashdown@javelin.sim.es.com (Pete Ashdown) (05/18/91)

Does anyone have a fix for this compiling error for wscrawl?  I looked at the
code myself, but no amount of dinking around could get it to work.

wscrawl.c: In function parse_and_fix_dialog_text:
wscrawl.c:2910: invalid type argument of `array indexing'
wscrawl.c:2910: invalid type argument of `array indexing'
wscrawl.c:2910: invalid type argument of `array indexing'
wscrawl.c:2910: invalid type argument of `array indexing'
wscrawl.c:2910: invalid type argument of `array indexing'

Line 2909-2910 is:

 tmp_ptr = &strpbrk(&strpbrk(&strpbrk(&strpbrk(&strpbrk(
               current_line, ":")[1], ":")[1], ":")[1], ":")[1], ":")[1];

Thanks in advance.
-- 
   "I looked right, I looked left.  Nowhere to go but straight ahead.  There
   was no other choice.  I ripped out the AK-47 and blasted a clean path right
   through the cluster of centaurs."  - Go To Hell Dante: Inferno II
Pete Ashdown  pashdown@javelin.sim.es.com ...uunet!javelin.sim.es.com!pashdown

imp@solbourne.com (Warner Losh) (05/21/91)

In article <1991May17.181846.14774@javelin.sim.es.com> pashdown@javelin.sim.es.com (Pete Ashdown) writes:
>Does anyone have a fix for this compiling error for wscrawl?
[...]
> tmp_ptr = &strpbrk(&strpbrk(&strpbrk(&strpbrk(&strpbrk(
>               current_line, ":")[1], ":")[1], ":")[1], ":")[1], ":")[1];

I changed my copy to read:

	tmp_ptr = strpbrk(strpbrk(strpbrk(strpbrk(strpbrk(current_line,
		":") + 1, ":") + 1, ":") + 1, ":") + 1, ":") + 1;

since that is same thing.  I also think that adding something like
"char *strpbrk();" would also do the trick, but I haven't tried it.

Warner
-- 
Warner Losh		imp@Solbourne.COM
God is an Iron