Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).

Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
This commit is contained in:
Ulf Möller
1999-06-04 21:35:58 +00:00
parent 9231f47796
commit a53955d8ab
34 changed files with 543 additions and 3 deletions

View File

@@ -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,