[sword-svn] r3157 - in branches/sword-1-7-x: . include src/modules/filters
greg.hellings at crosswire.org
greg.hellings at crosswire.org
Wed Apr 16 20:56:12 MST 2014
Author: greg.hellings
Date: 2014-04-16 20:56:12 -0700 (Wed, 16 Apr 2014)
New Revision: 3157
Modified:
branches/sword-1-7-x/
branches/sword-1-7-x/include/utf8nfc.h
branches/sword-1-7-x/src/modules/filters/unicodertf.cpp
branches/sword-1-7-x/src/modules/filters/utf16utf8.cpp
branches/sword-1-7-x/src/modules/filters/utf8html.cpp
branches/sword-1-7-x/src/modules/filters/utf8latin1.cpp
branches/sword-1-7-x/src/modules/filters/utf8nfc.cpp
branches/sword-1-7-x/src/modules/filters/utf8nfkd.cpp
branches/sword-1-7-x/src/modules/filters/utf8utf16.cpp
Log:
Merging r3081.
Property changes on: branches/sword-1-7-x
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3080
+ /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081
Modified: branches/sword-1-7-x/include/utf8nfc.h
===================================================================
--- branches/sword-1-7-x/include/utf8nfc.h 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/include/utf8nfc.h 2014-04-17 03:56:12 UTC (rev 3157)
@@ -32,10 +32,11 @@
SWORD_NAMESPACE_START
+/** This filter normalizes UTF-8 encoded text
+ */
class SWDLLEXPORT UTF8NFC : public SWFilter {
private:
UConverter* conv;
- UChar *source, *target;
UErrorCode err;
public:
UTF8NFC();
Modified: branches/sword-1-7-x/src/modules/filters/unicodertf.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/unicodertf.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/unicodertf.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -20,7 +20,6 @@
*
*/
-#include <stdlib.h>
#include <stdio.h>
#include <unicodertf.h>
#include <swbuf.h>
Modified: branches/sword-1-7-x/src/modules/filters/utf16utf8.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/utf16utf8.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/utf16utf8.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -21,9 +21,6 @@
*/
-#include <stdlib.h>
-#include <stdio.h>
-
#include <utf16utf8.h>
#include <swbuf.h>
Modified: branches/sword-1-7-x/src/modules/filters/utf8html.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/utf8html.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/utf8html.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -21,7 +21,6 @@
*
*/
-#include <stdlib.h>
#include <stdio.h>
#include <utf8html.h>
#include <swbuf.h>
Modified: branches/sword-1-7-x/src/modules/filters/utf8latin1.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/utf8latin1.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/utf8latin1.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -20,9 +20,6 @@
*
*/
-#include <stdlib.h>
-#include <stdio.h>
-
#include <utf8latin1.h>
#include <swbuf.h>
Modified: branches/sword-1-7-x/src/modules/filters/utf8nfc.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/utf8nfc.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/utf8nfc.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -23,9 +23,6 @@
#ifdef _ICU_
-#include <stdlib.h>
-
-#include <utilstr.h>
#include <unicode/unistr.h>
#include <unicode/normlzr.h>
#include <unicode/unorm.h>
@@ -48,16 +45,16 @@
if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering
return -1;
- UErrorCode status = U_ZERO_ERROR;
- UnicodeString source(text.getRawData(), text.length(), conv, status);
+ err = U_ZERO_ERROR;
+ UnicodeString source(text.getRawData(), text.length(), conv, err);
UnicodeString target;
- status = U_ZERO_ERROR;
- Normalizer::normalize(source, UNORM_NFC, 0, target, status);
+ err = U_ZERO_ERROR;
+ Normalizer::normalize(source, UNORM_NFC, 0, target, err);
- status = U_ZERO_ERROR;
+ err = U_ZERO_ERROR;
text.setSize(text.size()*2); // potentially, it can grow to 2x the original size
- int32_t len = target.extract(text.getRawData(), text.size(), conv, status);
+ int32_t len = target.extract(text.getRawData(), text.size(), conv, err);
text.setSize(len);
return 0;
Modified: branches/sword-1-7-x/src/modules/filters/utf8nfkd.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/utf8nfkd.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/utf8nfkd.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -23,10 +23,6 @@
#ifdef _ICU_
-#include <stdlib.h>
-
-#include <utilstr.h>
-
#include <utf8nfkd.h>
#include <swbuf.h>
Modified: branches/sword-1-7-x/src/modules/filters/utf8utf16.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/utf8utf16.cpp 2014-04-17 03:50:37 UTC (rev 3156)
+++ branches/sword-1-7-x/src/modules/filters/utf8utf16.cpp 2014-04-17 03:56:12 UTC (rev 3157)
@@ -20,10 +20,7 @@
*
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <sysdata.h>
#include <utf8utf16.h>
#include <utilstr.h>
#include <swbuf.h>
@@ -68,7 +65,6 @@
text.setSize(text.size()-2);
return 0;
-
}
SWORD_NAMESPACE_END
More information about the sword-cvs
mailing list