diff options
Diffstat (limited to 'regexp/utf8.h')
-rw-r--r-- | regexp/utf8.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/regexp/utf8.h b/regexp/utf8.h index 841b806f1..7b62d5539 100644 --- a/regexp/utf8.h +++ b/regexp/utf8.h @@ -28,17 +28,11 @@ int utf8_fromunicode(char *p, unsigned uc); #include <ctype.h> /* No utf-8 support. 1 byte = 1 char */ -#define utf8_strlen(S, B) ((B) < 0 ? (int)strlen(S) : (B)) -#define utf8_strwidth(S, B) utf8_strlen((S), (B)) #define utf8_tounicode(S, CP) (*(CP) = (unsigned char)*(S), 1) #define utf8_getchars(CP, C) (*(CP) = (C), 1) #define utf8_upper(C) toupper(C) -#define utf8_title(C) toupper(C) -#define utf8_lower(C) tolower(C) #define utf8_index(C, I) (I) #define utf8_charlen(C) 1 -#define utf8_prev_len(S, L) 1 -#define utf8_width(C) 1 #else #if !defined(JIM_BOOTSTRAP) @@ -54,25 +48,6 @@ int utf8_fromunicode(char *p, unsigned uc); int utf8_charlen(int c); /** - * Returns the number of characters in the utf-8 - * string of the given byte length. - * - * Any bytes which are not part of an valid utf-8 - * sequence are treated as individual characters. - * - * The string *must* be null terminated. - * - * Does not support unicode code points > \u1fffff - */ -int utf8_strlen(const char *str, int bytelen); - -/** - * Calculates the display width of the first 'charlen' characters in 'str'. - * See utf8_width() - */ -int utf8_strwidth(const char *str, int charlen); - -/** * Returns the byte index of the given character in the utf-8 string. * * The string *must* be null terminated. @@ -99,45 +74,11 @@ int utf8_index(const char *str, int charindex); int utf8_tounicode(const char *str, int *uc); /** - * Returns the number of bytes before 'str' that the previous - * utf-8 character sequence starts (which may be the middle of a sequence). - * - * Looks back at most 'len' bytes backwards, which must be > 0. - * If no start char is found, returns -len - */ -int utf8_prev_len(const char *str, int len); - -/** * Returns the upper-case variant of the given unicode codepoint. * * Unicode code points > \uffff are returned unchanged. */ int utf8_upper(int uc); - -/** - * Returns the title-case variant of the given unicode codepoint. - * - * If none, returns utf8_upper(). - * - * Unicode code points > \uffff are returned unchanged. - */ -int utf8_title(int uc); - -/** - * Returns the lower-case variant of the given unicode codepoint. - * - * NOTE: Use utf8_upper() in preference for case-insensitive matching. - * - * Unicode code points > \uffff are returned unchanged. - */ -int utf8_lower(int uc); - -/** - * Returns the width (in characters) of the given unicode codepoint. - * This is 1 for normal letters and 0 for combining characters and 2 for wide characters. - */ -int utf8_width(int ch); - #endif /* JIM_BOOTSTRAP */ #endif |