--- rxvt-unicode/src/misc.C 2007/09/08 20:55:49 1.45 +++ rxvt-unicode/src/misc.C 2007/10/31 09:55:23 1.49 @@ -81,7 +81,7 @@ *p++ = 0xc0 | ( w >> 6), *p++ = 0x80 | ( w & 0x3f); else if (w < 0x010000) - *p++ = 0xe0 | ( w >> 12 ), + *p++ = 0xe0 | ( w >> 12), *p++ = 0x80 | ((w >> 6) & 0x3f), *p++ = 0x80 | ( w & 0x3f); else if (w < 0x110000) @@ -118,7 +118,7 @@ else if (s[0] < 0x80) *p++ = *s++; else if (len >= 2 - && s[0] >= 0xc2 && s[0] <= 0xdf + && s[0] >= 0xc2 && s[0] <= 0xdf && (s[1] & 0xc0) == 0x80) { *p++ = ((s[0] & 0x1f) << 6) @@ -146,9 +146,9 @@ && (s[2] & 0xc0) == 0x80 && (s[3] & 0xc0) == 0x80) { - *p++ = ((s[0] & 0x07) << 18) - | ((s[1] & 0x3f) << 12) - | ((s[2] & 0x3f) << 6) + *p++ = ((s[0] & 0x07) << 18) + | ((s[1] & 0x3f) << 12) + | ((s[2] & 0x3f) << 6) | (s[3] & 0x3f); s += 4; } @@ -165,7 +165,7 @@ } char * -rxvt_r_basename (const char *str) NOTHROW +rxvt_basename (const char *str) NOTHROW { char *base = strrchr (str, '/'); @@ -237,8 +237,8 @@ /* * remove leading/trailing space in place. */ -char * -rxvt_Str_trim (char *str) NOTHROW +char * +rxvt_strtrim (char *str) NOTHROW { char *r, *s; @@ -264,9 +264,8 @@ /* * Split a comma-separated string into an array, stripping leading and * trailing spaces from each entry. Empty strings are properly returned - * Caller should free each entry and array when done */ -char ** +char ** rxvt_splitcommastring (const char *cs) NOTHROW { int l, n, p; @@ -290,7 +289,7 @@ ret[l] = (char *)malloc (p + 1); strncpy (ret[l], s, p); ret[l][p] = '\0'; - rxvt_Str_trim (ret[l]); + rxvt_strtrim (ret[l]); s = ++t; }