doop.c Support code for various operations
dosish.h Some defines for MS/DOSish machines
dump.c Debugging output
-ebcdic.c EBCDIC support routines
emacs/cperl-mode.el An alternate perl-mode
emacs/e2ctags.pl etags to ctags converter
emacs/ptags Creates smart TAGS file
+++ /dev/null
-#include "EXTERN.h"
-#define PERL_IN_EBCDIC_C
-#include "perl.h"
-
-/* in ASCII order, not that it matters */
-static const char controllablechars[] = "?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
-
-int
-ebcdic_control(int ch)
-{
- if (ch > 'a') {
- char *ctlp;
-
- if (islower(ch))
- ch = toupper(ch);
-
- if ((ctlp = strchr(controllablechars, ch)) == 0) {
- Perl_die(aTHX_ "unrecognised control character '%c'\n", ch);
- }
-
- if (ctlp == controllablechars)
- return('\177'); /* DEL */
- else
- return((unsigned char)(ctlp - controllablechars - 1));
- } 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
- Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF);
- }
-}
# if defined(LEAKTEST)
#define xstat S_xstat
# endif
+# if defined(EBCDIC)
+#define ebcdic_control Perl_ebcdic_control
+# endif
#endif
#if defined(PERL_OBJECT)
#endif
# if defined(LEAKTEST)
#define xstat(a) S_xstat(aTHX_ a)
# endif
+# if defined(EBCDIC)
+#define ebcdic_control(a) Perl_ebcdic_control(aTHX_ a)
+# endif
#endif
#if defined(PERL_OBJECT)
#endif
#define S_xstat CPerlObj::S_xstat
#define xstat S_xstat
# endif
+# if defined(EBCDIC)
+#define Perl_ebcdic_control CPerlObj::Perl_ebcdic_control
+#define ebcdic_control Perl_ebcdic_control
+# endif
#endif
#if defined(PERL_OBJECT)
#endif
# if defined(LEAKTEST)
s |void |xstat |int
# endif
+# if defined(EBCDIC)
+p |int |ebcdic_control |int ch
+# endif
#endif
#if defined(PERL_OBJECT)
#define isBLANK_LC_utf8(c) isBLANK(c) /* could be wrong */
#ifdef EBCDIC
-EXT int ebcdic_control (int);
# define toCTRL(c) ebcdic_control(c)
#else
/* This conversion works both ways, strangely enough. */
'') archname="$osname" ;;
esac
-# Architecture related object files.
-# ebcdic.c contains special \cX mapping code for EBCDIC char sets.
-# Prepend your preference with Configure -Darchobs=your_preference.o.
-case "$archname" in
-'') archobjs="ebcdic.o" ;;
-*) archobjs="$archobjs ebcdic.o" ;;
-esac
-
# We have our own cppstdin script. This is not a variable since
# Configure sees the presence of the script file.
# We put system header -D definitions in so that Configure
#'') ldlibpthname=LIBPATH ;;
#esac
-# Architecture related object files.
-# ebcdic.c contains special \cX mapping code for EBCDIC char sets.
-# Prepend your preference with Configure -Darchobs=your_preference.o.
-case "$archname" in
-'') archobjs="ebcdic.o" ;;
-*) archobjs="$archobjs ebcdic.o" ;;
-esac
d_alarm='define'
d_archlib='define'
# randbits='15'
-archobjs="ebcdic.o vmesa.o"
+archobjs="vmesa.o"
d_attribut='undef'
d_bcmp='define'
d_bcopy='define'
#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
# if defined(LEAKTEST)
# endif
+# if defined(EBCDIC)
+# endif
#endif
#if defined(PERL_OBJECT)
#endif
#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
# if defined(LEAKTEST)
# endif
+# if defined(EBCDIC)
+# endif
#endif
#if defined(PERL_OBJECT)
#endif
# if defined(LEAKTEST)
STATIC void S_xstat(pTHX_ int);
# endif
+# if defined(EBCDIC)
+PERL_CALLCONV int Perl_ebcdic_control(pTHX_ int ch);
+# endif
#endif
#if defined(PERL_OBJECT)
func, pars);
}
}
+
+#ifdef EBCDIC
+int
+Perl_ebcdic_control(pTHX_ int ch)
+{
+ if (ch > 'a') {
+ char *ctlp;
+
+ if (islower(ch))
+ ch = toupper(ch);
+
+ if ((ctlp = strchr(controllablechars, ch)) == 0) {
+ Perl_die(aTHX_ "unrecognised control character '%c'\n", ch);
+ }
+
+ if (ctlp == controllablechars)
+ return('\177'); /* DEL */
+ else
+ return((unsigned char)(ctlp - controllablechars - 1));
+ } 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
+ Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF);
+ }
+}
+#endif