aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohannes Schickel2010-06-24 22:00:45 +0000
committerJohannes Schickel2010-06-24 22:00:45 +0000
commit17a96b3bd2f0c24fdf581aac8cffabb575fd8c82 (patch)
tree534bee5bd8cb7267ad87931ee7562edad6823a86 /tools
parent968e10795ffdf2e17a7ca678ca5e303b0d265795 (diff)
downloadscummvm-rg350-17a96b3bd2f0c24fdf581aac8cffabb575fd8c82.tar.gz
scummvm-rg350-17a96b3bd2f0c24fdf581aac8cffabb575fd8c82.tar.bz2
scummvm-rg350-17a96b3bd2f0c24fdf581aac8cffabb575fd8c82.zip
Yet another slight variable renaming to match our conventions.
svn-id: r50242
Diffstat (limited to 'tools')
-rwxr-xr-xtools/po2c16
1 files changed, 8 insertions, 8 deletions
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;