1
0
Fork 0

Internal messages are overwritten by the language file now.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@440
This commit is contained in:
Sjoerd van der Berg 2002-10-25 21:40:56 +00:00
parent 70d5be8ddb
commit 7149f0611b

View file

@ -40,7 +40,15 @@ struct MessageBlock {
static list<MessageBlock> Lang;
typedef list<MessageBlock>::iterator itmb;
void MSG_Add(const char * _name, const char* _val) {
/* Find the message */
for(itmb tel=Lang.begin();tel!=Lang.end();tel++) {
if((*tel).name==_name) {
return;
}
}
/* Even if the message doesn't exist add it */
Lang.push_back(MessageBlock(_name,_val));
}
@ -55,8 +63,9 @@ void MSG_Replace(const char * _name, const char* _val) {
}
}
/* Even if the message doesn't exist add it */
MSG_Add(_name,_val);
Lang.push_back(MessageBlock(_name,_val));
}
static void LoadMessageFile(const char * fname) {
if (!fname) return;
if(*fname=='\0') return;//empty string=no languagefile