| 131 |
Arguments: |
Arguments: |
| 132 |
c the character value |
c the character value |
| 133 |
|
|
| 134 |
Returns: the other case or -1 if none |
Returns: the other case or NOTACHAR if none |
| 135 |
*/ |
*/ |
| 136 |
|
|
| 137 |
int |
unsigned int |
| 138 |
_pcre_ucp_othercase(const int c) |
_pcre_ucp_othercase(const unsigned int c) |
| 139 |
{ |
{ |
| 140 |
int bot = 0; |
int bot = 0; |
| 141 |
int top = sizeof(ucp_table)/sizeof(cnode); |
int top = sizeof(ucp_table)/sizeof(cnode); |
| 161 |
} |
} |
| 162 |
} |
} |
| 163 |
|
|
| 164 |
/* Found an entry in the table. Return -1 for a range entry. Otherwise return |
/* Found an entry in the table. Return NOTACHAR for a range entry. Otherwise |
| 165 |
the other case if there is one, else -1. */ |
return the other case if there is one, else NOTACHAR. */ |
| 166 |
|
|
| 167 |
if ((ucp_table[mid].f0 & f0_rangeflag) != 0) return -1; |
if ((ucp_table[mid].f0 & f0_rangeflag) != 0) return NOTACHAR; |
| 168 |
|
|
| 169 |
offset = ucp_table[mid].f1 & f1_casemask; |
offset = ucp_table[mid].f1 & f1_casemask; |
| 170 |
if ((offset & f1_caseneg) != 0) offset |= f1_caseneg; |
if ((offset & f1_caseneg) != 0) offset |= f1_caseneg; |
| 171 |
return (offset == 0)? -1 : c + offset; |
return (offset == 0)? NOTACHAR : c + offset; |
| 172 |
} |
} |
| 173 |
|
|
| 174 |
|
|