[sword-svn] r2977 - trunk/utilities
scribe at crosswire.org
scribe at crosswire.org
Tue Sep 10 07:34:41 MST 2013
Author: scribe
Date: 2013-09-10 07:34:41 -0700 (Tue, 10 Sep 2013)
New Revision: 2977
Modified:
trunk/utilities/imp2gbs.cpp
trunk/utilities/tei2mod.cpp
Log:
seems a bug in order of initialization of std::list with c-tor(iterator start, iterator end) as a global. This moves globals in utils to stack
Modified: trunk/utilities/imp2gbs.cpp
===================================================================
--- trunk/utilities/imp2gbs.cpp 2013-09-10 14:09:44 UTC (rev 2976)
+++ trunk/utilities/imp2gbs.cpp 2013-09-10 14:34:41 UTC (rev 2977)
@@ -59,7 +59,7 @@
bool augMod = false;
bool augEnt = true;
int lexLevels = 0;
-UTF8GreekAccents greekAccentsFilter;
+UTF8GreekAccents *greekAccentsFilter = 0;
void usage(const char *app) {
@@ -132,7 +132,7 @@
if (greekFilter) {
- greekAccentsFilter.processText(keyBuffer);
+ greekAccentsFilter->processText(keyBuffer);
}
if (toUpper) {
@@ -220,7 +220,9 @@
int main(int argc, char **argv) {
- greekAccentsFilter.setOptionValue("Off"); // off = accents off
+ UTF8GreekAccents gaf;
+ greekAccentsFilter = &gaf;
+ greekAccentsFilter->setOptionValue("Off"); // off = accents off
parseParams(argc, argv);
// Let's see if we can open our input file
Modified: trunk/utilities/tei2mod.cpp
===================================================================
--- trunk/utilities/tei2mod.cpp 2013-09-10 14:09:44 UTC (rev 2976)
+++ trunk/utilities/tei2mod.cpp 2013-09-10 14:34:41 UTC (rev 2977)
@@ -79,7 +79,7 @@
using namespace std;
#ifdef _ICU_
-UTF8NFC normalizer;
+UTF8NFC *normalizer = 0;
int normalized = 0;
Latin1UTF8 converter;
@@ -192,7 +192,7 @@
if (utf8State > 0) {
SWBuf before = text;
- normalizer.processText(text, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks
+ normalizer->processText(text, (SWKey *)2); // note the hack of 2 to mimic a real key. TODO: remove all hacks
if (before != text) {
normalized++;
}
@@ -358,6 +358,8 @@
}
int main(int argc, char **argv) {
+ UTF8NFC normalizr;
+ normalizer = &normalizr;
SWBuf program = argv[0];
fprintf(stderr, "You are running %s: $Rev: 2138 $\n", argv[0]);
More information about the sword-cvs
mailing list