[sword-cvs] sword/src/modules/filters gbfosis.cpp,1.17,1.18 thmlosis.cpp,1.25,1.26 utf8transliterator.cpp,1.31,1.32

sword@www.crosswire.org sword@www.crosswire.org
Fri, 6 Feb 2004 14:01:04 -0700


Update of /cvs/core/sword/src/modules/filters
In directory www:/tmp/cvs-serv27118/src/modules/filters

Modified Files:
	gbfosis.cpp thmlosis.cpp utf8transliterator.cpp 
Log Message:
	Changed system[Log|File|Locale]Mgr to
		*Mgr *[get|set]System*Mgr() per Daniel Glassey's
		discovery of potential problems from order of
		initializing statics.

	Added new prefix recognition for OSIS lemma prefix
		"strong:"



Index: gbfosis.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/gbfosis.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- gbfosis.cpp	27 Jun 2003 06:13:16 -0000	1.17
+++ gbfosis.cpp	6 Feb 2004 21:01:02 -0000	1.18
@@ -271,7 +271,7 @@
 
 			if (!keepToken) {	
 				if (!handled) {
-					SWLog::systemlog->LogError("Unprocessed Token: <%s>", token);
+					SWLog::getSystemLog()->LogError("Unprocessed Token: <%s>", token);
 //					exit(-1);
 				}
 				if (from[1] && strchr(" ,;.:?!()'\"", from[1])) {
@@ -346,7 +346,7 @@
 //						sprintf(ref, "\t</div>");
 //						pushString(&to, ref);
 						if (!quoteStack.empty()) {
-							SWLog::systemlog->LogError("popping unclosed quote at end of book");
+							SWLog::getSystemlog()->LogError("popping unclosed quote at end of book");
 							quoteStack.clear();
 						}
 					}

Index: thmlosis.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlosis.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- thmlosis.cpp	27 Jun 2003 06:13:16 -0000	1.25
+++ thmlosis.cpp	6 Feb 2004 21:01:02 -0000	1.26
@@ -273,7 +273,7 @@
 
 			if (!keepToken) {	// if we don't want strongs
 				if (!handled) {
-					SWLog::systemlog->LogError("Unprocessed Token: <%s>", token);
+					SWLog::getSystemLog()->logError("Unprocessed Token: <%s>", token);
 //					exit(-1);
 				}
 				if (strchr(" ,:;.?!()'\"", from[1])) {

Index: utf8transliterator.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/utf8transliterator.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- utf8transliterator.cpp	26 Sep 2003 20:29:57 -0000	1.31
+++ utf8transliterator.cpp	6 Feb 2004 21:01:02 -0000	1.32
@@ -137,8 +137,8 @@
 	UResourceBundle *bundle, *transIDs, *colBund;
 	bundle = ures_openDirect(SW_RESDATA, translit_swordindex, &status);
 	if (U_FAILURE(status)) {
-		SWLog::systemlog->LogError("no resource index to load");
-		SWLog::systemlog->LogError("status %s", u_errorName(status));
+		SWLog::getSystemLog()->logError("no resource index to load");
+		SWLog::getSystemLog()->logError("status %s", u_errorName(status));
 		return;
 	}
 
@@ -155,7 +155,7 @@
 				UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
                         	UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
 				UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
-                        	SWLog::systemlog->LogInformation("ok so far");
+                        	SWLog::getSystemLog()->logInformation("ok so far");
 
 				 if (U_SUCCESS(status)) {
 					switch (type) {
@@ -170,9 +170,9 @@
 								0x0046 /*F*/) ?
 								UTRANS_FORWARD : UTRANS_REVERSE;
 		                                        //registry->put(id, resString, dir, visible);
-							SWLog::systemlog->LogInformation("instantiating %s ...", resString.getBuffer());
+							SWLog::getSystemLog()->logInformation("instantiating %s ...", resString.getBuffer());
 					    		registerTrans(id, resString, dir, status);
-							SWLog::systemlog->LogInformation("done.");
+							SWLog::getSystemLog()->logInformation("done.");
 	                                	}
 						break;
 					case 0x61: // 'a'
@@ -181,16 +181,16 @@
                                 		break;
 					}
         	                 }
-                	         else SWLog::systemlog->LogError("Failed to get resString");
+                	         else SWLog::getSystemLog()->logError("Failed to get resString");
 	                }
