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,
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).

Micah

Reply via email to