3 |
;;; Real Code: |
;;; Real Code: |
4 |
|
|
5 |
(defvar erbcountry-list) |
(defvar erbcountry-list) |
6 |
(unless (boundp 'erbcoutnry-list) |
(defvar erbcountry-string) |
7 |
|
|
8 |
|
|
9 |
|
;; This is an incomplete, old list. We don't want to spend time to |
10 |
|
;; create it again, so we will simply dump the contents into |
11 |
|
;; erbcountry-string and use a routine to alistify that. |
12 |
|
(unless (boundp 'erbcountry-list) |
13 |
(setq erbcountry-list |
(setq erbcountry-list |
14 |
'( |
'( |
15 |
(".ac" "Ascension Island") |
(".ac" "Ascension Island") |
223 |
(".tg" "Togo") |
(".tg" "Togo") |
224 |
(".th" "Thaila") |
(".th" "Thaila") |
225 |
(".us" "USA") |
(".us" "USA") |
226 |
|
|
227 |
|
|
228 |
))) |
))) |
229 |
|
|
230 |
|
|
231 |
|
|
232 |
|
(unless (boundp 'erbcountry-string) |
233 |
|
(setq erbcountry-string |
234 |
|
".ac Ascension Island |
235 |
|
.ad Andorra |
236 |
|
.ae United Arab Emirates |
237 |
|
.af Afghanistan |
238 |
|
.ag Antigua and Barbuda |
239 |
|
.ai Anguilla |
240 |
|
.al Albania |
241 |
|
.am Armenia |
242 |
|
.an Netherlands Antilles |
243 |
|
.ao Angola |
244 |
|
.aq Antarctica |
245 |
|
.ar Argentina |
246 |
|
.as American Samoa |
247 |
|
.at Austria |
248 |
|
.au Australia |
249 |
|
.aw Aruba |
250 |
|
.ax Aland Islands |
251 |
|
.az Azerbaijan |
252 |
|
.ba Bosnia and Herzegovina |
253 |
|
.bb Barbados |
254 |
|
.bd Bangladesh |
255 |
|
.be Belgium |
256 |
|
.bf Burkina Faso |
257 |
|
.bg Bulgaria |
258 |
|
.bh Bahrain |
259 |
|
.bi Burundi |
260 |
|
.bj Benin |
261 |
|
.bm Bermuda |
262 |
|
.bn Brunei Darussalam |
263 |
|
.bo Bolivia |
264 |
|
.br Brazil |
265 |
|
.bs Bahamas |
266 |
|
.bt Bhutan |
267 |
|
.bv Bouvet Island |
268 |
|
.bw Botswana |
269 |
|
.by Belarus |
270 |
|
.bz Belize |
271 |
|
.ca Canada |
272 |
|
.cc Cocos (Keeling) Islands |
273 |
|
.cd Congo, The Democratic Republic of the |
274 |
|
.cf Central African Republic |
275 |
|
.cg Congo, Republic of |
276 |
|
.ch Switzerland |
277 |
|
.ci Cote d'Ivoire |
278 |
|
.ck Cook Islands |
279 |
|
.cl Chile |
280 |
|
.cm Cameroon |
281 |
|
.cn China |
282 |
|
.co Colombia |
283 |
|
.cr Costa Rica |
284 |
|
.cs Serbia and Montenegro |
285 |
|
.cu Cuba |
286 |
|
.cv Cape Verde |
287 |
|
.cx Christmas Island |
288 |
|
.cy Cyprus |
289 |
|
.cz Czech Republic |
290 |
|
.de Germany |
291 |
|
.dj Djibouti |
292 |
|
.dk Denmark |
293 |
|
.dm Dominica |
294 |
|
.do Dominican Republic |
295 |
|
.dz Algeria |
296 |
|
.ec Ecuador |
297 |
|
.ee Estonia |
298 |
|
.eg Egypt |
299 |
|
.eh Western Sahara |
300 |
|
.er Eritrea |
301 |
|
.es Spain |
302 |
|
.et Ethiopia |
303 |
|
.fi Finland |
304 |
|
.fj Fiji |
305 |
|
.fk Falkland Islands (Malvinas) |
306 |
|
.fm Micronesia, Federal State of |
307 |
|
.fo Faroe Islands |
308 |
|
.fr France |
309 |
|
.ga Gabon |
310 |
|
.gb United Kingdom |
311 |
|
.gd Grenada |
312 |
|
.ge Georgia |
313 |
|
.gf French Guiana |
314 |
|
.gg Guernsey |
315 |
|
.gh Ghana |
316 |
|
.gi Gibraltar |
317 |
|
.gl Greenland |
318 |
|
.gm Gambia |
319 |
|
.gn Guinea |
320 |
|
.gp Guadeloupe |
321 |
|
.gq Equatorial Guinea |
322 |
|
.gr Greece |
323 |
|
.gs South Georgia and the South Sandwich Islands |
324 |
|
.gt Guatemala |
325 |
|
.gu Guam |
326 |
|
.gw Guinea-Bissau |
327 |
|
.gy Guyana |
328 |
|
.hk Hong Kong |
329 |
|
.hm Heard and McDonald Islands |
330 |
|
.hn Honduras |
331 |
|
.hr Croatia/Hrvatska |
332 |
|
.ht Haiti |
333 |
|
.hu Hungary |
334 |
|
.id Indonesia |
335 |
|
.ie Ireland |
336 |
|
.il Israel |
337 |
|
.im Isle of Man |
338 |
|
.in India |
339 |
|
.io British Indian Ocean Territory |
340 |
|
.iq Iraq |
341 |
|
.ir Iran, Islamic Republic of |
342 |
|
.is Iceland |
343 |
|
.it Italy |
344 |
|
.je Jersey |
345 |
|
.jm Jamaica |
346 |
|
.jo Jordan |
347 |
|
.jp Japan |
348 |
|
.ke Kenya |
349 |
|
.kg Kyrgyzstan |
350 |
|
.kh Cambodia |
351 |
|
.ki Kiribati |
352 |
|
.km Comoros |
353 |
|
.kn Saint Kitts and Nevis |
354 |
|
.kp Korea, Democratic People's Republic |
355 |
|
.kr Korea, Republic of |
356 |
|
.kw Kuwait |
357 |
|
.ky Cayman Islands |
358 |
|
.kz Kazakhstan |
359 |
|
.la Lao People's Democratic Republic |
360 |
|
.lb Lebanon |
361 |
|
.lc Saint Lucia |
362 |
|
.li Liechtenstein |
363 |
|
.lk Sri Lanka |
364 |
|
.lr Liberia |
365 |
|
.ls Lesotho |
366 |
|
.lt Lithuania |
367 |
|
.lu Luxembourg |
368 |
|
.lv Latvia |
369 |
|
.ly Libyan Arab Jamahiriya |
370 |
|
.ma Morocco |
371 |
|
.mc Monaco |
372 |
|
.md Moldova, Republic of |
373 |
|
.mg Madagascar |
374 |
|
.mh Marshall Islands |
375 |
|
.mk Macedonia, The Former Yugoslav Republic of |
376 |
|
.ml Mali |
377 |
|
.mm Myanmar |
378 |
|
.mn Mongolia |
379 |
|
.mo Macau |
380 |
|
.mp Northern Mariana Islands |
381 |
|
.mq Martinique |
382 |
|
.mr Mauritania |
383 |
|
.ms Montserrat |
384 |
|
.mt Malta |
385 |
|
.mu Mauritius |
386 |
|
.mv Maldives |
387 |
|
.mw Malawi |
388 |
|
.mx Mexico |
389 |
|
.my Malaysia |
390 |
|
.mz Mozambique |
391 |
|
.na Namibia |
392 |
|
.nc New Caledonia |
393 |
|
.ne Niger |
394 |
|
.nf Norfolk Island |
395 |
|
.ng Nigeria |
396 |
|
.ni Nicaragua |
397 |
|
.nl Netherlands |
398 |
|
.no Norway |
399 |
|
.np Nepal |
400 |
|
.nr Nauru |
401 |
|
.nu Niue |
402 |
|
.nz New Zealand |
403 |
|
.om Oman |
404 |
|
.pa Panama |
405 |
|
.pe Peru |
406 |
|
.pf French Polynesia |
407 |
|
.pg Papua New Guinea |
408 |
|
.ph Philippines |
409 |
|
.pk Pakistan |
410 |
|
.pl Poland |
411 |
|
.pm Saint Pierre and Miquelon |
412 |
|
.pn Pitcairn Island |
413 |
|
.pr Puerto Rico |
414 |
|
.ps Palestinian Territory, Occupied |
415 |
|
.pt Portugal |
416 |
|
.pw Palau |
417 |
|
.py Paraguay |
418 |
|
.qa Qatar |
419 |
|
.re Reunion Island |
420 |
|
.ro Romania |
421 |
|
.ru Russian Federation |
422 |
|
.rw Rwanda |
423 |
|
.sa Saudi Arabia |
424 |
|
.sb Solomon Islands |
425 |
|
.sc Seychelles |
426 |
|
.sd Sudan |
427 |
|
.se Sweden |
428 |
|
.sg Singapore |
429 |
|
.sh Saint Helena |
430 |
|
.si Slovenia |
431 |
|
.sj Svalbard and Jan Mayen Islands |
432 |
|
.sk Slovak Republic |
433 |
|
.sl Sierra Leone |
434 |
|
.sm San Marino |
435 |
|
.sn Senegal |
436 |
|
.so Somalia |
437 |
|
.sr Suriname |
438 |
|
.st Sao Tome and Principe |
439 |
|
.sv El Salvador |
440 |
|
.sy Syrian Arab Republic |
441 |
|
.sz Swaziland |
442 |
|
.tc Turks and Caicos Islands |
443 |
|
.td Chad |
444 |
|
.tf French Southern Territories |
445 |
|
.tg Togo |
446 |
|
.th Thailand |
447 |
|
.tj Tajikistan |
448 |
|
.tk Tokelau |
449 |
|
.tl Timor-Leste |
450 |
|
.tm Turkmenistan |
451 |
|
.tn Tunisia |
452 |
|
.to Tonga |
453 |
|
.tp East Timor |
454 |
|
.tr Turkey |
455 |
|
.tt Trinidad and Tobago |
456 |
|
.tv Tuvalu |
457 |
|
.tw Taiwan |
458 |
|
.tz Tanzania |
459 |
|
.ua Ukraine |
460 |
|
.ug Uganda |
461 |
|
.uk United Kingdom |
462 |
|
.um United States Minor Outlying Islands |
463 |
|
.us United States |
464 |
|
.uy Uruguay |
465 |
|
.uz Uzbekistan |
466 |
|
.va Holy See (Vatican City State) |
467 |
|
.vc Saint Vincent and the Grenadines |
468 |
|
.ve Venezuela |
469 |
|
.vg Virgin Islands, British |
470 |
|
.vi Virgin Islands, U.S. |
471 |
|
.vn Vietnam |
472 |
|
.vu Vanuatu |
473 |
|
.wf Wallis and Futuna Islands |
474 |
|
.ws Western Samoa |
475 |
|
.ye Yemen |
476 |
|
.yt Mayotte |
477 |
|
.yu Yugoslavia |
478 |
|
.za South Africa |
479 |
|
.zm Zambia |
480 |
|
.zw Zimbabwe")) |
481 |
|
|
482 |
|
|
483 |
|
|
484 |
|
(defun erbcountry-create-list () |
485 |
|
"Creates erbcountry-list from erbcountry-string. " |
486 |
|
(let ((strlist (split-string erbcountry-string "[\n]+")) splits dom name) |
487 |
|
(dolist (str strlist) |
488 |
|
(setq splits (split-string str "[ \t\n]+")) |
489 |
|
(setq dom (first splits)) |
490 |
|
(setq name (mapconcat 'identity (cdr splits) " ")) |
491 |
|
(add-to-list 'erbcountry-list (list dom name))))) |
492 |
|
|
493 |
|
(erbcountry-create-list) |
494 |
|
|
495 |
|
|
496 |
|
|
497 |
(defun erbcountry-lookup (ct) |
(defun erbcountry-lookup (ct) |
498 |
;;(unless (stringp ct) (setq ct (format "%s" ct))) |
;;(unless (stringp ct) (setq ct (format "%s" ct))) |