[sword-cvs] sword/src/modules/genbook/rawgenbook rawgenbook.cpp,1.12,1.13

sword@www.crosswire.org sword@www.crosswire.org
Thu, 15 Jan 2004 20:42:44 -0700


Update of /cvs/core/sword/src/modules/genbook/rawgenbook
In directory www:/tmp/cvs-serv22315/src/modules/genbook/rawgenbook

Modified Files:
	rawgenbook.cpp 
Log Message:
WINCE fixes

Index: rawgenbook.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/genbook/rawgenbook/rawgenbook.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- rawgenbook.cpp	12 Aug 2003 05:36:30 -0000	1.12
+++ rawgenbook.cpp	16 Jan 2004 03:42:42 -0000	1.13
@@ -82,10 +82,10 @@
 	__u32 size = 0;
 
 	TreeKeyIdx *key = 0;
-	try {
+	SWTRY {
 		key = SWDYNAMIC_CAST(TreeKeyIdx, (this->key));
 	}
-	catch ( ... ) {}
+	SWCATCH ( ... ) {}
 
 	if (!key) {
 		key = (TreeKeyIdx *)CreateKey();
@@ -148,10 +148,10 @@
 	TreeKeyIdx *srckey = 0;
 	TreeKeyIdx *key = ((TreeKeyIdx *)this->key);
 	// see if we have a VerseKey * or decendant
-	try {
+	SWTRY {
 		srckey = SWDYNAMIC_CAST(TreeKeyIdx, inkey);
 	}
-	catch ( ... ) {}
+	SWCATCH ( ... ) {}
 	// if we don't have a VerseKey * decendant, create our own
 	if (!srckey) {
 		srckey = (TreeKeyIdx *)CreateKey();
@@ -190,7 +190,7 @@
 		path[strlen(path)-1] = 0;
 
 	sprintf(buf, "%s.bdt", path);
-	unlink(buf);
+	FileMgr::removeFile(buf);
 	fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
 	fd->getFd();
 	FileMgr::systemFileMgr.close(fd);