locationalias is case insensitive now
This commit is contained in:
parent
fc011f01b9
commit
73b0d1b7d3
@ -79,6 +79,7 @@ LocationAlias Cheboxary
|
||||
LocationAlias Cherkassy —¥àª ááë
|
||||
LocationAlias Chistopol —¨á⮯®«
|
||||
LocationAlias Chornobyl —¥à®¡ë«ì
|
||||
LocationAlias Dalmatovo „ «¬ ⮢®
|
||||
LocationAlias Energodar <20>¥à£®¤ à
|
||||
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 <20>¥«£®à®¤
|
||||
@ -135,6 +136,7 @@ LocationAlias Volzhsky
|
||||
LocationAlias Voronezh ‚®à®¥¦
|
||||
LocationAlias Zauralie ‡ ãà «ì¥
|
||||
LocationAlias Angarsk €£ àáª
|
||||
LocationAlias Armavir €à¬ ¢¨à
|
||||
LocationAlias Barnaul <20> à ã«
|
||||
LocationAlias Bendery <20>¥¤¥àë
|
||||
LocationAlias Borisov <20>®à¨á®¢
|
||||
@ -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 Ž¤¥áá
|
||||
|
@ -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.
|
||||
|
@ -326,7 +326,7 @@ void CfgLocationalias()
|
||||
getkeyval(&key, &val);
|
||||
StripQuotes(key);
|
||||
StripQuotes(val);
|
||||
CFG->locationalias.Add(key, val);
|
||||
CFG->locationalias.Add(strupr(key), val);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include <gftnnlge.h>
|
||||
#include <gftnnlv7.h>
|
||||
|
||||
#if defined(__USE_ALLOCA__)
|
||||
#include <malloc.h>
|
||||
#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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user