Skip to content

Commit de96c7a

Browse files
committed
Corrected character classifications for CP437
1 parent f8ae7eb commit de96c7a

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

CEdev/lib/src/std/shared/maptab.c

+38-38
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
/************************************************************************/
2-
/* */
3-
/* Copyright (C)1987-2008 by */
4-
/* Zilog, Inc. */
5-
/* */
6-
/* San Jose, California */
7-
/* */
8-
/************************************************************************/
9-
10-
/* Mapping table for isxxx functions */
11-
12-
#define CTL 0x80 /* control character */
13-
#define WS 0x40 /* whitespace character */
14-
#define SP 0x20 /* space character */
15-
#define HEX 0x10 /* hex digit (A-Z,a-z) */
16-
#define UC 0x08 /* uppercase letter */
17-
#define LC 0x04 /* lowercase letter */
18-
#define PUN 0x02 /* punctuation */
19-
#define DIG 0x01 /* decimal digit (0-9) */
20-
21-
__rom unsigned char __maptab[128] = {
22-
/* 0 */ CTL,CTL,CTL,CTL,CTL,CTL,CTL,CTL,
23-
/* 8 */ CTL,CTL|WS,CTL|WS,CTL|WS,CTL|WS,CTL|WS,CTL,CTL,
24-
/* 10 */ CTL,CTL,CTL,CTL,CTL,CTL,CTL,CTL,
25-
/* 18 */ CTL,CTL,CTL,CTL,CTL,CTL,CTL,CTL,
26-
/* 20 */ WS|SP,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
27-
/* 28 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
28-
/* 30 */ DIG,DIG,DIG,DIG,DIG,DIG,DIG,DIG,
29-
/* 38 */ DIG,DIG,PUN,PUN,PUN,PUN,PUN,PUN,
30-
/* 40 */ PUN,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC,
31-
/* 48 */ UC,UC,UC,UC,UC,UC,UC,UC,
32-
/* 50 */ UC,UC,UC,UC,UC,UC,UC,UC,
33-
/* 58 */ UC,UC,UC,PUN,PUN,PUN,PUN,PUN,
34-
/* 60 */ PUN,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC,
35-
/* 68 */ LC,LC,LC,LC,LC,LC,LC,LC,
36-
/* 70 */ LC,LC,LC,LC,LC,LC,LC,LC,
37-
/* 78 */ LC,LC,LC,PUN,PUN,PUN,PUN,CTL
38-
};
1+
/************************************************************************/
2+
/* */
3+
/* Copyright (C)1987-2008 by */
4+
/* Zilog, Inc. */
5+
/* */
6+
/* San Jose, California */
7+
/* */
8+
/************************************************************************/
9+
10+
/* Mapping table for isxxx functions */
11+
12+
#define CTL 0x80 /* control character */
13+
#define WS 0x40 /* whitespace character */
14+
#define SP 0x20 /* space character */
15+
#define HEX 0x10 /* hex digit (A-Z,a-z) */
16+
#define UC 0x08 /* uppercase letter */
17+
#define LC 0x04 /* lowercase letter */
18+
#define PUN 0x02 /* punctuation */
19+
#define DIG 0x01 /* decimal digit (0-9) */
20+
21+
__rom unsigned char __maptab[128] = {
22+
/* 0 */ CTL,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
23+
/* 8 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
24+
/* 10 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
25+
/* 18 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
26+
/* 20 */ WS|SP,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
27+
/* 28 */ PUN,PUN,PUN,PUN,PUN,PUN,PUN,PUN,
28+
/* 30 */ DIG,DIG,DIG,DIG,DIG,DIG,DIG,DIG,
29+
/* 38 */ DIG,DIG,PUN,PUN,PUN,PUN,PUN,PUN,
30+
/* 40 */ PUN,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC|HEX,UC,
31+
/* 48 */ UC,UC,UC,UC,UC,UC,UC,UC,
32+
/* 50 */ UC,UC,UC,UC,UC,UC,UC,UC,
33+
/* 58 */ UC,UC,UC,PUN,PUN,PUN,PUN,PUN,
34+
/* 60 */ PUN,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC|HEX,LC,
35+
/* 68 */ LC,LC,LC,LC,LC,LC,LC,LC,
36+
/* 70 */ LC,LC,LC,LC,LC,LC,LC,LC,
37+
/* 78 */ LC,LC,LC,PUN,PUN,PUN,PUN,PUN
38+
};

0 commit comments

Comments
 (0)