summaryrefslogtreecommitdiffstats
path: root/crypto/conf
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
committerUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
commita53955d8abd68c604de02cc1e101c66169207fb7 (patch)
treee51051484f2b073f7b58a1549442bf0657ca2978 /crypto/conf
parent9231f4779677a3cb95a4f8ccebd56432cb914498 (diff)
Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_lcl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/conf/conf_lcl.h b/crypto/conf/conf_lcl.h
index 4e5644ed79..f9a015df57 100644
--- a/crypto/conf/conf_lcl.h
+++ b/crypto/conf/conf_lcl.h
@@ -71,6 +71,7 @@
#define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \
CONF_PUNCTUATION)
+#ifndef CHARSET_EBCDIC
#define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[(a)&0x7f]))
#define IS_EOF(a) ((a) == '\0')
#define IS_ESC(a) ((a) == '\\')
@@ -81,6 +82,19 @@
(CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT)
#define IS_QUOTE(a) (CONF_type[(a)&0x7f]&CONF_QUOTE)
+#else /*CHARSET_EBCDIC*/
+
+#define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[os_toascii[a]&0x7f]))
+#define IS_EOF(a) (os_toascii[a] == '\0')
+#define IS_ESC(a) (os_toascii[a] == '\\')
+#define IS_NUMER(a) (CONF_type[os_toascii[a]&0x7f]&CONF_NUMBER)
+#define IS_WS(a) (CONF_type[os_toascii[a]&0x7f]&CONF_WS)
+#define IS_ALPHA_NUMERIC(a) (CONF_type[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC)
+#define IS_ALPHA_NUMERIC_PUNCT(a) \
+ (CONF_type[os_toascii[a]&0x7f]&CONF_ALPHA_NUMERIC_PUNCT)
+#define IS_QUOTE(a) (CONF_type[os_toascii[a]&0x7f]&CONF_QUOTE)
+#endif /*CHARSET_EBCDIC*/
+
static unsigned short CONF_type[128]={
0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000,