diff -r eec5a7dcbf61 -r fcf5fb2548eb src/string_func.h --- a/src/string_func.h Mon Apr 14 20:32:36 2008 +0000 +++ b/src/string_func.h Tue Apr 15 00:47:19 2008 +0000 @@ -48,7 +48,7 @@ static inline int ttd_strnlen(const char *str, int maxlen) { const char *t; - for (t = str; *t != '\0' && t - str < maxlen; t++); + for (t = str; *t != '\0' && t - str < maxlen; t++) {} return t - str; } @@ -128,7 +128,7 @@ static inline char *Utf8PrevChar(const char *s) { const char *ret = s; - while (IsUtf8Part(*--ret)); + while (IsUtf8Part(*--ret)) {} return (char*)ret; } @@ -142,7 +142,8 @@ } /** - * Check whether UNICODE character is whitespace or not + * Check whether UNICODE character is whitespace or not, i.e. whether + * this is a potential line-break character. * @param c UNICODE character to check * @return a boolean value whether 'c' is a whitespace character or not * @see http://www.fileformat.info/info/unicode/category/Zs/list.htm @@ -151,7 +152,6 @@ { return c == 0x0020 /* SPACE */ || - c == 0x00A0 /* NO-BREAK SPACE */ || c == 0x3000 /* IDEOGRAPHIC SPACE */ ; }