mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Alpha-3 code space for language names
This commit is contained in:
parent
3efdad36b0
commit
6583767d7e
@ -145,8 +145,8 @@ CLangMngr::CLang::CLang(const char *lang)
|
|||||||
{
|
{
|
||||||
m_LookUpTable.clear();
|
m_LookUpTable.clear();
|
||||||
m_entries = 0;
|
m_entries = 0;
|
||||||
strncpy(m_LanguageName, lang, 2);
|
strncpy(m_LanguageName, lang, LANGNAME_LEN - 1);
|
||||||
m_LanguageName[2] = 0;
|
m_LanguageName[LANGNAME_LEN - 1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLangMngr::CLang::AddEntry(int key, const char *definition)
|
void CLangMngr::CLang::AddEntry(int key, const char *definition)
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#define ERR_BADKEY 1 // Lang key not found
|
#define ERR_BADKEY 1 // Lang key not found
|
||||||
#define ERR_BADLANG 2 // Invalid lang
|
#define ERR_BADLANG 2 // Invalid lang
|
||||||
|
|
||||||
|
#define LANGNAME_LEN 4
|
||||||
|
|
||||||
struct sKeyDef
|
struct sKeyDef
|
||||||
{
|
{
|
||||||
ke::AutoString* definition;
|
ke::AutoString* definition;
|
||||||
@ -92,7 +94,7 @@ class CLangMngr : public ITextListener_INI
|
|||||||
typedef THash<int, defentry> LookUpVec;
|
typedef THash<int, defentry> LookUpVec;
|
||||||
typedef LookUpVec::iterator LookUpVecIter;
|
typedef LookUpVec::iterator LookUpVecIter;
|
||||||
|
|
||||||
char m_LanguageName[3];
|
char m_LanguageName[LANGNAME_LEN];
|
||||||
|
|
||||||
// our lookup table
|
// our lookup table
|
||||||
LookUpVec m_LookUpTable;
|
LookUpVec m_LookUpTable;
|
||||||
|
Loading…
Reference in New Issue
Block a user