[sword-cvs] biblecs biblecsmgr.cpp,1.22,1.23 mainfrm.cpp,1.128,1.129 mainfrm.h,1.47,1.48 optionfrm.cpp,1.35,1.36 sword.bpr,1.132,1.133 sword.res,1.119,1.120 vrslstfrm.cpp,1.15,1.16

sword@www.crosswire.org sword@www.crosswire.org
Fri, 6 Feb 2004 15:02:13 -0700


Update of /cvs/core/biblecs
In directory www:/tmp/cvs-serv28318

Modified Files:
	biblecsmgr.cpp mainfrm.cpp mainfrm.h optionfrm.cpp sword.bpr 
	sword.res vrslstfrm.cpp 
Log Message:
Fixed to compile against new system calls

Index: biblecsmgr.cpp
===================================================================
RCS file: /cvs/core/biblecs/biblecsmgr.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- biblecsmgr.cpp	27 Jun 2003 11:31:41 -0000	1.22
+++ biblecsmgr.cpp	6 Feb 2004 22:02:11 -0000	1.23
@@ -85,10 +85,10 @@
 	
 	ModInstFrm->ShowModal();
 
-	logflag = SWLog::systemlog->getLogLevel();
-	SWLog::systemlog->setLogLevel(0);
+	logflag = SWLog::getSystemLog()->getLogLevel();
+	SWLog::getSystemLog()->setLogLevel(0);
 	retval = SWMgr::AddModToConfig(conffd, fname);
-	SWLog::systemlog->setLogLevel(logflag);
+	SWLog::getSystemLog()->setLogLevel(logflag);
 
 	return retval;
 }

Index: mainfrm.cpp
===================================================================
RCS file: /cvs/core/biblecs/mainfrm.cpp,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- mainfrm.cpp	24 Dec 2003 22:29:02 -0000	1.128
+++ mainfrm.cpp	6 Feb 2004 22:02:11 -0000	1.129
@@ -131,7 +131,7 @@
 	optionsconf = new SWConfig("./options.conf");
 
 	// add our ui locale info to sword's system localemgr
-	LocaleMgr::systemLocaleMgr.loadConfigDir("./uilocales.d");
+	LocaleMgr::getSystemLocaleMgr()->loadConfigDir("./uilocales.d");
 
 	Lookup->Text = "[ SWORD DDE Lookup ]";
 	Search->Text = "[ SWORD DDE Search ]";
