[Scummvm-cvs-logs] SF.net SVN: scummvm:[50242] scummvm/trunk

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jun 25 00:00:45 CEST 2010


Revision: 50242
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50242&view=rev
Author:   lordhoto
Date:     2010-06-24 22:00:45 +0000 (Thu, 24 Jun 2010)

Log Message:
-----------
Yet another slight variable renaming to match our conventions.

Modified Paths:
--------------
    scummvm/trunk/common/messages.cpp
    scummvm/trunk/tools/po2c

Modified: scummvm/trunk/common/messages.cpp
===================================================================
--- scummvm/trunk/common/messages.cpp	2010-06-24 22:00:20 UTC (rev 50241)
+++ scummvm/trunk/common/messages.cpp	2010-06-24 22:00:45 UTC (rev 50242)
@@ -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 @@
 
 // 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 @@
 	// if found, count entries
 	if (_currentTranslation != NULL) {
 		for (const PoMessageEntry *m = _currentTranslation; m->msgid != -1; ++m)
-			++_currentTranslationMessageEntries;
+			++_currentTranslationMessageEntryCount;
 	}
 }
 
@@ -1055,13 +1055,13 @@
 
 	// 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;

Modified: scummvm/trunk/tools/po2c
===================================================================
--- scummvm/trunk/tools/po2c	2010-06-24 22:00:20 UTC (rev 50241)
+++ scummvm/trunk/tools/po2c	2010-06-24 22:00:45 UTC (rev 50242)
@@ -111,7 +111,7 @@
 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 "// 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 @@
 	// if found, count entries
 	if (_currentTranslation != NULL) {
 		for (const PoMessageEntry *m = _currentTranslation; m->msgid != -1; ++m)
-			++_currentTranslationMessageEntries;
+			++_currentTranslationMessageEntryCount;
 	}
 }
 
@@ -221,13 +221,13 @@
 
 	// 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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list