From 719279790ec7501860760290356a145a2e54363b Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Thu, 31 Mar 2011 08:32:23 +0000 Subject: [PATCH] Add some more TLDs to $country(), synchronised with the IANA list: .ax, .eu, .me, .rs, .tl, .asia, .cat, .jobs, .tel and .travel. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@113 13b04d17-f746-0410-82c6-800466cd88b0 --- Changelog | 2 +- source/misc.c | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index 9f10c0c..bcf9842 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,6 @@ [Changes 1.2c01] -* Improve country() and add .mobi TLD. (caf) +* Improve country() and add several new TLDs, suggested by gauze. (caf) * Apply fixes from darkfires removing non-standard use of arithmetic on void * values, to allow building on Irix. (caf) diff --git a/source/misc.c b/source/misc.c index 5d2e7d7..522c933 100644 --- a/source/misc.c +++ b/source/misc.c @@ -4925,6 +4925,7 @@ static const struct { {"AT", "Austria" }, {"AU", "Australia" }, {"AW", "Aruba" }, + {"AX", "Aland" }, {"AZ", "Azerbaijan" }, {"BA", "Bosnia and Herzegovina" }, {"BB", "Barbados" }, @@ -4947,9 +4948,9 @@ static const struct { {"BZ", "Belize" }, {"CA", "Canada (pHEAR)" }, {"CC", "Cocos (Keeling) Islands" }, - {"CD", "Democratic Republic of the Congo" }, + {"CD", "Congo-Kinshasa" }, {"CF", "Central African Republic" }, - {"CG", "Congo" }, + {"CG", "Congo-Brazzaville" }, {"CH", "Switzerland" }, {"CI", "Cote D'Ivoire" }, {"CK", "Cook Islands" }, @@ -4976,10 +4977,11 @@ static const struct { {"ER", "Eritrea" }, {"ES", "Spain" }, {"ET", "Ethiopia" }, + {"EU", "European Union" }, {"FI", "Finland" }, {"FJ", "Fiji" }, {"FK", "Falkland Islands" }, - {"FM", "Federal State of Micronesia" }, + {"FM", "Micronesia" }, {"FO", "Faroe Islands" }, {"FR", "France" }, {"GA", "Gabon" }, @@ -5004,7 +5006,7 @@ static const struct { {"HK", "Hong Kong" }, {"HM", "Heard and McDonald Islands" }, {"HN", "Honduras" }, - {"HR", "Croatia/Hrvatska" }, + {"HR", "Croatia" }, {"HT", "Haiti" }, {"HU", "Hungary" }, {"ID", "Indonesia" }, @@ -5046,6 +5048,7 @@ static const struct { {"MA", "Morocco" }, {"MC", "Monaco" }, {"MD", "Moldova" }, + {"ME", "Montenegro" }, {"MG", "Madagascar" }, {"MH", "Marshall Islands" }, {"MK", "Macedonia" }, @@ -5094,6 +5097,7 @@ static const struct { {"QA", "Qatar" }, {"RE", "Reunion Island" }, {"RO", "Romania" }, + {"RS", "Serbia" }, {"RU", "Russian Federation (pHEAR)" }, {"RW", "Rwanda" }, {"SA", "Saudi Arabia" }, @@ -5114,7 +5118,7 @@ static const struct { {"ST", "Sao Tome and Principe" }, {"SU", "Former USSR (pHEAR)" }, {"SV", "El Salvador" }, - {"SY", "Syrian Arab Republic" }, + {"SY", "Syria" }, {"SZ", "Swaziland" }, {"TC", "Turks and Caicos Islands" }, {"TD", "Chad" }, @@ -5123,6 +5127,7 @@ static const struct { {"TH", "Thailand" }, {"TJ", "Tajikistan" }, {"TK", "Tokelau" }, + {"TL", "East Timor" }, {"TM", "Turkmenistan" }, {"TN", "Tunisia" }, {"TO", "Tonga" }, @@ -5139,7 +5144,7 @@ static const struct { {"US", "United States of America" }, {"UY", "Uruguay" }, {"UZ", "Uzbekistan" }, - {"VA", "Vatican City State" }, + {"VA", "Vatican City" }, {"VC", "St. Vincent and the Grenadines" }, {"VE", "Venezuela" }, {"VG", "British Virgin Islands" }, @@ -5157,13 +5162,16 @@ static const struct { {"ZW", "Zimbabwe" }, {"AERO", "Air Transport Industry" }, {"ARPA", "Reverse DNS" }, + {"ASIA", "Asia-Pacific" }, {"BIZ", "Business" }, + {"CAT", "Catalan Language" }, {"COOP", "Cooperative Association" }, {"COM", "Commercial" }, {"EDU", "Educational Institution" }, {"GOV", "United States Government" }, {"INFO", "Informational" }, {"INT", "International" }, + {"JOBS", "Employment Advertisements" }, {"MIL", "United States Military" }, {"MOBI", "Mobile Device" }, {"MUSEUM", "Museum" }, @@ -5171,6 +5179,8 @@ static const struct { {"NAME", "Individuals" }, {"ORG", "Organization" }, {"PRO", "Professional" }, + {"TEL", "Contact Information" }, + {"TRAVEL", "Travel Industry" }, {NULL, NULL} }; char *p;