7 static const int caps_table[CAPS_LEN][2]={
676 static const int reverse_caps_table[CAPS_LEN-1][2]={
1345 static int _find_upper(
int ch) {
1349 int high = CAPS_LEN -1;
1352 while( low <= high )
1354 middle = ( low + high ) / 2;
1356 if( ch < caps_table[ middle][0] ) {
1358 }
else if ( caps_table[middle][0] < ch) {
1361 return caps_table[middle][1];
1369 static int _find_lower(
int ch) {
1373 int high = CAPS_LEN -2;
1376 while( low <= high )
1378 middle = ( low + high ) / 2;
1380 if( ch < reverse_caps_table[ middle][0] ) {
1382 }
else if ( reverse_caps_table[middle][0] < ch) {
1385 return reverse_caps_table[middle][1];