| 63 |
*/ |
*/ |
| 64 |
|
|
| 65 |
int |
int |
| 66 |
_pcre_ord2utf8(int cvalue, pcre_uint8 *buffer) |
PRIV(ord2utf8)(int cvalue, pcre_uint8 *buffer) |
| 67 |
{ |
{ |
| 68 |
#ifdef SUPPORT_UTF8 |
#ifdef SUPPORT_UTF8 |
| 69 |
register int i, j; |
register int i, j; |
| 70 |
for (i = 0; i < _pcre_utf8_table1_size; i++) |
for (i = 0; i < PRIV(utf8_table1_size); i++) |
| 71 |
if (cvalue <= _pcre_utf8_table1[i]) break; |
if (cvalue <= PRIV(utf8_table1)[i]) break; |
| 72 |
buffer += i; |
buffer += i; |
| 73 |
for (j = i; j > 0; j--) |
for (j = i; j > 0; j--) |
| 74 |
{ |
{ |
| 75 |
*buffer-- = 0x80 | (cvalue & 0x3f); |
*buffer-- = 0x80 | (cvalue & 0x3f); |
| 76 |
cvalue >>= 6; |
cvalue >>= 6; |
| 77 |
} |
} |
| 78 |
*buffer = _pcre_utf8_table2[i] | cvalue; |
*buffer = PRIV(utf8_table2)[i] | cvalue; |
| 79 |
return i + 1; |
return i + 1; |
| 80 |
#else |
#else |
| 81 |
(void)(cvalue); /* Keep compiler happy; this function won't ever be */ |
(void)(cvalue); /* Keep compiler happy; this function won't ever be */ |