[sword-svn] r2341 - in trunk: include src/mgr src/modules/filters tests

scribe at crosswire.org scribe at crosswire.org
Sun Apr 26 06:55:36 MST 2009


Author: scribe
Date: 2009-04-26 06:55:36 -0700 (Sun, 26 Apr 2009)
New Revision: 2341

Modified:
   trunk/include/config.h
   trunk/include/utf8arabicpoints.h
   trunk/include/versemgr.h
   trunk/src/mgr/versemgr.cpp
   trunk/src/modules/filters/utf8arabicpoints.cpp
   trunk/tests/Makefile.am
Log:
Added public method StringList VerseMgr::getVersificationSystems() to return know system names.
Added/Updated license info
Removed arabic filter test from Makefile.am until we have it submitted from the author :)




Modified: trunk/include/config.h
===================================================================
--- trunk/include/config.h	2009-04-26 13:51:42 UTC (rev 2340)
+++ trunk/include/config.h	2009-04-26 13:55:36 UTC (rev 2341)
@@ -40,10 +40,6 @@
 /* Define to 1 if you have the `vsnprintf' function. */
 #define HAVE_VSNPRINTF 1
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
 /* Name of package */
 #define PACKAGE "sword"
 

Modified: trunk/include/utf8arabicpoints.h
===================================================================
--- trunk/include/utf8arabicpoints.h	2009-04-26 13:51:42 UTC (rev 2340)
+++ trunk/include/utf8arabicpoints.h	2009-04-26 13:55:36 UTC (rev 2341)
@@ -1,8 +1,10 @@
 /******************************************************************************
  *
+ * UTF8ArabicPoints - SWFilter descendant to remove UTF-8 Arabic vowel points
+ *
  * $Id: utf8arabicpoints.h 1688 2008-11-30 04:42:26Z refdoc $
  *
- * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
+ * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
  *	CrossWire Bible Society
  *	P. O. Box 2528
  *	Tempe, AZ  85280-2528

Modified: trunk/include/versemgr.h
===================================================================
--- trunk/include/versemgr.h	2009-04-26 13:51:42 UTC (rev 2340)
+++ trunk/include/versemgr.h	2009-04-26 13:55:36 UTC (rev 2341)
@@ -20,6 +20,7 @@
  *
  */
 
+#include <list>
 #include <defs.h>
 #include <swcacher.h>
 #include <swbuf.h>
@@ -31,6 +32,7 @@
 
 SWORD_NAMESPACE_START
 
+typedef std::list <SWBuf>StringList;
 
 struct sbook;
 class TreeKey;
@@ -149,6 +151,7 @@
 	~VerseMgr();
 	static VerseMgr *getSystemVerseMgr();
 	static void setSystemVerseMgr(VerseMgr *newVerseMgr);
+	const StringList getVersificationSystems() const;
 	const System *getVersificationSystem(const char *name) const;
 	void registerVersificationSystem(const char *name, const sbook *ot, const sbook *nt, int *chMax);
 	void registerVersificationSystem(const char *name, const TreeKey *);

Modified: trunk/src/mgr/versemgr.cpp
===================================================================
--- trunk/src/mgr/versemgr.cpp	2009-04-26 13:51:42 UTC (rev 2340)
+++ trunk/src/mgr/versemgr.cpp	2009-04-26 13:55:36 UTC (rev 2341)
@@ -335,6 +335,7 @@
 	return (it != p->systems.end()) ? &(it->second) : 0;
 }
 
