aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/messages.cpp16
-rwxr-xr-xtools/po2c16
2 files changed, 16 insertions, 16 deletions
diff --git a/common/messages.cpp b/common/messages.cpp
index dde7f1504c..b33e2ab115 100644
--- a/common/messages.cpp
+++ b/common/messages.cpp
@@ -1,6 +1,6 @@
// generated by po2c 1.0.2-scummvm - Do not modify
-static const char * const _po2c_msgids[] = {
+static const char * const _messageIds[] = {
/* 0 */ "",
/* 1 */ " Are you sure you want to quit ? ",
/* 2 */ " Looking for a plugin supporting this gameid... ",
@@ -1012,13 +1012,13 @@ const PoLangEntry _translations[] = {
// code
-static const struct PoMessageEntry *_currentTranslation = NULL;
-static int _currentTranslationMessageEntries = 0;
+static const PoMessageEntry *_currentTranslation = NULL;
+static int _currentTranslationMessageEntryCount = 0;
static const char *_currentTranslationCharset = NULL;
void po2c_setlang(const char *lang) {
_currentTranslation = NULL;
- _currentTranslationMessageEntries = 0;
+ _currentTranslationMessageEntryCount = 0;
_currentTranslationCharset = NULL;
// if lang is NULL or "", deactivate it
@@ -1044,7 +1044,7 @@ void po2c_setlang(const char *lang) {
// if found, count entries
if (_currentTranslation != NULL) {
for (const PoMessageEntry *m = _currentTranslation; m->msgid != -1; ++m)
- ++_currentTranslationMessageEntries;
+ ++_currentTranslationMessageEntryCount;
}
}
@@ -1055,13 +1055,13 @@ const char *po2c_gettext(const char *msgid) {
// binary-search for the msgid
int leftIndex = 0;
- int rightIndex = _currentTranslationMessageEntries - 1;
+ int rightIndex = _currentTranslationMessageEntryCount - 1;
while (rightIndex >= leftIndex) {
const int midIndex = (leftIndex + rightIndex) / 2;
- const struct PoMessageEntry * const m = &_currentTranslation[midIndex];
+ const PoMessageEntry * const m = &_currentTranslation[midIndex];
- const int compareResult = strcmp(msgid, _po2c_msgids[m->msgid]);
+ const int compareResult = strcmp(msgid, _messageIds[m->msgid]);
if (compareResult == 0)
return m->msgstr;
diff --git a/tools/po2c b/tools/po2c
index dddd4541c0..9dbc5e0fb7 100755
--- a/tools/po2c
+++ b/tools/po2c
@@ -111,7 +111,7 @@ for(my $n = 0;$n < scalar(@msgids);$n++)
print "// generated by po2c $VERSION - Do not modify\n\n";
# dump first the msgid array
-print "static const char * const _po2c_msgids[] = {\n";
+print "static const char * const _messageIds[] = {\n";
for(my $n = 0;$n < scalar(@msgids);$n++)
{
@@ -178,13 +178,13 @@ print "\t{ NULL, NULL, NULL }\n};\n\n";
print "// code\n";
print << 'EOF';
-static const struct PoMessageEntry *_currentTranslation = NULL;
-static int _currentTranslationMessageEntries = 0;
+static const PoMessageEntry *_currentTranslation = NULL;
+static int _currentTranslationMessageEntryCount = 0;
static const char *_currentTranslationCharset = NULL;
void po2c_setlang(const char *lang) {
_currentTranslation = NULL;
- _currentTranslationMessageEntries = 0;
+ _currentTranslationMessageEntryCount = 0;
_currentTranslationCharset = NULL;
// if lang is NULL or "", deactivate it
@@ -210,7 +210,7 @@ void po2c_setlang(const char *lang) {
// if found, count entries
if (_currentTranslation != NULL) {
for (const PoMessageEntry *m = _currentTranslation; m->msgid != -1; ++m)
- ++_currentTranslationMessageEntries;
+ ++_currentTranslationMessageEntryCount;
}
}
@@ -221,13 +221,13 @@ const char *po2c_gettext(const char *msgid) {
// binary-search for the msgid
int leftIndex = 0;
- int rightIndex = _currentTranslationMessageEntries - 1;
+ int rightIndex = _currentTranslationMessageEntryCount - 1;
while (rightIndex >= leftIndex) {
const int midIndex = (leftIndex + rightIndex) / 2;
- const struct PoMessageEntry * const m = &_currentTranslation[midIndex];
+ const PoMessageEntry * const m = &_currentTranslation[midIndex];
- const int compareResult = strcmp(msgid, _po2c_msgids[m->msgid]);
+ const int compareResult = strcmp(msgid, _messageIds[m->msgid]);
if (compareResult == 0)
return m->msgstr;