[cg3] 01/03: Imported Upstream version 0.9.9~r10817
Tino Didriksen
tinodidriksen-guest at moszumanska.debian.org
Mon Jun 29 07:15:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
tinodidriksen-guest pushed a commit to branch master
in repository cg3.
commit 3704a1bb8b31012e0e1795148d27a8d4f28afe8d
Author: Tino Didriksen <mail at tinodidriksen.com>
Date: Mon Jun 29 07:15:26 2015 +0000
Imported Upstream version 0.9.9~r10817
---
ChangeLog | 59 +++++++++++++----------------
newsletters/2015-06-23.txt | 53 ++++++++++++++++++++++++++
src/ApertiumApplicator.cpp | 6 +--
src/FSTApplicator.cpp | 6 +--
src/GrammarApplicator.hpp | 7 +++-
src/GrammarApplicator_matchSet.cpp | 8 +++-
src/GrammarApplicator_reflow.cpp | 4 +-
src/GrammarApplicator_runContextualTest.cpp | 4 +-
src/GrammarApplicator_runGrammar.cpp | 10 ++---
src/GrammarApplicator_runRules.cpp | 38 ++++++++++---------
src/NicelineApplicator.cpp | 6 +--
src/PlaintextApplicator.cpp | 6 +--
src/Tag.hpp | 2 +-
src/TagTrie.hpp | 2 +
src/Window.cpp | 4 +-
src/Window.hpp | 2 +-
src/version.hpp | 2 +-
17 files changed, 139 insertions(+), 80 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6a63470..84f27a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
+2015-06-26 tino
+
+ * [r10811] src/ApertiumApplicator.cpp, src/FSTApplicator.cpp,
+ src/GrammarApplicator_runGrammar.cpp,
+ src/GrammarApplicator_runRules.cpp, src/NicelineApplicator.cpp,
+ src/PlaintextApplicator.cpp, src/Tag.hpp, src/TagTrie.hpp,
+ src/Window.cpp, src/Window.hpp: Eliminate std::list
+ * [r10810] src/GrammarApplicator.cpp, src/GrammarApplicator.hpp,
+ src/GrammarApplicator_matchSet.cpp,
+ src/GrammarApplicator_reflow.cpp,
+ src/GrammarApplicator_runContextualTest.cpp,
+ src/GrammarApplicator_runRules.cpp: Regex store as with unif
+ * [r10809] src/GrammarApplicator_runRules.cpp: Fix
+ * [r10808] src/GrammarApplicator.cpp, src/GrammarApplicator.hpp,
+ src/GrammarApplicator_matchSet.cpp,
+ src/GrammarApplicator_reflow.cpp,
+ src/GrammarApplicator_runContextualTest.cpp,
+ src/GrammarApplicator_runRules.cpp: Let's see if this works...
+
2015-06-23 tino
+ * [r10802] newsletters/2015-06-23.txt: Newsletter
+ * [r10800] ChangeLog, src/ApertiumApplicator.cpp,
+ src/FSTApplicator.cpp, src/GrammarApplicator_runGrammar.cpp,
+ src/GrammarApplicator_runRules.cpp, src/NicelineApplicator.cpp,
+ src/PlaintextApplicator.cpp, src/SingleWindow.cpp,
+ src/SingleWindow.hpp, src/Window.cpp, src/version.hpp: Even more
+ pooling
* [r10799] src/GrammarApplicator_reflow.cpp: More removed cohort
badness
* [r10798] src/inlines.hpp: Demote CR and NEL to just spaces
@@ -2290,36 +2316,3 @@
* [r8813] dist/Portfile: MacPorts
* [r8812] dist/Portfile: MacPorts
-2013-01-22 tino
-
- * [r8810] TODO, manual/installation.xml, scripts/cg3-autobin.pl,
- src/GrammarApplicator_runContextualTest.cpp, src/version.h,
- test/T_BasicDependency/expected.txt,
- test/T_BasicDependency/grammar.cg3: Fixed parent-or-self tests to
- not only test self
-
-2012-12-19 tino
-
- * [r8752] scripts/cg3-autobin.pl,
- src/GrammarApplicator_runGrammar.cpp, src/version.h: FLUSH now
- clears variables
-
-2012-12-10 tino
-
- * [r8734] scripts/cg3-autobin.pl, src/GrammarApplicator_reflow.cpp,
- src/version.h: When the text contains , don't say a varstring
- wasn't created just because it is identical to no result.
-
-2012-12-09 tino
-
- * [r8732] dist/dist-osx.pl: OS X dist script
-
-2012-11-24 tino
-
- * [r8709] manual/installation.xml: cg3
-
-2012-11-22 tino
-
- * [r8708] src/GrammarApplicator_runGrammar.cpp: ; in input does not
- mean end of line...
-
diff --git a/newsletters/2015-06-23.txt b/newsletters/2015-06-23.txt
new file mode 100644
index 0000000..36bda6f
--- /dev/null
+++ b/newsletters/2015-06-23.txt
@@ -0,0 +1,53 @@
+A new release of CG-3 has been tagged v0.9.9.10800.
+
+Performance:
+- Rules application is now 60% faster than previous release. The reference test ( http://visl.sdu.dk/cg3_performance.html ) went from 390 cohorts/sec to 620, and performs 1/3rd the number of re-allocations. This was accomplished by taking advantage of an internal re-structuring of using sequential set numbers instead of their hashes, which in turn was initially implemented to eliminate some hash collisions.
+- EXTERNAL processing is now 20 times faster than previous release.
+
+New features:
+- Binary grammars are now kept forward compatible, to the best of my ability. Grammars compiled all the way back to r10043 will continue to load on latest versions.
+- Added cmdline option --quiet and alias -v0
+- Grammar compiling diagnostics now print what file the message is from, alongside better context
+- Added STRICT-TAGS to enforce a basic tag set. See http://visl.sdu.dk/cg3/chunked/tags.html#strict-tags
+- Added OPTIONS to enforce stricter cleaner grammars. See http://visl.sdu.dk/cg3/chunked/grammar.html#grammar-options
+- Added cg-conv cmdline options for handling weights and sub-readings (--wfactor, --wtag, --sub-delim)
+- Added REOPEN-MAPPINGS to let a grammar reuse a prefix for chosen tags. See http://visl.sdu.dk/cg3/chunked/grammar.html#reopen-mappings
+- Added magic set _SAME_BASIC_ to check for identical readings. See http://visl.sdu.dk/cg3/chunked/sets.html#set-same-basic
+- Added context modifier 'f' to automatically create an alternative branch where numeric tags don't apply. See http://visl.sdu.dk/cg3/chunked/contexts.html#test-branch
+- Added SUB:* to match any sub-reading. Can currently only be used for Select/Remove-like actions.
+- Added cmdline flag --split-mappings to keep mapping tags on a reading of their own in the output. Note that you MUST NOT treat this format as different from the merged format - they are logically identical.
+
+Changes:
+- cg-conv now auto-detects Apertium better
+- Tag prefix ! (inversion) removed in favour of ^ (fail-fast)
+- Empty composite tag is now an error
+- Readings that would be considered identical without --trace are now marked deleted under --trace. This is incorrect behavior, but being blessed because it makes things easier for grammarians.
+- Regex captures are now done on a true per-reading basis, which fixes a lot of quirks
+- Non-capturing unification is now also done on a true per-reading basis, and ditto
+- Cmdline flag --prefix must now match the loaded binary grammar's prefix
+- The Emacs major mode is now named cg.el again
+- CR and NEL are no longer considered separate newlines, which fixes line numbers for DOS/Windows files
+
+Fixed Bugs:
+- Substitute out-of-order tags no longer crashes
+- Mapping tags created via varstring now work like mapping tags
+- Regex captures no longer remain after a failed context
+- Fixed partial wordform parsing in the input stream
+- Fixed empty sections that caused --sections to skip last section
+- Fixed sub-readings remaining active in certain situations
+- Fixed parsing the set SUB as the SUB: flag
+- Fixed a minor memory leak regarding regexes
+- Fixed dependencies looking at removed cohorts and subsequently crashing
+
+Main site is http://visl.sdu.dk/cg3.html
+Google Group is http://groups.google.com/group/constraint-grammar
+Source snapshots available at http://visl.sdu.dk/download/cg3/
+Windows binary is at http://apertium.projectjj.com/win32/nightly/
+OS X binary is at http://apertium.projectjj.com/osx/nightly/
+RHEL/Fedora/CentOS/OpenSUSE packages are at http://apertium.projectjj.com/rpm/howto.txt
+Debian/Ubuntu packages are at http://apertium.projectjj.com/apt/howto.txt
+
+I strongly recommend everyone uses STRICT-TAGS in their grammars. It greatly reduces the risk of typos.
+
+-- Tino Didriksen
+CG-3 Developer
diff --git a/src/ApertiumApplicator.cpp b/src/ApertiumApplicator.cpp
index 314fc38..e594dcb 100644
--- a/src/ApertiumApplicator.cpp
+++ b/src/ApertiumApplicator.cpp
@@ -276,7 +276,7 @@ void ApertiumApplicator::runGrammarOnText(istream& input, UFILE *output) {
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -436,7 +436,7 @@ void ApertiumApplicator::runGrammarOnText(istream& input, UFILE *output) {
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -447,7 +447,7 @@ void ApertiumApplicator::runGrammarOnText(istream& input, UFILE *output) {
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
if ((inchar) && inchar != 0xffff) {
diff --git a/src/FSTApplicator.cpp b/src/FSTApplicator.cpp
index 515a92e..ee3574c 100644
--- a/src/FSTApplicator.cpp
+++ b/src/FSTApplicator.cpp
@@ -361,7 +361,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -409,7 +409,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -420,7 +420,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
u_fflush(output);
diff --git a/src/GrammarApplicator.hpp b/src/GrammarApplicator.hpp
index 32fe4c6..519a7de 100644
--- a/src/GrammarApplicator.hpp
+++ b/src/GrammarApplicator.hpp
@@ -45,6 +45,8 @@ namespace CG3 {
class Set;
class Rule;
+ typedef std::vector<UnicodeString> regexgrps_t;
+
struct dSMC_Context {
const ContextualTest *test;
Cohort **deep;
@@ -184,8 +186,9 @@ namespace CG3 {
uint32_t par_left_pos, par_right_pos;
bool did_final_enclosure;
- std::vector<UnicodeString> regexgrps;
- bc::flat_map<uint32_t, std::vector<UnicodeString> > regexgrps_r;
+ std::vector<regexgrps_t> regexgrps_store;
+ std::pair<size_t, regexgrps_t*>* regexgrps;
+ bc::flat_map<uint32_t, std::pair<size_t,regexgrps_t*> > regexgrps_r;
uint32_t same_basic;
Cohort *target;
Cohort *mark;
diff --git a/src/GrammarApplicator_matchSet.cpp b/src/GrammarApplicator_matchSet.cpp
index 4be9904..32947ef 100644
--- a/src/GrammarApplicator_matchSet.cpp
+++ b/src/GrammarApplicator_matchSet.cpp
@@ -95,8 +95,12 @@ uint32_t GrammarApplicator::doesTagMatchRegexp(uint32_t test, const Tag& tag, bo
UChar tmp[1024];
for (int i = 1; i <= gc; ++i) {
tmp[0] = 0;
- uregex_group(tag.regexp, i, tmp, 1024, &status);
- regexgrps.push_back(tmp);
+ int32_t len = uregex_group(tag.regexp, i, tmp, 1024, &status);
+ regexgrps->second->resize(std::max(regexgrps->first+1, regexgrps->second->size()));
+ UnicodeString& ucstr = (*regexgrps->second)[regexgrps->first];
+ ucstr.remove();
+ ucstr.append(tmp, len);
+ ++regexgrps->first;
}
}
else {
diff --git a/src/GrammarApplicator_reflow.cpp b/src/GrammarApplicator_reflow.cpp
index 2ceeaa4..5e39d71 100644
--- a/src/GrammarApplicator_reflow.cpp
+++ b/src/GrammarApplicator_reflow.cpp
@@ -379,8 +379,8 @@ Tag *GrammarApplicator::generateVarstringTag(const Tag *tag) {
}
// Replace $1-$9 with their respective match groups
- for (size_t i=0 ; i<regexgrps.size() && i<9 ; ++i) {
- tmp.findAndReplace(stringbits[S_VS1+i].getTerminatedBuffer(), regexgrps[i]);
+ for (size_t i = 0; i<regexgrps->first && i<9; ++i) {
+ tmp.findAndReplace(stringbits[S_VS1+i], (*regexgrps->second)[i]);
did_something = true;
}
diff --git a/src/GrammarApplicator_runContextualTest.cpp b/src/GrammarApplicator_runContextualTest.cpp
index b96ecb1..dd7850f 100644
--- a/src/GrammarApplicator_runContextualTest.cpp
+++ b/src/GrammarApplicator_runContextualTest.cpp
@@ -31,7 +31,7 @@
namespace CG3 {
Cohort *GrammarApplicator::runSingleTest(Cohort *cohort, const ContextualTest *test, uint8_t& rvs, bool *retval, Cohort **deep, Cohort *origin) {
- size_t regexgrpz = regexgrps.size();
+ size_t regexgrpz = regexgrps->first;
if (test->pos & POS_MARK_SET) {
mark = cohort;
}
@@ -92,7 +92,7 @@ Cohort *GrammarApplicator::runSingleTest(Cohort *cohort, const ContextualTest *t
rvs |= TRV_BREAK;
}
if (!*retval) {
- regexgrps.resize(regexgrpz);
+ regexgrps->first = regexgrpz;
}
return cohort;
}
diff --git a/src/GrammarApplicator_runGrammar.cpp b/src/GrammarApplicator_runGrammar.cpp
index 49dca3e..d523ca5 100644
--- a/src/GrammarApplicator_runGrammar.cpp
+++ b/src/GrammarApplicator_runGrammar.cpp
@@ -253,7 +253,7 @@ gotaline:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -438,7 +438,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -455,7 +455,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
u_fprintf(output, "%S", &line[0]);
line[0] = 0;
@@ -615,7 +615,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -630,7 +630,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
u_fflush(output);
diff --git a/src/GrammarApplicator_runRules.cpp b/src/GrammarApplicator_runRules.cpp
index 273e583..9bbd0c9 100644
--- a/src/GrammarApplicator_runRules.cpp
+++ b/src/GrammarApplicator_runRules.cpp
@@ -117,20 +117,20 @@ TagList GrammarApplicator::getTagList(const Set& theSet, bool unif_mode) const {
const_foreach (uint32Vector, pSet.sets, iter, iter_end) {
if (unif_sets->count(*iter)) {
TagList recursiveTags = getTagList(*(grammar->sets_list[*iter]));
- theTags.splice(theTags.end(), recursiveTags);
+ theTags.insert(theTags.end(), recursiveTags.begin(), recursiveTags.end());
}
}
}
else if (theSet.type & ST_TAG_UNIFY) {
const_foreach (uint32Vector, theSet.sets, iter, iter_end) {
TagList recursiveTags = getTagList(*(grammar->sets_list[*iter]), true);
- theTags.splice(theTags.end(), recursiveTags);
+ theTags.insert(theTags.end(), recursiveTags.begin(), recursiveTags.end());
}
}
else if (!theSet.sets.empty()) {
const_foreach (uint32Vector, theSet.sets, iter, iter_end) {
TagList recursiveTags = getTagList(*(grammar->sets_list[*iter]), unif_mode);
- theTags.splice(theTags.end(), recursiveTags);
+ theTags.insert(theTags.end(), recursiveTags.begin(), recursiveTags.end());
}
}
else if (unif_mode) {
@@ -402,9 +402,6 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
subs_any.clear();
}
// Varstring capture groups exist on a per-cohort basis, since we may need them for mapping later.
- if (!regexgrps.empty()) {
- regexgrps.clear();
- }
if (!regexgrps_r.empty()) {
regexgrps_r.clear();
}
@@ -415,6 +412,9 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
unif_sets_rs.clear();
}
+ size_t used_regex = 0;
+ regexgrps_store.resize(std::max(regexgrps_store.size(), cohort->readings.size()));
+
size_t used_unif = 0;
unif_tags_store.resize(std::max(unif_tags_store.size(), cohort->readings.size()));
unif_sets_store.resize(std::max(unif_sets_store.size(), cohort->readings.size()));
@@ -450,10 +450,17 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
if (reading->matched_tests) {
++num_active;
}
+ regexgrps_r[reading->number] = regexgrps_r[rpit->second->number];
continue;
}
}
+ // Regex capture is done on a per-reading basis, so clear all captured state.
+ regexgrps = ®exgrps_r[reading->number];
+ regexgrps->first = 0;
+ regexgrps->second = ®exgrps_store[used_regex];
+ ++used_regex;
+
// Unification is done on a per-reading basis, so clear all unification state.
unif_tags = &unif_tags_store[used_unif];
unif_sets = &unif_sets_store[used_unif];
@@ -477,13 +484,11 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
same_basic = reading->hash_plain;
target = 0;
mark = cohort;
- size_t orz = regexgrps.size();
+ size_t orz = regexgrps->first;
// Actually check if the reading is a valid target. First check if rule target matches...
if (rule.target && doesSetMatchReading(*reading, rule.target, (set.type & (ST_CHILD_UNIFY|ST_SPECIAL)) != 0)) {
- bool captured = false;
- if (orz != regexgrps.size()) {
+ if (orz != regexgrps->first) {
did_test = false;
- captured = true;
}
target = cohort;
reading->matched_target = true;
@@ -532,17 +537,14 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
reading->matched_tests = true;
++num_active;
++rule.num_match;
- if (captured) {
- regexgrps_r[reading->hash].swap(regexgrps);
- }
}
else {
- regexgrps.resize(orz);
+ regexgrps->first = orz;
}
++num_iff;
}
else {
- regexgrps.resize(orz);
+ regexgrps->first = orz;
++rule.num_fail;
}
readings_plain.insert(std::make_pair(reading->hash_plain,reading));
@@ -595,8 +597,9 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
bool good = reading.matched_tests;
const uint32_t state_hash = reading.hash;
- if (regexgrps_r.count(reading.hash)) {
- regexgrps_r[reading.hash].swap(regexgrps);
+ regexgrps = 0;
+ if (regexgrps_r.count(reading.number)) {
+ regexgrps = ®exgrps_r[reading.number];
}
// Iff needs extra special care; if it is a Remove type and we matched the target, go ahead.
@@ -749,6 +752,7 @@ uint32_t GrammarApplicator::runRulesOnSingleWindow(SingleWindow& current, const
// Move any enclosed parentheses to the previous cohort
if (!cohort->enclosed.empty()) {
cohort->prev->enclosed.insert(cohort->prev->enclosed.end(), cohort->enclosed.begin(), cohort->enclosed.end());
+ cohort->enclosed.clear();
}
cohort->type |= CT_REMOVED;
cohort->prev->removed.push_back(cohort);
diff --git a/src/NicelineApplicator.cpp b/src/NicelineApplicator.cpp
index f2c041f..fc81bb6 100644
--- a/src/NicelineApplicator.cpp
+++ b/src/NicelineApplicator.cpp
@@ -204,7 +204,7 @@ gotaline:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -340,7 +340,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -351,7 +351,7 @@ istext:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
u_fflush(output);
diff --git a/src/PlaintextApplicator.cpp b/src/PlaintextApplicator.cpp
index 6481a30..70f65db 100644
--- a/src/PlaintextApplicator.cpp
+++ b/src/PlaintextApplicator.cpp
@@ -194,7 +194,7 @@ gotaline:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -331,7 +331,7 @@ gotaline:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
gWindow->shuffleWindowsDown();
runGrammarOnWindow();
@@ -342,7 +342,7 @@ gotaline:
SingleWindow *tmp = gWindow->previous.front();
printSingleWindow(tmp, output);
free_swindow(tmp);
- gWindow->previous.pop_front();
+ gWindow->previous.erase(gWindow->previous.begin());
}
u_fflush(output);
diff --git a/src/Tag.hpp b/src/Tag.hpp
index ffed51c..6594638 100644
--- a/src/Tag.hpp
+++ b/src/Tag.hpp
@@ -120,8 +120,8 @@ namespace CG3 {
}
};
- typedef std::list<Tag*> TagList;
typedef std::vector<Tag*> TagVector;
+ typedef TagVector TagList;
typedef flat_unordered_map<uint32_t,Tag*> Taguint32HashMap;
typedef sorted_vector<Tag*, compare_Tag> TagSortedVector;
diff --git a/src/TagTrie.hpp b/src/TagTrie.hpp
index 0ac7c21..dd2357e 100644
--- a/src/TagTrie.hpp
+++ b/src/TagTrie.hpp
@@ -156,6 +156,7 @@ namespace CG3 {
return false;
}
+ /*
inline void trie_getTagList(const trie_t& trie, TagVector& theTags) {
boost_foreach (const trie_t::value_type& kv, trie) {
theTags.push_back(kv.first);
@@ -164,6 +165,7 @@ namespace CG3 {
}
}
}
+ //*/
inline TagVector trie_getTagList(const trie_t& trie) {
TagVector theTags;
diff --git a/src/Window.cpp b/src/Window.cpp
index 9c12fd0..625a783 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -68,7 +68,7 @@ SingleWindow *Window::allocPushSingleWindow() {
swindow->previous = current;
current->next = swindow;
}
- next.push_front(swindow);
+ next.insert(next.begin(), swindow);
return swindow;
}
@@ -94,7 +94,7 @@ void Window::shuffleWindowsDown() {
if (!next.empty()) {
current = next.front();
- next.pop_front();
+ next.erase(next.begin());
}
}
diff --git a/src/Window.hpp b/src/Window.hpp
index 3b2192a..a31333e 100644
--- a/src/Window.hpp
+++ b/src/Window.hpp
@@ -30,7 +30,7 @@ namespace CG3 {
class Cohort;
class SingleWindow;
- typedef std::list<SingleWindow*> SingleWindowCont;
+ typedef std::vector<SingleWindow*> SingleWindowCont;
class Window {
public:
diff --git a/src/version.hpp b/src/version.hpp
index 107b674..5194255 100644
--- a/src/version.hpp
+++ b/src/version.hpp
@@ -30,7 +30,7 @@ const char* const CG3_COPYRIGHT_STRING = "Copyright (C) 2007-2015 GrammarSoft Ap
const uint32_t CG3_VERSION_MAJOR = 0;
const uint32_t CG3_VERSION_MINOR = 9;
const uint32_t CG3_VERSION_PATCH = 9;
-const uint32_t CG3_REVISION = 10800;
+const uint32_t CG3_REVISION = 10815;
const uint32_t CG3_FEATURE_REV = 10575;
const uint32_t CG3_TOO_OLD = 10373;
const uint32_t CG3_EXTERNAL_PROTOCOL = 7226;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cg3.git
More information about the debian-science-commits
mailing list