+
 void VerseMgr::registerVersificationSystem(const char *name, const sbook *ot, const sbook *nt, int *chMax) {
 	p->systems[name] = name;
 	System &s = p->systems[name];
@@ -345,87 +346,14 @@
 void VerseMgr::registerVersificationSystem(const char *name, const TreeKey *tk) {
 }
 
-// --------------- end statics --------------
 
-/*
-
-long         *VerseKey::offsets[2][2]  = {{VerseKey::otbks, VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}};
-const char    VerseKey::builtin_BMAX[2]        = {39, 27};
-void SWLocale::getBooks(char **iBMAX, struct sbook ***ibooks) {
-	if (!BMAX) {
-		BMAX = new char [2];
-		BMAX[0] = VerseKey::builtin_BMAX[0];
-		BMAX[1] = VerseKey::builtin_BMAX[1];
-
-		books = new struct sbook *[2];
-		books[0] = new struct sbook[BMAX[0]];
-		books[1] = new struct sbook[BMAX[1]];
-
-		for (int i = 0; i < 2; i++) {
-			for (int j = 0; j < BMAX[i]; j++) {
-				books[i][j] = VerseKey::builtin_books[i][j];
-				books[i][j].name = translate(VerseKey::builtin_books[i][j].name);
-			}
-		}
+const StringList VerseMgr::getVersificationSystems() const {
+	StringList retVal;
+	for (map<SWBuf, System>::const_iterator it = p->systems.begin(); it != p->systems.end(); it++) {
+		retVal.push_back(it->first);
 	}
-
-	*iBMAX  = BMAX;
-	*ibooks = books;
+	return retVal;
 }
 
-~() {
-	if (BMAX) {
-		for (int i = 0; i < 2; i++)
-			delete [] books[i];
-		delete [] BMAX;
-		delete [] books;
-	}
-}
 
-
-******************************************************************************
- * VerseKey::initstatics - initializes statics.  Performed only when first
- *						instance on VerseKey (or descendent) is created.
- */
-
-/*
-void VerseKey::initstatics() {
-	int l1, l2, chaptmp = 0;
-
-	builtin_books[0] = otbooks;
-	builtin_books[1] = ntbooks;
-
-	for (l1 = 0; l1 < 2; l1++) {
-		for (l2 = 0; l2 < builtin_BMAX[l1]; l2++) {
-			builtin_books[l1][l2].versemax = &vm[chaptmp];
-			chaptmp += builtin_books[l1][l2].chapmax;
-		}
-	}
-}
-
-
-const int VerseKey::getOSISBookNum(const char *bookab) {
-	int i;
-	for (i=0; i < 39; i++)
-	{
-		if (!strncmp(bookab, osisotbooks[i], strlen(osisotbooks[i])))
-		{
-			//printf("VerseKey::getOSISBookNum %s is OT %d\n", bookab, i+1);
-			return i+1;
-		}
-	}
-	for (i=0; i < 27; i++)
-	{
-		if (!strncmp(bookab, osisntbooks[i], strlen(osisotbooks[i])))
-		{
-			//printf("VerseKey::getOSISBookNum %s is NT %d\n", bookab, i+1);
-			return i+1;
-		}
-	}
-	return -1;
-}
-
-*/
-
-
 SWORD_NAMESPACE_END

Modified: trunk/src/modules/filters/utf8arabicpoints.cpp
===================================================================
--- trunk/src/modules/filters/utf8arabicpoints.cpp	2009-04-26 13:51:42 UTC (rev 2340)
+++ trunk/src/modules/filters/utf8arabicpoints.cpp	2009-04-26 13:55:36 UTC (rev 2341)
@@ -2,6 +2,22 @@
  *
  * UTF8ArabicPoints - SWFilter descendant to remove UTF-8 Arabic vowel points
  *
+ * $Id: utf8arabicpoints.h 1688 2008-11-30 04:42:26Z refdoc $
+ *
+ * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
  */
 
 

Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am	2009-04-26 13:51:42 UTC (rev 2340)
+++ trunk/tests/Makefile.am	2009-04-26 13:55:36 UTC (rev 2341)
@@ -56,7 +56,6 @@
 romantest_SOURCES = romantest.cpp
 testblocks_SOURCES = testblocks.cpp
 filtertest_SOURCES = filtertest.cpp
-arabicfiltertest_SOURCES = arabicfiltertest.cpp
 lextest_SOURCES = lextest.cpp
 rawldidxtest_SOURCES = rawldidxtest.cpp
 swaptest_SOURCES = swaptest.cpp




More information about the sword-cvs mailing list