diff options
-rw-r--r-- | embed.fnc | 12 | ||||
-rw-r--r-- | embed.h | 12 | ||||
-rw-r--r-- | proto.h | 16 | ||||
-rw-r--r-- | utf8.c | 6 | ||||
-rw-r--r-- | utf8.h | 4 |
5 files changed, 44 insertions, 6 deletions
@@ -857,9 +857,21 @@ ApMd |U8* |bytes_from_utf8|NN const U8 *s|NN STRLEN *len|NULLOK bool *is_utf8 ApMd |U8* |bytes_to_utf8 |NN const U8 *s|NN STRLEN *len Apd |UV |utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen Apd |UV |utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen + +#ifdef EBCDIC Adp |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags +#else +Adpbm |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags +#endif + Adp |UV |utf8n_to_uvuni |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags + +#ifdef EBCDIC Apd |U8* |uvchr_to_utf8 |NN U8 *d|UV uv +#else +Apdbm |U8* |uvchr_to_utf8 |NN U8 *d|UV uv +#endif + Apbm |U8* |uvuni_to_utf8 |NN U8 *d|UV uv Ap |U8* |uvchr_to_utf8_flags |NN U8 *d|UV uv|UV flags Apd |U8* |uvuni_to_utf8_flags |NN U8 *d|UV uv|UV flags @@ -884,9 +884,15 @@ #define bytes_to_utf8 Perl_bytes_to_utf8 #define utf8_to_uvchr Perl_utf8_to_uvchr #define utf8_to_uvuni Perl_utf8_to_uvuni +#ifdef EBCDIC #define utf8n_to_uvchr Perl_utf8n_to_uvchr +#else +#endif #define utf8n_to_uvuni Perl_utf8n_to_uvuni +#ifdef EBCDIC #define uvchr_to_utf8 Perl_uvchr_to_utf8 +#else +#endif #define uvchr_to_utf8_flags Perl_uvchr_to_utf8_flags #define uvuni_to_utf8_flags Perl_uvuni_to_utf8_flags #define pv_uni_display Perl_pv_uni_display @@ -2860,9 +2866,15 @@ #define bytes_to_utf8(a,b) Perl_bytes_to_utf8(aTHX_ a,b) #define utf8_to_uvchr(a,b) Perl_utf8_to_uvchr(aTHX_ a,b) #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) +#ifdef EBCDIC #define utf8n_to_uvchr(a,b,c,d) Perl_utf8n_to_uvchr(aTHX_ a,b,c,d) +#else +#endif #define utf8n_to_uvuni(a,b,c,d) Perl_utf8n_to_uvuni(aTHX_ a,b,c,d) +#ifdef EBCDIC #define uvchr_to_utf8(a,b) Perl_uvchr_to_utf8(aTHX_ a,b) +#else +#endif #define uvchr_to_utf8_flags(a,b,c) Perl_uvchr_to_utf8_flags(aTHX_ a,b,c) #define uvuni_to_utf8_flags(a,b,c) Perl_uvuni_to_utf8_flags(aTHX_ a,b,c) #define pv_uni_display(a,b,c,d,e) Perl_pv_uni_display(aTHX_ a,b,c,d,e) @@ -2388,15 +2388,31 @@ PERL_CALLCONV UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) __attribute__nonnull__(pTHX_1); + +#ifdef EBCDIC PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) __attribute__nonnull__(pTHX_1); +#else +/* PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) + __attribute__nonnull__(pTHX_1); */ + +#endif + PERL_CALLCONV UV Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) __attribute__nonnull__(pTHX_1); + +#ifdef EBCDIC PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) __attribute__nonnull__(pTHX_1); +#else +/* PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) + __attribute__nonnull__(pTHX_1); */ + +#endif + /* PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) __attribute__nonnull__(pTHX_1); */ @@ -614,8 +614,8 @@ returned and retlen is set, if possible, to -1. UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) { - return Perl_utf8n_to_uvchr(aTHX_ s, UTF8_MAXBYTES, retlen, - ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); + return utf8n_to_uvchr(s, UTF8_MAXBYTES, retlen, + ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY); } /* @@ -1773,7 +1773,6 @@ is the recommended wide native character-aware way of saying /* On ASCII machines this is normally a macro but we want a real function in case XS code wants it */ -#undef Perl_uvchr_to_utf8 U8 * Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) { @@ -1802,7 +1801,6 @@ Allows length and flags to be passed to low level routine. /* On ASCII machines this is normally a macro but we want a real function in case XS code wants it */ -#undef Perl_utf8n_to_uvchr UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) @@ -58,8 +58,8 @@ END_EXTERN_C #define ASCII_TO_NEED(enc,ch) (ch) /* As there are no translations avoid the function wrapper */ -#define Perl_utf8n_to_uvchr Perl_utf8n_to_uvuni -#define Perl_uvchr_to_utf8 Perl_uvuni_to_utf8 +#define utf8n_to_uvchr utf8n_to_uvuni +#define uvchr_to_utf8 uvuni_to_utf8 /* |