[sword-svn] r1958 - in trunk: include lib/bcppmake src/keys src/modules/filters

scribe at www.crosswire.org scribe at www.crosswire.org
Mon Aug 21 17:16:44 MST 2006


Author: scribe
Date: 2006-08-21 17:15:10 -0700 (Mon, 21 Aug 2006)
New Revision: 1958

Modified:
   trunk/include/listkey.h
   trunk/include/swkey.h
   trunk/include/treekey.h
   trunk/include/treekeyidx.h
   trunk/include/versekey.h
   trunk/include/versetreekey.h
   trunk/lib/bcppmake/libsword.bpr
   trunk/src/keys/listkey.cpp
   trunk/src/modules/filters/thmlrtf.cpp
Log:
Added support for <p /> to ThMLRTF filters

More cleanups for 1.5.9 release, including, but not limited to:
Changed isTraversable to const
renamed ListKey::ClearList to more standard ListKey::clear
deprecated ClearList

Modified: trunk/include/listkey.h
===================================================================
--- trunk/include/listkey.h	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/include/listkey.h	2006-08-22 00:15:10 UTC (rev 1958)
@@ -38,84 +38,100 @@
 class SWDLLEXPORT ListKey : public SWKey {
 
 	static SWClass classdef;
-	void init ();
+	void init();
+
 protected:
 	int arraypos;
 	int arraymax;
 	int arraycnt;
 	SWKey **array;
+
 public:
+
 	/** initializes instance of ListKey
-	*
-	* @param ikey text key
-	*/
+	 *
+	 * @param ikey text key
+	 */
 	ListKey(const char *ikey = 0);
 	ListKey(ListKey const &k);
+
 	/** cleans up instance of ListKey
-	*/
-	virtual ~ ListKey();
+	 */
+	virtual ~ListKey();
 
 	virtual SWKey *clone() const;
+	
 	/** Clears out elements of list
-	*/
-	virtual void ClearList();
+	 */
+	virtual void clear();
+
+	/** deprecated, use clear(), instead
+	 */
+	virtual void ClearList() { clear(); }
+
 	/** Returns number of elements in list
-	* @return number of elements in list
-	*/
+	 * @return number of elements in list
+	 */
 	virtual int Count();
+	
 	/** Removes current element from list
-	*/
+	 */
 	virtual void Remove();
+	
 	/** Sets key to element number
-	*
-	* @param ielement element number to set to
-	* @return error status
-	*/
+	 *
+	 * @param ielement element number to set to
+	 * @return error status
+	 */
 	virtual char SetToElement(int ielement, SW_POSITION = TOP);
+	
 	/** Gets a key element number
-	*
-	* @param pos element number to get (or default current)
-	* @return Key or null on error
-	*/
+	 *
+	 * @param pos element number to get (or default current)
+	 * @return Key or null on error
+	 */
 	virtual SWKey *getElement(int pos = -1);
+	
 	// deprecated, use above function
 	virtual SWKey *GetElement(int pos = -1) { return getElement(pos); }
 
 	/** Adds an element to the list
-	* @param ikey the element to add
-	*/
+	 * @param ikey the element to add
+	 */
 	ListKey & operator <<(const SWKey &ikey) { add(ikey); return *this; }
 	virtual void add(const SWKey &ikey);
 
 	/** Equates this ListKey to another ListKey object
-	*
-	* @param ikey other ListKey object
-	*/
+	 *
+	 * @param ikey other ListKey object
+	 */
 	virtual void copyFrom(const ListKey & ikey);
 	virtual void copyFrom(const SWKey & ikey) { SWKey::copyFrom(ikey); }
 
 	/** Positions this key
-	*
-	* @param pos position
-	* @return *this
-	*/
+	 *
+	 * @param pos position
+	 * @return *this
+	 */
 	virtual void setPosition(SW_POSITION pos);
+	
 	/** Decrements a number of elements
-	*/
+	 */
 	virtual void decrement(int step);
+	
 	/** Increments a number of elements
-	*/
+	 */
 	virtual void increment(int step);
 
-	virtual bool isTraversable() { return true; }
+	virtual bool isTraversable() const { return true; }
 	virtual long Index() const { return arraypos; }
 	virtual const char *getRangeText() const;
 
 	/**
-	* Returns the index for the new one given as as parameter.
-	* The first parameter is the new index.
-	*/
-	virtual long Index(long index) { SetToElement (index); return Index (); }
+	 * Returns the index for the new one given as as parameter.
+	 * The first parameter is the new index.
+	 */
+	virtual long Index(long index) { SetToElement(index); return Index (); }
 	virtual const char *getText() const;
 	virtual void setText(const char *ikey);
 	virtual void sort();

Modified: trunk/include/swkey.h
===================================================================
--- trunk/include/swkey.h	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/include/swkey.h	2006-08-22 00:15:10 UTC (rev 1958)
@@ -170,14 +170,13 @@
 	 */
 	virtual void increment(int steps = 1);
 
-	/** Increments key a number of entries
-	 * deprecated, use isTraversible
+	/** deprecated, use isTraversible
 	 */
 	char Traversable() { return (isTraversable()) ? 1:0; }
 
 	/** Whether or not this key can be ++ -- incremented
 	 */
-	virtual bool isTraversable() { return false; }
+	virtual bool isTraversable() const { return false; }
 
 	/** Use this function to get an index position within a module.
 	 * Here's a small example how to use this function and @ref Index(long).

Modified: trunk/include/treekey.h
===================================================================
--- trunk/include/treekey.h	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/include/treekey.h	2006-08-22 00:15:10 UTC (rev 1958)
@@ -103,7 +103,7 @@
 	virtual int compare(const SWKey &ikey) = 0;
 	virtual void decrement(int steps = 1) = 0;
 	virtual void increment(int steps = 1) = 0;
-	virtual bool isTraversable() { return true; }
+	virtual bool isTraversable() const { return true; }
 	virtual long Index() const { return getOffset(); }
 	virtual long Index(long iindex) { setOffset(iindex); return getOffset(); }
 

Modified: trunk/include/treekeyidx.h
===================================================================
--- trunk/include/treekeyidx.h	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/include/treekeyidx.h	2006-08-22 00:15:10 UTC (rev 1958)
@@ -112,7 +112,7 @@
 	virtual int compare(const SWKey &ikey);
 	virtual void decrement(int steps = 1);
 	virtual void increment(int steps = 1);
-	virtual bool isTraversable() { return true; }
+	virtual bool isTraversable() const { return true; }
 
 	static signed char create(const char *path);
 };

Modified: trunk/include/versekey.h
===================================================================
--- trunk/include/versekey.h	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/include/versekey.h	2006-08-22 00:15:10 UTC (rev 1958)
@@ -280,7 +280,7 @@
 	* @return *this
 	*/
 	virtual void increment(int steps);
-	virtual bool isTraversable() { return true; }
+	virtual bool isTraversable() const { return true; }
 
 	virtual const char *getBookName() const;
 	virtual const char *getBookAbbrev() const;

Modified: trunk/include/versetreekey.h
===================================================================
--- trunk/include/versetreekey.h	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/include/versetreekey.h	2006-08-22 00:15:10 UTC (rev 1958)
@@ -84,7 +84,7 @@
 	*/
 	virtual SWKey *clone() const;
 	
-	virtual bool isTraversable() { return true; }
+	virtual bool isTraversable() const { return true; }
 
 	virtual TreeKey *getTreeKey() { return treeKey; }
 	

Modified: trunk/lib/bcppmake/libsword.bpr
===================================================================
--- trunk/lib/bcppmake/libsword.bpr	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/lib/bcppmake/libsword.bpr	2006-08-22 00:15:10 UTC (rev 1958)
@@ -129,7 +129,7 @@
     <PATHRC value=".;"/>
     <PATHASM value=".;"/>
     <LINKER value="TLib"/>
-    <USERDEFINES value="UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING"/>
+    <USERDEFINES value="UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG"/>
     <SYSDEFINES value="NO_STRICT"/>
     <MAINSOURCE value="libsword.bpf"/>
     <INCLUDEPATH value="..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include"/>
@@ -155,9 +155,9 @@
       -I..\..\..\biblecs\apps\InstallMgr\curl\include -src_suffix cpp -DUNICODE 
       -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0 -DUSELUCENE 
       -D_WIN32 -D_CL_DISABLE_MULTITHREADING -no_tie -boa"/>
-    <CFLAG1 value="-O2 -Vx -X- -a8 -b- -k- -vi -c -tW -tWM"/>
-    <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
-    <AFLAGS value="/mx /w2 /zn"/>
+    <CFLAG1 value="-Od -Vx -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM"/>
+    <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
+    <AFLAGS value="/mx /w2 /zi"/>
     <LFLAGS value="/P512"/>
   </OPTIONS>
   <LINKER>
@@ -231,8 +231,8 @@
 
 [HistoryLists\hlConditionals]
 Count=22
-Item0=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING
-Item1=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG
+Item0=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG
+Item1=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING
 Item2=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING
 Item3=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;UNICODE
 Item4=_UCS2;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING

Modified: trunk/src/keys/listkey.cpp
===================================================================
--- trunk/src/keys/listkey.cpp	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/src/keys/listkey.cpp	2006-08-22 00:15:10 UTC (rev 1958)
@@ -63,7 +63,7 @@
  * ListKey::ClearList	- Clears out elements of list
  */
 
-void ListKey::ClearList()
+void ListKey::clear()
 {
 	int loop;
 

Modified: trunk/src/modules/filters/thmlrtf.cpp
===================================================================
--- trunk/src/modules/filters/thmlrtf.cpp	2006-08-17 04:17:05 UTC (rev 1957)
+++ trunk/src/modules/filters/thmlrtf.cpp	2006-08-22 00:15:10 UTC (rev 1958)
@@ -140,6 +140,7 @@
 	addTokenSubstitute("b", "{\\b1 ");
 	addTokenSubstitute("/b", "}");
 	addTokenSubstitute("p", "\\par ");
+	addTokenSubstitute("p /", "\\par\\pard ");
 
 	//we need uppercase forms for the moment to support a few early ThML modules that aren't XHTML compliant
 	addTokenSubstitute("BR", "\\line ");




More information about the sword-cvs mailing list