diff options
author | joerg <joerg@pkgsrc.org> | 2013-05-23 18:38:36 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-05-23 18:38:36 +0000 |
commit | f2d740af4a2435f56e335c1e2866240663690bb6 (patch) | |
tree | e818b60db68d5b4d6a7a6b098734b7856514acf9 /databases/kmysqladmin | |
parent | fd425166065ae2705d59ffd142958ca03b9b6f9e (diff) | |
download | pkgsrc-f2d740af4a2435f56e335c1e2866240663690bb6.tar.gz |
Use wider type to make sure that find() errors can be detected.
Don't use iterator(0). Bump revision.
Diffstat (limited to 'databases/kmysqladmin')
-rw-r--r-- | databases/kmysqladmin/Makefile | 4 | ||||
-rw-r--r-- | databases/kmysqladmin/distinfo | 5 | ||||
-rw-r--r-- | databases/kmysqladmin/patches/patch-kmysqladmin_helpers_stringlist.h | 49 | ||||
-rw-r--r-- | databases/kmysqladmin/patches/patch-kmysqladmin_helpers_tfunctions.h | 13 |
4 files changed, 65 insertions, 6 deletions
diff --git a/databases/kmysqladmin/Makefile b/databases/kmysqladmin/Makefile index 1c5fa9e63fb..87aecd30769 100644 --- a/databases/kmysqladmin/Makefile +++ b/databases/kmysqladmin/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.61 2013/05/09 07:39:31 adam Exp $ +# $NetBSD: Makefile,v 1.62 2013/05/23 18:38:36 joerg Exp $ DISTNAME= kmysqladmin-0.7.2 -PKGREVISION= 23 +PKGREVISION= 24 CATEGORIES= databases kde MASTER_SITES= http://www.alwins-world.de/programs/download/kmysqladmin/ diff --git a/databases/kmysqladmin/distinfo b/databases/kmysqladmin/distinfo index 232392db57d..88aaed9d1b8 100644 --- a/databases/kmysqladmin/distinfo +++ b/databases/kmysqladmin/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.10 2011/11/24 14:16:18 joerg Exp $ +$NetBSD: distinfo,v 1.11 2013/05/23 18:38:36 joerg Exp $ SHA1 (kmysqladmin-0.7.2.tar.gz) = b184c5f9ffcc872c49f048b939327448e0a82ae7 RMD160 (kmysqladmin-0.7.2.tar.gz) = 0993b8969888618395efa5b671a9a0f9d44e9d5a Size (kmysqladmin-0.7.2.tar.gz) = 1294472 bytes SHA1 (patch-af) = bb36a6402d9ba28a73c01203fe282f93ccd654ae -SHA1 (patch-kmysqladmin_helpers_stringlist.h) = dfc52b884016db2cabf65a936db780ab1ffb5163 +SHA1 (patch-kmysqladmin_helpers_stringlist.h) = 951509f572bd52ddc1f2a1f2d7cbb10df50a8207 +SHA1 (patch-kmysqladmin_helpers_tfunctions.h) = 81071ea454a6f807da56c28c28f460f647811f12 diff --git a/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_stringlist.h b/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_stringlist.h index 3f47ce4c2c7..c55c27ae1cd 100644 --- a/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_stringlist.h +++ b/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_stringlist.h @@ -1,6 +1,6 @@ -$NetBSD: patch-kmysqladmin_helpers_stringlist.h,v 1.1 2011/11/24 14:16:18 joerg Exp $ +$NetBSD: patch-kmysqladmin_helpers_stringlist.h,v 1.2 2013/05/23 18:38:36 joerg Exp $ ---- kmysqladmin/helpers/stringlist.h.orig 2011-11-24 01:52:27.000000000 +0000 +--- kmysqladmin/helpers/stringlist.h.orig 2003-10-01 01:07:04.000000000 +0000 +++ kmysqladmin/helpers/stringlist.h @@ -25,6 +25,7 @@ #include "stringhelper.h" @@ -10,3 +10,48 @@ $NetBSD: patch-kmysqladmin_helpers_stringlist.h,v 1.1 2011/11/24 14:16:18 joerg /*! * Implementation of a string-list +@@ -59,14 +60,20 @@ public: + * \param start_pos the position of list to start for search + * \return the position if found else vector::end() + */ +- iterator find(const std::string&what,iterator start_pos = iterator(0)); +- iterator find_nocase(const std::string&what,iterator start_pos = iterator(0)); ++ iterator find(const std::string&what,iterator start_pos); ++ iterator find(const std::string&what) { ++ return find(what, begin()); ++ } ++ iterator find_nocase(const std::string&what,iterator start_pos); ++ iterator find_nocase(const std::string&what) { ++ return find_nocase(what, begin()); ++ } + }; + + inline std::vector<std::string>::iterator + stringlist::find(const std::string&what,iterator start_pos) + { +- _search_pos = start_pos!=iterator(0)?start_pos:begin(); ++ _search_pos = start_pos; + for (;_search_pos<end();++_search_pos) { + if (_search_pos->compare(what) == 0) { + return _search_pos; +@@ -78,7 +85,7 @@ stringlist::find(const std::string&what, + inline std::vector<std::string>::iterator + stringlist::find_nocase(const std::string&what,iterator start_pos) + { +- _search_pos = start_pos!=iterator(0)?start_pos:begin(); ++ _search_pos = start_pos; + return std::find_if(_search_pos,end(),Caseequif(what)); + } + +@@ -92,7 +99,10 @@ public: + * \param start_pos the position to start - default the first item of list + * \return the position if found else vector::end() + */ +- iterator find(const std::string&what,iterator start_pos = iterator(0)); ++ iterator find(const std::string&what,iterator start_pos); ++ iterator find(const std::string&what) { ++ return find(what, begin()); ++ } + }; + + inline std::vector<std::string>::iterator diff --git a/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_tfunctions.h b/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_tfunctions.h new file mode 100644 index 00000000000..f3c45fee51b --- /dev/null +++ b/databases/kmysqladmin/patches/patch-kmysqladmin_helpers_tfunctions.h @@ -0,0 +1,13 @@ +$NetBSD: patch-kmysqladmin_helpers_tfunctions.h,v 1.1 2013/05/23 18:38:36 joerg Exp $ + +--- kmysqladmin/helpers/tfunctions.h.orig 2013-05-23 17:28:38.000000000 +0000 ++++ kmysqladmin/helpers/tfunctions.h +@@ -167,7 +167,7 @@ namespace tfunctions { + Explode(){}; + stringlist operator()(const std::string&s,const std::string&delemiter,bool aTrimit) + { +- unsigned int pos; ++ std::string::size_type pos; + stringlist l; + std::string iLine = s; + while ( (pos = iLine.find(delemiter))!=std::string::npos) { |