Merge branch 'develop' into ryzomclassic-develop

ryzomclassic-develop
kaetemi 4 years ago
commit c08163dcb6

@ -631,7 +631,7 @@ inline bool CFormElm::convertValue (bool &result, const std::string &value) cons
}
else
{
std::string temp = NLMISC::toLower(value);
std::string temp = NLMISC::toLowerAscii(value);
if (strcmp (temp.c_str (), "true") == 0)
{
result = true;

@ -267,6 +267,18 @@ void toLowerAscii(char *str, char replacement);
std::string toUpperAscii(const std::string &str, char replacement);
void toUpperAscii(char *str, char replacement);
/** ASCII to lowercase. Useful for internal identifiers.
* Characters outside of the 7-bit ASCII space are not affected.
*/
std::string toLowerAscii(const std::string &str);
void toLowerAscii(char *str);
/** ASCII to uppercase. Useful for internal identifiers.
* Characters outside of the 7-bit ASCII space are not affected.
*/
std::string toUpperAscii(const std::string &str);
void toUpperAscii(char *str);
/**
* Convert to an hexadecimal std::string
*/

@ -147,8 +147,8 @@ public:
static void append(IStream &s, u32char c);
static u32char get(IStream &s);
/// Get an UTF-8 string from an undefined ASCII-based codepage
static std::string fromAscii(std::string &str);
/// Get an UTF-8 string from an undefined ASCII-based codepage, without attempting to convert non-7-bit characters
static std::string fromAscii(const std::string &str);
private:
typedef u32char (*TIterator)(const void **addr);

@ -289,7 +289,7 @@ void CAnimationSet::preloadSSSShapes(IDriver &drv, CShapeBank &shapeBank)
std::set<std::string>::iterator it;
for(it=_SSSShapes.begin();it!=_SSSShapes.end();it++)
{
string fileName= toLower(*it);
string fileName= toLowerAscii(*it);
// link the shape to the shapeCache
shapeBank.linkShapeToShapeCache(fileName, shapeCacheName);

@ -151,7 +151,7 @@ uint CAsyncTextureManager::addTextureRef(const string &textNameNotLwr, CMeshBa
uint ret;
// lower case name
string textName = toLower(textNameNotLwr);
string textName = toLowerAscii(textNameNotLwr);
// find the texture in map
ItTextureEntryMap it;

@ -117,7 +117,7 @@ bool CCoarseMeshBuild::buildBitmap (const std::vector<CCoarseMeshDesc>& coarseMe
if (texture->supportSharing())
{
// Get sharing name
name+=toLower(texture->getShareName());
name+=toLowerAscii(texture->getShareName());
}
else
{
@ -477,7 +477,7 @@ void CCoarseMeshBuild::remapCoordinates (const std::vector<CCoarseMeshDesc>& coa
if (texture->supportSharing())
{
// Get sharing name
name+=toLower(texture->getShareName());
name+=toLowerAscii(texture->getShareName());
}
else
{

@ -291,7 +291,7 @@ bool IDriver::invalidateShareTexture (ITexture &texture)
void IDriver::getTextureShareName (const ITexture& tex, string &output)
{
// Create the shared Name.
output= toLower(tex.getShareName());
output= toLowerAscii(tex.getShareName());
// append format Id of the texture.
static char fmt[256];
@ -372,7 +372,7 @@ void IDriver::profileTextureUsage(std::vector<std::string> &result)
// get the shareName
string shareName;
if(text->supportSharing())
shareName= toLower(text->getShareName());
shareName= toLowerAscii(text->getShareName());
else
shareName= "Not Shared";

@ -2583,7 +2583,7 @@ void CDriverGL::retrieveATIDriverVersion()
result = RegQueryValueExA(subKey, "DriverDesc", NULL, &valueType, (unsigned char *) driverDesc, &driverDescBufSize);
if (result == ERROR_SUCCESS && valueType == REG_SZ)
{
toLower(driverDesc);
toLowerAscii(driverDesc);
if (strstr(driverDesc, "radeon")) // is it a radeon card ?
{
char driverVersion[256];

@ -59,7 +59,7 @@ uint32 CHLSTextureBank::addColorTexture(const CHLSColorTexture &tex)
// ***************************************************************************
void CHLSTextureBank::addTextureInstance(const std::string &name, uint32 colorTextureId, const vector<CHLSColorDelta> &cols)
{
string nameLwr= toLower(name);
string nameLwr= toLowerAscii(name);
// checks
nlassert(colorTextureId<_ColorTextures.size());

@ -76,7 +76,7 @@ sint CHLSTextureManager::findTexture(const std::string &name) const
return -1;
// Build a valid key.
string nameLwr= toLower(name);
string nameLwr= toLowerAscii(name);
CHLSTextureBank::CTextureInstance textKey;
CHLSTextureBank::CTextureInstanceHandle textKeyHandle;
textKey.buildAsKey(nameLwr.c_str());

@ -415,7 +415,7 @@ void CInstanceLighter::light (const CInstanceGroup &igIn, CInstanceGroup &igOut,
string name= _Instances[i].Name;
bool shapeFound= true;
if (toLower (CFile::getExtension (name)) == "pacs_prim")
if (toLowerAscii (CFile::getExtension (name)) == "pacs_prim")
{
nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str());
continue;

@ -115,7 +115,7 @@ void CLandscapeIGManager::initIG(UScene *scene, const std::string &igDesc, UDriv
if (ig)
{
// add it to the map.
string tokId= toUpper(string(token));
string tokId= toUpperAscii(string(token));
_ZoneInstanceGroupMap[tokId]= CInstanceGroupElement(ig, token);
// Add a reference on the shapes
@ -129,7 +129,7 @@ void CLandscapeIGManager::initIG(UScene *scene, const std::string &igDesc, UDriv
_ig.getShapeName(i, shapeName);
if (!shapeName.empty ())
{
if (toLower(CFile::getExtension(shapeName)) != "pacs_prim")
if (toLowerAscii(CFile::getExtension(shapeName)) != "pacs_prim")
{
// Insert a new shape ?
if (_ShapeAdded.find(shapeName) == _ShapeAdded.end())
@ -295,7 +295,7 @@ UInstanceGroup *CLandscapeIGManager::getIG(const std::string &name) const
std::string CLandscapeIGManager::translateName(const std::string &name) const
{
std::string ret;
ret= toUpper(name + ".ig");
ret= toUpperAscii(name + ".ig");
return ret;
}
@ -364,7 +364,7 @@ void CLandscapeIGManager::reloadAllIgs()
const char *token= bkupIgFileNameList[i].c_str();
UInstanceGroup *ig = UInstanceGroup::createInstanceGroup(token);
// add it to the map.
string tokId= toUpper(token);
string tokId= toUpperAscii(token);
_ZoneInstanceGroupMap[tokId]= CInstanceGroupElement(ig, token);
// If was addedToScene before, re-add to scene now.

@ -665,7 +665,7 @@ void CPackedZone32::build(std::vector<const CTessFace*> &leaves,
{
CMatrix instanceMatrix;
igs[k]->getInstanceMatrix(l, instanceMatrix);
if (NLMISC::toLower(NLMISC::CFile::getExtension(igs[k]->getShapeName(l))) == "pacs_prim") continue;
if (NLMISC::toLowerAscii(NLMISC::CFile::getExtension(igs[k]->getShapeName(l))) == "pacs_prim") continue;
std::string stdShapeName = standardizeShapeName(igs[k]->getShapeName(l));
TShapeCache::const_iterator it = shapeCache.find(stdShapeName);
if (it != shapeCache.end())

@ -793,7 +793,7 @@ CTransformShape *CScene::createInstance(const string &shapeName)
if (pMB->getAutoAnim())
{
std::string animName = toLower(CFile::getFilenameWithoutExtension(shapeName));
std::string animName = toLowerAscii(CFile::getFilenameWithoutExtension(shapeName));
uint animID = _AutomaticAnimationSet->getAnimationIdByName(animName);
if (animID != CAnimationSet::NotFound)
{
@ -833,7 +833,7 @@ void CScene::createInstanceAsync(const string &shapeName, CTransformShape **pIns
if (_ShapeBank->getPresentState( shapeName ) != CShapeBank::Present)
{
// Load it from file asynchronously
_ShapeBank->loadAsync( toLower(shapeName), getDriver(), position, NULL, selectedTexture);
_ShapeBank->loadAsync( toLowerAscii(shapeName), getDriver(), position, NULL, selectedTexture);
}
}

@ -607,7 +607,7 @@ void CInstanceGroup::getShapeName (uint instanceIndex, std::string &shapeName) c
shapeName = _TransformName->transformName (instanceIndex, rInstanceInfo.InstanceName, rInstanceInfo.Name);
}
toLower(shapeName);
toLowerAscii(shapeName);
if (!shapeName.empty() && shapeName.find('.') == std::string::npos)
shapeName += ".shape";
}
@ -860,7 +860,7 @@ bool CInstanceGroup::addToSceneAsync (CScene& scene, IDriver *driver, uint selec
shapeName = _TransformName->transformName (i, rInstanceInfo.InstanceName, rInstanceInfo.Name);
}
toLower(shapeName);
toLowerAscii(shapeName);
if (!shapeName.empty() && shapeName.find('.') == std::string::npos)
shapeName += ".shape";
@ -920,7 +920,7 @@ void CInstanceGroup::stopAddToSceneAsync ()
shapeName = rInstanceInfo.Name;
}
toLower(shapeName);
toLowerAscii(shapeName);
_AddToSceneTempScene->getShapeBank()->cancelLoadAsync (shapeName);
}
}

@ -56,7 +56,7 @@ CShapeBank::~CShapeBank()
IShape*CShapeBank::addRef(const string &shapeNameNotLwr)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
// get the shape info (must succeed)
TShapeInfoMap::iterator scfpmIt = ShapePtrToShapeInfo.find( getShapePtrFromShapeName( shapeName ) );
@ -434,7 +434,7 @@ bool CShapeBank::processWSUploadTexture (CWaitingShape &rWS, uint32 &nTotalUploa
CShapeBank::TShapeState CShapeBank::getPresentState (const string &shapeNameNotLwr)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
// Is the shape is found in the shape map so return Present
TShapeMap::iterator smIt = ShapeMap.find (shapeName);
@ -450,7 +450,7 @@ CShapeBank::TShapeState CShapeBank::getPresentState (const string &shapeNameNotL
// ***************************************************************************
IShape *CShapeBank::getShape (const std::string &shapeNameNotLwr)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
// Is the shape is found in the shape map so return Present
TShapeMap::iterator smIt = ShapeMap.find (shapeName);
@ -464,7 +464,7 @@ IShape *CShapeBank::getShape (const std::string &shapeNameNotLwr)
void CShapeBank::load (const string &shapeNameNotLwr)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
TShapeMap::iterator smIt = ShapeMap.find(shapeName);
if( smIt == ShapeMap.end() )
@ -498,7 +498,7 @@ void CShapeBank::load (const string &shapeNameNotLwr)
void CShapeBank::loadAsync (const std::string &shapeNameNotLwr, IDriver *pDriver, const CVector &position, bool *bSignal, uint selectedTexture)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
TShapeMap::iterator smIt = ShapeMap.find(shapeName);
if (smIt != ShapeMap.end())
@ -530,7 +530,7 @@ void CShapeBank::loadAsync (const std::string &shapeNameNotLwr, IDriver *pDriver
void CShapeBank::cancelLoadAsync (const std::string &shapeNameNotLwr)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
TWaitingShapesMap::iterator wsmmIt = WaitingShapes.find(shapeName);
if (wsmmIt != WaitingShapes.end())
@ -600,7 +600,7 @@ bool CShapeBank::isShapeWaiting ()
void CShapeBank::add (const string &shapeNameNotLwr, IShape* pShp)
{
nlassert(pShp);
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
// request a system mem geometry copy?
if(pShp && _ShapeNeedingSystemGeometryCopy.find(shapeName)!=_ShapeNeedingSystemGeometryCopy.end())
@ -724,7 +724,7 @@ sint CShapeBank::getShapeCacheFreeSpace(const std::string &shapeCacheName) const
void CShapeBank::linkShapeToShapeCache(const string &shapeNameNotLwr, const string &shapeCacheName)
{
string shapeName= toLower(shapeNameNotLwr);
string shapeName= toLowerAscii(shapeNameNotLwr);
for(;;)
{
@ -857,7 +857,7 @@ void CShapeBank::preLoadShapes(const std::string &shapeCacheName,
return;
// lower case
string wildCard= toLower(wildCardNotLwr);
string wildCard= toLowerAscii(wildCardNotLwr);
// For all files
for(uint i=0;i<listFile.size();i++)
@ -866,7 +866,7 @@ void CShapeBank::preLoadShapes(const std::string &shapeCacheName,
if (progress)
progress->progress ((float)i/(float)listFile.size ());
string fileName= toLower(CFile::getFilename(listFile[i]));
string fileName= toLowerAscii(CFile::getFilename(listFile[i]));
// if the file is ok for the wildCard, process it
if( testWildCard(fileName.c_str(), wildCard.c_str()) )
{
@ -908,7 +908,7 @@ void CShapeBank::preLoadShapes(const std::string &shapeCacheName,
// ***************************************************************************
void CShapeBank::buildSystemGeometryForshape(const std::string &shapeName)
{
_ShapeNeedingSystemGeometryCopy.insert(toLower(shapeName));
_ShapeNeedingSystemGeometryCopy.insert(toLowerAscii(shapeName));
}

@ -229,7 +229,7 @@ void CShapeInfo::build(const CMeshBase &meshBase, const CMeshMRMGeom &meshGeom)
// ***************************************************************************
std::string standardizeShapeName(const std::string &name)
{
std::string result = NLMISC::toLower(name);
std::string result = NLMISC::toLowerAscii(name);
if (CFile::getExtension(result).empty())
{
result += ".shape";

@ -311,7 +311,7 @@ void CTextureFile::setMipMapSkipAtLoad(uint8 level)
// ***************************************************************************
std::string CTextureFile::getShareName() const
{
return toLower(_FileName);
return toLowerAscii(_FileName);
}

@ -275,7 +275,7 @@ sint CTileBank::getNumBitmap (CTile::TBitmap bitmap) const
{
std::vector<char> vect (str.length()+1);
memcpy (&*vect.begin(), str.c_str(), str.length()+1);
toLower(&*vect.begin());
toLowerAscii(&*vect.begin());
setString.insert (std::string (&*vect.begin()));
}
}
@ -600,7 +600,7 @@ void CTileBank::removeDisplacementMap (uint mapId)
uint CTileBank::getDisplacementMap (const string &fileName)
{
// Lower string
string lower=toLower(fileName);
string lower=toLowerAscii(fileName);
// Look for this texture filename
uint noiseTile;

@ -371,7 +371,7 @@ void CForm::warning (bool exception, const std::string &function, const char *fo
void CForm::getDependencies (std::set<std::string> &dependencies) const
{
// Add me
if (dependencies.insert (toLower(CFile::getFilename (_Filename))).second)
if (dependencies.insert (toLowerAscii(CFile::getFilename (_Filename))).second)
{
// Add parents
uint i;

@ -882,7 +882,7 @@ void CFormDfn::warning (bool exception, const std::string &function, const char
void CFormDfn::getDependencies (std::set<std::string> &dependencies) const
{
// Scan only if not already inserted
if (dependencies.insert (toLower(CFile::getFilename (_Filename))).second)
if (dependencies.insert (toLowerAscii(CFile::getFilename (_Filename))).second)
{
// Add parents
uint i;
@ -898,7 +898,7 @@ void CFormDfn::getDependencies (std::set<std::string> &dependencies) const
Entries[i].getDfnPtr ()->getDependencies (dependencies);
if (Entries[i].getTypePtr ())
{
dependencies.insert (toLower(CFile::getFilename (Entries[i].getFilename())));
dependencies.insert (toLowerAscii(CFile::getFilename (Entries[i].getFilename())));
}
}
}

@ -67,7 +67,7 @@ CFormLoader::~CFormLoader()
CType *CFormLoader::loadType (const std::string &filename)
{
// Lower string filename
string lowerStr = toLower(filename);
string lowerStr = toLowerAscii(filename);
lowerStr = CFile::getFilename (lowerStr);
// Already in the map ?
@ -137,7 +137,7 @@ CType *CFormLoader::loadType (const std::string &filename)
CFormDfn *CFormLoader::loadFormDfn (const std::string &filename, bool forceLoad)
{
// Lower string filename
string lowerStr = toLower(filename);
string lowerStr = toLowerAscii(filename);
lowerStr = CFile::getFilename (lowerStr);
// Already in the map ?
@ -203,7 +203,7 @@ CFormDfn *CFormLoader::loadFormDfn (const std::string &filename, bool forceLoad)
UForm *CFormLoader::loadForm (const std::string &filename)
{
// Lower string filename
string lowerStr = toLower((string)filename);
string lowerStr = toLowerAscii((string)filename);
lowerStr = CFile::getFilename (lowerStr);
// Already in the map ?

@ -73,13 +73,13 @@ namespace NLGUI
{
string allparam = Params;
skipBlankAtStart (allparam);
string param = toLower (ParamName);
string param = toLowerAscii (ParamName);
while (!allparam.empty())
{
std::string::size_type e = allparam.find('=');
if (e == std::string::npos || e == 0) break;
std::string::size_type p = allparam.find('|');
string tmp = NLMISC::toLower(allparam.substr(0,e));
string tmp = NLMISC::toLowerAscii(allparam.substr(0,e));
skipBlankAtEnd(tmp);
if (tmp == param)
{
@ -105,7 +105,7 @@ namespace NLGUI
std::string::size_type e = allparam.find('=');
if (e == std::string::npos || e == 0) break;
std::string::size_type p = allparam.find('|');
string tmp = NLMISC::toLower(allparam.substr(0,e));
string tmp = NLMISC::toLowerAscii(allparam.substr(0,e));
skipBlankAtEnd(tmp);
string tmp2 = allparam.substr(e+1,p-e-1);

@ -50,7 +50,7 @@ namespace NLGUI
pos = elements[i].find_first_of(':');
if (pos != std::string::npos)
{
std::string key = trim(toLower(elements[i].substr(0, pos)));
std::string key = trim(toLowerAscii(elements[i].substr(0, pos)));
std::string value = trim(elements[i].substr(pos+1));
styles.push_back(TStylePair(key, value));
}
@ -361,7 +361,7 @@ namespace NLGUI
while(pos < sel.size() && is_nmchar(sel[pos]))
pos++;
current.Element = toLower(sel.substr(start, pos - start));
current.Element = toLowerAscii(sel.substr(start, pos - start));
start = pos;
continue;
}
@ -374,7 +374,7 @@ namespace NLGUI
while(pos < sel.size() && is_nmchar(sel[pos]))
pos++;
current.Id = toLower(sel.substr(start, pos - start));
current.Id = toLowerAscii(sel.substr(start, pos - start));
start = pos;
}
else if (sel[pos] == '.')
@ -386,7 +386,7 @@ namespace NLGUI
while(pos < sel.size() && (is_nmchar(sel[pos]) || sel[pos] == '.'))
pos++;
current.setClass(toLower(sel.substr(start, pos - start)));
current.setClass(toLowerAscii(sel.substr(start, pos - start)));
start = pos;
}
else if (sel[pos] == '[')
@ -552,7 +552,7 @@ namespace NLGUI
}
}
std::string key = toLower(sel.substr(start, pos - start));
std::string key = toLowerAscii(sel.substr(start, pos - start));
if (key.empty())
{
failed = true;

@ -59,7 +59,7 @@ namespace NLGUI
void CCssSelector::setClass(const std::string &cls)
{
std::vector<std::string> parts;
NLMISC::splitString(toLower(cls), ".", parts);
NLMISC::splitString(toLowerAscii(cls), ".", parts);
for(uint i = 0; i< parts.size(); i++)
{
@ -80,7 +80,7 @@ namespace NLGUI
}
else
{
Attr.push_back(SAttribute(key, toLower(val), op, cs));
Attr.push_back(SAttribute(key, toLowerAscii(val), op, cs));
}
}
@ -146,7 +146,7 @@ namespace NLGUI
// case-insensitive compare, Attr.value is already lowercased
if (!Attr[i].caseSensitive)
{
value = toLower(value);
value = toLowerAscii(value);
}
switch(Attr[i].op)
@ -255,7 +255,7 @@ namespace NLGUI
if (start == std::string::npos) return;
std::string expr = toLower(pseudo.substr(start, end - start));
std::string expr = toLowerAscii(pseudo.substr(start, end - start));
if (expr.empty()) return;

@ -676,7 +676,7 @@ namespace NLGUI
else
if (it->first == "text-decoration" || it->first == "text-decoration-line")
{
std::string prop(toLower(it->second));
std::string prop(toLowerAscii(it->second));
style.Underlined = (prop.find("underline") != std::string::npos);
style.StrikeThrough = (prop.find("line-through") != std::string::npos);
}
@ -924,7 +924,7 @@ namespace NLGUI
{
// normalize
std::string image = trim(it->second);
if (toLower(image.substr(0, 4)) == "url(")
if (toLowerAscii(image.substr(0, 4)) == "url(")
{
image = image.substr(4, image.size()-5);
}
@ -934,7 +934,7 @@ namespace NLGUI
if (it->first == "background-repeat")
{
// normalize
std::string val = toLower(trim(it->second));
std::string val = toLowerAscii(trim(it->second));
std::vector<std::string> parts;
splitParams(val, ' ', parts);
// check for "repeat repeat"
@ -947,7 +947,7 @@ namespace NLGUI
if (it->first == "background-size")
{
// normalize
std::string val = toLower(trim(it->second));
std::string val = toLowerAscii(trim(it->second));
std::vector<std::string> parts;
splitParams(val, ' ', parts);
if (parts.size() == 2 && parts[0] == parts[1])
@ -999,7 +999,7 @@ namespace NLGUI
uint index = 0;
while(!failed && index < parts.size())
{
std::string val = toLower(parts[index]);
std::string val = toLowerAscii(parts[index]);
bool matches = false;
for(uint i = 0; i < nbProps; i++)
{
@ -1028,7 +1028,7 @@ namespace NLGUI
// second loop -> false && break
loop = !loop;
val = toLower(parts[next]);
val = toLowerAscii(parts[next]);
if (val == "center")
{
if (bgPositionX.empty()) bgPositionX = "center";
@ -1082,7 +1082,7 @@ namespace NLGUI
uint next = index + 1;
if (next < parts.size())
{
val = toLower(parts[next]);
val = toLowerAscii(parts[next]);
if (val == "cover" || val == "contain")
{
matches = true;
@ -1106,7 +1106,7 @@ namespace NLGUI
next++;
if (next < parts.size())
{
val = toLower(parts[next]);
val = toLowerAscii(parts[next]);
if (val == "auto")
v = "auto";
else if (getCssLength(fval, unit, val))
@ -1160,7 +1160,7 @@ namespace NLGUI
uint next = index + 1;
if (next < parts.size())
{
val = toLower(parts[next]);
val = toLowerAscii(parts[next]);
if (val == "repeat" || val == "space" || val == "round" || val == "no-repeat")
{
vert = val;
@ -1334,7 +1334,7 @@ namespace NLGUI
bool CCssStyle::tryBorderWidthShorthand(const std::string &prop, const std::string &value, TStyle &style) const
{
std::vector<std::string> parts;
splitParams(toLower(value), ' ', parts);
splitParams(toLowerAscii(value), ' ', parts);
float tmpf;
std::string unit;
@ -1371,7 +1371,7 @@ namespace NLGUI
bool CCssStyle::tryBorderStyleShorthand(const std::string &prop, const std::string &value, TStyle &style) const
{
std::vector<std::string> parts;
splitParams(toLower(value), ' ', parts);
splitParams(toLowerAscii(value), ' ', parts);
// verify that parts are valid
uint8 maxSize = (prop == "border" || prop == "border-style") ? 4 : 1;
@ -1420,7 +1420,7 @@ namespace NLGUI
bool CCssStyle::tryBorderColorShorthand(const std::string &prop, const std::string &value, TStyle &style) const
{
std::vector<std::string> parts;
splitParams(toLower(value), ' ', parts);
splitParams(toLowerAscii(value), ' ', parts);
CRGBA color;
// verify that parts are valid
@ -1465,7 +1465,7 @@ namespace NLGUI
TStyle borderStyle;
std::vector<std::string> parts;
splitParams(toLower(value), ' ', parts);
splitParams(toLowerAscii(value), ' ', parts);
for(uint index = 0; index < parts.size(); ++index)
{
@ -1530,7 +1530,7 @@ namespace NLGUI
void CCssStyle::expandPaddingShorthand(const std::string &value, TStyle &style) const
{
std::vector<std::string> parts;
splitParams(toLower(value), ' ', parts);
splitParams(toLowerAscii(value), ' ', parts);
uint8 t, r, b, l;
if (!getShorthandIndices(parts.size(), t, r, b, l))

@ -100,7 +100,7 @@ namespace NLGUI
CCtrlBase::TToolTipParentType CCtrlBase::stringToToolTipParent( const std::string &str )
{
std::string s = toLower( str );
std::string s = toLowerAscii( str );
if( s == "mouse" )
return TTMouse;

@ -584,18 +584,18 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_l" );
if (prop)
{
_ListMenuLeft = NLMISC::toLower(std::string((const char *) prop));
_ListMenuLeft = NLMISC::toLowerAscii(std::string((const char *) prop));
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
if (prop)
{
_ListMenuRight = NLMISC::toLower(std::string((const char *) prop));
_ListMenuRight = NLMISC::toLowerAscii(std::string((const char *) prop));
}
// list menu on both clicks
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_b" );
if (prop)
{
setListMenuBoth(NLMISC::toLower(std::string((const char *) prop)));
setListMenuBoth(NLMISC::toLowerAscii(std::string((const char *) prop)));
}
prop= (char*) xmlGetProp (cur, (xmlChar*)"frozen");

@ -210,21 +210,21 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_normal" );
if (prop)
{
string TxName = NLMISC::toLower((const char *) prop);
string TxName = NLMISC::toLowerAscii((const char *) prop);
_TextureIdNormal.setTexture(TxName.c_str());
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_pushed" );
if (prop)
{
string TxName = NLMISC::toLower((const char *) prop);
string TxName = NLMISC::toLowerAscii((const char *) prop);
_TextureIdPushed.setTexture(TxName.c_str());
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_over" );
if (prop)
{
string TxName = NLMISC::toLower((const char *) prop);
string TxName = NLMISC::toLowerAscii((const char *) prop);
_TextureIdOver.setTexture(TxName.c_str());
}

@ -212,12 +212,12 @@ namespace NLGUI
CViewRenderer &rVR = *CViewRenderer::getInstance();
if(prop)
{
string sTmp = NLMISC::toLower((const char*)prop);
string sTmp = NLMISC::toLowerAscii((const char*)prop);
_Texture = rVR.createTexture (sTmp, 0, 0, 256, 64, false, false);
}
prop = (char*) xmlGetProp( node, (xmlChar*)"onchange" );
if (prop) _AHOnChange = NLMISC::toLower((const char*)prop);
if (prop) _AHOnChange = NLMISC::toLowerAscii((const char*)prop);
prop = (char*) xmlGetProp( node, (xmlChar*)"onchange_params" );
if (prop) _AHOnChangeParams = string((const char*)prop);

@ -561,17 +561,17 @@ namespace NLGUI
// Read Action handlers
prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" );
if (prop) _AHOnScroll = NLMISC::toLower(prop.str());
if (prop) _AHOnScroll = NLMISC::toLowerAscii(prop.str());
prop = (char*) xmlGetProp( node, (xmlChar*)"params" );
if (prop) _AHOnScrollParams = string((const char*)prop);
//
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" );
if (prop) _AHOnScrollEnd = NLMISC::toLower(prop.str());
if (prop) _AHOnScrollEnd = NLMISC::toLowerAscii(prop.str());
prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" );
if (prop) _AHOnScrollEndParams = string((const char*)prop);
//
prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" );
if (prop) _AHOnScrollCancel = NLMISC::toLower(prop.str());
if (prop) _AHOnScrollCancel = NLMISC::toLowerAscii(prop.str());
prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" );
if (prop) _AHOnScrollCancelParams = string((const char*)prop);

@ -542,7 +542,7 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_normal" );
if (prop)
{
string TxName = toLower(std::string((const char *) prop));
string TxName = toLowerAscii(std::string((const char *) prop));
_TextureIdNormal[0].setTexture((TxName+"_l.tga").c_str());
_TextureIdNormal[1].setTexture((TxName+"_m.tga").c_str());
_TextureIdNormal[2].setTexture((TxName+"_r.tga").c_str());
@ -551,7 +551,7 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_pushed" );
if (prop)
{
string TxName = toLower(std::string((const char *) prop));
string TxName = toLowerAscii(std::string((const char *) prop));
_TextureIdPushed[0].setTexture((TxName+"_l.tga").c_str());
_TextureIdPushed[1].setTexture((TxName+"_m.tga").c_str());
_TextureIdPushed[2].setTexture((TxName+"_r.tga").c_str());
@ -560,7 +560,7 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_over" );
if (prop)
{
string TxName = toLower(std::string((const char *) prop));
string TxName = toLowerAscii(std::string((const char *) prop));
_TextureIdOver[0].setTexture((TxName+"_l.tga").c_str());
_TextureIdOver[1].setTexture((TxName+"_m.tga").c_str());
_TextureIdOver[2].setTexture((TxName+"_r.tga").c_str());

@ -45,7 +45,8 @@ namespace NLGUI
// Compare strings
static inline bool lt_text(const std::pair<int,std::string> &s1, const std::pair<int,std::string> &s2)
{
return toLower(s1.second) < toLower(s2.second);
// return toLower(s1.second) < toLower(s2.second);
return -NLMISC::compareCaseInsensitive(s1.second, s2.second);
}
std::string CDBGroupComboBox::measureMenu;

@ -629,7 +629,7 @@ namespace NLGUI
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
if (prop) _ListMenuRight = toLower((const char *) prop);
if (prop) _ListMenuRight = toLowerAscii((const char *) prop);
prop = (char*) xmlGetProp( cur, (xmlChar*)"max_historic" );
if (prop) fromString((const char*)prop, _MaxHistoric);

@ -89,7 +89,7 @@ namespace NLGUI
// Return URL with https is host is in HSTS list
static std::string upgradeInsecureUrl(const std::string &url)
{
if (toLower(url.substr(0, 7)) != "http://") {
if (toLowerAscii(url.substr(0, 7)) != "http://") {
return url;
}
@ -136,7 +136,7 @@ namespace NLGUI
if (pos == std::string::npos)
return;
std::string key = toLower(header.substr(0, pos));
std::string key = toLowerAscii(header.substr(0, pos));
if (pos != std::string::npos)
{
HeadersRecv[key] = header.substr(pos + 2);
@ -185,7 +185,7 @@ namespace NLGUI
bool hasHSTSHeader()
{
// ignore header if not secure connection
if (toLower(Url.substr(0, 8)) != "https://")
if (toLowerAscii(Url.substr(0, 8)) != "https://")
{
return false;
}
@ -552,7 +552,7 @@ namespace NLGUI
LOG_DL("curl easy handle %p created for '%s'", curl, download.url.c_str());
// https://
if (toLower(download.url.substr(0, 8)) == "https://")
if (toLowerAscii(download.url.substr(0, 8)) == "https://")
{
// if supported, use custom SSL context function to load certificates
NLWEB::CCurlCertificates::useCertificates(curl);
@ -1266,7 +1266,7 @@ namespace NLGUI
// TODO: 'content' should already be tokenized in css parser as it has all the functions for that
std::string content = trim(_Style.getStyle("content"));
if (toLower(content) == "none" || toLower(content) == "normal")
if (toLowerAscii(content) == "none" || toLowerAscii(content) == "normal")
{
_Style.popStyle();
return;
@ -1297,7 +1297,7 @@ namespace NLGUI
// skip closing quote
pos++;
}
else if (content[pos] == 'u' && pos < content.size() - 6 && toLower(content.substr(pos, 4)) == "url(")
else if (content[pos] == 'u' && pos < content.size() - 6 && toLowerAscii(content.substr(pos, 4)) == "url(")
{
// url(/path-to/image.jpg) / "Alt!"
// url("/path to/image.jpg") / "Alt!"
@ -3440,7 +3440,7 @@ namespace NLGUI
result = url;
string tmp;
if (toLower(result).find("file:") == 0 && result.size() > 5)
if (toLowerAscii(result).find("file:") == 0 && result.size() > 5)
{
result = result.substr(5, result.size()-5);
}
@ -3461,7 +3461,7 @@ namespace NLGUI
{
// Normalize the path
if (isUrl)
//result = "file:"+toLower(CPath::standardizePath (CPath::getFullPath (CFile::getPath(result)))+CFile::getFilename(result));*/
//result = "file:"+toLowerAscii(CPath::standardizePath (CPath::getFullPath (CFile::getPath(result)))+CFile::getFilename(result));*/
result = "file:/"+tmp;
else
result = tmp;
@ -3786,7 +3786,7 @@ namespace NLGUI
updateRefreshButton();
std::string filename;
if (toLower(uri).find("file:/") == 0)
if (toLowerAscii(uri).find("file:/") == 0)
{
filename = uri.substr(6, uri.size() - 6);
}
@ -3856,7 +3856,7 @@ namespace NLGUI
}
// https://
if (toLower(url.substr(0, 8)) == "https://")
if (toLowerAscii(url.substr(0, 8)) == "https://")
{
// if supported, use custom SSL context function to load certificates
NLWEB::CCurlCertificates::useCertificates(curl);
@ -5347,7 +5347,7 @@ namespace NLGUI
if (_Style.hasStyle("text-align"))
align = _Style.Current.TextAlign;
else if (elm.hasNonEmptyAttribute("align"))
align = toLower(elm.getAttribute("align"));
align = toLowerAscii(elm.getAttribute("align"));
if (align == "left")
cellParams.Align = CGroupCell::Left;
@ -5362,7 +5362,7 @@ namespace NLGUI
if (_Style.hasStyle("vertical-align"))
valign = _Style.Current.VerticalAlign;
else if (elm.hasNonEmptyAttribute("valign"))
valign = toLower(elm.getAttribute("valign"));
valign = toLowerAscii(elm.getAttribute("valign"));
if (valign == "top")
cellParams.VAlign = CGroupCell::Top;
@ -5859,7 +5859,7 @@ namespace NLGUI
// Build the form
CGroupHTML::CForm form;
// id check is case sensitive and auto id's are uppercase
form.id = toLower(trim(elm.getAttribute("id")));
form.id = toLowerAscii(trim(elm.getAttribute("id")));
if (form.id.empty())
{
form.id = toString("FORM%d", _Forms.size());
@ -6287,7 +6287,7 @@ namespace NLGUI
{
fromString(httpContent.substr(0, pos), _NextRefreshTime);
pos = toLower(httpContent).find("url=");
pos = toLowerAscii(httpContent).find("url=");
if (pos != string::npos)
_RefreshUrl = getAbsoluteUrl(httpContent.substr(pos + 4));
}

@ -89,7 +89,7 @@ namespace NLGUI
}
}
parent.Children.push_back(CHtmlElement(CHtmlElement::ELEMENT_NODE, toLower((const char*)node->name)));
parent.Children.push_back(CHtmlElement(CHtmlElement::ELEMENT_NODE, toLowerAscii((const char*)node->name)));
CHtmlElement &elm = parent.Children.back();
elm.ID = element_number;
elm.parent = &parent;
@ -109,7 +109,7 @@ namespace NLGUI
elm.Attributes.clear();
for (xmlAttr *cur_attr = node->properties; cur_attr; cur_attr = cur_attr->next) {
std::string key(toLower((const char *)(cur_attr->name)));
std::string key(toLowerAscii((const char *)(cur_attr->name)));
std::string value;
if (cur_attr->children)
{
@ -124,7 +124,7 @@ namespace NLGUI
NLMISC::splitString(elm.getAttribute("class"), " ", parts);
for(uint i = 0; i<parts.size();++i)
{
elm.ClassNames.insert(toLower(trim(parts[i])));
elm.ClassNames.insert(toLowerAscii(trim(parts[i])));
}
}
@ -136,7 +136,7 @@ namespace NLGUI
bool useStyle = true;
if (elm.hasAttribute("media"))
{
std::string media = trim(toLower(elm.Attributes["media"]));
std::string media = trim(toLowerAscii(elm.Attributes["media"]));
useStyle = media.empty() || media.find("all") != std::string::npos || media.find("screen") != std::string::npos;
// <style media="ryzom"> for ingame browser
@ -154,7 +154,7 @@ namespace NLGUI
bool useStyle = true;
if (elm.hasAttribute("media"))
{
std::string media = trim(toLower(elm.Attributes["media"]));
std::string media = trim(toLowerAscii(elm.Attributes["media"]));
useStyle = media.empty() || media.find("all") != std::string::npos || media.find("screen") != std::string::npos;
// <style media="ryzom"> for ingame browser

@ -210,7 +210,7 @@ namespace NLGUI {
{
// max-age=<seconds>; includeSubdomains; preload;
std::vector<std::string> elements;
NLMISC::splitString(toLower(header), ";", elements);
NLMISC::splitString(toLowerAscii(header), ";", elements);
if (elements.empty()) return;
time_t currentTime;

@ -63,7 +63,7 @@ namespace NLGUI
if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr);
ptr = xmlGetProp (cur, (xmlChar*)"type");
string sTmp = toLower(ptr.str());
string sTmp = toLowerAscii(ptr.str());
if (sTmp == "linear")
_Type = Track_Linear;
else if (sTmp == "bezier")

@ -320,7 +320,7 @@ namespace NLGUI
ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" );
if (ptr)
{
string idparent = NLMISC::toLower(ptr.str());
string idparent = NLMISC::toLowerAscii(ptr.str());
if (idparent != "parent")
{
if (parentGroup)

@ -83,7 +83,7 @@ namespace NLGUI
}
else
{
string name = NLMISC::toLower(string((const char*)ptr));
string name = NLMISC::toLowerAscii(string((const char*)ptr));
string value = (string((const char*)val));
_ParamValue[name].init(value);
}
@ -135,7 +135,7 @@ namespace NLGUI
// ***************************************************************************
const CInterfaceOptionValue &CInterfaceOptions::getValue(const string &sParamName) const
{
std::map<std::string, CInterfaceOptionValue>::const_iterator it = _ParamValue.find (toLower(sParamName));
std::map<std::string, CInterfaceOptionValue>::const_iterator it = _ParamValue.find (toLowerAscii(sParamName));
if (it != _ParamValue.end())
return it->second;
else

@ -1369,7 +1369,7 @@ namespace NLGUI
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
if (!ptr) return false;
string stmp2 = toLower(string((const char*)ptr));
string stmp2 = toLowerAscii(string((const char*)ptr));
CInterfaceElement *pEltFound = NULL;
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
@ -1379,7 +1379,7 @@ namespace NLGUI
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
{
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
string stmp = toLowerAscii(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
if (stmp == stmp2)
{
@ -1421,7 +1421,7 @@ namespace NLGUI
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
if (!ptr) return false;
string stmp2 = toLower(string((const char*)ptr));
string stmp2 = toLowerAscii(string((const char*)ptr));
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
CInterfaceElement *pEltFound = NULL;
@ -1431,7 +1431,7 @@ namespace NLGUI
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
{
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
string stmp = toLowerAscii(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
if (stmp == stmp2)
{
pEltFound = pIG;
@ -1615,7 +1615,7 @@ namespace NLGUI
CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" ));
if (!ptr) return false;
string stmp2 = toLower(string((const char*)ptr));
string stmp2 = toLowerAscii(string((const char*)ptr));
std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup();
CInterfaceElement *pEltFound = NULL;
@ -1625,7 +1625,7 @@ namespace NLGUI
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
{
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
string stmp = toLowerAscii(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
if (stmp == stmp2)
{
@ -1693,8 +1693,8 @@ namespace NLGUI
for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j)
{
CInterfaceGroup *pIG = rMG.Group->getGroups()[j];
string stmp = NLMISC::toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
string stmp2 = NLMISC::toLower(string((const char*)ptr));
string stmp = NLMISC::toLowerAscii(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size()));
string stmp2 = NLMISC::toLowerAscii(string((const char*)ptr));
if (stmp == stmp2)
{
pEltFound = pIG;

@ -227,7 +227,7 @@ namespace NLGUI
pos++;
}
unit = toLower(str.substr(pos));
unit = toLowerAscii(str.substr(pos));
if (unit == "%" || unit == "rem" || unit == "em" || unit == "px" || unit == "pt")
{
std::string tmpstr = str.substr(0, pos);
@ -687,7 +687,7 @@ namespace NLGUI
}
// make sure domain is lowercase
chunks[0] = toLower(chunks[0]);
chunks[0] = toLowerAscii(chunks[0]);
if (chunks[0] != domain && chunks[0] != std::string("." + domain))
{

@ -88,7 +88,7 @@ namespace NLGUI
host = authority.substr(2);
// case-insensitive
host = NLMISC::toLower(host);
host = NLMISC::toLowerAscii(host);
pos = host.find(":");
if (pos != npos)

@ -92,43 +92,43 @@ namespace NLGUI
_OffsetY = getY();
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_default");
if (prop) _TxDefault = NLMISC::toLower ((const char *) prop);
if (prop) _TxDefault = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_move_window");
if (prop) _TxMoveWindow = NLMISC::toLower ((const char *) prop);
if (prop) _TxMoveWindow = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BR_TL");
if (prop) _TxResizeBRTL = NLMISC::toLower ((const char *) prop);
if (prop) _TxResizeBRTL = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BL_TR");
if (prop) _TxResizeBLTR = NLMISC::toLower ((const char *) prop);
if (prop) _TxResizeBLTR = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_TB");
if (prop) _TxResizeTB = NLMISC::toLower ((const char *) prop);
if (prop) _TxResizeTB = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_LR");
if (prop) _TxResizeLR = NLMISC::toLower ((const char *) prop);
if (prop) _TxResizeLR = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_rotate");
if (prop) _TxRotate = NLMISC::toLower ((const char *) prop);
if (prop) _TxRotate = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_scale");
if (prop) _TxScale = NLMISC::toLower ((const char *) prop);
if (prop) _TxScale = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_colpick");
if (prop) _TxColPick = NLMISC::toLower ((const char *) prop);
if (prop) _TxColPick = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan");
if (prop) _TxPan = NLMISC::toLower ((const char *) prop);
if (prop) _TxPan = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan");
if (prop) _TxCanPan = NLMISC::toLower ((const char *) prop);
if (prop) _TxCanPan = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan_r2");
if (prop) _TxPanR2 = NLMISC::toLower ((const char *) prop);
if (prop) _TxPanR2 = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan_r2");
if (prop) _TxCanPanR2 = NLMISC::toLower ((const char *) prop);
if (prop) _TxCanPanR2 = NLMISC::toLowerAscii ((const char *) prop);
prop = (char*) xmlGetProp (cur, (xmlChar*)"color");
if (prop) _Color = convertColor(prop);

@ -895,7 +895,7 @@ namespace NLGUI
image.UVMin.V = uvMinV;
image.UVMax.U = uvMaxU;
image.UVMax.V = uvMaxV;
sTGAname = toLower(string(tgaName));
sTGAname = toLowerAscii(string(tgaName));
string::size_type stripPng = sTGAname.find(".png");
if (stripPng != string::npos)
@ -964,11 +964,11 @@ namespace NLGUI
return;
}
// Look if already existing
string sLwrGTName = toLower(sGlobalTextureName);
string sLwrGTName = toLowerAscii(sGlobalTextureName);
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
while (ite != _GlobalTextures.end())
{
if (toLower(ite->Name) == sLwrGTName)
if (toLowerAscii(ite->Name) == sLwrGTName)
break;
ite++;
}
@ -1007,11 +1007,11 @@ namespace NLGUI
return createTextureFromDataURL(sGlobalTextureName, uploadDXTC, bReleasable);
// Look if already existing
string sLwrGTName = toLower(sGlobalTextureName);
string sLwrGTName = toLowerAscii(sGlobalTextureName);
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
while (ite != _GlobalTextures.end())
{
std::string sText = toLower(ite->Name);
std::string sText = toLowerAscii(ite->Name);
if (sText == sLwrGTName)
break;
ite++;
@ -1184,11 +1184,11 @@ namespace NLGUI
*/
NL3D::UTexture *CViewRenderer::getGlobalTexture(const std::string &name)
{
string sLwrGTName = NLMISC::toLower(name);
string sLwrGTName = NLMISC::toLowerAscii(name);
TGlobalTextureList::iterator ite = _GlobalTextures.begin();
while (ite != _GlobalTextures.end())
{
std::string sText = NLMISC::toLower(ite->Name);
std::string sText = NLMISC::toLowerAscii(ite->Name);
if (sText == sLwrGTName)
break;
ite++;
@ -1318,7 +1318,7 @@ namespace NLGUI
return -1;
// convert to lowCase
string nameLwr = toLower(sName);
string nameLwr = toLowerAscii(sName);
string::size_type stripPng = nameLwr.find(".png");
if (stripPng != string::npos)

@ -1250,7 +1250,7 @@ const IPrimitive *IPrimitive::getPrimitive (const std::string &absoluteOrRelativ
childName=path.substr(0,indexStr);
path.erase(0, indexStr);
}
childName=toUpper(childName);
childName=toUpperAscii(childName);
const IPrimitive*child=NULL;
uint childIndex;
for (childIndex=0;childIndex<cursor->getNumChildren();childIndex++)
@ -1259,7 +1259,7 @@ const IPrimitive *IPrimitive::getPrimitive (const std::string &absoluteOrRelativ
nlassert(child);
string name;
if ( child->getPropertyByName("class", name)
&& toUpper(name)==childName )
&& toUpperAscii(name)==childName )
break;
}
if (childIndex>=cursor->getNumChildren())

@ -353,7 +353,7 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode,
// Read the file extension
parameter.FileExtension.clear();
CIXml::getPropertyString (parameter.FileExtension, paramNode, "FILE_EXTENSION");
parameter.FileExtension = toLower(parameter.FileExtension);
parameter.FileExtension = toLowerAscii(parameter.FileExtension);
// Autonaming preference
parameter.Autoname.clear();
@ -362,7 +362,7 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode,
// Read the file extension
parameter.Folder.clear();
CIXml::getPropertyString (parameter.Folder, paramNode, "FOLDER");
parameter.Folder = toLower(parameter.Folder);
parameter.Folder = toLowerAscii(parameter.Folder);
// Read the combo values
for ( xmlNodePtr comboValueNode = CIXml::getFirstChildNode (paramNode, "COMBO_VALUES");
@ -427,7 +427,7 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode,
for (uint i=0; i<files.size (); i++)
{
// Good extension ?
if (toLower(NLMISC::CFile::getExtension (files[i])) != parameter.FileExtension)
if (toLowerAscii(NLMISC::CFile::getExtension (files[i])) != parameter.FileExtension)
continue;
// Add a combo value
@ -438,7 +438,7 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode,
CParameter::CConstStringValue &comboValue = insertResult.first->second;
// Get the filename without extension
string nameWithoutExt = toLower(NLMISC::CFile::getFilenameWithoutExtension (files[i]));
string nameWithoutExt = toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension (files[i]));
// Add the values
comboValue.Values.push_back (nameWithoutExt);

@ -105,13 +105,13 @@ bool CPrimitiveConfigurations::belong (const IPrimitive &primitive) const
for (rules=0; rules<numRules; rules++)
{
const std::pair<std::string, std::string> &pairs = matchGroup.Pairs[rules];
string key = toLower(pairs.second);
string key = toLowerAscii(pairs.second);
// Get the property
string value;
if (primitive.getPropertyByName (pairs.first.c_str(), value))
{
if (toLower(value) == key)
if (toLowerAscii(value) == key)
continue;
}
@ -122,7 +122,7 @@ bool CPrimitiveConfigurations::belong (const IPrimitive &primitive) const
uint i;
for (i=0; i<array->size(); i++)
{
if (toLower((*array)[i]) == key)
if (toLowerAscii((*array)[i]) == key)
break;
}
if (i!=array->size())

@ -128,7 +128,7 @@ void CBigFile::CThreadFileArray::currentThreadFinished()
bool CBigFile::add (const std::string &sBigFileName, uint32 nOptions)
{
// Is already the same bigfile name ?
string bigfilenamealone = toLower(CFile::getFilename (sBigFileName));
string bigfilenamealone = toLowerAscii(CFile::getFilename (sBigFileName));
if (_BNPs.find(bigfilenamealone) != _BNPs.end())
{
nlwarning ("CBigFile::add : bigfile %s already added.", bigfilenamealone.c_str());
@ -315,7 +315,7 @@ bool CBigFile::BNP::readHeader(FILE *file)
BNPFile bnpfTmp;
bnpfTmp.Pos = nFilePos;
bnpfTmp.Size = nFileSize2;
tempMap.insert (make_pair(toLower(string(sFileName)), bnpfTmp));
tempMap.insert (make_pair(toLowerAscii(string(sFileName)), bnpfTmp));
}
else
{
@ -606,7 +606,7 @@ std::string CBigFile::getBigFileName(const std::string &sBigFileName) const
// ***************************************************************************
void CBigFile::list (const std::string &sBigFileName, std::vector<std::string> &vAllFiles)
{
string lwrFileName = toLower(sBigFileName);
string lwrFileName = toLowerAscii(sBigFileName);
if (_BNPs.find (lwrFileName) == _BNPs.end())
return;
vAllFiles.clear ();
@ -639,7 +639,7 @@ struct CBNPFileComp
// ***************************************************************************
bool CBigFile::getFileInternal (const std::string &sFileName, BNP *&zeBnp, BNPFile *&zeBnpFile)
{
string zeFileName, zeBigFileName, lwrFileName = toLower(sFileName);
string zeFileName, zeBigFileName, lwrFileName = toLowerAscii(sFileName);
string::size_type i, nPos = sFileName.find ('@');
if (nPos == string::npos)
{
@ -753,7 +753,7 @@ char *CBigFile::getFileNamePtr(const std::string &sFileName, const std::string &
vector<BNPFile>::iterator itNBPFile;
if (rbnp.Files.empty())
return NULL;
string lwrFileName = toLower(sFileName);
string lwrFileName = toLowerAscii(sFileName);
BNPFile temp_bnp_file;
temp_bnp_file.Name = (char*)lwrFileName.c_str();

@ -465,7 +465,7 @@ void CCommandRegistry::expand (std::string &commandName, NLMISC::CLog &log)
useprefix = false;
}
string lowerCommandName = toLower(commandName);
string lowerCommandName = toLowerAscii(commandName);
// Build the list of matching command names
vector<string> matchingnames;
{
@ -474,7 +474,7 @@ void CCommandRegistry::expand (std::string &commandName, NLMISC::CLog &log)
// list of global commands
for (TCommand::iterator comm = _Commands.begin(); comm != _Commands.end(); comm++)
{
string first = toLower((*comm).first);
string first = toLowerAscii((*comm).first);
if (first.find( lowerCommandName ) == 0)
{
matchingnames.push_back( (*comm).first );
@ -484,7 +484,7 @@ void CCommandRegistry::expand (std::string &commandName, NLMISC::CLog &log)
// list of object instance
for (TCommandsHandlers::TAToBMap::const_iterator it(_CommandsHandlers.getAToBMap().begin()); it != _CommandsHandlers.getAToBMap().end(); ++it)
{
string first = toLower(it->first);
string first = toLowerAscii(it->first);
if (first.find( lowerCommandName ) == 0)
{
matchingnames.push_back( it->first );
@ -506,7 +506,7 @@ void CCommandRegistry::expand (std::string &commandName, NLMISC::CLog &log)
for (TCommandHandlerClassInfo::TCommandsInfo::iterator it(chci._Commands.begin()); it != chci._Commands.end(); ++it)
{
string first = toLower(it->first);
string first = toLowerAscii(it->first);
if (first.find( lowerCommandName ) == 0)
{
matchingnames.push_back( it->first );

@ -577,7 +577,6 @@ uint32 fromHumanReadable (const std::string &str)
return 0;
}
NLMISC_CATEGORISED_COMMAND(nel,stohr, "Convert a second number into an human readable time", "<int>")
{
nlunreferenced(rawCommandString);
@ -594,6 +593,50 @@ NLMISC_CATEGORISED_COMMAND(nel,stohr, "Convert a second number into an human rea
return true;
}
NLMISC_CATEGORISED_COMMAND(nel, toLower, "Convert a string to lowercase", "<string>")
{
nlunreferenced(args);
nlunreferenced(quiet);
nlunreferenced(human);
log.displayNL("%s", toLower(rawCommandString).c_str());
return true;
}
NLMISC_CATEGORISED_COMMAND(nel, toUpper, "Convert a string to uppercase", "<string>")
{
nlunreferenced(args);
nlunreferenced(quiet);
nlunreferenced(human);
log.displayNL("%s", toUpper(rawCommandString).c_str());
return true;
}
NLMISC_CATEGORISED_COMMAND(nel, toLowerAscii, "Convert a string's ascii-characters to lowercase", "<string>")
{
nlunreferenced(args);
nlunreferenced(quiet);
nlunreferenced(human);
log.displayNL("%s", toLowerAscii(rawCommandString).c_str());
return true;
}
NLMISC_CATEGORISED_COMMAND(nel, toUpperAscii, "Convert a string's ascii-characters to uppercase", "<string>")
{
nlunreferenced(args);
nlunreferenced(quiet);
nlunreferenced(human);
log.displayNL("%s", toUpperAscii(rawCommandString).c_str());
return true;
}
#if 0
std::string toLower(const char *str)
@ -739,6 +782,52 @@ void toUpperAscii(char *str, char replacement)
}
}
std::string toLowerAscii(const std::string &str)
{
std::string res;
res.reserve(str.size());
for (std::string::const_iterator it(str.begin()), end(str.end()); it != end; ++it)
{
char c = *it;
if (c >= 'A' && c <= 'Z') res += c + ('a' - 'A');
else res += c;
}
return res;
}
void toLowerAscii(char *str)
{
for (ptrdiff_t i = 0; str[i]; ++i)
{
char c = str[i];
if (c >= 'A' && c <= 'Z') str[i] = c + ('a' - 'A');
else str[i] = c;
}
}
std::string toUpperAscii(const std::string &str)
{
std::string res;
res.reserve(str.size());
for (std::string::const_iterator it(str.begin()), end(str.end()); it != end; ++it)
{
char c = *it;
if (c >= 'a' && c <= 'z') res += c - ('a' - 'A');
else res += c;
}
return res;
}
void toUpperAscii(char *str)
{
for (ptrdiff_t i = 0; str[i]; ++i)
{
char c = str[i];
if (c >= 'a' && c <= 'z') str[i] = c - ('a' - 'A');
else str[i] = c;
}
}
std::string toHexa(const uint8 &b)
{
return toString("%02hhx", b);
@ -1102,7 +1191,7 @@ bool launchProgram(const std::string &programName, const std::string &arguments,
#ifdef NL_OS_MAC
// special OS X case with bundles
if (toLower(CFile::getExtension(programName)) == ".app")
if (toLowerAscii(CFile::getExtension(programName)) == ".app")
{
// we need to open bundles with "open" command
std::string command = NLMISC::toString("open \"%s\"", programName.c_str());
@ -1210,7 +1299,7 @@ bool launchProgramArray (const std::string &programName, const std::vector<std::
#ifdef NL_OS_MAC
// special OS X case with bundles
if (toLower(CFile::getExtension(programName)) == "app")
if (toLowerAscii(CFile::getExtension(programName)) == "app")
{
// we need to open bundles with "open" command
std::string command = NLMISC::toString("open \"%s\"", programName.c_str());

@ -444,7 +444,7 @@ std::string CI18N::getSystemLanguageCode ()
if (lang.size() > 1)
{
// only keep 2 first characters
lang = NLMISC::toLower(lang).substr(0, 2);
lang = NLMISC::toLowerAscii(lang).substr(0, 2);
// language code supported?
if (isLanguageCodeSupported(lang))
@ -466,7 +466,7 @@ bool CI18N::setSystemLanguageCode (const std::string &languageCode)
// be sure supported languages are initialized
initLanguages();
std::string lang = NLMISC::toLower(languageCode);
std::string lang = NLMISC::toLowerAscii(languageCode);
// specified language is really a code (2 characters)
if (lang.length() == 2)
@ -474,7 +474,7 @@ bool CI18N::setSystemLanguageCode (const std::string &languageCode)
// check if language code is supported
for(uint i = 0; i < _LanguageCodes.size(); ++i)
{
std::string code = NLMISC::toLower(_LanguageCodes[i]);
std::string code = NLMISC::toLowerAscii(_LanguageCodes[i]);
if (lang == code)
{
@ -490,7 +490,7 @@ bool CI18N::setSystemLanguageCode (const std::string &languageCode)
// check if language name is supported
for(uint i = 0; i < _LanguageNames.size(); ++i)
{
std::string name = NLMISC::toLower(_LanguageNames[i]);
std::string name = NLMISC::toLowerAscii(_LanguageNames[i]);
if (name == lang)
{

@ -180,7 +180,7 @@ bool CIXml::init (IStream &stream)
header[2] = buffer[2];
header[3] = buffer[3];
header[4] = '\0';
toLower(header);
toLowerAscii(header);
// Does it a xml stream ?
if (strcmp(header, "<?xm"))

@ -334,8 +334,8 @@ void CFileContainer::remapExtension (const string &ext1, const string &ext2, boo
{
nlassert(!_MemoryCompressed);
string ext1lwr = toLower(ext1);
string ext2lwr = toLower(ext2);
string ext1lwr = toLowerAscii(ext1);
string ext2lwr = toLowerAscii(ext2);
if (ext1lwr.empty() || ext2lwr.empty())
{
@ -417,7 +417,7 @@ void CFileContainer::remapFile (const std::string &file1, const std::string &fil
{
if (file1.empty()) return;
if (file2.empty()) return;
_RemappedFiles[toLower(file1)] = toLower(file2);
_RemappedFiles[toLowerAscii(file1)] = toLowerAscii(file2);
}
// ***************************************************************************
@ -497,7 +497,7 @@ string CFileContainer::lookup (const string &filename, bool throwException, bool
// Try to find in the map directories
// If filename contains a path, we get only the filename to look inside paths
string str = CFile::getFilename(toLower(filename));
string str = CFile::getFilename(toLowerAscii(filename));
// Remove end spaces
while ((!str.empty()) && (str[str.size()-1] == ' '))
@ -557,7 +557,7 @@ string CFileContainer::lookup (const string &filename, bool throwException, bool
// try with the remapping
for (uint j = 0; j < _Extensions.size(); j++)
{
if (toLower(CFile::getExtension (str)) == _Extensions[j].second)
if (toLowerAscii(CFile::getExtension (str)) == _Extensions[j].second)
{
string rs = _AlternativePaths[i] + CFile::getFilenameWithoutExtension (filename) + "." + _Extensions[j].first;
if ( CFile::fileExists(rs) )
@ -599,7 +599,7 @@ bool CPath::exists (const std::string &filename)
bool CFileContainer::exists (const std::string &filename)
{
// Try to find in the map directories
string str = toLower(filename);
string str = toLowerAscii(filename);
// Remove end spaces
while ((!str.empty()) && (str[str.size()-1] == ' '))
@ -1215,7 +1215,7 @@ void CFileContainer::addSearchFile (const string &file, bool remap, const string
// now, we have to see extension and insert in the map the remapped files
for (uint i = 0; i < _Extensions.size (); i++)
{
if (_Extensions[i].first == toLower(ext))
if (_Extensions[i].first == toLowerAscii(ext))
{
// need to remap
addSearchFile (newFile, true, _Extensions[i].second, progressCallBack);
@ -1372,7 +1372,7 @@ void CFileContainer::addSearchBigFile (const string &sBigFilename, bool recurse,
NLMISC_BSWAP32(nFilePos);
#endif
string sTmp = toLower(string(FileName));
string sTmp = toLowerAscii(string(FileName));
if (sTmp.empty())
{
nlwarning ("PATH: CPath::addSearchBigFile(%s, %d, %d): can't add empty file, skip it", sBigFilename.c_str(), recurse, alternative);
@ -1380,7 +1380,7 @@ void CFileContainer::addSearchBigFile (const string &sBigFilename, bool recurse,
}
string bigfilenamealone = CFile::getFilename (sBigFilename);
string filenamewoext = CFile::getFilenameWithoutExtension (sTmp);
string ext = toLower(CFile::getExtension(sTmp));
string ext = toLowerAscii(CFile::getExtension(sTmp));
insertFileInMap (sTmp, bigfilenamealone + "@" + sTmp, false, ext);
@ -1438,7 +1438,7 @@ void CFileContainer::addSearchStreamedPackage (const string &filename, bool recu
}
// Add the file itself
std::string packname = NLMISC::toLower(CFile::getFilename(filename));
std::string packname = NLMISC::toLowerAscii(CFile::getFilename(filename));
insertFileInMap(packname, filename, false, CFile::getExtension(filename));
// Add the package to the package manager
@ -1525,7 +1525,7 @@ void CFileContainer::addSearchXmlpackFile (const string &sXmlpackFilename, bool
string packfilenamealone = sXmlpackFilename;
string filenamewoext = CFile::getFilenameWithoutExtension (filenames[i]);
string ext = toLower(CFile::getExtension(filenames[i]));
string ext = toLowerAscii(CFile::getExtension(filenames[i]));
insertFileInMap (filenames[i], packfilenamealone + "@@" + filenames[i], false, ext);
@ -1570,7 +1570,7 @@ void CFileContainer::insertFileInMap (const string &filename, const string &file
{
nlassert(!_MemoryCompressed);
// find if the file already exist
TFiles::iterator it = _Files.find (toLower(filename));
TFiles::iterator it = _Files.find (toLowerAscii(filename));
if (it != _Files.end ())
{
string path = SSMpath.get((*it).second.idPath);
@ -1629,8 +1629,8 @@ void CFileContainer::insertFileInMap (const string &filename, const string &file
fe.idPath = SSMpath.add(sTmp);
fe.Name = filename;
_Files.insert (make_pair(toLower(filename), fe));
NL_DISPLAY_PATH("PATH: CPath::insertFileInMap(%s, %s, %d, %s): added", toLower(filename).c_str(), filepath.c_str(), remap, toLower(extension).c_str());
_Files.insert (make_pair(toLowerAscii(filename), fe));
NL_DISPLAY_PATH("PATH: CPath::insertFileInMap(%s, %s, %d, %s): added", toLowerAscii(filename).c_str(), filepath.c_str(), remap, toLowerAscii(extension).c_str());
}
}
@ -1690,13 +1690,13 @@ void CFileContainer::removeBigFiles(const std::vector<std::string> &bnpFilenames
TFiles::iterator fileIt, fileCurrIt;
for (uint k = 0; k < bnpFilenames.size(); ++k)
{
std::string completeBNPName = toLower(bnpFilenames[k]) + "@";
std::string completeBNPName = toLowerAscii(bnpFilenames[k]) + "@";
if (SSMpath.isAdded(completeBNPName))
{
bnpStrIds.insert(SSMpath.add(completeBNPName));
}
CBigFile::getInstance().remove(bnpFilenames[k]);
fileIt = _Files.find(toLower(bnpFilenames[k]));
fileIt = _Files.find(toLowerAscii(bnpFilenames[k]));
if (fileIt != _Files.end())
{
_Files.erase(fileIt);
@ -1825,7 +1825,7 @@ void CFileContainer::memoryUncompress()
fe.idPath = it->idPath;
fe.Remapped = it->Remapped;
_Files[toLower(CFile::getFilename(fe.Name))] = fe;
_Files[toLowerAscii(CFile::getFilename(fe.Name))] = fe;
}
contReset(_MCFiles);
_MemoryCompressed = false;

@ -226,7 +226,7 @@ bool CSheetId::buildSheetId(const char *sheetName, size_t sheetNameLen)
// When no sheet_id.bin is loaded, use dynamically assigned IDs.
if (_DontHaveSheetKnowledge)
{
std::string sheetNameLc = toLower(sheetName);
std::string sheetNameLc = toLowerAscii(sheetName);
std::map<std::string, uint32>::iterator it = _DevSheetNameToId.find(sheetNameLc);
if (it == _DevSheetNameToId.end())
{
@ -278,7 +278,7 @@ bool CSheetId::buildSheetId(const char *sheetName, size_t sheetNameLen)
c.Ptr = new char[sheetName.size() + 1];
#endif
strcpy(c.Ptr, sheetName);
toLower(c.Ptr);
toLowerAscii(c.Ptr);
itId = _SheetNameToId.find(c);
#ifndef alloca
@ -381,7 +381,7 @@ void CSheetId::loadSheetId()
{
tempVec[nNb].Ptr = _AllStrings.Ptr + nSize;
strcpy(_AllStrings.Ptr + nSize, it->second.c_str());
toLower(_AllStrings.Ptr + nSize);
toLowerAscii(_AllStrings.Ptr + nSize);
nSize += (uint32)it->second.size() + 1;
nNb++;
it++;
@ -422,7 +422,7 @@ void CSheetId::loadSheetId()
if (_FileExtensions[type].empty())
{
// find the file extension part of the given file name
_FileExtensions[type] = toLower(CFile::getExtension((*itStr).second.Ptr));
_FileExtensions[type] = toLowerAscii(CFile::getExtension((*itStr).second.Ptr));
}
nSize--;
}
@ -826,7 +826,7 @@ uint32 CSheetId::typeFromFileExtension(const std::string &fileExtension)
uint i;
for (i = 0; i < _FileExtensions.size(); i++)
if (toLower(fileExtension) == _FileExtensions[i])
if (toLowerAscii(fileExtension) == _FileExtensions[i])
return i;
return std::numeric_limits<uint32>::max();

@ -55,7 +55,7 @@ void CStreamedPackage::CEntry::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
void CStreamedPackage::makePath(std::string &result, const CHashKey &hash)
{
std::string lowerHash = NLMISC::toLower(hash.toString());
std::string lowerHash = NLMISC::toLowerAscii(hash.toString());
result = std::string("/") + lowerHash.substr(0, 2)
+ "/" + lowerHash.substr(2, 2)
+ "/" + lowerHash.substr(4);

@ -41,7 +41,7 @@ bool CStreamedPackageManager::loadPackage(const std::string &package)
{
nldebug("Load package '%s'", package.c_str());
std::string packname = NLMISC::toLower(CFile::getFilename(package));
std::string packname = NLMISC::toLowerAscii(CFile::getFilename(package));
m_Packages[packname] = CStreamedPackage();
std::map<std::string, CStreamedPackage>::iterator it = m_Packages.find(packname);
CStreamedPackage &p = it->second;

@ -90,7 +90,7 @@ bool fromString(const std::string &str, bool &val)
}
else
{
std::string strl = toLower(str);
std::string strl = toLowerAscii(str);
if (strl == "true" || strl == "yes")
{
val = true;

@ -1690,7 +1690,7 @@ bool CSystemInfo::getVideoInfo (std::string &deviceName, uint64 &driverVersion)
}
else
{
string::size_type pos = toLower(keyPath).find ("\\device");
string::size_type pos = toLowerAscii(keyPath).find ("\\device");
if (pos != string::npos)
keyPath = keyPath.substr (0, pos+1);
keyName = "ImagePath";
@ -1703,7 +1703,7 @@ bool CSystemInfo::getVideoInfo (std::string &deviceName, uint64 &driverVersion)
}
// Format the key path
if (toLower(keyPath).find ("\\registry\\machine") == 0)
if (toLowerAscii(keyPath).find ("\\registry\\machine") == 0)
{
keyPath = "HKEY_LOCAL_MACHINE" + keyPath.substr (strlen ("\\registry\\machine"));
}
@ -1733,7 +1733,7 @@ bool CSystemInfo::getVideoInfo (std::string &deviceName, uint64 &driverVersion)
HKEY keyRoot = HKEY_LOCAL_MACHINE;
for (i=0; i<sizeof(rootKeysH)/sizeof(HKEY); i++)
{
if (toUpper(keyPath).find (rootKeys[i]) == 0)
if (toUpperAscii(keyPath).find (rootKeys[i]) == 0)
{
keyPath = keyPath.substr (strlen (rootKeys[i]));
keyRoot = rootKeysH[i];

@ -174,11 +174,11 @@ std::string CUtfStringView::toAscii() const
return res;
}
std::string CUtfStringView::fromAscii(std::string &str)
std::string CUtfStringView::fromAscii(const std::string &str)
{
std::string res;
res.reserve(str.size());
for (std::string::iterator it(str.begin()), end(str.end()); it != end; ++it)
for (std::string::const_iterator it(str.begin()), end(str.end()); it != end; ++it)
{
unsigned char c = *it;
if (c < 0x80)

@ -225,7 +225,7 @@ bool sendEmail (const string &smtpServer, const string &from, const string &to,
formatedBody += "--Multipart_nel\r\n";
formatedBody += "Content-Disposition: attachment;\r\n";
string lext = toLower(ext);
string lext = toLowerAscii(ext);
if(lext == "tga")
{
formatedBody += "Content-Type: image/x-targa;\r\n";

@ -708,7 +708,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
// we create the log with service name filename ("test_service_ALIAS.log" for example)
string logname = LogDirectory.toString() + _LongName;
if (haveArg('N'))
logname += "_" + toLower(getArg('N'));
logname += "_" + toLowerAscii(getArg('N'));
logname += ".log";
fd.setParam (logname, false);
@ -956,7 +956,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
// Load the recording state from the config file
if ((var = ConfigFile.getVarPtr ("Rec")) != NULL)
{
string srecstate = toUpper(var->asString());
string srecstate = toUpperAscii(var->asString());
if ( srecstate == "RECORD" )
{
_RecordingState = CCallbackNetBase::Record;

@ -89,7 +89,7 @@ IAudioDecoder *IAudioDecoder::createAudioDecoder(const std::string &type, NLMISC
return NULL;
}
#else
std::string type_lower = toLower(type);
std::string type_lower = toLowerAscii(type);
if (type_lower == "ogg")
{
return new CAudioDecoderVorbis(stream, loop);
@ -124,7 +124,7 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st
return CAudioDecoderFfmpeg::getInfo(&ifile, artist, title, length);
#else
std::string type = CFile::getExtension(filepath);
std::string type_lower = NLMISC::toLower(type);
std::string type_lower = NLMISC::toLowerAscii(type);
if (type_lower == "ogg")
{

@ -371,7 +371,7 @@ void CAudioMixerUser::init(uint maxTrack, bool useEax, bool useADPCM, IProgressC
/// Initialize the NeL Sound Driver with given driverName.
void CAudioMixerUser::initDriver(const std::string &driverName)
{
std::string dn = NLMISC::toLower(driverName);
std::string dn = NLMISC::toLowerAscii(driverName);
nldebug("AM: Init Driver '%s' ('%s')...", driverName.c_str(), dn.c_str());
ISoundDriver::TDriver driverType;

@ -90,7 +90,7 @@ bool CGroupControllerRoot::isReservedName(const std::string &nodeName)
CGroupController *CGroupControllerRoot::getGroupController(const std::string &path)
{
std::vector<std::string> pathNodes;
NLMISC::splitString(NLMISC::toLower(path), ":", pathNodes);
NLMISC::splitString(NLMISC::toLowerAscii(path), ":", pathNodes);
CGroupController *active = this;
if (pathNodes[0] != NLSOUND_GROUP_CONTROLLER_ROOT_PATH)
{

@ -65,7 +65,7 @@ void CAnimationFX::buildTrack(NL3D::UAnimationSet *as)
nlassert(Sheet != NULL);
if (!as) return;
if (Sheet->TrajectoryAnim.empty()) return;
std::string animName = NLMISC::toLower(Sheet->TrajectoryAnim);
std::string animName = NLMISC::toLowerAscii(Sheet->TrajectoryAnim);
uint id = as->getAnimationIdByName(animName);
NL3D::UAnimation *anim = NULL;
if (id != NL3D::UAnimationSet::NotFound)

@ -84,7 +84,7 @@ void initAutoAnimation()
file.getline(line, 512);
// Read the animation file
string animName = toLower(CFile::getFilenameWithoutExtension(line));
string animName = toLowerAscii(CFile::getFilenameWithoutExtension(line));
uint id = AutoAnimSet->addAnimation (line, animName.c_str ());
if (id == UAnimationSet::NotFound)
{

@ -617,7 +617,7 @@ uint32 CCharacterCL::buildEquipment(const CCharacterSheet::CEquipment &slot, SLO
{
// IS the item a valid one ?
CSheetId itemId;
if(itemId.buildSheetId(NLMISC::toLower(slot.getItem())))
if(itemId.buildSheetId(NLMISC::toLowerAscii(slot.getItem())))
{
// Is it stored in the database ?
CEntitySheet *entitySheet = SheetMngr.get(itemId);
@ -1105,7 +1105,7 @@ string CCharacterCL::automatonType() const // virtual
//-----------------------------------------------
void CCharacterCL::computeAutomaton()
{
_CurrentAutomaton = automatonType() + "_" + NLMISC::toLower(MBEHAV::modeToString(_Mode)) + ".automaton";
_CurrentAutomaton = automatonType() + "_" + NLMISC::toLowerAscii(MBEHAV::modeToString(_Mode)) + ".automaton";
}// computeAutomaton //
@ -10207,11 +10207,11 @@ NLMISC_COMMAND(setNamePosZ, "", "<low/high/normal> <value>")
CRaceStatsSheet *sheet = const_cast<CRaceStatsSheet*>(playerTarget->playerSheet());
if (sheet)
{
if (toLower(args[0]) == "low")
if (toLowerAscii(args[0]) == "low")
namePosZ = &sheet->GenderInfos[playerTarget->getGender()].NamePosZLow;
else if (toLower(args[0]) == "normal")
else if (toLowerAscii(args[0]) == "normal")
namePosZ = &sheet->GenderInfos[playerTarget->getGender()].NamePosZNormal;
else if (toLower(args[0]) == "high")
else if (toLowerAscii(args[0]) == "high")
namePosZ = &sheet->GenderInfos[playerTarget->getGender()].NamePosZHigh;
sheetName = sheet->Id.toString();
@ -10227,11 +10227,11 @@ NLMISC_COMMAND(setNamePosZ, "", "<low/high/normal> <value>")
CCharacterSheet *sheet = const_cast<CCharacterSheet*>(creatureTarget->getSheet());
if (sheet)
{
if (toLower(args[0]) == "low")
if (toLowerAscii(args[0]) == "low")
namePosZ = &sheet->NamePosZLow;
else if (toLower(args[0]) == "normal")
else if (toLowerAscii(args[0]) == "normal")
namePosZ = &sheet->NamePosZNormal;
else if (toLower(args[0]) == "high")
else if (toLowerAscii(args[0]) == "high")
namePosZ = &sheet->NamePosZHigh;
sheetName = sheet->Id.toString();
@ -10258,11 +10258,11 @@ NLMISC_COMMAND(setMyNamePosZ, "", "<low/high/normal> <value>")
CRaceStatsSheet *sheet = const_cast<CRaceStatsSheet*>(UserEntity->playerSheet());
if (sheet)
{
if (toLower(args[0]) == "low")
if (toLowerAscii(args[0]) == "low")
namePosZ = &sheet->GenderInfos[UserEntity->getGender()].NamePosZLow;
else if (toLower(args[0]) == "normal")
else if (toLowerAscii(args[0]) == "normal")
namePosZ = &sheet->GenderInfos[UserEntity->getGender()].NamePosZNormal;
else if (toLower(args[0]) == "high")
else if (toLowerAscii(args[0]) == "high")
namePosZ = &sheet->GenderInfos[UserEntity->getGender()].NamePosZHigh;
sheetName = sheet->Id.toString();

@ -302,7 +302,7 @@ int main(int argc, char **argv)
uint i;
for (i=0; i<files.size(); i++)
{
if (toLower(CFile::getExtension (files[i])) == "ttf")
if (toLowerAscii(CFile::getExtension (files[i])) == "ttf")
CFile::deleteFile (files[i]);
}
}

@ -1440,7 +1440,7 @@ void CClientConfig::setValues()
else if (stricmp(mode, "centeraround") == 0) p.Mode = SSysInfoParam::CenterAround;
else if (stricmp(mode, "around") == 0) p.Mode = SSysInfoParam::Around;
ClientCfg.SystemInfoParams[toLower(sic->asString(2 * k))] = p;
ClientCfg.SystemInfoParams[toLowerAscii(sic->asString(2 * k))] = p;
}
}
}
@ -1863,7 +1863,7 @@ void CClientConfig::setValues()
ClientCfg.HardwareCursors.clear ();
int iSz = pcvHardwareCursors->size();
for (int i = 0; i < iSz; i++)
ClientCfg.HardwareCursors.insert(toLower(pcvHardwareCursors->asString(i)));
ClientCfg.HardwareCursors.insert(toLowerAscii(pcvHardwareCursors->asString(i)));
}
else
{

@ -204,7 +204,7 @@ void CAutomatonStateSheet::build(const NLGEORGES::UFormElm &item, const string &
for(uint mode = 0; mode<MBEHAV::NUMBER_OF_MODES; ++mode)
{
string animset;
animset = NLMISC::toLower(MBEHAV::modeToString((MBEHAV::EMode)mode));
animset = NLMISC::toLowerAscii(MBEHAV::modeToString((MBEHAV::EMode)mode));
if(animset != "unknown_mode")
{
string resultTransition;
@ -495,9 +495,9 @@ void CAutomatonListSheet::build(const NLGEORGES::UFormElm &rootList)
for(uint mode = 0; mode<MBEHAV::NUMBER_OF_MODES; ++mode)
{
// Get the Mode Name
string modeName = NLMISC::toLower(MBEHAV::modeToString((MBEHAV::EMode)mode));
string modeName = NLMISC::toLowerAscii(MBEHAV::modeToString((MBEHAV::EMode)mode));
// Compute the automaton name
string filename = NLMISC::toLower(automatonType) + "_" + modeName + ".automaton";
string filename = NLMISC::toLowerAscii(automatonType) + "_" + modeName + ".automaton";
// Push some information
nlinfo("loading automaton '%s'.", filename.c_str());
// Load the automaton's form.

@ -129,7 +129,7 @@ void CCharacterSheet::readEquipment(const NLGEORGES::UFormElm &form, const strin
string itemName;
if(!form.getValueByName(itemName, string(key + ".Item").c_str() ))
debug(NLMISC::toString("Key '%s.Item' not found.", key.c_str()));
slot.IdItem = ClientSheetsStrings.add(NLMISC::toLower(itemName));
slot.IdItem = ClientSheetsStrings.add(NLMISC::toLowerAscii(itemName));
// Get the texture.
if(!form.getValueByName(slot.Texture, string(key + ".Texture").c_str() ))
@ -221,7 +221,7 @@ void CCharacterSheet::build(const NLGEORGES::UFormElm &item)
std::string right;
item.getValueByName(right, "item_right");
if (!right.empty())
ObjectInRightHand.IdItem = ClientSheetsStrings.add(NLMISC::toLower(right));
ObjectInRightHand.IdItem = ClientSheetsStrings.add(NLMISC::toLowerAscii(right));
}
if (!ObjectInLeftHand.IdItem)
@ -229,7 +229,7 @@ void CCharacterSheet::build(const NLGEORGES::UFormElm &item)
std::string left;
item.getValueByName(left, "item_left");
if (!left.empty())
ObjectInLeftHand.IdItem = ClientSheetsStrings.add(NLMISC::toLower(left));
ObjectInLeftHand.IdItem = ClientSheetsStrings.add(NLMISC::toLowerAscii(left));
}
// Get the animation set Base Name.
@ -239,7 +239,7 @@ void CCharacterSheet::build(const NLGEORGES::UFormElm &item)
if(AnimSetBaseName.empty())
debug("AnimSetBaseName is Empty.");
else
AnimSetBaseName = NLMISC::toLower(AnimSetBaseName); // Force the CASE in UPPER to not be CASE SENSITIVE.
AnimSetBaseName = NLMISC::toLowerAscii(AnimSetBaseName); // Force the CASE in UPPER to not be CASE SENSITIVE.
}
else
debug("Key '3d data.AnimSetBaseName' not found.");
@ -253,7 +253,7 @@ void CCharacterSheet::build(const NLGEORGES::UFormElm &item)
debug("Automaton is Empty.");
// Lower Case
else
Automaton = NLMISC::toLower(Automaton);
Automaton = NLMISC::toLowerAscii(Automaton);
}
// Key not Found
else

@ -180,28 +180,28 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
string IconMain;
if(!item.getValueByName (IconMain, "3d.icon"))
debug("key '3d.icon' not found.");
IconMain = toLower(IconMain);
IconMain = toLowerAscii(IconMain);
IdIconMain = ClientSheetsStrings.add(IconMain);
// Get the icon associated.
string IconBack;
if(!item.getValueByName (IconBack, "3d.icon background"))
debug("key '3d.icon background' not found.");
IconBack = toLower(IconBack);
IconBack = toLowerAscii(IconBack);
IdIconBack = ClientSheetsStrings.add(IconBack);
// Get the icon associated.
string IconOver;
if(!item.getValueByName (IconOver, "3d.icon overlay"))
debug("key '3d.icon overlay' not found.");
IconOver = toLower(IconOver);
IconOver = toLowerAscii(IconOver);
IdIconOver = ClientSheetsStrings.add(IconOver);
// Get the icon associated.
string IconOver2;
if(!item.getValueByName (IconOver2, "3d.icon overlay2"))
debug("key '3d.icon overlay2' not found.");
IconOver2 = toLower(IconOver2);
IconOver2 = toLowerAscii(IconOver2);
IdIconOver2 = ClientSheetsStrings.add(IconOver2);
// Get Special modulate colors
@ -214,7 +214,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
string IconText;
if(!item.getValueByName (IconText, "3d.text overlay"))
debug("key '3d.text overlay' not found.");
IconText = toLower(IconText);
IconText = toLowerAscii(IconText);
IdIconText = ClientSheetsStrings.add(IconText);
// See if this item can be hiden when equipped
@ -242,7 +242,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
debug(toString("The slot name %d is Empty.", i));
// Push the possible slots for the item in the list.
SlotBF|= SINT64_CONSTANT(1)<< (SLOTTYPE::stringToSlotType(NLMISC::toUpper(slotName)));
SlotBF|= SINT64_CONSTANT(1)<< (SLOTTYPE::stringToSlotType(NLMISC::toUpperAscii(slotName)));
}
}
}
@ -261,7 +261,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
}
else
{
Family = (ITEMFAMILY::EItemFamily) ITEMFAMILY::stringToItemFamily(NLMISC::toUpper( family) );
Family = (ITEMFAMILY::EItemFamily) ITEMFAMILY::stringToItemFamily(NLMISC::toUpperAscii( family) );
if(Family == ITEMFAMILY::UNDEFINED)
debug("Item Family Undefined.");
}
@ -275,7 +275,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
}
else
{
ItemType = (ITEM_TYPE::TItemType) ITEM_TYPE::stringToItemType(NLMISC::toUpper(itemtype) );
ItemType = (ITEM_TYPE::TItemType) ITEM_TYPE::stringToItemType(NLMISC::toUpperAscii(itemtype) );
if (ItemType == ITEM_TYPE::UNDEFINED)
debug("Item Type Undefined.");
}
@ -306,7 +306,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
debug("key '3d.anim_set' not found.");
// Force the CASE in UPPER to not be CASE SENSITIVE.
else
AnimSet = NLMISC::toLower(AnimSet);
AnimSet = NLMISC::toLowerAscii(AnimSet);
IdAnimSet = ClientSheetsStrings.add(AnimSet);
// Get the Trail Shape
@ -321,28 +321,28 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
string Effect1;
if(!item.getValueByName(Effect1, "Effects.Effect1"))
debug("key 'Effects.Effect1' not found.");
Effect1 = toLower(Effect1);
Effect1 = toLowerAscii(Effect1);
IdEffect1 = ClientSheetsStrings.add(Effect1);
// Get special Effect2
string Effect2;
if(!item.getValueByName(Effect2, "Effects.Effect2"))
debug("key 'Effects.Effect2' not found.");
Effect2 = toLower(Effect2);
Effect2 = toLowerAscii(Effect2);
IdEffect2 = ClientSheetsStrings.add(Effect2);
// Get special Effect3
string Effect3;
if(!item.getValueByName(Effect3, "Effects.Effect3"))
debug("key 'Effects.Effect3' not found.");
Effect3 = toLower(Effect3);
Effect3 = toLowerAscii(Effect3);
IdEffect3 = ClientSheetsStrings.add(Effect3);
// Get special Effect4
string Effect4;
if(!item.getValueByName(Effect4, "Effects.Effect4"))
debug("key 'Effects.Effect4' not found.");
Effect4 = toLower(Effect4);
Effect4 = toLowerAscii(Effect4);
IdEffect4 = ClientSheetsStrings.add(Effect4);
// Get its bulk

@ -110,28 +110,28 @@ void COutpostBuildingSheet::build(const NLGEORGES::UFormElm &root)
string IconMain;
if(!root.getValueByName (IconMain, "icon"))
debug("key 'icon' not found.");
IconMain = toLower(IconMain);
IconMain = toLowerAscii(IconMain);
IdIconMain = ClientSheetsStrings.add(IconMain);
// Get the icon associated.
string IconBack;
if(!root.getValueByName (IconBack, "icon background"))
debug("key 'icon background' not found.");
IconBack = toLower(IconBack);
IconBack = toLowerAscii(IconBack);
IdIconBack = ClientSheetsStrings.add(IconBack);
// Get the icon associated.
string IconOver;
if(!root.getValueByName (IconOver, "icon overlay"))
debug("key 'icon overlay' not found.");
IconOver = toLower(IconOver);
IconOver = toLowerAscii(IconOver);
IdIconOver = ClientSheetsStrings.add(IconOver);
// Get the icon text associated.
string IconText;
if(!root.getValueByName (IconText, "text overlay"))
debug("key 'text overlay' not found.");
IconText = toLower(IconText);
IconText = toLowerAscii(IconText);
IdIconText = ClientSheetsStrings.add(IconText);
}

@ -74,7 +74,7 @@ void CPlayerSheet::build(const NLGEORGES::UFormElm &item)
debug("Key 'AnimSetBaseName' not found.");
// Force the CASE in UPPER to not be CASE SENSITIVE.
else
AnimSetBaseName = NLMISC::toLower(AnimSetBaseName);
AnimSetBaseName = NLMISC::toLowerAscii(AnimSetBaseName);
// Load Lod character name
if(!item.getValueByName(LodCharacterName, "LodCharacterName"))
@ -240,7 +240,7 @@ void CPlayerSheet::CEquipment::build(const std::string &key,const NLGEORGES::UFo
if(!item.getValueByName(itemName, string(key + ".Item").c_str() ))
debug(NLMISC::toString("Key '%s.Item' not found.", key.c_str()));
else
Item = NLMISC::toLower(itemName);
Item = NLMISC::toLowerAscii(itemName);
// Get the color.
if(!item.getValueByName(Color, string(key + ".Color").c_str() ))

@ -103,7 +103,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
{
string sheetName= Id.toString();
std::string::size_type end= sheetName.find(".sbrick")-2;
BrickFamily = BRICK_FAMILIES::toSBrickFamily ( NLMISC::toUpper(sheetName.substr(0,end)) );
BrickFamily = BRICK_FAMILIES::toSBrickFamily ( NLMISC::toUpperAscii(sheetName.substr(0,end)) );
if(BrickFamily==BRICK_FAMILIES::Unknown)
nlwarning("Unknown Family for SBrick: %s", sheetName.c_str());
}
@ -113,22 +113,22 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
// read icons
string Icon;
root.getValueByName (Icon, "Client.Icon" );
Icon = toLower(Icon);
Icon = toLowerAscii(Icon);
IdIcon = ClientSheetsStrings.add(Icon);
string IconBack;
root.getValueByName (IconBack, "Client.IconBack" );
IconBack = toLower(IconBack);
IconBack = toLowerAscii(IconBack);
IdIconBack = ClientSheetsStrings.add(IconBack);
string IconOver;
root.getValueByName (IconOver, "Client.IconOver" );
IconOver = toLower(IconOver);
IconOver = toLowerAscii(IconOver);
IdIconOver = ClientSheetsStrings.add(IconOver);
string IconOver2;
root.getValueByName (IconOver2, "Client.IconOver2" );
IconOver2 = toLower(IconOver2);
IconOver2 = toLowerAscii(IconOver2);
IdIconOver2 = ClientSheetsStrings.add(IconOver2);
root.getValueByName (IconColor, "Client.IconColor" );
@ -312,7 +312,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
BrickRequiredFlags= 0;
for(i=0;i<Properties.size();i++)
{
string text= NLMISC::toLower(Properties[i].Text);
string text= NLMISC::toLowerAscii(Properties[i].Text);
// If the property is an opening property
const string openingProp[]= { "opening_1:", "opening_2:", "opening_3:" };
@ -381,7 +381,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
for(i=0;i<listBrick.size();i++)
{
CSheetId sheetId;
string str= toLower(listBrick[i]);
string str= toLowerAscii(listBrick[i]);
if(str.find(".sbrick")==string::npos)
str+= ".sbrick";
sheetId.buildSheetId(str);
@ -402,7 +402,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
// **** Magic only: try to get a ResistType against this brick
for(i=0;i<Properties.size();i++)
{
string text= toLower(Properties[i].Text);
string text= toLowerAscii(Properties[i].Text);
// *** If the property is a DamageType
const string dmgTypeProp= "ma_dmg_type:";

@ -134,7 +134,7 @@ uint CColorSlotManager::addSlot(const TStringVect &slotDescs)
_Slots.push_back(slotDescs);
for(uint k = 0; k < slotDescs.size(); ++k)
{
_Slots.back()[k] = NLMISC::toUpper(_Slots.back()[k]);
_Slots.back()[k] = NLMISC::toUpperAscii(_Slots.back()[k]);
}
return (uint)_Slots.size() - 1;
}
@ -266,7 +266,7 @@ bool CColorSlotManager::parseTexName(const char *texName, std::string *texNameWi
static std::string nameToParse;
static std::string currentExt;
static TIntCoupleVect slotsId;
nameToParse = NLMISC::toUpper(NLMISC::CFile::getFilenameWithoutExtension(texName));
nameToParse = NLMISC::toUpperAscii(NLMISC::CFile::getFilenameWithoutExtension(texName));
TStrPos currPos = nameToParse.length();
@ -376,7 +376,7 @@ bool CColorSlotManager::changeTexName(std::string &texName, TIntCouple *slotIDs,
static TIntCoupleVect srcSlotIDs;
everythingOk = true;
texNameNoExt = NLMISC::toUpper(NLMISC::CFile::getFilenameWithoutExtension(texName));
texNameNoExt = NLMISC::toUpperAscii(NLMISC::CFile::getFilenameWithoutExtension(texName));
texExt = NLMISC::CFile::getExtension(texName);
TTex2Slots::const_iterator texIt = _TexMap.find(texNameNoExt);
if (texIt != _TexMap.end())

@ -1090,7 +1090,7 @@ NLMISC_COMMAND(verbose, "Enable/Disable some Debug Information", "none or magic"
}
else
{
std::string type = NLMISC::toLower(args[0]);
std::string type = NLMISC::toLowerAscii(args[0]);
if (type == "none")
Verbose = VerboseNone;
else if(type == "magic")
@ -1424,7 +1424,7 @@ NLMISC_COMMAND(ah, "Launch an action handler", "<ActionHandler> <AHparam>")
if (args.empty())
return false;
if (!ClientCfg.AllowDebugLua && toLower(args[0]) == "lua")
if (!ClientCfg.AllowDebugLua && toLowerAscii(args[0]) == "lua")
{
return false; // not allowed!!
}
@ -1981,7 +1981,7 @@ NLMISC_COMMAND(pos, "Change the position of the user (in local only)", "<x, y, (
if(args.size() == 1)
{
string dest = args[0];
newPos = CTeleport::getPos(NLMISC::toLower(dest));
newPos = CTeleport::getPos(NLMISC::toLowerAscii(dest));
if(newPos == CTeleport::Unknown)
{
//here we try to teleport to a bot destination
@ -5666,7 +5666,7 @@ NLMISC_COMMAND(dumpShapeMaxDist, "dump max dist for shapes", "")
cs->getWholeEquipmentList(equipList);
for (uint k = 0; k < equipList.size(); ++k)
{
std::string item = toLower(equipList[k]->getItem());
std::string item = toLowerAscii(equipList[k]->getItem());
if (!item.empty())
{

@ -306,9 +306,9 @@ void CSoundGlobalMenu::updateSound()
// **** update the music played
// The first music played is the music played at loading, before select char
if (_MusicPlayed.empty())
_MusicPlayed = toLower(LoadingMusic.empty() ? ClientCfg.StartMusic : LoadingMusic);
_MusicPlayed = toLowerAscii(LoadingMusic.empty() ? ClientCfg.StartMusic : LoadingMusic);
if (_MusicWanted.empty())
_MusicWanted = toLower(LoadingMusic.empty() ? ClientCfg.StartMusic : LoadingMusic);
_MusicWanted = toLowerAscii(LoadingMusic.empty() ? ClientCfg.StartMusic : LoadingMusic);
// because music is changed when the player select other race for instance,
// wait the 3D to load (stall some secs)
@ -335,7 +335,7 @@ void CSoundGlobalMenu::updateSound()
void CSoundGlobalMenu::setMusic(const string &music, bool async)
{
_MusicWanted= toLower(music);
_MusicWanted= toLowerAscii(music);
_MusicWantedAsync= async;
// reset the counter
_NbFrameBeforeChange= NbFrameBeforeChangeMax;

@ -528,7 +528,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
// Associate IGs with the ZC number or -1 if there is no ZC.
for(uint i = 0; i<igsWithNames.size(); ++i)
{
string igZone = toLower(CFile::getFilenameWithoutExtension(igsWithNames[i].second));
string igZone = toLowerAscii(CFile::getFilenameWithoutExtension(igsWithNames[i].second));
// Search for the IG name in the ZC list to associate.
for(uint j = 0; j<ZCList.size(); ++j)
@ -538,7 +538,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
if (outpost)
{
// If name matching -> this zone should be a ZC.
string outpostZone = toLower(CFile::getFilenameWithoutExtension(ZCList[j].Name));
string outpostZone = toLowerAscii(CFile::getFilenameWithoutExtension(ZCList[j].Name));
if(igZone == outpostZone)
{
nlctassert(RZ_MAX_BUILDING_PER_OUTPOST==4);
@ -794,7 +794,7 @@ void CContinent::reloadFogMap()
const R2::CScenarioEntryPoints::CCompleteIsland *completeIsland = R2::CScenarioEntryPoints::getInstance().getCompleteIslandFromCoords(CVector2f((float) UserEntity->pos().x, (float) UserEntity->pos().y));
if (completeIsland)
{
std::string islandName = toLower(completeIsland->Island);
std::string islandName = toLowerAscii(completeIsland->Island);
std::string::size_type lastPos = islandName.find_last_of("_");
if (lastPos != std::string::npos)
{

@ -187,7 +187,7 @@ void CContinentManager::preloadSheets()
for (i = 0; i < ws->ContLocs.size(); ++i)
{
const SContLoc &clTmp = ws->ContLocs[i];
std::string continentSheetName = NLMISC::toLower(clTmp.ContinentName);
std::string continentSheetName = NLMISC::toLowerAscii(clTmp.ContinentName);
if (continentSheetName.find(".continent") == std::string::npos)
{
continentSheetName += ".continent";
@ -564,7 +564,7 @@ void CContinentManager::readFrom(xmlNodePtr node)
nlwarning("Ignore landmarks group without 'type' attribute.");
return;
}
lmtype = toLower((const char*)prop);
lmtype = toLowerAscii((const char*)prop);
if (lmtype != "user")
{
nlwarning("Ignore landmarks group with type '%s', expected 'user'.", lmtype.c_str());

@ -248,7 +248,7 @@ void CDoorManager::SDoor::checkToClose()
std::string CDoorManager::transformName (uint /* index */, const std::string &/* instanceName */, const std::string &shapeName)
{
if (shapeName.rfind('.') == string::npos) return shapeName;
string sExt = toLower(shapeName.substr(shapeName.rfind('.')+1,shapeName.size()));
string sExt = toLowerAscii(shapeName.substr(shapeName.rfind('.')+1,shapeName.size()));
if (sExt != "pacs_prim") return shapeName;
return ""; // Do not load a pacs prim as a mesh...
}
@ -265,7 +265,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig)
string sShapeName = ig->getShapeName(k);
if (sShapeName.rfind('.') == string::npos) continue;
string sExt = toLower(sShapeName.substr(sShapeName.rfind('.')+1,sShapeName.size()));
string sExt = toLowerAscii(sShapeName.substr(sShapeName.rfind('.')+1,sShapeName.size()));
if (sExt != "pacs_prim") continue;
// Check if the pacs_prim is a door detection
@ -347,7 +347,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig)
case SDoor::Matis3PartBourgeon:
{
string sDebug = ig->getShapeName(i);
sDebug = toLower(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
sDebug = toLowerAscii(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
if (sDebug == "gauche")
pDoor->Instances[0] = i;
else if (sDebug == "droite")
@ -360,7 +360,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig)
case SDoor::Zorai2Part:
{
string sDebug = ig->getShapeName(i);
sDebug = toLower(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
sDebug = toLowerAscii(sDebug.substr(sDebug.rfind('_')+1,sDebug.size()));
if (sDebug == "gauche")
pDoor->Instances[0] = i;
else if (sDebug == "droite")

@ -205,7 +205,7 @@ void CEntityAnimationManager::load(NLMISC::IProgressCallback &/* progress */, bo
for (uint32 i = 0; i < pASLS->AnimSetList.size(); ++i)
{
CAnimationSet as;
string sTmp = toLower(pASLS->AnimSetList[i].Name);
string sTmp = toLowerAscii(pASLS->AnimSetList[i].Name);
sTmp = sTmp.substr(0,sTmp.rfind('.'));
pair<map<string,CAnimationSet>::iterator, bool> it;
it = _AnimSet.insert(pair<string,CAnimationSet>(sTmp,as));

@ -524,7 +524,7 @@ void CGroundFXManager::update(const NLMISC::CVectorD &camPos)
}
if (!fxName.empty())
{
stdFXName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fxName));
stdFXName = NLMISC::toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(fxName));
}
// is an fx already attached to the entity ?
if (_SortedInstances[k]->HasFX)

@ -50,7 +50,7 @@ void CHairSet::init (NLMISC::IProgressCallback &progress)
if (item->getShape().find("cheveux", 0) != std::string::npos)
{
// get race
std::string itemName = NLMISC::toLower(item->getShape());
std::string itemName = NLMISC::toLowerAscii(item->getShape());
// fortunately, first character of each race is distinct
switch(itemName[0])

@ -200,7 +200,7 @@ void CIGCallback::CIGInstance::instanceGroupAdded()
uint numInstances = _IG->getNumInstance();
for(uint k = 0; k < numInstances; ++k)
{
TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(_IG->getShapeName(k))));
TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(_IG->getShapeName(k))));
if (pbIt != PacsPrims.end())
{
// compute orientation and position

@ -534,7 +534,7 @@ void checkDriverVersion()
uint i;
for (i=0; i< sizeofarray(driversVersion); i++)
{
string lwr = toLower(deviceName);
string lwr = toLowerAscii(deviceName);
if ((lwr.find (driversTest[i])!=string::npos) && (driversNTest[i]==NULL || lwr.find (driversNTest[i])==string::npos))
{
if (driverVersion < driversVersion[i])
@ -1285,7 +1285,7 @@ void prelogInit()
std::string deviceName;
uint64 driverVersion;
CSystemInfo::getVideoInfo(deviceName, driverVersion);
deviceName = NLMISC::toLower(deviceName);
deviceName = NLMISC::toLowerAscii(deviceName);
// for radeon 7200, patch because agp crash with agp with OpenGL -> don't display the message
if (!(Driver->getNbTextureStages() <= 3 && strstr(deviceName.c_str(), "radeon")))
{*/
@ -1496,7 +1496,7 @@ void initBotObjectSelection()
{
// IS the item a valid one ?
CSheetId itemId;
if(itemId.buildSheetId(NLMISC::toLower(strShape)))
if(itemId.buildSheetId(NLMISC::toLowerAscii(strShape)))
{
// Get this item sheet ?
CItemSheet *itemSheet= dynamic_cast<CItemSheet *>(SheetMngr.get(itemId));

@ -233,7 +233,7 @@ struct CStatThread : public NLMISC::IRunnable
name = UserEntity->getEntityName();
std::string userid = toString("u%d", NetMngr.getUserId())+name;
return toUpper(getMD5((const uint8 *)userid.c_str(), (uint32)userid.size()).toString());
return toUpperAscii(getMD5((const uint8 *)userid.c_str(), (uint32)userid.size()).toString());
}
// return true if we sent the connect because we have all information
@ -248,7 +248,7 @@ struct CStatThread : public NLMISC::IRunnable
std::string params;
addParam(params, "ra", randomString());
std::string session = toString("%d%d", NetMngr.getUserId(), CTime::getSecondsSince1970());
addParam(params, "sessioncookie", toUpper(getMD5((const uint8 *)session.c_str(), (uint32)session.size()).toString()));
addParam(params, "sessioncookie", toUpperAscii(getMD5((const uint8 *)session.c_str(), (uint32)session.size()).toString()));
addParam(params, "cookie", cookie());
addParam(params, "browsertoken", "X");
addParam(params, "platformtoken", "Win32");

@ -4601,7 +4601,7 @@ public:
}
std::locale loc("");
const std::collate<char>& coll = std::use_facet<std::collate<char> >(loc);
const std::collate<char>& coll = std::use_facet<std::collate<char> >(loc); // FIXME: Probably does not work
for(uint i = 0; i < nbChilds - 1; ++i)
{

@ -117,7 +117,7 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
if (!rootBrick->Properties.empty())
{
string prop= NLMISC::toUpper(rootBrick->Properties[0].Text);
string prop= NLMISC::toUpperAscii(rootBrick->Properties[0].Text);
vector<string> strList;
splitString(prop, " ", strList);
// The prop Id should be 'FPLAN:'

@ -1692,7 +1692,7 @@ void CBotChatPageTrade::setupFactionPointPrice(bool /* sellMode */, uint default
// setup icon according to pvp clan
CInterfaceManager *pIM= CInterfaceManager::getInstance();
factionName = NLMISC::toLower(factionName);
factionName = NLMISC::toLowerAscii(factionName);
string factionIcon= CWidgetManager::getInstance()->getParser()->getDefine(toString("faction_icon_%s", factionName.c_str()));
CViewBitmap *vBmp= dynamic_cast<CViewBitmap*>(fpGroup->getView("unit_price:item_price:icone"));
if(vBmp) vBmp->setTexture(factionIcon);

@ -450,7 +450,7 @@ void SCharacter3DSetup::setupFromCS_ModelCol (SLOTTYPE::EVisualSlot s, sint32 mo
if (shapeLegs.find("_caster01_") != std::string::npos)
{
std::string tmpName = toLower(Parts[part].Name);
std::string tmpName = toLowerAscii(Parts[part].Name);
std::string::size_type posBottes = tmpName.find("_bottes");

@ -188,7 +188,7 @@ static inline bool isUrlTag(const string &s, string::size_type index, string::si
if (textSize > i + 7)
{
bool isUrl = (toLower(s.substr(i, 7)) == "http://" || toLower(s.substr(i, 8)) == "https://");
bool isUrl = (toLowerAscii(s.substr(i, 7)) == "http://" || toLowerAscii(s.substr(i, 8)) == "https://");
// match "text http://" and not "texthttp://"
if (isUrl && i > 0 && !markdown)
{
@ -425,7 +425,7 @@ CViewBase *CChatTextManager::createMsgTextComplex(const string &msg, NLMISC::CRG
// quickly check if text has links or not
bool hasUrl;
{
string s = toLower(msg);
string s = toLowerAscii(msg);
hasUrl = (s.find("http://") || s.find("https://"));
}

@ -325,29 +325,30 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" );
if (prop)
{
if (NLMISC::toLower(prop.str()) == "item")
std::string lwrProp = NLMISC::toLower(prop.str());
if (lwrProp == "item")
_Type = CCtrlSheetInfo::SheetType_Item;
else if (NLMISC::toLower(prop.str()) == "pact")
else if (lwrProp == "pact")
_Type = CCtrlSheetInfo::SheetType_Pact;
else if (NLMISC::toLower(prop.str()) == "skill")
else if (lwrProp == "skill")
_Type = CCtrlSheetInfo::SheetType_Skill;
else if (NLMISC::toLower(prop.str()) == "auto")
else if (lwrProp == "auto")
_Type = CCtrlSheetInfo::SheetType_Auto;
else if (NLMISC::toLower(prop.str()) == "macro")
else if (lwrProp == "macro")
_Type = CCtrlSheetInfo::SheetType_Macro;
else if (NLMISC::toLower(prop.str()) == "guild_flag")
else if (lwrProp == "guild_flag")
_Type = CCtrlSheetInfo::SheetType_GuildFlag;
else if (NLMISC::toLower(prop.str()) == "mission")
else if (lwrProp == "mission")
_Type = CCtrlSheetInfo::SheetType_Mission;
else if (NLMISC::toLower(prop.str()) == "sbrick")
else if (lwrProp == "sbrick")
_Type = CCtrlSheetInfo::SheetType_SBrick;
else if (NLMISC::toLower(prop.str()) == "sphraseid")
else if (lwrProp == "sphraseid")
_Type = CCtrlSheetInfo::SheetType_SPhraseId;
else if (NLMISC::toLower(prop.str()) == "sphrase")
else if (lwrProp == "sphrase")
_Type = CCtrlSheetInfo::SheetType_SPhrase;
else if (NLMISC::toLower(prop.str()) == "elevator_destination")
else if (lwrProp == "elevator_destination")
_Type = CCtrlSheetInfo::SheetType_ElevatorDestination;
else if (NLMISC::toLower(prop.str()) == "outpost_building")
else if (lwrProp == "outpost_building")
_Type = CCtrlSheetInfo::SheetType_OutpostBuilding;
}
@ -355,7 +356,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" );
if (prop)
{
string TxName = toLower((const char *) prop);
string TxName = toLowerAscii((const char *) prop);
CViewRenderer &rVR = *CViewRenderer::getInstance();
_DispNoSheetBmpId = rVR.getTextureIdFromName (TxName);
}
@ -401,23 +402,23 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_l" );
if (prop)
{
_ListMenuLeft = toLower((const char *) prop);
_ListMenuLeft = toLowerAscii((const char *) prop);
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" );
if (prop)
{
_ListMenuRight = toLower((const char *) prop);
_ListMenuRight = toLowerAscii((const char *) prop);
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r_empty_slot" );
if (prop)
{
_ListMenuRightEmptySlot = toLower((const char *) prop);
_ListMenuRightEmptySlot = toLowerAscii((const char *) prop);
}
// list menu on both clicks
prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_b" );
if (prop)
{
setListMenuBoth(toLower((const char *) prop));
setListMenuBoth(toLowerAscii((const char *) prop));
}
// _BrickTypeBitField
@ -430,7 +431,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
// The string may have multiple brick type separated by |
string brickTypeArray= (const char*)prop;
vector<string> strList;
NLMISC::splitString(NLMISC::toUpper(brickTypeArray), "|", strList);
NLMISC::splitString(NLMISC::toUpperAscii(brickTypeArray), "|", strList);
// Test All words
for(uint i=0;i<strList.size();i++)
@ -456,7 +457,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
if(prop)
{
string str= prop.str();
_ItemSlot= SLOTTYPE::stringToSlotType(NLMISC::toUpper(str));
_ItemSlot= SLOTTYPE::stringToSlotType(NLMISC::toUpperAscii(str));
}
// _AutoGrayed
@ -1893,7 +1894,7 @@ void CDBCtrlSheet::resetCharBitmaps()
void CDBCtrlSheet::setupCharBitmaps(sint32 maxW, sint32 maxLine, sint32 maxWChar, bool topDown)
{
// Use the optString for the Macro name
_OptString = toLower(_OptString);
_OptString = toLowerAscii(_OptString);
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewRenderer &rVR = *CViewRenderer::getInstance();

@ -654,7 +654,7 @@ bool CDBGroupListSheetTrade::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup
prop= (char*) xmlGetProp( cur, (xmlChar*)"filter_seller_type" );
if(prop)
{
string lwrFilter= toLower(std::string((const char *)prop));
string lwrFilter= toLowerAscii(std::string((const char *)prop));
if(lwrFilter=="npc")
_SellerTypeFilter= NPC;
else if(lwrFilter=="resale")

@ -89,7 +89,7 @@ void CCompassTarget::serial(NLMISC::IStream &f)
{
f.serial(Name);
}
std::string language = toLower(ClientCfg.LanguageCode);
std::string language = toLowerAscii(ClientCfg.LanguageCode);
f.serial(language);
f.serialEnum(_Type);
if (_Type == PosTracker)
@ -115,7 +115,7 @@ void CCompassTarget::serial(NLMISC::IStream &f)
// reset the compass to north to avoid incoherency
if (f.isReading())
{
if (toLower(ClientCfg.LanguageCode) != language)
if (toLowerAscii(ClientCfg.LanguageCode) != language)
{
*this = CCompassTarget();
}

@ -2610,9 +2610,7 @@ void CGroupMap::setLandmarkFilter(const std::string &s)
_LandmarkFilter.clear();
if (!s.empty()) {
ucstring ucs;
ucs.fromUtf8(s);
splitUCString(toLower(ucs), ucstring(" "), _LandmarkFilter);
splitUCString(ucstring(toLower(s)), ucstring(" "), _LandmarkFilter);
}
// recreate landmarks
@ -3550,13 +3548,13 @@ std::string CGroupMap::getContinentName() const
{
if (_CurMap == NULL) return "";
return toLower(_CurMap->ContinentName);
return toLowerAscii(_CurMap->ContinentName);
}
//=========================================================================================================
std::string CGroupMap::getMapTexture() const
{
return toLower(_MapTexture);
return toLowerAscii(_MapTexture);
}
//=========================================================================================================

@ -395,7 +395,7 @@ void CGuildManager::update()
string cat = getStringCategory(msg, msg);
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
NLMISC::CRGBA col = CRGBA::Yellow;
it = ClientCfg.SystemInfoParams.find(toLower(cat));
it = ClientCfg.SystemInfoParams.find(toLowerAscii(cat));
if (it != ClientCfg.SystemInfoParams.end())
{
col = it->second.Color;
@ -734,7 +734,7 @@ bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetT
{
LIFT_ICONS::TLiftIcon li = (LIFT_ICONS::TLiftIcon)(icon & UINT64_CONSTANT(0x7FFFFFFFFFFFFFFF));
string str = toLower(LIFT_ICONS::toString(li));
string str = toLowerAscii(LIFT_ICONS::toString(li));
Ctrl->setType(CCtrlSheetInfo::SheetType_Teleport_Location);
Ctrl->setSlot("asc_"+str+".tga");
}

@ -298,7 +298,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name"));
string animName;
if (ptr)
animName = toLower(CFile::getFilenameWithoutExtension(ptr.str()));
animName = toLowerAscii(CFile::getFilenameWithoutExtension(ptr.str()));
if (!animName.empty())
{
@ -1090,7 +1090,7 @@ bool CInterface3DIG::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
if (ptr) _Rot = convertVector(ptr);
ptr = xmlGetProp (cur, (xmlChar*)"name");
if (ptr) _Name = toLower((const char*)ptr);
if (ptr) _Name = toLowerAscii((const char*)ptr);
_IG = UInstanceGroup::createInstanceGroup(_Name);
if (_IG == NULL)
@ -1205,7 +1205,7 @@ std::string CInterface3DIG::getName() const
// ----------------------------------------------------------------------------
void CInterface3DIG::setName (const std::string &ht)
{
string lwrname = toLower(ht);
string lwrname = toLowerAscii(ht);
if (lwrname != _Name)
{
CInterface3DScene *pI3DS = dynamic_cast<CInterface3DScene*>(_Parent);
@ -1253,7 +1253,7 @@ bool CInterface3DShape::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
if (ptr) _Rot = convertVector(ptr);
ptr = xmlGetProp (cur, (xmlChar*)"name");
if (ptr) _Name = toLower((const char*)ptr);
if (ptr) _Name = toLowerAscii((const char*)ptr);
_Instance = dynamic_cast<CInterface3DScene*>(parentGroup)->getScene()->createInstance(_Name);
if (_Instance.empty())
@ -1366,7 +1366,7 @@ void CInterface3DShape::setName (const std::string &ht)
_Name.clear();
}
string lwrname = toLower(ht);
string lwrname = toLowerAscii(ht);
if (lwrname != _Name)
{
CInterface3DScene *pI3DS = dynamic_cast<CInterface3DScene*>(_Parent);
@ -1532,7 +1532,7 @@ bool CInterface3DFX::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
if (ptr) _Rot = convertVector(ptr);
ptr = xmlGetProp (cur, (xmlChar*)"name");
if (ptr) _Name = toLower((const char*)ptr);
if (ptr) _Name = toLowerAscii((const char*)ptr);
return true;
}

@ -2534,7 +2534,7 @@ void CInterfaceManager::displaySystemInfo(const string &str, const string &cat)
CRGBA color = CRGBA::White;
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat));
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(toLowerAscii(cat));
if (it != ClientCfg.SystemInfoParams.end())
{
mode = it->second.Mode;
@ -2569,7 +2569,7 @@ void CInterfaceManager::displaySystemInfo(const string &str, const string &cat)
CRGBA CInterfaceManager::getSystemInfoColor(const std::string &cat)
{
CRGBA col = CRGBA::White;
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat));
map<string, CClientConfig::SSysInfoParam>::const_iterator it = ClientCfg.SystemInfoParams.find(toLowerAscii(cat));
if (it != ClientCfg.SystemInfoParams.end())
col = it->second.Color;
return col;
@ -2988,7 +2988,7 @@ void CInterfaceManager::log(const std::string &str, const std::string &cat)
FILE *f = nlfopen(fileName, "at");
if (f != NULL)
{
const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " (" + NLMISC::toUpper(cat) + ") * " + str;
const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " (" + NLMISC::toUpperAscii(cat) + ") * " + str;
fprintf(f, "%s\n", finalString.c_str());
fclose(f);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save