X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ebcdic.c;h=d86d50bd327ed085c5eae63ea87ce864f5a5d485;hb=300aed98347df4b3587b6ffdf7817ba6640f2e5e;hp=14e3955096d89eebdfe687a9c1beb591de74758f;hpb=864dbfa3ca8032ef66f7aa86961933b19b962357;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ebcdic.c b/ebcdic.c index 14e3955..d86d50b 100644 --- a/ebcdic.c +++ b/ebcdic.c @@ -15,7 +15,7 @@ ebcdic_control(int ch) ch = toupper(ch); if ((ctlp = strchr(controllablechars, ch)) == 0) { - die("unrecognised control character '%c'\n", ch); + Perl_die(aTHX_ "unrecognised control character '%c'\n", ch); } if (ctlp == controllablechars) @@ -25,9 +25,17 @@ ebcdic_control(int ch) } else { /* Want uncontrol */ if (ch == '\177' || ch == -1) return('?'); + else if (ch == '\157') + return('\177'); + else if (ch == '\174') + return('\000'); + else if (ch == '^') /* '\137' in 1047, '\260' in 819 */ + return('\036'); + else if (ch == '\155') + return('\037'); else if (0 < ch && ch < (sizeof(controllablechars) - 1)) return(controllablechars[ch+1]); else - die("invalid control request: '\\%03o'\n", ch & 0xFF); + Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF); } }