On Fri Jul 28 13:26:14 CDT 2006, [EMAIL PROTECTED] wrote:
> > in addition, one would need to change the string from
> > "`^#*[]=|\\?${}()'<>&;" (char*)
> > to
> > L"`^#*[]=|\\?${}()'<>&;" (Rune*)
> > i was trying to avoid that. i think it would make p9p harder.
> > (i dont trust gcc with L"".)
>
> No, utfrune finds a rune in a UTF-8 string (char *). R is already a
> Rune (even though it's declared int), so nothing needs to change,
you're right about this. but why obfuscate the situation with Runes?
the only characters that rc will treat as special are us-ascii -- that is
< 0x80.
- erik
> except to replace strchr with utfrune. Utfrune starts like this:
>
> char*
> utfrune(char *s, long c)
> {
> ...
> if(c < Runesync) /* not part of utf sequence */
> return strchr(s, c);
> ...
>
> Which is exactly what you were doing (Runesync == 0x80).