diff options
author | joerg <joerg> | 2013-06-16 20:44:24 +0000 |
---|---|---|
committer | joerg <joerg> | 2013-06-16 20:44:24 +0000 |
commit | 3e338c89aa504050139f0b3eced8a0ded7bd3e38 (patch) | |
tree | 1fa16ea8d5ce98a9f32339445dbf7a079b55f01a /news | |
parent | 3081b639e51d8f9e0b0c3a83c9e56ab1f4aa0945 (diff) | |
download | pkgsrc-3e338c89aa504050139f0b3eced8a0ded7bd3e38.tar.gz |
ISO C++ is explicit that deque requires a fully defined type, so it is
not portable to embeded a deque in the same type.
Diffstat (limited to 'news')
-rw-r--r-- | news/pan/Makefile | 4 | ||||
-rw-r--r-- | news/pan/distinfo | 15 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_data-impl_article-filter.cc | 27 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_data-impl_groups.cc | 13 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_data-impl_rules-filter.cc | 24 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_general_log.cc | 13 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_general_log.h | 18 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_general_macros.h | 36 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_gui_header-pane.cc | 128 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_gui_log-ui.cc | 30 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_usenet-utils_filter-info.cc | 46 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_usenet-utils_filter-info.h | 24 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_usenet-utils_rules-info.cc | 13 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_usenet-utils_rules-info.h | 23 | ||||
-rw-r--r-- | news/pan/patches/patch-pan_usenet-utils_scorefile.cc | 46 |
15 files changed, 457 insertions, 3 deletions
diff --git a/news/pan/Makefile b/news/pan/Makefile index 314e7a4a8b6..9f30e321dd6 100644 --- a/news/pan/Makefile +++ b/news/pan/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.78 2013/06/06 12:54:58 wiz Exp $ +# $NetBSD: Makefile,v 1.79 2013/06/16 20:44:24 joerg Exp $ # DISTNAME= pan-0.139 -PKGREVISION= 8 +PKGREVISION= 9 CATEGORIES= news MASTER_SITES= http://pan.rebelbase.com/download/releases/${DISTNAME:C/pan-//}/source/ EXTRACT_SUFX= .tar.bz2 diff --git a/news/pan/distinfo b/news/pan/distinfo index 7cfe79036ee..8cd421355b4 100644 --- a/news/pan/distinfo +++ b/news/pan/distinfo @@ -1,6 +1,19 @@ -$NetBSD: distinfo,v 1.24 2012/07/13 08:15:59 marino Exp $ +$NetBSD: distinfo,v 1.25 2013/06/16 20:44:24 joerg Exp $ SHA1 (pan-0.139.tar.bz2) = 01ea0361a6d81489888e6abb075fd552999c3c60 RMD160 (pan-0.139.tar.bz2) = e0e2963b2d11b362201639ca755ad9ae43581c2f Size (pan-0.139.tar.bz2) = 1523907 bytes +SHA1 (patch-pan_data-impl_article-filter.cc) = 418ff73ff2ab1e6aa392bc4274b5fe53be2f4b5e +SHA1 (patch-pan_data-impl_groups.cc) = 01f0d2788a57e11433601a5298dd6b325fa78757 +SHA1 (patch-pan_data-impl_rules-filter.cc) = 9cf5fc3b98fb413d00a3930048bd8ff20debc4cf +SHA1 (patch-pan_general_log.cc) = 14dfcfbca317db9d260650f4df8d3cd1b41b276e +SHA1 (patch-pan_general_log.h) = e1dec811667323cf1ca2923901428edb020f5e5e +SHA1 (patch-pan_general_macros.h) = c20f170d7abb8dfd14d20cdd1ad17432cb81a13b +SHA1 (patch-pan_gui_header-pane.cc) = e647ba0578752613f17ab50da2588b652b81ef16 +SHA1 (patch-pan_gui_log-ui.cc) = bf2588f29103325e0a9a01a8adfefa49d98452d7 +SHA1 (patch-pan_usenet-utils_filter-info.cc) = 00daa6d43df448993fa7e500c4c842921ce3ba8c +SHA1 (patch-pan_usenet-utils_filter-info.h) = 27523bb2caeafc89f97e98b801ac24d40148914d SHA1 (patch-pan_usenet-utils_mime-utils.cc) = fb3703e8e5ddd24b337b583e3f4348358a0098f5 +SHA1 (patch-pan_usenet-utils_rules-info.cc) = d233e004d4abdd16a8f0677b73476358b41f92e0 +SHA1 (patch-pan_usenet-utils_rules-info.h) = c51b3e823495ff06b2b88ffbff3dac79bca849b7 +SHA1 (patch-pan_usenet-utils_scorefile.cc) = b5955f55fa4d582cea950bae869e738b9debe056 diff --git a/news/pan/patches/patch-pan_data-impl_article-filter.cc b/news/pan/patches/patch-pan_data-impl_article-filter.cc new file mode 100644 index 00000000000..738d3d9819e --- /dev/null +++ b/news/pan/patches/patch-pan_data-impl_article-filter.cc @@ -0,0 +1,27 @@ +$NetBSD: patch-pan_data-impl_article-filter.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/data-impl/article-filter.cc.orig 2013-06-16 10:43:31.000000000 +0000 ++++ pan/data-impl/article-filter.cc +@@ -62,7 +62,7 @@ ArticleFilter :: test_article (const Dat + { + case FilterInfo::AGGREGATE_AND: + pass = true; +- foreach_const (FilterInfo::aggregates_t, criteria._aggregates, it) { ++ foreach_const (FilterInfo::aggregates_t, *criteria._aggregates, it) { + // assume test passes if test needs body but article not cached + if (!it->_needs_body || cache.contains(article.message_id) ) + if (!test_article (data, *it, group, article)) { +@@ -73,11 +73,11 @@ ArticleFilter :: test_article (const Dat + break; + + case FilterInfo::AGGREGATE_OR: +- if (criteria._aggregates.empty()) ++ if (criteria._aggregates->empty()) + pass = true; + else { + pass = false; +- foreach_const (FilterInfo::aggregates_t, criteria._aggregates, it) { ++ foreach_const (FilterInfo::aggregates_t, *criteria._aggregates, it) { + // assume test fails if test needs body but article not cached + if (!it->_needs_body || cache.contains(article.message_id) ) + if (test_article (data, *it, group, article)) { diff --git a/news/pan/patches/patch-pan_data-impl_groups.cc b/news/pan/patches/patch-pan_data-impl_groups.cc new file mode 100644 index 00000000000..28a08b3a30f --- /dev/null +++ b/news/pan/patches/patch-pan_data-impl_groups.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-pan_data-impl_groups.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/data-impl/groups.cc.orig 2013-06-16 10:45:37.000000000 +0000 ++++ pan/data-impl/groups.cc +@@ -81,8 +81,6 @@ namespace + } + } + +-#include <ext/algorithm> +- + void + DataImpl :: load_newsrc (const Quark & server, + LineReader * in, diff --git a/news/pan/patches/patch-pan_data-impl_rules-filter.cc b/news/pan/patches/patch-pan_data-impl_rules-filter.cc new file mode 100644 index 00000000000..93f47595bb5 --- /dev/null +++ b/news/pan/patches/patch-pan_data-impl_rules-filter.cc @@ -0,0 +1,24 @@ +$NetBSD: patch-pan_data-impl_rules-filter.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/data-impl/rules-filter.cc.orig 2013-06-16 10:44:22.000000000 +0000 ++++ pan/data-impl/rules-filter.cc +@@ -62,16 +62,16 @@ RulesFilter :: test_article ( Data + { + case RulesInfo::AGGREGATE__AND: + pass = true; +- foreach (RulesInfo::aggregates_t, rules._aggregates, it) ++ foreach (RulesInfo::aggregates_t, *rules._aggregates, it) + test_article (data, *it, group, article); + break; + + case RulesInfo::AGGREGATE__OR: +- if (rules._aggregates.empty()) ++ if (rules._aggregates->empty()) + pass = true; + else { + pass = false; +- foreach (RulesInfo::aggregates_t, rules._aggregates, it) { ++ foreach (RulesInfo::aggregates_t, *rules._aggregates, it) { + if (test_article (data, *it, group, article)) { + pass = true; + break; diff --git a/news/pan/patches/patch-pan_general_log.cc b/news/pan/patches/patch-pan_general_log.cc new file mode 100644 index 00000000000..5aefba313ef --- /dev/null +++ b/news/pan/patches/patch-pan_general_log.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-pan_general_log.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/general/log.cc.orig 2013-06-16 10:33:24.000000000 +0000 ++++ pan/general/log.cc +@@ -68,7 +68,7 @@ Log :: add_entry(Entry& e, std::deque<En + a.date = time(NULL); + a.severity = e.severity; + a.message = e.message; +- a.messages = list; ++ *a.messages = list; + fire_entry_added (a); + } + diff --git a/news/pan/patches/patch-pan_general_log.h b/news/pan/patches/patch-pan_general_log.h new file mode 100644 index 00000000000..60dc665e4a5 --- /dev/null +++ b/news/pan/patches/patch-pan_general_log.h @@ -0,0 +1,18 @@ +$NetBSD: patch-pan_general_log.h,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/general/log.h.orig 2013-06-16 10:31:39.000000000 +0000 ++++ pan/general/log.h +@@ -49,10 +49,11 @@ namespace pan + struct Entry { + time_t date; + Severity severity; +- std::deque<Entry> messages; ++ std::deque<Entry> *messages; + std::string message; + bool is_child; +- Entry() : is_child(false) { } ++ Entry() : is_child(false), messages(new(std::deque<Entry>)) { } ++ ~Entry() { delete messages;} + }; + + void add_entry(Entry& e, std::deque<Entry>& list); diff --git a/news/pan/patches/patch-pan_general_macros.h b/news/pan/patches/patch-pan_general_macros.h new file mode 100644 index 00000000000..b6d46e61cdb --- /dev/null +++ b/news/pan/patches/patch-pan_general_macros.h @@ -0,0 +1,36 @@ +$NetBSD: patch-pan_general_macros.h,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/general/macros.h.orig 2013-06-16 10:38:55.000000000 +0000 ++++ pan/general/macros.h +@@ -28,23 +28,23 @@ + **/ + + #define foreach(Type,var,itname) \ +- for (Type::iterator itname(var.begin()), \ +- itname##end(var.end()); itname!=itname##end; \ ++ for (Type::iterator itname((var).begin()), \ ++ itname##end((var).end()); itname!=itname##end; \ + ++itname) + + #define foreach_const(Type,var,itname) \ +- for (Type::const_iterator itname(var.begin()), \ +- itname##end(var.end()); itname!=itname##end; \ ++ for (Type::const_iterator itname((var).begin()), \ ++ itname##end((var).end()); itname!=itname##end; \ + ++itname) + + #define foreach_r(Type,var,itname) \ +- for (Type::reverse_iterator itname(var.rbegin()), \ +- itname##end(var.rend()); itname!=itname##end; \ ++ for (Type::reverse_iterator itname((var).rbegin()), \ ++ itname##end((var).rend()); itname!=itname##end; \ + ++itname) + + #define foreach_const_r(Type,var,itname) \ +- for (Type::const_reverse_iterator itname(var.rbegin()), \ +- itname##end(var.rend()); itname!=itname##end; \ ++ for (Type::const_reverse_iterator itname((var).rbegin()), \ ++ itname##end((var).rend()); itname!=itname##end; \ + ++itname) + + /** diff --git a/news/pan/patches/patch-pan_gui_header-pane.cc b/news/pan/patches/patch-pan_gui_header-pane.cc new file mode 100644 index 00000000000..6011f639b1e --- /dev/null +++ b/news/pan/patches/patch-pan_gui_header-pane.cc @@ -0,0 +1,128 @@ +$NetBSD: patch-pan_gui_header-pane.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/gui/header-pane.cc.orig 2013-06-16 10:47:35.000000000 +0000 ++++ pan/gui/header-pane.cc +@@ -1256,19 +1256,19 @@ HeaderPane :: rebuild_rules (bool enable + + res = get_int_from_rules_str(_prefs.get_string("rules-delete-value", "never")); + tmp.set_type_delete_b (res.first, res.second); +- r._aggregates.push_back (tmp); ++ r._aggregates->push_back (tmp); + + res = get_int_from_rules_str(_prefs.get_string("rules-mark-read-value", "never")); + tmp.set_type_mark_read_b (res.first, res.second); +- r._aggregates.push_back (tmp); ++ r._aggregates->push_back (tmp); + + res = get_int_from_rules_str(_prefs.get_string("rules-autocache-value", "never")); + tmp.set_type_autocache_b (res.first, res.second); +- r._aggregates.push_back (tmp); ++ r._aggregates->push_back (tmp); + + res = get_int_from_rules_str(_prefs.get_string("rules-auto-dl-value", "never")); + tmp.set_type_dl_b (res.first, res.second); +- r._aggregates.push_back (tmp); ++ r._aggregates->push_back (tmp); + + } + +@@ -1301,43 +1301,43 @@ HeaderPane :: rebuild_filter (const std: + entry_filter.set_type_aggregate_or (); + f1.set_type_text ("Subject", d); + f2.set_type_text ("From", d); +- entry_filter._aggregates.push_back (f1); +- entry_filter._aggregates.push_back (f2); ++ entry_filter._aggregates->push_back (f1); ++ entry_filter._aggregates->push_back (f2); + } else if (mode == SUBJECT_OR_AUTHOR_REGEX) { + FilterInfo f1, f2; + entry_filter.set_type_aggregate_or (); + d.type = TextMatch::REGEX; + f1.set_type_text ("Subject", d); + f2.set_type_text ("From", d); +- entry_filter._aggregates.push_back (f1); +- entry_filter._aggregates.push_back (f2); ++ entry_filter._aggregates->push_back (f1); ++ entry_filter._aggregates->push_back (f2); + } +- f._aggregates.push_back (entry_filter); ++ f._aggregates->push_back (entry_filter); + } + + if (_action_manager.is_action_active("match-only-unread-articles")) { + //std::cerr << LINE_ID << " AND is unread" << std::endl; + FilterInfo tmp; + tmp.set_type_is_unread (); +- f._aggregates.push_back (tmp); ++ f._aggregates->push_back (tmp); + } + if (_action_manager.is_action_active("match-only-cached-articles")) { + //std::cerr << LINE_ID << " AND is cached" << std::endl; + FilterInfo tmp; + tmp.set_type_cached (); +- f._aggregates.push_back (tmp); ++ f._aggregates->push_back (tmp); + } + if (_action_manager.is_action_active("match-only-binary-articles")) { + //std::cerr << LINE_ID << " AND has an attachment" << std::endl; + FilterInfo tmp; + tmp.set_type_binary (); +- f._aggregates.push_back (tmp); ++ f._aggregates->push_back (tmp); + } + if (_action_manager.is_action_active("match-only-my-articles")) { + //std::cerr << LINE_ID << " AND was posted by me" << std::endl; + FilterInfo tmp; + tmp.set_type_posted_by_me (); +- f._aggregates.push_back (tmp); ++ f._aggregates->push_back (tmp); + } + + // try to fold the six ranges into as few FilterInfo items as possible.. +@@ -1386,22 +1386,22 @@ HeaderPane :: rebuild_filter (const std: + FilterInfo s, tmp; + s.set_type_aggregate_and (); + tmp.set_type_score_ge (range.first); +- s._aggregates.push_back (tmp); ++ s._aggregates->push_back (tmp); + tmp.set_type_score_le (range.second); +- s._aggregates.push_back (tmp); ++ s._aggregates->push_back (tmp); + //std::cerr << LINE_ID << " AND has a in [" << range.first << "..." << range.second << ']' << std::endl; + filters.push_back (s); + } + } + if (filters.size()==1) // can fit in an `and' parent +- f._aggregates.push_back (filters[0]); ++ f._aggregates->push_back (filters[0]); + else if (!filters.empty()) { // needs an `or' parent + FilterInfo s; + s.set_type_aggregate_or (); +- s._aggregates.swap (filters); +- f._aggregates.push_back (s); ++ s._aggregates->swap (filters); ++ f._aggregates->push_back (s); + } +-//std::cerr << LINE_ID << " number of filters: " << f._aggregates.size() << std::endl; ++//std::cerr << LINE_ID << " number of filters: " << f._aggregates->size() << std::endl; + } + + void +@@ -1413,7 +1413,7 @@ HeaderPane :: filter (const std::string& + { + _wait.watch_cursor_on (); + +- if (_filter._aggregates.empty()) ++ if (_filter._aggregates->empty()) + _atree->set_filter (); + else + _atree->set_filter (_show_type, &_filter); +@@ -1431,7 +1431,7 @@ HeaderPane :: rules(bool enable) + { + _wait.watch_cursor_on (); + +- if (_rules._aggregates.empty()) ++ if (_rules._aggregates->empty()) + _atree->set_rules(); + else + _atree->set_rules(_show_type, &_rules); diff --git a/news/pan/patches/patch-pan_gui_log-ui.cc b/news/pan/patches/patch-pan_gui_log-ui.cc new file mode 100644 index 00000000000..2efb53f6bb8 --- /dev/null +++ b/news/pan/patches/patch-pan_gui_log-ui.cc @@ -0,0 +1,30 @@ +$NetBSD: patch-pan_gui_log-ui.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/gui/log-ui.cc.orig 2013-06-16 10:49:10.000000000 +0000 ++++ pan/gui/log-ui.cc +@@ -57,11 +57,11 @@ namespace + COL_SEVERITY, (e.severity & Log::PAN_SEVERITY_ERROR), + COL_DATE, (unsigned long)e.date, + COL_MESSAGE, &e, -1); +- if (!e.messages.empty()) ++ if (!e.messages->empty()) + { + GtkTreeIter child; + +- foreach_const (Log::entries_t, e.messages, lit) ++ foreach_const (Log::entries_t, *e.messages, lit) + { + gtk_tree_store_prepend (myStore, &child, &iter ); + gtk_tree_store_set (myStore, &child, +@@ -155,9 +155,9 @@ namespace + COL_SEVERITY, (it->severity & Log::PAN_SEVERITY_ERROR), + COL_DATE, (unsigned long)it->date, + COL_MESSAGE, &*it, -1); +- if (!it->messages.empty()) ++ if (!it->messages->empty()) + { +- foreach_const (Log::entries_t, it->messages, lit) ++ foreach_const (Log::entries_t, *it->messages, lit) + { + gtk_tree_store_prepend (store, &child, &top ); + gtk_tree_store_set (store, &child, diff --git a/news/pan/patches/patch-pan_usenet-utils_filter-info.cc b/news/pan/patches/patch-pan_usenet-utils_filter-info.cc new file mode 100644 index 00000000000..4a1f4d0ec45 --- /dev/null +++ b/news/pan/patches/patch-pan_usenet-utils_filter-info.cc @@ -0,0 +1,46 @@ +$NetBSD: patch-pan_usenet-utils_filter-info.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/usenet-utils/filter-info.cc.orig 2013-06-16 10:37:40.000000000 +0000 ++++ pan/usenet-utils/filter-info.cc +@@ -38,7 +38,7 @@ FilterInfo :: clear () + _ge = 0; + _header.clear (); + _text.clear (); +- _aggregates.clear (); ++ _aggregates->clear (); + _negate = false; + _needs_body = false; + } +@@ -284,28 +284,28 @@ FilterInfo :: describe () const + { + ret = _("Any of these tests fail:"); + ret += "\n"; +- foreach_const (aggregates_t, _aggregates, it) ++ foreach_const (aggregates_t, *_aggregates, it) + ret += " " + it->describe() + "\n"; + } + else if (_type==AGGREGATE_AND) + { + ret = _("All of these tests pass:"); + ret += "\n"; +- foreach_const (aggregates_t, _aggregates, it) ++ foreach_const (aggregates_t, *_aggregates, it) + ret += " " + it->describe() + "\n"; + } + else if (_type==AGGREGATE_OR && _negate) + { + ret = _("None of these tests pass:"); + ret += "\n"; +- foreach_const (aggregates_t, _aggregates, it) ++ foreach_const (aggregates_t, *_aggregates, it) + ret += " " + it->describe() + "\n"; + } + else if (_type==AGGREGATE_OR) + { + ret = _("Any of these tests pass:"); + ret += "\n"; +- foreach_const (aggregates_t, _aggregates, it) ++ foreach_const (aggregates_t, *_aggregates, it) + ret += " " + it->describe() + "\n"; + } + diff --git a/news/pan/patches/patch-pan_usenet-utils_filter-info.h b/news/pan/patches/patch-pan_usenet-utils_filter-info.h new file mode 100644 index 00000000000..aa62392fb90 --- /dev/null +++ b/news/pan/patches/patch-pan_usenet-utils_filter-info.h @@ -0,0 +1,24 @@ +$NetBSD: patch-pan_usenet-utils_filter-info.h,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/usenet-utils/filter-info.h.orig 2013-06-16 10:36:39.000000000 +0000 ++++ pan/usenet-utils/filter-info.h +@@ -54,8 +54,8 @@ namespace pan + + public: + bool empty() const { return _type == TYPE_ERR; } +- FilterInfo () { clear(); } +- virtual ~FilterInfo () { } ++ FilterInfo () : _aggregates(new aggregates_t) { clear(); } ++ virtual ~FilterInfo () { delete _aggregates; } + + public: + +@@ -77,7 +77,7 @@ namespace pan + + /** When `_type' is AGGREGATE_OR or AGGREGATE_AND, + these are the filters being or'ed or and'ed together. */ +- aggregates_t _aggregates; ++ aggregates_t *_aggregates; + + /** When this is true, the results of the test should be negated. */ + bool _negate; diff --git a/news/pan/patches/patch-pan_usenet-utils_rules-info.cc b/news/pan/patches/patch-pan_usenet-utils_rules-info.cc new file mode 100644 index 00000000000..479697832b6 --- /dev/null +++ b/news/pan/patches/patch-pan_usenet-utils_rules-info.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-pan_usenet-utils_rules-info.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/usenet-utils/rules-info.cc.orig 2013-06-16 10:37:35.000000000 +0000 ++++ pan/usenet-utils/rules-info.cc +@@ -39,7 +39,7 @@ void + RulesInfo :: clear () + { + _type = RulesInfo::TYPE__ERR; +- _aggregates.clear (); ++ _aggregates->clear (); + _lb = _hb = 0; + _ge = 0; + _negate = false; diff --git a/news/pan/patches/patch-pan_usenet-utils_rules-info.h b/news/pan/patches/patch-pan_usenet-utils_rules-info.h new file mode 100644 index 00000000000..31b8a752d6a --- /dev/null +++ b/news/pan/patches/patch-pan_usenet-utils_rules-info.h @@ -0,0 +1,23 @@ +$NetBSD: patch-pan_usenet-utils_rules-info.h,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/usenet-utils/rules-info.h.orig 2013-06-16 10:35:10.000000000 +0000 ++++ pan/usenet-utils/rules-info.h +@@ -50,15 +50,15 @@ namespace pan + RulesType _type; + + bool empty() const { return _type == TYPE__ERR; } +- RulesInfo () { clear(); } +- virtual ~RulesInfo () { } ++ RulesInfo () : _aggregates(new aggregates_t) { clear(); } ++ virtual ~RulesInfo () { delete _aggregates; } + + /** Convenience typedef. */ + typedef std::deque<RulesInfo> aggregates_t; + + /** When `_type' is AGGREGATE_OR or AGGREGATE_AND, + these are the filters being or'ed or and'ed together. */ +- aggregates_t _aggregates; ++ aggregates_t *_aggregates; + + /** When this is true, the results of the test should be negated. */ + bool _negate; diff --git a/news/pan/patches/patch-pan_usenet-utils_scorefile.cc b/news/pan/patches/patch-pan_usenet-utils_scorefile.cc new file mode 100644 index 00000000000..349251b071d --- /dev/null +++ b/news/pan/patches/patch-pan_usenet-utils_scorefile.cc @@ -0,0 +1,46 @@ +$NetBSD: patch-pan_usenet-utils_scorefile.cc,v 1.1 2013/06/16 20:44:24 joerg Exp $ + +--- pan/usenet-utils/scorefile.cc.orig 2013-06-16 10:40:34.000000000 +0000 ++++ pan/usenet-utils/scorefile.cc +@@ -103,7 +103,7 @@ struct pan::Scorefile::ParseContext + test = &item->test; + if (test) + foreach_const (std::vector<int>, test_offsets, it) +- test = &test->_aggregates[*it]; ++ test = &(*test->_aggregates)[*it]; + return test; + } + +@@ -265,8 +265,8 @@ Scorefile :: parse_file (ParseContext& c + test.set_type_aggregate_and (); + + FilterInfo * parent (context.get_current_test ()); +- context.test_offsets.push_back (parent->_aggregates.size()); +- parent->_aggregates.push_back (test); ++ context.test_offsets.push_back (parent->_aggregates->size()); ++ parent->_aggregates->push_back (test); + } + + // end nested conditions +@@ -331,7 +331,7 @@ Scorefile :: parse_file (ParseContext& c + StringView val (line.substr (delimiter+1, 0)); + val.trim (); + +- FilterInfo::aggregates_t& aggregates (context.get_current_test()->_aggregates); ++ FilterInfo::aggregates_t& aggregates (*context.get_current_test()->_aggregates); + aggregates.resize (aggregates.size() + 1); + FilterInfo& test (aggregates.back()); + +@@ -395,9 +395,9 @@ namespace + if ((test._type!=test.AGGREGATE_AND) && (test._type!=test.AGGREGATE_OR)) + return; + +- if (test._aggregates.size() == 1) +- test = test._aggregates[0]; +- else foreach (FilterInfo::aggregates_t, test._aggregates, it) ++ if (test._aggregates->size() == 1) ++ test = (*test._aggregates)[0]; ++ else foreach (FilterInfo::aggregates_t, *test._aggregates, it) + normalize_test (*it); + } + } |