[sword-cvs] sword/src/modules/filters osisredletterwords.cpp,1.10,1.11 osisfootnotes.cpp,1.17,1.18

sword@www.crosswire.org sword@www.crosswire.org
Mon, 12 Apr 2004 13:10:43 -0700


Update of /cvs/core/sword/src/modules/filters
In directory www:/tmp/cvs-serv7274

Modified Files:
	osisredletterwords.cpp osisfootnotes.cpp 
Log Message:
no message

Index: osisredletterwords.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisredletterwords.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- osisredletterwords.cpp	9 Apr 2004 12:31:16 -0000	1.10
+++ osisredletterwords.cpp	12 Apr 2004 20:10:41 -0000	1.11
@@ -40,9 +40,9 @@
 	const char *from = orig.c_str();
 
 	//taken out of the loop
-	char* start;
-	char* end;
-	
+	const char* start;
+	const char* end;
+
 	if (!option)
 	for (text = ""; *from; from++) {
 		if (*from == '<') {
@@ -66,8 +66,8 @@
 				if (start && (strlen(start) > 11)) {
 					end = start+11;
 					text.append('<');
-					text.append(token, start-token); //the text before the who attr
-					text.append(end, strlen(token)-(end - token)); //text after the who attr
+					text.append(token, start-(token.c_str())); //the text before the who attr
+					text.append(end, strlen(token)-(end-(token.c_str()))); //text after the who attr
 					text.append('>');
 				}
 			}

Index: osisfootnotes.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- osisfootnotes.cpp	9 Apr 2004 12:31:15 -0000	1.17
+++ osisfootnotes.cpp	12 Apr 2004 20:10:41 -0000	1.18
@@ -114,9 +114,9 @@
 					refs.append("; ");
 				}
 				
-				char* attr = strstr(token.c_str() + 9, "osisRef=\"");
-				char* end  = attr ? strchr(attr+9, '"') : 0;
-				
+				const char* attr = strstr(token.c_str() + 9, "osisRef=\"");
+				const char* end  = attr ? strchr(attr+9, '"') : 0;
+
 				if (attr && end) {
 					refs.append(attr+9, end-(attr+9));
 				}