Update acountry.c country code list (#341)

Updated country_list[]:
 * 2-letter ISO-3166 country-codes.
 * Add, rename some names + codes in accordance with latest table at https://en.wikipedia.org/wiki/ISO_3166-1.

Fix By: Gisle Vanem (@gvanem)
pull/94/head^2
Gisle Vanem 4 years ago committed by GitHub
parent 46b406f6c8
commit 5668ed4e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 33
      acountry.c

@ -279,7 +279,7 @@ static const struct search_list *list_lookup(int number, const struct search_lis
}
/*
* Ref: ftp://ftp.ripe.net/iso3166-countrycodes.txt
* Ref: https://en.wikipedia.org/wiki/ISO_3166-1
*/
static const struct search_list country_list[] = {
{ 4, "af", "Afghanistan" },
@ -309,7 +309,8 @@ static const struct search_list country_list[] = {
{ 60, "bm", "Bermuda" },
{ 64, "bt", "Bhutan" },
{ 68, "bo", "Bolivia" },
{ 70, "ba", "Bosnia & Herzegowina" },
{ 535, "bq", "Bonaire, Sint Eustatius and Saba" }, /* Formerly 'Bonaire' / 'Netherlands Antilles' */
{ 70, "ba", "Bosnia & Herzegovina" },
{ 72, "bw", "Botswana" },
{ 74, "bv", "Bouvet Island" },
{ 76, "br", "Brazil" },
@ -338,6 +339,7 @@ static const struct search_list country_list[] = {
{ 384, "ci", "Cote d'Ivoire" },
{ 191, "hr", "Croatia" },
{ 192, "cu", "Cuba" },
{ 531, "cw", "Curaçao" },
{ 196, "cy", "Cyprus" },
{ 203, "cz", "Czech Republic" },
{ 208, "dk", "Denmark" },
@ -350,7 +352,9 @@ static const struct search_list country_list[] = {
{ 226, "gq", "Equatorial Guinea" },
{ 232, "er", "Eritrea" },
{ 233, "ee", "Estonia" },
{ 748, "sz", "Eswatini" }, /* Formerly Swaziland */
{ 231, "et", "Ethiopia" },
{ 65281, "eu", "European Union" }, /* 127.0.255.1 */
{ 238, "fk", "Falkland Islands" },
{ 234, "fo", "Faroe Islands" },
{ 242, "fj", "Fiji" },
@ -372,12 +376,13 @@ static const struct search_list country_list[] = {
{ 312, "gp", "Guadeloupe" },
{ 316, "gu", "Guam" },
{ 320, "gt", "Guatemala" },
{ 831, "gg", "Guernsey" },
{ 324, "gn", "Guinea" },
{ 624, "gw", "Guinea-Bissau" },
{ 328, "gy", "Guyana" },
{ 332, "ht", "Haiti" },
{ 334, "hm", "Heard & Mc Donald Islands" },
{ 336, "va", "Vatican City" },
{ 336, "va", "Holy See" }, /* Vatican City */
{ 340, "hn", "Honduras" },
{ 344, "hk", "Hong kong" },
{ 348, "hu", "Hungary" },
@ -387,16 +392,19 @@ static const struct search_list country_list[] = {
{ 364, "ir", "Iran" },
{ 368, "iq", "Iraq" },
{ 372, "ie", "Ireland" },
{ 833, "im", "Isle of Man" },
{ 376, "il", "Israel" },
{ 380, "it", "Italy" },
{ 388, "jm", "Jamaica" },
{ 392, "jp", "Japan" },
{ 832, "je", "Jersey" },
{ 400, "jo", "Jordan" },
{ 398, "kz", "Kazakhstan" },
{ 404, "ke", "Kenya" },
{ 296, "ki", "Kiribati" },
{ 408, "kp", "Korea (north)" },
{ 410, "kr", "Korea (south)" },
{ 0, "xk", "Kosovo" }, /* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */
{ 414, "kw", "Kuwait" },
{ 417, "kg", "Kyrgyzstan" },
{ 418, "la", "Laos" },
@ -409,7 +417,6 @@ static const struct search_list country_list[] = {
{ 440, "lt", "Lithuania" },
{ 442, "lu", "Luxembourg" },
{ 446, "mo", "Macao" },
{ 807, "mk", "Macedonia" },
{ 450, "mg", "Madagascar" },
{ 454, "mw", "Malawi" },
{ 458, "my", "Malaysia" },
@ -426,6 +433,7 @@ static const struct search_list country_list[] = {
{ 498, "md", "Moldova" },
{ 492, "mc", "Monaco" },
{ 496, "mn", "Mongolia" },
{ 499, "me", "Montenegro" },
{ 500, "ms", "Montserrat" },
{ 504, "ma", "Morocco" },
{ 508, "mz", "Mozambique" },
@ -434,7 +442,6 @@ static const struct search_list country_list[] = {
{ 520, "nr", "Nauru" },
{ 524, "np", "Nepal" },
{ 528, "nl", "Netherlands" },
{ 530, "an", "Netherlands Antilles" },
{ 540, "nc", "New Caledonia" },
{ 554, "nz", "New Zealand" },
{ 558, "ni", "Nicaragua" },
@ -442,6 +449,7 @@ static const struct search_list country_list[] = {
{ 566, "ng", "Nigeria" },
{ 570, "nu", "Niue" },
{ 574, "nf", "Norfolk Island" },
{ 807, "mk", "North Macedonia" }, /* 'Macedonia' until February 2019 */
{ 580, "mp", "Northern Mariana Islands" },
{ 578, "no", "Norway" },
{ 512, "om", "Oman" },
@ -460,26 +468,30 @@ static const struct search_list country_list[] = {
{ 634, "qa", "Qatar" },
{ 638, "re", "Reunion" },
{ 642, "ro", "Romania" },
{ 643, "ru", "Russia" },
{ 643, "ru", "Russian Federation" },
{ 646, "rw", "Rwanda" },
{ 0, "bl", "Saint Barthélemy" }, /* https://en.wikipedia.org/wiki/ISO_3166-2:BL */
{ 659, "kn", "Saint Kitts & Nevis" },
{ 662, "lc", "Saint Lucia" },
{ 663, "mf", "Saint Martin" },
{ 670, "vc", "Saint Vincent" },
{ 882, "ws", "Samoa" },
{ 674, "sm", "San Marino" },
{ 678, "st", "Sao Tome & Principe" },
{ 682, "sa", "Saudi Arabia" },
{ 686, "sn", "Senegal" },
{ 891, "cs", "Serbia and Montenegro" },
{ 688, "rs", "Serbia" },
{ 690, "sc", "Seychelles" },
{ 694, "sl", "Sierra Leone" },
{ 702, "sg", "Singapore" },
{ 534, "sx", "Sint Maarten" },
{ 703, "sk", "Slovakia" },
{ 705, "si", "Slovenia" },
{ 90, "sb", "Solomon Islands" },
{ 706, "so", "Somalia" },
{ 710, "za", "South Africa" },
{ 239, "gs", "South Georgia" },
{ 239, "gs", "South Georgia & South Sandwich Is." },
{ 728, "ss", "South Sudan" },
{ 724, "es", "Spain" },
{ 144, "lk", "Sri Lanka" },
{ 654, "sh", "St. Helena" },
@ -487,15 +499,14 @@ static const struct search_list country_list[] = {
{ 736, "sd", "Sudan" },
{ 740, "sr", "Suriname" },
{ 744, "sj", "Svalbard & Jan Mayen Islands" },
{ 748, "sz", "Swaziland" },
{ 752, "se", "Sweden" },
{ 756, "ch", "Switzerland" },
{ 760, "sy", "Syrian Arab Republic" },
{ 626, "tl", "Timor-Leste" },
{ 158, "tw", "Taiwan" },
{ 762, "tj", "Tajikistan" },
{ 834, "tz", "Tanzania" },
{ 764, "th", "Thailand" },
{ 626, "tl", "Timor-Leste" },
{ 768, "tg", "Togo" },
{ 772, "tk", "Tokelau" },
{ 776, "to", "Tonga" },
@ -638,4 +649,4 @@ static void print_help_info_acountry() {
" h : Display this help and exit.\n"
" v : Be more verbose. Print extra information.\n\n");
exit(0);
}
}

Loading…
Cancel
Save