From: Jarkko Hietaniemi Date: Sun, 27 Jan 2002 21:47:29 +0000 (+0000) Subject: B::cstring() and B::Deparse EBCDIC fixes from Rafael Garcia-Suarez. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce561ef2a2e40559428a2f37f9211123e7481f9d;p=p5sagit%2Fp5-mst-13.2.git B::cstring() and B::Deparse EBCDIC fixes from Rafael Garcia-Suarez. p4raw-id: //depot/perl@14451 --- diff --git a/ext/B/B.xs b/ext/B/B.xs index 9b7fa9d..c731c98 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -251,7 +251,11 @@ cstring(pTHX_ SV *sv) sprintf(escbuff, "\\%03o", '?'); sv_catpv(sstr, escbuff); } - else if (*s >= ' ' && *s < 127) /* XXX not portable */ +#ifdef EBCDIC + else if (isPRINT(*s)) +#else + else if (*s >= ' ' && *s < 127) +#endif /* EBCDIC */ sv_catpvn(sstr, s, 1); else if (*s == '\n') sv_catpv(sstr, "\\n"); @@ -292,7 +296,11 @@ cchar(pTHX_ SV *sv) sv_catpv(sstr, "\\'"); else if (*s == '\\') sv_catpv(sstr, "\\\\"); - else if (*s >= ' ' && *s < 127) /* XXX not portable */ +#ifdef EBCDIC + else if (isPRINT(8s)) +#else + else if (*s >= ' ' && *s < 127) +#endif /* EBCDIC */ sv_catpvn(sstr, s, 1); else if (*s == '\n') sv_catpv(sstr, "\\n"); diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index c373a69..fe1dc10 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -3074,7 +3074,7 @@ sub re_unback { my($str) = @_; # the insane complexity here is due to the behaviour of "\c\" - $str =~ s/(^|[^\\]|\\c\\)(?