From 17a96b3bd2f0c24fdf581aac8cffabb575fd8c82 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 24 Jun 2010 22:00:45 +0000 Subject: Yet another slight variable renaming to match our conventions. svn-id: r50242 --- tools/po2c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools') 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; -- cgit v1.2.3