@@ -719,7 +719,7 @@
 
 
 void TForm1::i12ize(const char *lang) {
-	LocaleMgr::systemLocaleMgr.setDefaultLocaleName(lang);
+	LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(lang);
 	// TODO 5 -cConfiguration Ops -oScribe: add mainmgr->configpath, or something, to beginning of these image names ???
 	AnsiString tmp;
 	Graphics::TBitmap *bitmap = 0;
@@ -1015,12 +1015,10 @@
 
 	logmodstate = true;
 	freshdict   = true;
-	if (SWLog::systemlog)
-		delete SWLog::systemlog;
-	SWLog::systemlog = new SWWinLog(this->Handle);		// set the system logger to our MSWindows specific SWLog class
+	SWLog::setSystemLog(new SWWinLog(this->Handle));		// set the system logger to our MSWindows specific SWLog class
 	tmpval = optionsconf->Sections["System"]["MaxFiles"];
 	if ((maxFiles = atoi(tmpval.c_str()))) {
-		FileMgr::systemFileMgr.maxFiles = maxFiles;
+		FileMgr::getSystemFileMgr()->maxFiles = maxFiles;
 	}
 
 	tmpval = optionsconf->Sections["General"]["DevsAsDicts"];

Index: mainfrm.h
===================================================================
RCS file: /cvs/core/biblecs/mainfrm.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mainfrm.h	27 Jun 2003 11:31:41 -0000	1.47
+++ mainfrm.h	6 Feb 2004 22:02:11 -0000	1.48
@@ -53,7 +53,7 @@
 #include <vector>
 
 //#define _tr(text) UTF8ToWideString(LocaleMgr::systemLocaleMgr.translate(text))
-#define _tr(text) LocaleMgr::systemLocaleMgr.translate(text)
+#define _tr(text) LocaleMgr::getSystemLocaleMgr()->translate(text)
 #define MONITOR_CENTER     0x0001        // center rect to monitor
 #define MONITOR_CLIP     0x0000        // clip rect to monitor
 #define MONITOR_WORKAREA 0x0002        // use monitor work area

Index: optionfrm.cpp
===================================================================
RCS file: /cvs/core/biblecs/optionfrm.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- optionfrm.cpp	27 Jun 2003 11:31:41 -0000	1.35
+++ optionfrm.cpp	6 Feb 2004 22:02:11 -0000	1.36
@@ -54,11 +54,11 @@
 	localeCB->Clear();
 	localeCB->Items->AddObject(defaultLocaleDescription, (TObject *)defaultLocaleName);
 
-	locales = LocaleMgr::systemLocaleMgr.getAvailableLocales();
+	locales = LocaleMgr::getSystemLocaleMgr()->getAvailableLocales();
 
 	for (list<SWBuf>::iterator it = locales.begin(); it != locales.end(); it++) {
-		const char *name       = LocaleMgr::systemLocaleMgr.getLocale(it->c_str())->getName();
-		const char *description = LocaleMgr::systemLocaleMgr.getLocale(it->c_str())->getDescription();
+		const char *name       = LocaleMgr::getSystemLocaleMgr()->getLocale(it->c_str())->getName();
+		const char *description = LocaleMgr::getSystemLocaleMgr()->getLocale(it->c_str())->getDescription();
 		localeCB->Items->AddObject(description, (TObject *)name);
 	}
 	localeCB->ItemIndex = 0;
@@ -739,8 +739,8 @@
 	if (!stricmp(tmpval.c_str(), "Devotional"))
 		Optionsfrm->devSplashCB->Checked = true;
 
-	const char *localeName = LocaleMgr::systemLocaleMgr.getDefaultLocaleName();
-	SWLocale *defLocale = LocaleMgr::systemLocaleMgr.getLocale(localeName);
+	const char *localeName = LocaleMgr::getSystemLocaleMgr()->getDefaultLocaleName();
+	SWLocale *defLocale = LocaleMgr::getSystemLocaleMgr()->getLocale(localeName);
 	Optionsfrm->localeCB->ItemIndex = Optionsfrm->localeCB->Items->IndexOf((defLocale)?defLocale->getDescription():"English (US)");
 
 	tmpval = ((eit = config->Sections["ModDefaults"].find("GreekDef")) != config->Sections["ModDefaults"].end())? (*eit).second : (SWBuf)"";

Index: sword.bpr
===================================================================
RCS file: /cvs/core/biblecs/sword.bpr,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- sword.bpr	21 Jan 2004 01:28:44 -0000	1.132
+++ sword.bpr	6 Feb 2004 22:02:11 -0000	1.133
@@ -56,7 +56,7 @@
       -I..\..\..\..\..\icu-sword\source\i18n -I..\..\..\..\include 
       -I$(BCB)\include -I$(BCB)\include\vcl -Irxlib -src_suffix cpp -D_ICU_ 
       -D_ICUSWORD_ -DUSBINARY -D_DEBUG -DU_HAVE_PLACEMENT_NEW=0"/>
-    <CFLAG1 value="-Od -Vx -X- -r- -a8 -4 -b- -k -y -v -vi- -c -tW -tWM"/>
+    <CFLAG1 value="-vGc -vGt -vGd -Od -Vx -X- -r- -a8 -4 -b- -k -y -v -vi- -c -tW -tWM"/>
     <PFLAGS value="-N2obj -N0obj -$Y+ -$W -$O- -v -M -JPHNE"/>
     <RFLAGS value=""/>
     <AFLAGS value="/mx /w2 /zi"/>
@@ -65,7 +65,7 @@
   <LINKER>
     <ALLOBJ value="c0w32.obj $(OBJFILES)"/>
     <ALLRES value="$(RESFILES)"/>
-    <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
+    <ALLLIB value="cg32.lib $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
   </LINKER>
   <IDEOPTIONS>
 [Version Info]
@@ -172,7 +172,7 @@
 [Compiler]
 ShowInfoMsgs=0
 LinkDebugVcl=0
-LinkCGLIB=0
+LinkCGLIB=1
 
 [Language]
 ActiveLang=

Index: sword.res
===================================================================
RCS file: /cvs/core/biblecs/sword.res,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
Binary files /tmp/cvsmqTcqv and /tmp/cvsMWUR3V differ

Index: vrslstfrm.cpp
===================================================================
RCS file: /cvs/core/biblecs/vrslstfrm.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- vrslstfrm.cpp	5 Jul 2003 01:16:46 -0000	1.15
+++ vrslstfrm.cpp	6 Feb 2004 22:02:11 -0000	1.16
@@ -159,7 +159,7 @@
 		}
 		FileDesc *fd;
 		unlink(VLSaveDialog->FileName.c_str());
-		fd = FileMgr::systemFileMgr.open(VLSaveDialog->FileName.c_str(), O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
+		fd = FileMgr::getSystemFileMgr()->open(VLSaveDialog->FileName.c_str(), O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
 		ListKey verses;
 		for (int i = 0; i < ListBox1->Items->Count; i++) {
 			VerseKey toEn;
@@ -170,7 +170,7 @@
 		}
 		const char *rangeText = verses.getRangeText();
 		write(fd->getFd(), rangeText, strlen(rangeText));
-		FileMgr::systemFileMgr.close(fd);
+		FileMgr::getSystemFileMgr()->close(fd);
 	}
 }
 //---------------------------------------------------------------------------
@@ -184,7 +184,7 @@
 			return;
 		}
 		FileDesc *fd;
-		fd = FileMgr::systemFileMgr.open(VLOpenDialog->FileName.c_str(), O_RDONLY|O_BINARY);
+		fd = FileMgr::getSystemFileMgr()->open(VLOpenDialog->FileName.c_str(), O_RDONLY|O_BINARY);
 		ListKey verses;
 		VerseKey parser;
 		long size = lseek(fd->getFd(), 0, SEEK_END);
@@ -192,7 +192,7 @@
 		char *buf = new char[size+5];
 		memset(buf, 0, size+5);
 		read(fd->getFd(), buf, size);
-		FileMgr::systemFileMgr.close(fd);
+		FileMgr::getSystemFileMgr()->close(fd);
 		verses = parser.ParseVerseList(buf, parser, false);
 		fillWithVerseList(verses);
 		delete [] buf;