2 #define PERL_IN_EBCDIC_C
5 /* in ASCII order, not that it matters */
6 static const char controllablechars[] = "?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
17 if ((ctlp = strchr(controllablechars, ch)) == 0) {
18 Perl_die(aTHX_ "unrecognised control character '%c'\n", ch);
21 if (ctlp == controllablechars)
22 return('\177'); /* DEL */
24 return((unsigned char)(ctlp - controllablechars - 1));
25 } else { /* Want uncontrol */
26 if (ch == '\177' || ch == -1)
28 else if (0 < ch && ch < (sizeof(controllablechars) - 1))
29 return(controllablechars[ch+1]);
31 Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF);