123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifdef HAVE_CONFIG_H
- #include "config.h"
- #endif
- #define COMPILE_PCRE16
- #include "pcre_internal.h"
- unsigned int
- PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
- {
- #ifdef SUPPORT_UTF
- if (cvalue <= 0xffff)
- {
- *buffer = (pcre_uchar)cvalue;
- return 1;
- }
- cvalue -= 0x10000;
- *buffer++ = 0xd800 | (cvalue >> 10);
- *buffer = 0xdc00 | (cvalue & 0x3ff);
- return 2;
- #else
- (void)(cvalue);
- (void)(buffer);
- return 0;
- #endif
- }
|