[sword-svn] r1872 - in trunk: . include src/mgr src/modules/filters
src/modules/texts/rawtext utilities
scribe at crosswire.org
scribe at crosswire.org
Sat Dec 17 16:45:11 MST 2005
Author: scribe
Date: 2005-12-17 16:45:01 -0700 (Sat, 17 Dec 2005)
New Revision: 1872
Modified:
trunk/ChangeLog
trunk/include/swsearchable.h
trunk/src/mgr/swsearchable.cpp
trunk/src/modules/filters/osishtmlhref.cpp
trunk/src/modules/filters/osisrtf.cpp
trunk/src/modules/filters/osisstrongs.cpp
trunk/src/modules/filters/thmlosis.cpp
trunk/src/modules/texts/rawtext/rawtext.cpp
trunk/utilities/imp2gbs.cpp
trunk/utilities/osis2mod.cpp
Log:
Added necessary header files, removed other unnecessary ones
Cleaned up some variable naming conventions
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/ChangeLog 2005-12-17 23:45:01 UTC (rev 1872)
@@ -1,7 +1,7 @@
API ChangeLog (see the ChangeLog in each 'apps' directory for
app specific changes
-19-Nov-2005 Troy A. Griffitts <scribe at crosswire.org>
+28-Nov-2005 Troy A. Griffitts <scribe at crosswire.org>
Fixed ICUStringMgr toUpper method
19-Nov-2005 Troy A. Griffitts <scribe at crosswire.org>
Modified: trunk/include/swsearchable.h
===================================================================
--- trunk/include/swsearchable.h 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/include/swsearchable.h 2005-12-17 23:45:01 UTC (rev 1872)
@@ -85,11 +85,7 @@
* This function checks whether the search framework may work in the best way.
* @return True if the the search is optimally supported, false if it's not working in the best way.
*/
- virtual bool isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey * scope) {
- bool retVal = false;
- search(istr, searchType, flags, scope, &retVal);
- return retVal;
- }
+ virtual bool isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope);
};
SWORD_NAMESPACE_END
Modified: trunk/src/mgr/swsearchable.cpp
===================================================================
--- trunk/src/mgr/swsearchable.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/src/mgr/swsearchable.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -38,7 +38,15 @@
return 0;
}
+
void SWSearchable::deleteSearchFramework() {
}
+
+bool SWSearchable::isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope) {
+ bool retVal = false;
+ search(istr, searchType, flags, scope, &retVal);
+ return retVal;
+}
+
SWORD_NAMESPACE_END
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -15,6 +15,7 @@
***************************************************************************/
#include <stdlib.h>
+#include <ctype.h>
#include <osishtmlhref.h>
#include <utilxml.h>
#include <versekey.h>
Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/src/modules/filters/osisrtf.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -15,6 +15,7 @@
***************************************************************************/
#include <stdlib.h>
+#include <ctype.h>
#include <osisrtf.h>
#include <utilxml.h>
#include <versekey.h>
Modified: trunk/src/modules/filters/osisstrongs.cpp
===================================================================
--- trunk/src/modules/filters/osisstrongs.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/src/modules/filters/osisstrongs.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -6,6 +6,7 @@
#include <stdlib.h>
+#include <ctype.h>
#include <osisstrongs.h>
#include <swmodule.h>
#include <versekey.h>
Modified: trunk/src/modules/filters/thmlosis.cpp
===================================================================
--- trunk/src/modules/filters/thmlosis.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/src/modules/filters/thmlosis.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -8,11 +8,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
+#include <ctype.h>
#include <thmlosis.h>
#include <swmodule.h>
#include <swlog.h>
#include <versekey.h>
-#include <stdarg.h>
#include <utilstr.h>
#include <utilxml.h>
Modified: trunk/src/modules/texts/rawtext/rawtext.cpp
===================================================================
--- trunk/src/modules/texts/rawtext/rawtext.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/src/modules/texts/rawtext/rawtext.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -9,10 +9,8 @@
#include <sysdata.h>
#include <utilstr.h>
-#include <stringmgr.h>
#include <rawverse.h>
#include <rawtext.h>
-#include <rawstr.h>
#include <filemgr.h>
#include <versekey.h>
Modified: trunk/utilities/imp2gbs.cpp
===================================================================
--- trunk/utilities/imp2gbs.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/utilities/imp2gbs.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -37,8 +37,8 @@
printTree(treeKey, target, level);
}
-void setkey (TreeKeyIdx * treeKey, char* keybuffer) {
- char* tok = strtok(keybuffer, "/");
+void setKey(TreeKeyIdx * treeKey, char* keyBuffer) {
+ char* tok = strtok(keyBuffer, "/");
while (tok) {
bool foundkey = false;
if (treeKey->hasChildren()) {
@@ -73,14 +73,14 @@
}
}
-int readline(FILE* infile, char* linebuffer) {
+int readline(FILE* infile, char* lineBuffer) {
signed char c;
- char* lbPtr = linebuffer;
+ char* lbPtr = lineBuffer;
while ((c = fgetc(infile)) != EOF) {
*lbPtr++ = c;
if (c == 10) {
*lbPtr = 0;
- return (strlen(linebuffer));
+ return (strlen(lineBuffer));
}
}
return 0;
@@ -91,9 +91,9 @@
const char * helptext ="imp2gbs 1.0 General Book module creation tool for the SWORD Project\n usage:\n %s <filename> [modname]\n";
signed long i = 0;
- char* keybuffer = new char[2048];
- char* entbuffer = new char[1048576];
- char* linebuffer = new char[1048576];
+ char* keyBuffer = new char[2048];
+ char* entBuffer = new char[1048576];
+ char* lineBuffer = new char[1048576];
char modname[16];
if (argc > 2) {
@@ -125,37 +125,37 @@
//DEBUG TreeKeyIdx root = *((TreeKeyIdx *)((SWKey *)(*book)));
treeKey = ((TreeKeyIdx *)((SWKey *)(*book)));
- while (readline(infile, linebuffer)) {
- if (!strncmp(linebuffer, "$$$", 3)) {
- if (strlen(keybuffer) && strlen(entbuffer)) {
- std::cout << keybuffer << std::endl;
+ while (readline(infile, lineBuffer)) {
+ if (!strncmp(lineBuffer, "$$$", 3)) {
+ if (strlen(keyBuffer) && strlen(entBuffer)) {
+ std::cout << keyBuffer << std::endl;
treeKey->root();
- setkey(treeKey, keybuffer);
- book->setEntry(entbuffer, strlen(entbuffer));
+ setKey(treeKey, keyBuffer);
+ book->setEntry(entBuffer, strlen(entBuffer));
}
- linebuffer[strlen(linebuffer) - 1] = 0;
- strcpy (keybuffer, linebuffer + 3);
- *entbuffer = 0;
+ lineBuffer[strlen(lineBuffer) - 1] = 0;
+ strcpy (keyBuffer, lineBuffer + 3);
+ *entBuffer = 0;
}
else {
- strcat (entbuffer, linebuffer);
+ strcat (entBuffer, lineBuffer);
}
}
//handle final entry
- if (strlen(keybuffer) && strlen(entbuffer)) {
- std::cout << keybuffer << std::endl;
+ if (strlen(keyBuffer) && strlen(entBuffer)) {
+ std::cout << keyBuffer << std::endl;
treeKey->root();
- setkey(treeKey, keybuffer);
- book->setEntry(entbuffer, strlen(entbuffer));
+ setKey(treeKey, keyBuffer);
+ book->setEntry(entBuffer, strlen(entBuffer));
}
//DEBUG printTree(root, treeKey);
delete book;
- delete [] keybuffer;
- delete [] linebuffer;
- delete [] entbuffer;
+ delete [] keyBuffer;
+ delete [] lineBuffer;
+ delete [] entBuffer;
return 0;
}
Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp 2005-12-12 20:35:54 UTC (rev 1871)
+++ trunk/utilities/osis2mod.cpp 2005-12-17 23:45:01 UTC (rev 1872)
@@ -342,10 +342,11 @@
// Let's test our command line arguments
if (argc < 3) {
fprintf(stderr,
-"usage: osis2mod <output/path> <osisDoc> [createMod] [compressType [blockType [cipherKey]]]\n");
+"\nusage: osis2mod <output/path> <osisDoc> [createMod] [compressType [blockType [cipherKey]]]\n");
fprintf(stderr, " createMod : (default 0): 0 - create 1 - augment\n");
fprintf(stderr, " compressType: (default 0): 0 - no compression 1 - LZSS 2 - Zip\n");
fprintf(stderr, " blockType : (default 4): 2 - verses 3 - chapters 4 - books\n");
+ exit(-1);
}
int iType = 4;
More information about the sword-cvs
mailing list