[sword-svn] r2169 - in trunk: include src/keys src/mgr src/modules/comments src/modules/filters src/modules/genbook src/modules/lexdict src/modules/texts src/utilfuns utilities
scribe at www.crosswire.org
scribe at www.crosswire.org
Sat May 17 19:50:53 MST 2008
Author: scribe
Date: 2008-05-17 19:50:53 -0700 (Sat, 17 May 2008)
New Revision: 2169
Modified:
trunk/include/versekey.h
trunk/src/keys/versekey.cpp
trunk/src/mgr/swmgr.cpp
trunk/src/modules/comments/swcom.cpp
trunk/src/modules/filters/scsuutf8.cpp
trunk/src/modules/filters/utf16utf8.cpp
trunk/src/modules/filters/utf8greekaccents.cpp
trunk/src/modules/genbook/swgenbook.cpp
trunk/src/modules/lexdict/swld.cpp
trunk/src/modules/texts/swtext.cpp
trunk/src/utilfuns/swbuf.cpp
trunk/src/utilfuns/swunicod.cpp
trunk/utilities/cipherraw.cpp
trunk/utilities/osis2mod.cpp
trunk/utilities/xml2gbs.cpp
Log:
updated to fix warning from gcc 4.3
Modified: trunk/include/versekey.h
===================================================================
--- trunk/include/versekey.h 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/include/versekey.h 2008-05-18 02:50:53 UTC (rev 2169)
@@ -98,9 +98,9 @@
static int instance;
static struct sbook otbooks[];
static struct sbook ntbooks[];
- static char *osisotbooks[];
- static char *osisntbooks[];
- static char **osisbooks[];
+ static const char *osisotbooks[];
+ static const char *osisntbooks[];
+ static const char **osisbooks[];
#if 1
static long otbks[];
static long otcps[];
Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/keys/versekey.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -1540,7 +1540,7 @@
return keyval1;
}
-char *VerseKey::osisotbooks[] = {
+const char *VerseKey::osisotbooks[] = {
"Gen","Exod","Lev","Num","Deut","Josh","Judg","Ruth","1Sam","2Sam",
"1Kgs","2Kgs","1Chr","2Chr","Ezra","Neh","Esth","Job","Ps",
"Prov", // added this. Was not in OSIS spec
@@ -1549,11 +1549,11 @@
"Jonah","Mic","Nah","Hab","Zeph","Hag","Zech","Mal","Bar","PrAzar",
"Bel","Sus","1Esd","2Esd","AddEsth","EpJer","Jdt","1Macc","2Macc","3Macc",
"4Macc","PrMan","Ps151","Sir","Tob","Wis"};
-char *VerseKey::osisntbooks[] = {
+const char *VerseKey::osisntbooks[] = {
"Matt","Mark","Luke","John","Acts","Rom","1Cor","2Cor","Gal","Eph",
"Phil","Col","1Thess","2Thess","1Tim","2Tim","Titus","Phlm","Heb","Jas",
"1Pet","2Pet","1John","2John","3John","Jude","Rev"};
-char **VerseKey::osisbooks[] = { osisotbooks, osisntbooks };
+const char **VerseKey::osisbooks[] = { osisotbooks, osisntbooks };
const char *VerseKey::getOSISRef() const {
Modified: trunk/src/mgr/swmgr.cpp
===================================================================
--- trunk/src/mgr/swmgr.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/mgr/swmgr.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -294,7 +294,7 @@
path = iConfigPath;
int len = path.length();
- if ((len < 1) || (iConfigPath[len-1] != '\\') && (iConfigPath[len-1] != '/'))
+ if ((len < 1) || ((iConfigPath[len-1] != '\\') && (iConfigPath[len-1] != '/')))
path += "/";
if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
stdstr(&prefixPath, path.c_str());
Modified: trunk/src/modules/comments/swcom.cpp
===================================================================
--- trunk/src/modules/comments/swcom.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/comments/swcom.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -17,7 +17,7 @@
* idisp - Display object to use for displaying
*/
-SWCom::SWCom(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, "Commentaries", enc, dir, mark, ilang) {
+SWCom::SWCom(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, (char *)"Commentaries", enc, dir, mark, ilang) {
delete key;
key = CreateKey();
tmpVK = new VerseKey();
Modified: trunk/src/modules/filters/scsuutf8.cpp
===================================================================
--- trunk/src/modules/filters/scsuutf8.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/filters/scsuutf8.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -44,18 +44,18 @@
}
else if (uchar < 0x800) {
*text++ = 0xc0 | uchar >> 6;
- *text++ = 0x80 | uchar & 0x3f;
+ *text++ = 0x80 | (uchar & 0x3f);
}
else if (uchar < 0x10000) {
*text++ = 0xe0 | uchar >> 12;
- *text++ = 0x80 | uchar >> 6 & 0x3f;
- *text++ = 0x80 | uchar & 0x3f;
+ *text++ = 0x80 | (uchar >> 6 & 0x3f);
+ *text++ = 0x80 | (uchar & 0x3f);
}
else if (uchar < 0x200000) {
*text++ = 0xf0 | uchar >> 18;
- *text++ = 0x80 | uchar >> 12 & 0x3f;
- *text++ = 0x80 | uchar >> 6 & 0x3f;
- *text++ = 0x80 | uchar & 0x3f;
+ *text++ = 0x80 | (uchar >> 12 & 0x3f);
+ *text++ = 0x80 | (uchar >> 6 & 0x3f);
+ *text++ = 0x80 | (uchar & 0x3f);
}
return text;
Modified: trunk/src/modules/filters/utf16utf8.cpp
===================================================================
--- trunk/src/modules/filters/utf16utf8.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/filters/utf16utf8.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -69,15 +69,15 @@
text += 0x80 | (uchar & 0x3f);
}
else if (uchar < 0x10000) {
- text += 0xe0 | (uchar >> 12);
- text += 0x80 | (uchar >> 6) & 0x3f;
- text += 0x80 | uchar & 0x3f;
+ text += 0xe0 | (uchar >> 12);
+ text += 0x80 | ((uchar >> 6) & 0x3f);
+ text += 0x80 | (uchar & 0x3f);
}
else if (uchar < 0x200000) {
text += 0xF0 | (uchar >> 18);
- text += 0x80 | (uchar >> 12) & 0x3F;
- text += 0x80 | (uchar >> 6) & 0x3F;
- text += 0x80 | uchar & 0x3F;
+ text += 0x80 | ((uchar >> 12) & 0x3F);
+ text += 0x80 | ((uchar >> 6) & 0x3F);
+ text += 0x80 | (uchar & 0x3F);
}
}
Modified: trunk/src/modules/filters/utf8greekaccents.cpp
===================================================================
--- trunk/src/modules/filters/utf8greekaccents.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/filters/utf8greekaccents.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -146,7 +146,7 @@
//Extended Greek
//capital alpha
- else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x88 && *(from + 2) <= 0x8F) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBC)) {
+ else if (*from == 0xE1 && (((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x88 && *(from + 2) <= 0x8F) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBC))) {
text += 0xCE;
text += 0x91;
from+=2;
@@ -170,7 +170,7 @@
from+=2;
}
//capital omicron
- else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x88 && *(from + 2) <= 0x8D) || (*(from + 1) == 0xBF && *(from + 2) == 0xB8 || *(from + 2) == 0xB9))) {
+ else if (*from == 0xE1 && (((*(from + 1) == 0xBD && *(from + 2) >= 0x88 && *(from + 2) <= 0x8D)) || ((*(from + 1) == 0xBF && *(from + 2) == 0xB8 || *(from + 2) == 0xB9)))) {
text += 0xCE;
text += 0x9F;
from+=2;
@@ -195,7 +195,10 @@
}
//alpha
- else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x80 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB0 || *(from + 2) == 0xB1)) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7)) {
+ else if (*from == 0xE1 && (
+ ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x80 && *(from + 2) <= 0x87)
+ || (*(from + 1) == 0xBD && (*(from + 2) == 0xB0 || *(from + 2) == 0xB1))
+ || (*(from + 1) == 0xBE && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7))) {
text += 0xCE;
text += 0xB1;
from+=2;
Modified: trunk/src/modules/genbook/swgenbook.cpp
===================================================================
--- trunk/src/modules/genbook/swgenbook.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/genbook/swgenbook.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -15,7 +15,7 @@
* idisp - Display object to use for displaying
*/
-SWGenBook::SWGenBook(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, "Generic Books", enc, dir, mark, ilang) {
+SWGenBook::SWGenBook(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, (char *)"Generic Books", enc, dir, mark, ilang) {
}
Modified: trunk/src/modules/lexdict/swld.cpp
===================================================================
--- trunk/src/modules/lexdict/swld.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/lexdict/swld.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -16,7 +16,7 @@
* idisp - Display object to use for displaying
*/
-SWLD::SWLD(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, "Lexicons / Dictionaries", enc, dir, mark, ilang)
+SWLD::SWLD(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, (char *)"Lexicons / Dictionaries", enc, dir, mark, ilang)
{
delete key;
key = CreateKey();
Modified: trunk/src/modules/texts/swtext.cpp
===================================================================
--- trunk/src/modules/texts/swtext.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/modules/texts/swtext.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -17,7 +17,7 @@
* idisp - Display object to use for displaying
*/
-SWText::SWText(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, "Biblical Texts", enc, dir, mark, ilang) {
+SWText::SWText(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, (char *)"Biblical Texts", enc, dir, mark, ilang) {
tmpVK = new VerseKey();
delete key;
key = CreateKey();
Modified: trunk/src/utilfuns/swbuf.cpp
===================================================================
--- trunk/src/utilfuns/swbuf.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/utilfuns/swbuf.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -27,7 +27,7 @@
SWORD_NAMESPACE_START
-char *SWBuf::nullStr = "";
+char *SWBuf::nullStr = (char *)"";
char SWBuf::junkBuf[JUNKBUFSIZE];
/******************************************************************************
Modified: trunk/src/utilfuns/swunicod.cpp
===================================================================
--- trunk/src/utilfuns/swunicod.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/src/utilfuns/swunicod.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -125,7 +125,7 @@
count--;
utf32 = i >> count;
for (i = 1; i <= count; i++) {
- if (0xc0 & utf8[i] != 0x80) {
+ if ((0xc0 & utf8[i]) != 0x80) {
return 0xffff;
}
utf32 <<= 6;
Modified: trunk/utilities/cipherraw.cpp
===================================================================
--- trunk/utilities/cipherraw.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/utilities/cipherraw.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -32,7 +32,6 @@
char *tmpbuf;
if (argc != 3) {
- printf("%ld %ld\n", sizeof(long), sizeof(unsigned short));
fprintf(stderr, "usage: %s <datapath> \"<key>\"\n", argv[0]);
exit(1);
}
Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/utilities/osis2mod.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -57,7 +57,7 @@
VerseKey *currentVerse = 0;
char activeOsisID[255];
char currentOsisID[255];
-char *osisabbrevs[] = {"Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg",
+const char *osisabbrevs[] = {"Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg",
"Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh",
"Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek",
"Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab",
Modified: trunk/utilities/xml2gbs.cpp
===================================================================
--- trunk/utilities/xml2gbs.cpp 2008-05-17 22:40:35 UTC (rev 2168)
+++ trunk/utilities/xml2gbs.cpp 2008-05-18 02:50:53 UTC (rev 2169)
@@ -111,7 +111,7 @@
}
if (keybuffer.length()) {
- if ((format == F_OSIS) && ((!strncmp(keybuffer.c_str(), "/div>", 5)) || (!strncmp(keybuffer.c_str(), "/verse>", 7)) || (!strncmp(keybuffer.c_str(), "/chapter>", 9))) ||
+ if (((format == F_OSIS) && ((!strncmp(keybuffer.c_str(), "/div>", 5)) || (!strncmp(keybuffer.c_str(), "/verse>", 7)) || (!strncmp(keybuffer.c_str(), "/chapter>", 9)))) ||
((format == F_THML) && ((!strncmp(keybuffer.c_str(), "/div", 4)) && (keybuffer[4] > '0' && keybuffer[4] < '7')))) {
if (!closer) {
keysize = 0;
@@ -141,7 +141,7 @@
closer = true;
}
- else if ((format == F_OSIS) && !((!strncmp(keybuffer.c_str(), "div>", 4) || !strncmp(keybuffer.c_str(), "div ", 4)) || (!strncmp(keybuffer.c_str(), "verse>", 6) || !strncmp(keybuffer.c_str(), "verse ", 6)) || (!strncmp(keybuffer.c_str(), "chapter>", 8) || !strncmp(keybuffer.c_str(), "chapter ", 8))) ||
+ else if (((format == F_OSIS) && !((!strncmp(keybuffer.c_str(), "div>", 4) || !strncmp(keybuffer.c_str(), "div ", 4)) || (!strncmp(keybuffer.c_str(), "verse>", 6) || !strncmp(keybuffer.c_str(), "verse ", 6)) || (!strncmp(keybuffer.c_str(), "chapter>", 8) || !strncmp(keybuffer.c_str(), "chapter ", 8)))) ||
((format == F_THML) && !((!strncmp(keybuffer.c_str(), "div", 3)) && (keybuffer[3] > '0' && keybuffer[3] < '7')))) {
entbuffer += '<';
entrysize++;
More information about the sword-cvs
mailing list