[sword-cvs] sword/include localemgr.h,1.16,1.17 swbuf.h,1.27,1.28 swkey.h,1.24,1.25

sword@www.crosswire.org sword@www.crosswire.org
Thu, 5 Feb 2004 03:24:38 -0700


Update of /cvs/core/sword/include
In directory www:/tmp/cvs-serv27385/include

Modified Files:
	localemgr.h swbuf.h swkey.h 
Log Message:

dglassey: change systemLocaleMgr to a function that returns the static object


Index: localemgr.h
===================================================================
RCS file: /cvs/core/sword/include/localemgr.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- localemgr.h	5 Jul 2003 04:58:42 -0000	1.16
+++ localemgr.h	5 Feb 2004 10:24:36 -0000	1.17
@@ -56,8 +56,9 @@
 	LocaleMap *locales;
 
 public:
+
 	/** Default constructor of  LocaleMgr
-	* You do normally not need this constructor, use LocaleMgr::systemLocaleMgr instead.
+	* You do normally not need this constructor, use LocaleMgr::systemLocaleMgr() instead.
 	*/
 	LocaleMgr(const char *iConfigPath = 0);
 
@@ -103,8 +104,7 @@
 	/** The LocaleMgr object used globally in the Sword world.
 	* Do not create your own LocaleMgr, use this static object instead.
 	*/
-	static LocaleMgr systemLocaleMgr;
-
+	static LocaleMgr& systemLocaleMgr();
 
 	/** Augment this localmgr with all locale.conf files in a directory
 	*/

Index: swbuf.h
===================================================================
RCS file: /cvs/core/sword/include/swbuf.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- swbuf.h	21 Dec 2003 10:57:35 -0000	1.27
+++ swbuf.h	5 Feb 2004 10:24:36 -0000	1.28
@@ -43,7 +43,7 @@
 	static char *nullStr;
 	static char junkBuf[JUNKBUFSIZE];
 
-	inline void assureMore(unsigned long pastEnd) {
+	inline void assureMore(signed long pastEnd) {
 		if (endAlloc-end < pastEnd) {
 			long newsize = (end-buf)+pastEnd;
 			allocSize = newsize + 16;

Index: swkey.h
===================================================================
RCS file: /cvs/core/sword/include/swkey.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- swkey.h	28 Feb 2003 13:12:43 -0000	1.24
+++ swkey.h	5 Feb 2004 10:24:36 -0000	1.25
@@ -191,7 +191,7 @@
 	* const char* randomVerse() {
 	*   VerseKey vk;
 	*   SWMgr mgr;
-	*   LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");
+	*   LocaleMgr::systemLocaleMgr().setDefaultLocaleName("de");
 	*
 	*   SWModule* module = mgr->Modules("GerLut");
 	*   srand( time(0) );