diff --git a/cfgs/config/aliasru.cfg b/cfgs/config/aliasru.cfg index 342a7de..ccfb54b 100755 --- a/cfgs/config/aliasru.cfg +++ b/cfgs/config/aliasru.cfg @@ -79,6 +79,7 @@ LocationAlias Cheboxary LocationAlias Cherkassy Черкассы LocationAlias Chistopol Чистопол LocationAlias Chornobyl Чернобыль +LocationAlias Dalmatovo Далматово LocationAlias Energodar Энергодар LocationAlias Essentuky Ессентуки LocationAlias Karaganda Караганда @@ -100,7 +101,7 @@ LocationAlias Vasilyevo LocationAlias Volgograd Волгоград LocationAlias Yaroslavl Ярославль LocationAlias Zapolarny Заполярный -LocationAlias zarechniy Заречный +LocationAlias Zarechniy Заречный LocationAlias Zhukovsky Жуковский LocationAlias Alma-Ata Алма-Ата LocationAlias Belgorod Белгород @@ -135,6 +136,7 @@ LocationAlias Volzhsky LocationAlias Voronezh Воронеж LocationAlias Zauralie Зауралье LocationAlias Angarsk Ангарск +LocationAlias Armavir Армавир LocationAlias Barnaul Барнаул LocationAlias Bendery Бендеры LocationAlias Borisov Борисов @@ -146,7 +148,6 @@ LocationAlias Ivanovo LocationAlias Izhevsk Ижевск LocationAlias Kharkov Харьков LocationAlias Kherson Херсон -LocationAlias kherson Херсон LocationAlias Klichev Кличев LocationAlias Kolomna Коломна LocationAlias Lipetsk Липетск @@ -176,7 +177,6 @@ LocationAlias Grodno LocationAlias Kaluga Калуга LocationAlias Ketovo Кетово LocationAlias Kobrin Кобрин -LocationAlias kurgan Курган LocationAlias Kurgan Курган LocationAlias Moscow Москва LocationAlias Odessa Одесса diff --git a/docs/notework.txt b/docs/notework.txt index 4552f93..a89aed6 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,8 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ LocationAlias is case insensitive now. + + Macro '@widepid' contains platform ID again. ! Golded+ now may be compiled on 64bit platforms. diff --git a/golded3/gccfgg5.cpp b/golded3/gccfgg5.cpp index 56e1f52..70c5e34 100644 --- a/golded3/gccfgg5.cpp +++ b/golded3/gccfgg5.cpp @@ -326,7 +326,7 @@ void CfgLocationalias() getkeyval(&key, &val); StripQuotes(key); StripQuotes(val); - CFG->locationalias.Add(key, val); + CFG->locationalias.Add(strupr(key), val); } // ------------------------------------------------------------------ diff --git a/golded3/genode.cpp b/golded3/genode.cpp index e3466b8..5598066 100644 --- a/golded3/genode.cpp +++ b/golded3/genode.cpp @@ -30,6 +30,10 @@ #include #include +#if defined(__USE_ALLOCA__) + #include +#endif + // ------------------------------------------------------------------ @@ -1141,12 +1145,19 @@ void LookupNodeLocation(GMsg* msg, std::string &location, int what) if (strbag.First()) { +#if defined(__USE_ALLOCA__) + char *city_upr = (char*)alloca(city.length()+1); +#else + __extension__ char city_upr[city.length()+1]; +#endif + strcpy(city_upr, city.c_str()); + strupr(city_upr); + do { const char* str = strbag.Current1(); - size_t pos = city.find(str); - if (pos != city.npos) - city.replace(pos, strlen(str), strbag.Current2()); + const char* ptr = strstr(city_upr, str); + if (ptr) city.replace(ptr-city_upr, strlen(str), strbag.Current2()); } while (strbag.Next()); }