summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-03 18:33:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-03 18:33:53 +0000
commitb08decb7b84e3a0b745312414baf1f50cbcbcaf4 (patch)
tree7ff8124d82d815e7cb532ed269d6546575e63b5b
parentce8c819616049942b71a3b6af9feab67951411a5 (diff)
downloadperl-b08decb7b84e3a0b745312414baf1f50cbcbcaf4.tar.gz
EBCDIC: more natification.
p4raw-id: //depot/perl@14540
-rw-r--r--regcomp.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/regcomp.c b/regcomp.c
index c238f4eaa5..2283d109fa 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4052,20 +4052,23 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
ANYOF_BITMAP_SET(ret, i);
}
if (value > 255 || UTF) {
+ UV prevnatvalue = NATIVE_TO_UNI(prevvalue);
+ UV natvalue = NATIVE_TO_UNI(value);
+
ANYOF_FLAGS(ret) |= ANYOF_UNICODE;
- if (prevvalue < value)
+ if (prevnatvalue < natvalue) { /* what about > ? */
Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\t%04"UVxf"\n",
- (UV)prevvalue, (UV)value);
- else if (prevvalue == value) {
- Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n",
- (UV)value);
+ prevnatvalue, natvalue);
+ }
+ else if (prevnatvalue == natvalue) {
+ Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", natvalue);
if (FOLD) {
U8 tmpbuf [UTF8_MAXLEN+1];
U8 foldbuf[UTF8_MAXLEN_FOLD+1];
STRLEN foldlen;
UV f;
- uvchr_to_utf8(tmpbuf, NATIVE_TO_UNI(value));
+ uvchr_to_utf8(tmpbuf, natvalue);
to_utf8_fold(tmpbuf, foldbuf, &foldlen);
f = UNI_TO_NATIVE(utf8_to_uvchr(foldbuf, 0));