[sword-svn] r1815 - trunk/utilities

chrislit at crosswire.org chrislit at crosswire.org
Sat May 21 20:59:58 MST 2005


Author: chrislit
Date: 2005-05-21 20:59:57 -0700 (Sat, 21 May 2005)
New Revision: 1815

Modified:
   trunk/utilities/xml2gbs.cpp
Log:
added chapter as recognized division break

Modified: trunk/utilities/xml2gbs.cpp
===================================================================
--- trunk/utilities/xml2gbs.cpp	2005-05-16 18:10:25 UTC (rev 1814)
+++ trunk/utilities/xml2gbs.cpp	2005-05-22 03:59:57 UTC (rev 1815)
@@ -189,7 +189,7 @@
   while ((c = fgetc(infile)) != EOF) {
     if (c == '<') {
       if (getTag(infile, keybuffer)) {
-	if ((format == F_OSIS) && ((!strcmp(keybuffer, "/div>")) || (!strcmp(keybuffer, "/verse>"))) ||
+	if ((format == F_OSIS) && ((!strcmp(keybuffer, "/div>")) || (!strcmp(keybuffer, "/verse>")) || (!strcmp(keybuffer, "/chapter>"))) ||
            ((format == F_THML) && ((!strncmp(keybuffer, "/div", 4)) && (keybuffer[4] > '0' && keybuffer[4] < '7')))) {
 	  if (!closer) {
        	    keysize = 0;
@@ -220,7 +220,7 @@
 
 	  closer = true;
 	}
-	else if ((format == F_OSIS) && !((!strcmp(keybuffer, "div>") || !strncmp(keybuffer, "div ", 4)) || (!strcmp(keybuffer, "verse>") || !strncmp(keybuffer, "verse ", 6))) ||
+	else if ((format == F_OSIS) && !((!strcmp(keybuffer, "div>") || !strncmp(keybuffer, "div ", 4)) || (!strcmp(keybuffer, "verse>") || !strncmp(keybuffer, "verse ", 6)) || (!strcmp(keybuffer, "chapter>") || !strncmp(keybuffer, "chapter ", 8))) ||
                 ((format == F_THML) && !((!strncmp(keybuffer, "div", 3)) && (keybuffer[3] > '0' && keybuffer[3] < '7')))) {
 	  entbuffer[entrysize++] = '<';
 	  for (i = 0; i <= strlen(keybuffer); i++) {



More information about the sword-cvs mailing list