Commit | Line | Data |
---|---|---|
f522e28b C |
1 | /* iso3166.c - bitmap of ISO 3166 codes */ |
2 | ||
3 | #ifndef lint | |
4 | /* | |
5 | static char *rcsid = "$Header: /f/osi/dsap/common/RCS/iso3166.h,v 7.2 91/02/22 09:19:27 mrose Interim $"; | |
6 | */ | |
7 | #endif | |
8 | ||
9 | /* | |
10 | * $Header: /f/osi/dsap/common/RCS/iso3166.h,v 7.2 91/02/22 09:19:27 mrose Interim $ | |
11 | * | |
12 | * | |
13 | * $Log: iso3166.h,v $ | |
14 | * Revision 7.2 91/02/22 09:19:27 mrose | |
15 | * Interim 6.8 | |
16 | * | |
17 | * Revision 7.1 90/12/11 10:53:54 mrose | |
18 | * lock-and-load | |
19 | * | |
20 | * Revision 7.0 90/12/10 14:26:03 mrose | |
21 | * *** empty log message *** | |
22 | * | |
23 | */ | |
24 | ||
25 | /* | |
26 | * NOTICE | |
27 | * | |
28 | * Acquisition, use, and distribution of this module and related | |
29 | * materials are subject to the restrictions of a license agreement. | |
30 | * Consult the Preface in the User's Manual for the full terms of | |
31 | * this agreement. | |
32 | * | |
33 | */ | |
34 | ||
35 | ||
36 | /* LINTLIBRARY */ | |
37 | ||
38 | ||
39 | /* The idea for this comes from EWOS/EGDIR/90/156 | |
40 | ||
41 | The table below was automatically generated by "dsaconfig -c". If the list | |
42 | of 3166 codes change, re-run dsaconfig and update this file! | |
43 | */ | |
44 | ||
45 | ||
46 | /* this macro assumes that bitno is already defined, and that chars are already | |
47 | in upper-case. */ | |
48 | ||
49 | #define is3166(cp) \ | |
50 | (bitno = (((((cp)[0]) - 'A') & 0xff) * 26) + ((((cp)[1]) - 'A') & 0xff), \ | |
51 | bits_3166[bitno >> 3] & (1 << (bitno % 8))) | |
52 | ||
53 | ||
54 | static unsigned char bits_3166[85] = { | |
55 | 0x78, | |
56 | 0x69, | |
57 | 0x5f, | |
58 | 0xe8, | |
59 | 0xcf, | |
60 | 0xf9, | |
61 | 0x5d, | |
62 | 0xde, | |
63 | 0x67, | |
64 | 0x1b, | |
65 | 0x86, | |
66 | 0x15, | |
67 | 0x80, | |
68 | 0xc4, | |
69 | 0x00, | |
70 | 0x0c, | |
71 | 0x00, | |
72 | 0x5c, | |
73 | 0x09, | |
74 | 0xb0, | |
75 | 0x9a, | |
76 | 0xbb, | |
77 | 0x15, | |
78 | 0x00, | |
79 | 0x0d, | |
80 | 0x06, | |
81 | 0x18, | |
82 | 0x68, | |
83 | 0x0f, | |
84 | 0x00, | |
85 | 0x40, | |
86 | 0x03, | |
87 | 0x00, | |
88 | 0x19, | |
89 | 0x2b, | |
90 | 0xd4, | |
91 | 0x41, | |
92 | 0x81, | |
93 | 0x45, | |
94 | 0xc5, | |
95 | 0xe8, | |
96 | 0xff, | |
97 | 0xd7, | |
98 | 0x25, | |
99 | 0x6b, | |
100 | 0x08, | |
101 | 0x00, | |
102 | 0x01, | |
103 | 0x40, | |
104 | 0x3c, | |
105 | 0x8f, | |
106 | 0x52, | |
107 | 0x01, | |
108 | 0x00, | |
109 | 0x00, | |
110 | 0x40, | |
111 | 0x00, | |
112 | 0x01, | |
113 | 0xf1, | |
114 | 0xad, | |
115 | 0xa7, | |
116 | 0x33, | |
117 | 0x3b, | |
118 | 0xb9, | |
119 | 0x9a, | |
120 | 0x41, | |
121 | 0x10, | |
122 | 0x04, | |
123 | 0x55, | |
124 | 0x85, | |
125 | 0x40, | |
126 | 0x00, | |
127 | 0x02, | |
128 | 0x40, | |
129 | 0x00, | |
130 | 0x00, | |
131 | 0x00, | |
132 | 0x00, | |
133 | 0x18, | |
134 | 0x00, | |
135 | 0x10, | |
136 | 0x04, | |
137 | 0x40, | |
138 | 0x08, | |
139 | 0x01, | |
140 | }; |