-			else SWLog::systemlog->LogError("Failed to get row");
+			else SWLog::getSystemLog()->logError("Failed to get row");
 			ures_close(colBund);
 		}
 	}
 	else
 	{
-		SWLog::systemlog->LogError("no resource index to load");
-		SWLog::systemlog->LogError("status %s", u_errorName(status));
+		SWLog::getSystemLog()->logError("no resource index to load");
+		SWLog::getSystemLog()->logError("status %s", u_errorName(status));
 	}
 
 	ures_close(transIDs);
@@ -203,7 +203,7 @@
 		UTransDirection dir, UErrorCode &status )
 {
 #ifndef _ICUSWORD_
-		SWLog::systemlog->LogInformation("registering ID locally %s", ID.getBuffer());
+		SWLog::getSystemLog()->logInformation("registering ID locally %s", ID.getBuffer());
 		SWTransData swstuff;
 		swstuff.resource = resource;
 		swstuff.dir = dir;
@@ -221,7 +221,7 @@
 		if (!U_FAILURE(status))
 		{
 			// already have it, clean up and return true
-			SWLog::systemlog->LogInformation("already have it %s", ID.getBuffer());
+			SWLog::getSystemLog()->logInformation("already have it %s", ID.getBuffer());
 			delete trans;
 			return true;
 		}
@@ -230,13 +230,13 @@
 	SWTransMap::iterator swelement;
 	if ((swelement = transMap.find(ID)) != transMap.end())
 	{
-		SWLog::systemlog->LogInformation("found element in map");
+		SWLog::getSystemLog()->logInformation("found element in map");
 		SWTransData swstuff = (*swelement).second;
 		UParseError parseError;
 		//UErrorCode status;
 		//std::cout << "unregistering " << ID << std::endl;
 		//Transliterator::unregister(ID);
-		SWLog::systemlog->LogInformation("resource is %s", swstuff.resource.getBuffer());
+		SWLog::getSystemLog()->logInformation("resource is %s", swstuff.resource.getBuffer());
 
 		// Get the rules
 		//std::cout << "importing: " << ID << ", " << resource << std::endl;
@@ -247,8 +247,8 @@
 		//parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
 		//        parseError, status);
 		if (U_FAILURE(status)) {
-			SWLog::systemlog->LogError("Failed to get rules");
-			SWLog::systemlog->LogError("status %s", u_errorName(status));
+			SWLog::getSystemLog()->logError("Failed to get rules");
+			SWLog::getSystemLog()->logError("status %s", u_errorName(status));
 			return false;
 		}
 
@@ -256,14 +256,14 @@
 		Transliterator *trans = Transliterator::createFromRules(ID, rules, swstuff.dir,
 			parseError,status);
 		if (U_FAILURE(status)) {
-			SWLog::systemlog->LogError("Failed to create transliterator");
-			SWLog::systemlog->LogError("status %s", u_errorName(status));
-			SWLog::systemlog->LogError("Parse error: line %s", parseError.line);
-			SWLog::systemlog->LogError("Parse error: offset %d", parseError.offset);
-			SWLog::systemlog->LogError("Parse error: preContext %s", *parseError.preContext);
-			SWLog::systemlog->LogError("Parse error: postContext %s", *parseError.postContext);
-			SWLog::systemlog->LogError("rules were");
-//			SWLog::systemlog->LogError((const char *)rules);
+			SWLog::getSystemLog()->logError("Failed to create transliterator");
+			SWLog::getSystemLog()->logError("status %s", u_errorName(status));
+			SWLog::getSystemLog()->logError("Parse error: line %s", parseError.line);
+			SWLog::getSystemLog()->logError("Parse error: offset %d", parseError.offset);
+			SWLog::getSystemLog()->logError("Parse error: preContext %s", *parseError.preContext);
+			SWLog::getSystemLog()->logError("Parse error: postContext %s", *parseError.postContext);
+			SWLog::getSystemLog()->logError("rules were");
+//			SWLog::getSystemLog()->logError((const char *)rules);
 			return false;
 		}