-
Notifications
You must be signed in to change notification settings - Fork 50
/
codepage.h
48 lines (35 loc) · 1.49 KB
/
codepage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**********************************************************
* Headerfile for converting characters from upper case *
* to lower case for ISO code pages. *
*---------------------------------------------------------*
[new] 25.09.96 alpha/digit
[chg] 22.09.96 metasymbol [TG]
[chg] 21.08.96 changed from subroutine to struct [TG]
Tom Gries <[email protected]>
[ini] Mike Thomas <[email protected]>
*******************************************************/
#define CODEPGNR 256 /* array index of codepage identification number */
#define CPSIZE 257 /* 0..255 characters, one codepage identifier */
#define CODEPAGES 3 /* number of implemented codepages: 437, 850, ISO-8859-1 */
struct CODEPAGE_struct
{
unsigned char lower_1; /* output 1: lowercase characters
- still accented
- still "umlauted" */
unsigned char lower_2; /* output 2: lowercase characters
- mapped to the closest
ASCII lowercase character */
unsigned char lower_3; /* output 3: type indicator:
for the control characters < ' ':
- preserve the code;
for example, CR remains CR
for characters >= ' ':
- 'a': all letters are mapped to 'a'
- '1': all digits or what looks like: '1'
- '#': otherwise */
int metasymb; /* output 3:
- >0 : character is used as metasymbol
- metasymb[UL850[c].metasymb]=c;
- is not allowed in search pattern
- AGREP.C shows a warning message */
};