1 /*
2 ** Modular Logfile Analyzer
3 ** Copyright 2000 Jan Kneschke <jan@kneschke.de>
4 **
5 ** Homepage: http://www.modlogan.org
6 **
7 
8     This program is free software; you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation; either version 2 of the License, or
11     (at your option) any later version, and provided that the above
12     copyright and permission notice is included with all distributed
13     copies of this or derived software.
14 
15     This program is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     GNU General Public License for more details.
19 
20     You should have received a copy of the GNU General Public License
21     along with this program; if not, write to the Free Software
22     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23 
24 **
25 ** $Id: mlocale.c,v 1.40 2006/07/31 20:24:28 erich Exp $
26 */
27 
28 #include <stdlib.h>
29 #include <stdio.h>
30 #include <string.h>
31 #include <ctype.h>
32 #include <locale.h>
33 
34 #include "mlocale.h"
35 
init_locale(mconfig * conf)36 int init_locale (mconfig *conf) {
37 #ifdef HAVE_GETTEXT
38 	setlocale(LC_ALL, "");
39 	bindtextdomain (PACKAGE, LOCALEDIR);
40 	textdomain (PACKAGE);
41 # ifdef HAVE_BIND_TEXTDOMAIN_CODESET
42 	bind_textdomain_codeset(PACKAGE,"ISO8859-1");
43 # endif
44 #endif
45 
46 	return 0;
47 }
48 
mhttpcodes(int status)49 char *mhttpcodes(int status) {
50 	switch (status) {
51 		case 100:	return _("Continue");
52 		case 101:	return _("Switching Protocols");
53 		case 200:	return _("OK");
54 		case 201:	return _("Created");
55 		case 202:	return _("Accepted");
56 		case 203:	return _("Non-Authoritative Information");
57 		case 204:	return _("No Content");
58 		case 205:	return _("Reset Content");
59 		case 206:	return _("Partial Content");
60 		case 300:	return _("Multiple Choices");
61 		case 301:	return _("Moved Permanently");
62 		case 302:	return _("Found");
63 		case 303:	return _("See Other");
64 		case 304:	return _("Not Modified");
65 		case 305:	return _("Use Proxy");
66 		case 307:	return _("Moved Temporarily");
67 		case 400:	return _("Bad Request");
68 		case 401:	return _("Unauthorized");
69 		case 402:	return _("Payment Required");
70 		case 403:	return _("Forbidden");
71 		case 404:	return _("Not Found");
72 		case 405:	return _("Method Not Allowed");
73 		case 406:	return _("Not Acceptable");
74 		case 407:	return _("Proxy Authentication Required");
75 		case 408:	return _("Request Timeout");
76 		case 409:	return _("Conflict");
77 		case 410:	return _("Gone");
78 		case 411:	return _("Length Required");
79 		case 412:	return _("Precondition Failed");
80 		case 413:	return _("Request Entity Too Large");
81 		case 414:	return _("Request-URI Too Long");
82 		case 415:	return _("Unsupported Media Type");
83 		case 416:	return _("Requested Range Not Satisfiable");
84 		case 417:	return _("Expectation Failed");
85 		case 500:	return _("Internal Server Error");
86 		case 501:	return _("Not Implemented");
87 		case 502:	return _("Bad Gateway");
88 		case 503:	return _("Service Unavailable");
89 		case 504:	return _("Gateway Timeout");
90 		case 505:	return _("HTTP Version Not Supported");
91 		default:	return _("Unknown status code");
92 	}
93 }
94 
isondx(const char * str)95 long long isondx(const char *str) {
96 	int i = 0;
97 	int j = 3;
98 	if (!str || strlen(str) > 4) return M_RESOLV_UNKNOWN_ERROR;
99 	if (!isalpha(*str)) return M_RESOLV_UNRESOLVED;
100 
101 	while (*str) {
102 		i |= tolower(*str) << (8*j);
103 		str++;
104 		j--;
105 	}
106 
107 	return i;
108 }
109 
110 #define NDX2(x,y)	x << 24 | y << 16
111 #define NDX3(x,y,z)	x << 24 | y << 16 | z << 8
112 #define NDX4(x,y,z,a)	x << 24 | y << 16 | z << 8 | a
113 
misoname(const char * str)114 char *misoname(const char *str) {
115 	switch(isondx(str)) {
116 /* .ac */	case NDX2('a','c'):	return _("Ascension Island");
117 /* .ad */	case NDX2('a','d'): 	return _("Andorra");
118 /* .ae */	case NDX2('a','e'):	return _("United Arab Emirates");
119 /* .aero */	case NDX4('a','e','r','o'):	return _("Aviation (.aero)");
120 /* .af */	case NDX2('a','f'):	return _("Afghanistan");
121 /* .ag */	case NDX2('a','g'):	return _("Antigua and Barbuda");
122 /* .ai */	case NDX2('a','i'):	return _("Anguilla");
123 /* .al */	case NDX2('a','l'):	return _("Albania");
124 /* .am */	case NDX2('a','m'):	return _("Armenia");
125 /* .an */	case NDX2('a','n'):	return _("Netherlands Antilles");
126 /* .ao */	case NDX2('a','o'):	return _("Angola");
127 /* .aq */	case NDX2('a','q'):	return _("Antarctica");
128 /* .ar */	case NDX2('a','r'):	return _("Argentina");
129 /* .arpa */	case NDX4('a','r','p','a'):	return _("Old style Arpanet (arpa)");
130 /* .as */	case NDX2('a','s'):	return _("American Samoa");
131 /* .at */	case NDX2('a','t'):	return _("Austria");
132 /* .au */	case NDX2('a','u'):	return _("Australia");
133 /* .aw */	case NDX2('a','w'):	return _("Aruba");
134 /* .ax */	case NDX2('a','x'):	return _("Aland Islands");
135 /* .az */	case NDX2('a','z'):	return _("Azerbaijan");
136 /* .ba */	case NDX2('b','a'):	return _("Bosnia and Herzegovina");
137 /* .bb */	case NDX2('b','b'):	return _("Barbados");
138 /* .bd */	case NDX2('b','d'):	return _("Bangladesh");
139 /* .be */	case NDX2('b','e'):	return _("Belgium");
140 /* .bf */	case NDX2('b','f'):	return _("Burkina Faso");
141 /* .bg */	case NDX2('b','g'):	return _("Bulgaria");
142 /* .bh */	case NDX2('b','h'):	return _("Bahrain");
143 /* .bi */	case NDX2('b','i'):	return _("Burundi");
144 /* .biz */	case NDX3('b','i','z'):	return _("Business (.biz)");
145 /* .bj */	case NDX2('b','j'):	return _("Benin");
146 /* .bm */	case NDX2('b','m'):	return _("Bermuda");
147 /* .bn */	case NDX2('b','n'):	return _("Brunei Darussalam");
148 /* .bo */	case NDX2('b','o'):	return _("Bolivia");
149 /* .br */	case NDX2('b','r'):	return _("Brasil");
150 /* .bs */	case NDX2('b','s'):	return _("Bahamas");
151 /* .bt */	case NDX2('b','t'):	return _("Bhutan");
152 /* .bv */	case NDX2('b','v'):	return _("Bouvet Island");
153 /* .bw */	case NDX2('b','w'):	return _("Botswana");
154 /* .by */	case NDX2('b','y'):	return _("Belarus");
155 /* .bz */	case NDX2('b','z'):	return _("Belize");
156 /* .ca */	case NDX2('c','a'):	return _("Canada");
157 /* .cat */	case NDX3('c','a','t'):	return _("Catalan linguistic and cultural community");
158 /* .cc */	case NDX2('c','c'):	return _("Cocos (Keeling) Islands");
159 /* .cd */	case NDX2('c','d'):	return _("Congo, Democratic Republic of the");
160 /* .cf */	case NDX2('c','f'):	return _("Central African Republic");
161 /* .cg */	case NDX2('c','g'):	return _("Congo");
162 /* .ch */	case NDX2('c','h'):	return _("Switzerland");
163 /* .ci */	case NDX2('c','i'):	return _("Ivory Coast");
164 /* .ck */	case NDX2('c','k'):	return _("Cook Islands");
165 /* .cl */	case NDX2('c','l'):	return _("Chile");
166 /* .cm */	case NDX2('c','m'):	return _("Cameroon");
167 /* .cn */	case NDX2('c','n'):	return _("China");
168 /* .co */	case NDX2('c','o'):	return _("Colombia");
169 /* .com */	case NDX3('c','o','m'):	return _("US Commercial");
170 /* .coop */	case NDX4('c','o','o','p'):	return _("Cooperation (.coop)");
171 /* .cr */	case NDX2('c','r'):	return _("Costa Rica");
172 /* .cs */	case NDX2('c','s'):	return _("Czechoslovakia (former)");
173 /* .cu */	case NDX2('c','u'):	return _("Cuba");
174 /* .cv */	case NDX2('c','v'):	return _("Cape Verde");
175 /* .cx */	case NDX2('c','x'):	return _("Christmas Island");
176 /* .cy */	case NDX2('c','y'):	return _("Cyprus");
177 /* .cz */	case NDX2('c','z'):	return _("Czech Republic");
178 /* .de */	case NDX2('d','e'):	return _("Germany");
179 /* .dj */	case NDX2('d','j'):	return _("Djibouti");
180 /* .dk */	case NDX2('d','k'):	return _("Denmark");
181 /* .dm */	case NDX2('d','m'):	return _("Dominica");
182 /* .do */	case NDX2('d','o'):	return _("Dominican Republic");
183 /* .dz */	case NDX2('d','z'):	return _("Algeria");
184 /* .ec */	case NDX2('e','c'):	return _("Ecuador");
185 /* .edu */	case NDX3('e','d','u'):	return _("US Educational");
186 /* .ee */	case NDX2('e','e'):	return _("Estonia");
187 /* .eg */	case NDX2('e','g'):	return _("Egypt");
188 /* .eh */	case NDX2('e','h'):	return _("Western Sahara");
189 /* .er */	case NDX2('e','r'):	return _("Eritrea");
190 /* .es */	case NDX2('e','s'):	return _("Spain");
191 /* .et */	case NDX2('e','t'):	return _("Ethiopia");
192 /* .eu */	case NDX2('e','u'):	return _("European Union");
193 /* .fi */	case NDX2('f','i'):	return _("Finland");
194 /* .fj */	case NDX2('f','j'):	return _("Fiji");
195 /* .fk */	case NDX2('f','k'):	return _("Falkland Islands (Malvinas)");
196 /* .fm */	case NDX2('f','m'):	return _("Micronesia");
197 /* .fo */	case NDX2('f','o'):	return _("Faroe Islands");
198 /* .fr */	case NDX2('f','r'):	return _("France");
199 /* .fx */	case NDX2('f','x'):	return _("France, Metropolitan");
200 /* .ga */	case NDX2('g','a'):	return _("Gabon");
201 /* .gb */	case NDX2('g','b'):	return _("Great Britain (UK)");
202 /* .gd */	case NDX2('g','d'):	return _("Grenada");
203 /* .ge */	case NDX2('g','e'):	return _("Georgia");
204 /* .gf */	case NDX2('g','f'):	return _("French Guiana");
205 /* .gg */	case NDX2('g','g'):	return _("Guernsey");
206 /* .gh */	case NDX2('g','h'):	return _("Ghana");
207 /* .gi */	case NDX2('g','i'):	return _("Gibraltar");
208 /* .gl */	case NDX2('g','l'):	return _("Greenland");
209 /* .gm */	case NDX2('g','m'):	return _("Gambia");
210 /* .gn */	case NDX2('g','n'):	return _("Guinea");
211 /* .gov */	case NDX3('g','o','v'):	return _("US Government");
212 /* .gp */	case NDX2('g','p'):	return _("Guadeloupe");
213 /* .gq */	case NDX2('g','q'):	return _("Equatorial Guinea");
214 /* .gr */	case NDX2('g','r'):	return _("Greece");
215 /* .gs */	case NDX2('g','s'):	return _("S. Georgia and S. Sandwich Isls.");
216 /* .gt */	case NDX2('g','t'):	return _("Guatemala");
217 /* .gu */	case NDX2('g','u'):	return _("Guam");
218 /* .gw */	case NDX2('g','w'):	return _("Guinea-Bissau");
219 /* .gy */	case NDX2('g','y'):	return _("Guyana");
220 /* .hk */	case NDX2('h','k'):	return _("Hong Kong");
221 /* .hm */	case NDX2('h','m'):	return _("Heard and McDonald Islands");
222 /* .hn */	case NDX2('h','n'):	return _("Honduras");
223 /* .hr */	case NDX2('h','r'):	return _("Croatia");
224 /* .ht */	case NDX2('h','t'):	return _("Haiti");
225 /* .hu */	case NDX2('h','u'):	return _("Hungary");
226 /* .id */	case NDX2('i','d'):	return _("Indonesia");
227 /* .ie */	case NDX2('i','e'):	return _("Ireland");
228 /* .il */	case NDX2('i','l'):	return _("Israel");
229 /* .im */	case NDX2('i','m'):	return _("Isle of Man");
230 /* .in */	case NDX2('i','n'):	return _("India");
231 /* .info */	case NDX4('i','n','f','o'):	return _("Informational (info)");
232 /* .int */	case NDX3('i','n','t'):	return _("International (int)");
233 /* .io */	case NDX2('i','o'):	return _("British Indian Ocean Territory");
234 /* .iq */	case NDX2('i','q'):	return _("Iraq");
235 /* .ir */	case NDX2('i','r'):	return _("Iran");
236 /* .is */	case NDX2('i','s'):	return _("Iceland");
237 /* .it */	case NDX2('i','t'):	return _("Italy");
238 /* .je */	case NDX2('j','e'):	return _("Jersey");
239 /* .jm */	case NDX2('j','m'):	return _("Jamaica");
240 /* .jo */	case NDX2('j','o'):	return _("Jordan");
241 /* .jobs */	case NDX4('j','o','b','s'):	return _("Human resource managers");
242 /* .jp */	case NDX2('j','p'):	return _("Japan");
243 /* .ke */	case NDX2('k','e'):	return _("Kenya");
244 /* .kg */	case NDX2('k','g'):	return _("Kyrgyzstan");
245 /* .kh */	case NDX2('k','h'):	return _("Cambodia");
246 /* .ki */	case NDX2('k','i'):	return _("Kiribati");
247 /* .km */	case NDX2('k','m'):	return _("Comoros");
248 /* .kn */	case NDX2('k','n'):	return _("Saint Kitts and Nevis");
249 /* .kp */	case NDX2('k','p'):	return _("Korea (North)");
250 /* .kr */	case NDX2('k','r'):	return _("Korea (South)");
251 /* .kw */	case NDX2('k','w'):	return _("Kuwait");
252 /* .ky */	case NDX2('k','y'):	return _("Cayman Islands");
253 /* .kz */	case NDX2('k','z'):	return _("Kazakhstan");
254 /* .la */	case NDX2('l','a'):	return _("Laos");
255 /* .lb */	case NDX2('l','b'):	return _("Lebanon");
256 /* .lc */	case NDX2('l','c'):	return _("Saint Lucia");
257 /* .li */	case NDX2('l','i'):	return _("Liechtenstein");
258 /* .lk */	case NDX2('l','k'):	return _("Sri Lanka");
259 /* .lr */	case NDX2('l','r'):	return _("Liberia");
260 /* .ls */	case NDX2('l','s'):	return _("Lesotho");
261 /* .lt */	case NDX2('l','t'):	return _("Lithuania");
262 /* .lu */	case NDX2('l','u'):	return _("Luxembourg");
263 /* .lv */	case NDX2('l','v'):	return _("Latvia");
264 /* .ly */	case NDX2('l','y'):	return _("Lybia");
265 /* .ma */	case NDX2('m','a'):	return _("Morocco");
266 /* .mc */	case NDX2('m','c'):	return _("Monaco");
267 /* .md */	case NDX2('m','d'):	return _("Moldova");
268 /* .mg */	case NDX2('m','g'):	return _("Madagascar");
269 /* .mh */	case NDX2('m','h'):	return _("Marshall Islands");
270 /* .mil */	case NDX3('m','i','l'):	return _("US Military");
271 /* .mk */	case NDX2('m','k'):	return _("Macedonia");
272 /* .ml */	case NDX2('m','l'):	return _("Mali");
273 /* .mm */	case NDX2('m','m'):	return _("Myanmar");
274 /* .mn */	case NDX2('m','n'):	return _("Mongolia");
275 /* .mo */	case NDX2('m','o'):	return _("Macau");
276 /* .mobi */	case NDX4('m','o','b','i'):	return _("Consumers and providers of mobile products");
277 /* .mp */	case NDX2('m','p'):	return _("Northern Mariana Islands");
278 /* .mq */	case NDX2('m','q'):	return _("Martinique");
279 /* .mr */	case NDX2('m','r'):	return _("Mauritania");
280 /* .ms */	case NDX2('m','s'):	return _("Montserrat");
281 /* .mt */	case NDX2('m','t'):	return _("Malta");
282 /* .mu */	case NDX2('m','u'):	return _("Mauritius");
283 /* .museum */	case NDX4('m','u','s','e'):	return _("Museum");
284 /* .mv */	case NDX2('m','v'):	return _("Maldives");
285 /* .mw */	case NDX2('m','w'):	return _("Malawi");
286 /* .mx */	case NDX2('m','x'):	return _("Mexico");
287 /* .my */	case NDX2('m','y'):	return _("Malaysia");
288 /* .mz */	case NDX2('m','z'):	return _("Mozambique");
289 /* .na */	case NDX2('n','a'):	return _("Namibia");
290 /* .name */	case NDX4('n','a','m','e'):	return _("Personal Name (.name)");
291 /* .nato */	case NDX4('n','a','t','o'):	return _("Nato field");
292 /* .nc */	case NDX2('n','c'):	return _("New Caledonia");
293 /* .ne */	case NDX2('n','e'):	return _("Niger");
294 /* .net */	case NDX3('n','e','t'):	return _("Network");
295 /* .nf */	case NDX2('n','f'):	return _("Norfolk Island");
296 /* .ng */	case NDX2('n','g'):	return _("Nigeria");
297 /* .ni */	case NDX2('n','i'):	return _("Nicaragua");
298 /* .nl */	case NDX2('n','l'):	return _("Netherland");
299 /* .no */	case NDX2('n','o'):	return _("Norway");
300 /* .np */	case NDX2('n','p'):	return _("Nepal");
301 /* .nr */	case NDX2('n','r'):	return _("Nauru");
302 /* .nt */	case NDX2('n','t'):	return _("Neutral Zone");
303 /* .nu */	case NDX2('n','u'):	return _("Niue");
304 /* .nz */	case NDX2('n','z'):	return _("New Zealand");
305 /* .om */	case NDX2('o','m'):	return _("Oman");
306 /* .org */	case NDX3('o','r','g'):	return _("Organizational");
307 /* .pa */	case NDX2('p','a'):	return _("Panama");
308 /* .pe */	case NDX2('p','e'):	return _("Peru");
309 /* .pf */	case NDX2('p','f'):	return _("French Polynesia");
310 /* .pg */	case NDX2('p','g'):	return _("Papua New Guinea");
311 /* .ph */	case NDX2('p','h'):	return _("Philippines");
312 /* .pk */	case NDX2('p','k'):	return _("Pakistan");
313 /* .pl */	case NDX2('p','l'):	return _("Poland");
314 /* .pm */	case NDX2('p','m'):	return _("St. Pierre and Miquelon");
315 /* .pn */	case NDX2('p','n'):	return _("Pitcairn");
316 /* .pr */	case NDX2('p','r'):	return _("Puerto Rico");
317 /* .pro */	case NDX3('p','r','o'):	return _("Credentialed professionals and related entities");
318 /* .ps */	case NDX2('p','s'):	return _("Palestinian Territories");
319 /* .pt */	case NDX2('p','t'):	return _("Portugal");
320 /* .pw */	case NDX2('p','w'):	return _("Palau");
321 /* .py */	case NDX2('p','y'):	return _("Paraguay");
322 /* .qa */	case NDX2('q','a'):	return _("Qatar");
323 /* .re */	case NDX2('r','e'):	return _("Reunion");
324 /* .ro */	case NDX2('r','o'):	return _("Romania");
325 /* .ru */	case NDX2('r','u'):	return _("Russian Federation");
326 /* .rw */	case NDX2('r','w'):	return _("Rwanda");
327 /* .sa */	case NDX2('s','a'):	return _("Saudi Arabia");
328 /* .sb */	case NDX2('s','b'):	return _("Solomon Islands");
329 /* .sc */	case NDX2('s','c'):	return _("Seychelles");
330 /* .sd */	case NDX2('s','d'):	return _("Sudan");
331 /* .se */	case NDX2('s','e'):	return _("Sweden");
332 /* .sg */	case NDX2('s','g'):	return _("Singapore");
333 /* .sh */	case NDX2('s','h'):	return _("St. Helena");
334 /* .si */	case NDX2('s','i'):	return _("Slovenia");
335 /* .sj */	case NDX2('s','j'):	return _("Svalbard and Jan Mayen Islands");
336 /* .sk */	case NDX2('s','k'):	return _("Slovak Republic");
337 /* .sl */	case NDX2('s','l'):	return _("Sierra Leone");
338 /* .sm */	case NDX2('s','m'):	return _("San Marino");
339 /* .sn */	case NDX2('s','n'):	return _("Senegal");
340 /* .so */	case NDX2('s','o'):	return _("Somalia");
341 /* .sr */	case NDX2('s','r'):	return _("Suriname");
342 /* .st */	case NDX2('s','t'):	return _("Sao Tome and Principe");
343 /* .su */	case NDX2('s','u'):	return _("USSR (former)");
344 /* .sv */	case NDX2('s','v'):	return _("El Salvador");
345 /* .sy */	case NDX2('s','y'):	return _("Syria");
346 /* .sz */	case NDX2('s','z'):	return _("Swaziland");
347 /* .tc */	case NDX2('t','c'):	return _("Turks and Caicos Islands");
348 /* .td */	case NDX2('t','d'):	return _("Chad");
349 /* .tf */	case NDX2('t','f'):	return _("French Southern Territories");
350 /* .tg */	case NDX2('t','g'):	return _("Togo");
351 /* .th */	case NDX2('t','h'):	return _("Thailand");
352 /* .tj */	case NDX2('t','j'):	return _("Tajikistan");
353 /* .tk */	case NDX2('t','k'):	return _("Tokelau");
354 /* .tl */	case NDX2('t','l'):	return _("Timor-Leste");
355 /* .tm */	case NDX2('t','m'):	return _("Turkmenistan");
356 /* .tn */	case NDX2('t','n'):	return _("Tunisia");
357 /* .to */	case NDX2('t','o'):	return _("Tonga");
358 /* .tp */	case NDX2('t','p'):	return _("East Timor");
359 /* .tr */	case NDX2('t','r'):	return _("Turkey");
360 /* .travel */	case NDX4('t','r','a','v'):	return _("Travel");
361 /* .tt */	case NDX2('t','t'):	return _("Trinidad and Tobago");
362 /* .tv */	case NDX2('t','v'):	return _("Tuvalu");
363 /* .tw */	case NDX2('t','w'):	return _("Taiwan");
364 /* .tz */	case NDX2('t','z'):	return _("Tanzania");
365 /* .ua */	case NDX2('u','a'):	return _("Ukraine");
366 /* .ug */	case NDX2('u','g'):	return _("Uganda");
367 /* .uk */	case NDX2('u','k'):	return _("United Kingdom");
368 /* .um */	case NDX2('u','m'):	return _("US Minor Outlying Islands");
369 /* .us */	case NDX2('u','s'):	return _("United States");
370 /* .uy */	case NDX2('u','y'):	return _("Uruguay");
371 /* .uz */	case NDX2('u','z'):	return _("Uzbekistan");
372 /* .va */	case NDX2('v','a'):	return _("Vatican City State (Holy See)");
373 /* .vc */	case NDX2('v','c'):	return _("Saint Vincent and the Grenadines");
374 /* .ve */	case NDX2('v','e'):	return _("Venezuela");
375 /* .vg */	case NDX2('v','g'):	return _("Virgin Islands (British)");
376 /* .vi */	case NDX2('v','i'):	return _("Virgin Islands (U.S.)");
377 /* .vn */	case NDX2('v','n'):	return _("Viet Nam");
378 /* .vu */	case NDX2('v','u'):	return _("Vanuatu");
379 /* .wf */	case NDX2('w','f'):	return _("Wallis and Futuna Islands");
380 /* .ws */	case NDX2('w','s'):	return _("Samoa");
381 /* .ye */	case NDX2('y','e'):	return _("Yemen");
382 /* .yt */	case NDX2('y','t'):	return _("Mayotte");
383 /* .yu */	case NDX2('y','u'):	return _("Yugoslavia");
384 /* .za */	case NDX2('z','a'):	return _("South Africa");
385 /* .zm */	case NDX2('z','m'):	return _("Zambia");
386 /* .zr */	case NDX2('z','r'):	return _("Zaire");
387 /* .zw */	case NDX2('z','w'):	return _("Zimbabwe");
388 
389 	        case NDX4('u','n','r','e'): return _("Unresolved");
390 
391 /* unknown domains:
392 	.fsu -> illegally-used-at.fsu
393 	.wil2 -> server2.wil2
394 */
395 		case M_RESOLV_UNKNOWN_ERROR:
396 			return NULL;
397 		case M_RESOLV_UNRESOLVED:
398 			return _("Unresolved");
399 		default:
400 			/* printf("unknown country code: %s -> 0x%08llx\n", str, isondx(str)); */
401 			return _("Unknown country");
402 	}
403 }
404