[sword-cvs] sword/src/modules/filters swbasicfilter.cpp,1.25,1.26

sword@www.crosswire.org sword@www.crosswire.org
Tue, 29 Jul 2003 18:14:36 -0700


Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv26152/src/modules/filters

Modified Files:
	swbasicfilter.cpp 
Log Message:


Index: swbasicfilter.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/swbasicfilter.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- swbasicfilter.cpp	30 Jul 2003 00:51:34 -0000	1.25
+++ swbasicfilter.cpp	30 Jul 2003 01:14:34 -0000	1.26
@@ -216,7 +216,16 @@
 
 	SWBuf orig = text;
 	from = orig.c_str();
-	for (text = ""; *from; from++) {
+	text = "";
+
+	if (processStages & INITIALIZE)
+		processStage(INITIALIZE, text, from, userData);
+
+	for (;*from; from++) {
+
+		if (processStages & PRECHAR)
+			processStage(PRECHAR, text, from, userData);
+
 		if (*from == tokenStart[tokenStartPos]) {
 			if (tokenStartPos == (tokenStartLen - 1)) {
 				intoken = true;
@@ -287,7 +296,15 @@
 				text += *from;
 			lastTextNode += *from;
 		}
+
+		if (processStages & POSTCHAR)
+			processStage(POSTCHAR, text, from, userData);
+
 	}
+
+	if (processStages & FINALIZE)
+		processStage(FINALIZE, text, from, userData);
+
 	delete userData;
 	return 0;
 }