File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,11 @@ extern "C"
95
95
static void p_b_eclass (struct parse * p , cset * cs );
96
96
static pg_wchar p_b_symbol (struct parse * p );
97
97
static char p_b_coll_elem (struct parse * p , int endc );
98
+ #ifdef MULTIBYTE
99
+ static unsigned char othercase (int ch );
100
+ #else
98
101
static char othercase (int ch );
102
+ #endif
99
103
static void bothcases (struct parse * p , int ch );
100
104
static void ordinary (struct parse * p , int ch );
101
105
static void nonnewline (struct parse * p );
@@ -1032,18 +1036,34 @@ int endc; /* name ended by endc,']' */
1032
1036
- othercase - return the case counterpart of an alphabetic
1033
1037
== static char othercase(int ch);
1034
1038
*/
1035
- static char /* if no counterpart, return ch */
1039
+ #ifdef MULTIBYTE
1040
+ static unsigned char /* if no counterpart, return ch */
1041
+ #else
1042
+ static char /* if no counterpart, return ch */
1043
+ #endif
1036
1044
othercase (ch )
1037
1045
int ch ;
1038
1046
{
1039
1047
assert (pg_isalpha (ch ));
1040
1048
if (pg_isupper (ch ))
1049
+ #ifdef MULTIBYTE
1050
+ return (unsigned char )tolower (ch );
1051
+ #else
1041
1052
return tolower (ch );
1053
+ #endif
1042
1054
else if (pg_islower (ch ))
1055
+ #ifdef MULTIBYTE
1056
+ return (unsigned char )toupper (ch );
1057
+ #else
1043
1058
return toupper (ch );
1059
+ #endif
1044
1060
else
1045
1061
/* peculiar, but could happen */
1062
+ #ifdef MULTIBYTE
1063
+ return (unsigned char )ch ;
1064
+ #else
1046
1065
return ch ;
1066
+ #endif
1047
1067
}
1048
1068
1049
1069
/*
You can’t perform that action at this time.
0 commit comments