Kaydet (Commit) 552adfbb authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

we really do not care about ebcdic do we ?

Change-Id: I1a2d8628fc2b1fe21e77019f12dc2a8adab877ed
üst f3fae7d3
......@@ -50,17 +50,11 @@ extern FILE* pDefOut; /* ER */
#define TOK_SEP 0x1E /* Token concatenation delim. */
#define COM_SEP 0x1F /* Magic comment separator */
#ifdef EBCDIC
#define HT 0x05 /* horizontal tab */
#define NL 0x15 /* new line */
#define CR 0x0D /* carriage return */
#define DEL 0x07
#else
#define HT 0x09 /* horizontal tab */
#define NL 0x0A /* new line */
#define CR 0x0D /* carriage return */
#define DEL 0x7F
#endif
#ifdef SOLAR
......
......@@ -666,13 +666,10 @@ FILE_LOCAL int evalnum(int c)
c1 = c;
if (isascii(c) && isupper(c1))
c1 = tolower(c1);
#ifdef EBCDIC
if (c1 <= 'f')
#else
if (c1 >= 'a')
#endif
c1 -= ('a' - 10);
else c1 -= '0';
if (c1 >= 'a')
c1 -= ('a' - 10);
else
c1 -= '0';
if (c1 < 0 || c1 >= base)
break;
value *= base;
......@@ -744,11 +741,7 @@ FILE_LOCAL int evalchar(int skip)
(--count >= 0))
{
value *= 16;
#ifdef EBCDIC
value += (c <= '9') ? (c - '0') : ((c & 0xF) + 9);
#else
value += (c >= '0') ? (c - '0') : ((c & 0xF) + 9);
#endif
}
unget();
break;
......
......@@ -89,44 +89,6 @@
#define DOL LET
#ifdef EBCDIC
char type[256] = { /* Character type codes Hex */
END, 000, 000, 000, 000, SPA, 000, 000, /* 00 */
000, 000, 000, 000, 000, 000, 000, 000, /* 08 */
000, 000, 000, 000, 000, 000, 000, 000, /* 10 */
000, 000, 000, 000, 000, LET, 000, SPA, /* 18 */
000, 000, 000, 000, 000, 000, 000, 000, /* 20 */
000, 000, 000, 000, 000, 000, 000, 000, /* 28 */
000, 000, 000, 000, 000, 000, 000, 000, /* 30 */
000, 000, 000, 000, 000, 000, 000, 000, /* 38 */
SPA, 000, 000, 000, 000, 000, 000, 000, /* 40 */
000, 000, 000, DOT, OP_LT,OP_LPA,OP_ADD, OP_OR, /* 48 .<(+| */
OP_AND, 000, 000, 000, 000, 000, 000, 000, /* 50 & */
000, 000,OP_NOT, DOL,OP_MUL,OP_RPA, 000,OP_XOR, /* 58 !$*);^ */
OP_SUB,OP_DIV, 000, 000, 000, 000, 000, 000, /* 60 -/ */
000, 000, 000, 000,OP_MOD, LET, OP_GT,OP_QUE, /* 68 ,%_>? */
000, 000, 000, 000, 000, 000, 000, 000, /* 70 */
000, 000,OP_COL, 000, 000, QUO, OP_EQ, QUO, /* 78 `:#@'=" */
000, LET, LET, LET, LET, LET, LET, LET, /* 80 abcdefg */
LET, LET, 000, 000, 000, 000, 000, 000, /* 88 hi */
000, LET, LET, LET, LET, LET, LET, LET, /* 90 jklmnop */
LET, LET, 000, 000, 000, 000, 000, 000, /* 98 qr */
000,OP_NOT, LET, LET, LET, LET, LET, LET, /* A0 ~stuvwx */
LET, LET, 000, 000, 000, 000, 000, 000, /* A8 yz [ */
000, 000, 000, 000, 000, 000, 000, 000, /* B0 */
000, 000, 000, 000, 000, 000, 000, 000, /* B8 ] */
000, LET, LET, LET, LET, LET, LET, LET, /* C0 {ABCDEFG */
LET, LET, 000, 000, 000, 000, 000, 000, /* C8 HI */
000, LET, LET, LET, LET, LET, LET, LET, /* D0 }JKLMNOP */
LET, LET, 000, 000, 000, 000, 000, 000, /* D8 QR */
BSH, 000, LET, LET, LET, LET, LET, LET, /* E0 \ STUVWX */
LET, LET, 000, 000, 000, 000, 000, 000, /* E8 YZ */
DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, /* F0 01234567 */
DIG, DIG, 000, 000, 000, 000, 000, 000, /* F8 89 */
};
#else
char type[256] = { /* Character type codes Hex */
END, 000, 000, 000, 000, 000, 000, 000, /* 00 */
......@@ -155,7 +117,6 @@ OP_LPA,OP_RPA,OP_MUL,OP_ADD, 000,OP_SUB, DOT,OP_DIV, /* 28 ()*+,-./ */
000, 000, 000, 000, 000, 000, 000, 000, /* 80 .. FF */
};
#endif
/*
* C P P S y m b o l T a b l e s
......
......@@ -168,12 +168,8 @@
#ifndef ALERT
#ifdef EBCDIC
#define ALERT '\057'
#else
#define ALERT '\007' /* '\a' is "Bell" */
#endif
#endif
#ifndef VT
#define VT '\013' /* Vertical Tab CTRL/K */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment