]> git.pld-linux.org Git - packages/fbpager.git/commitdiff
- initial
authorBartłomiej Zimoń <cactus@pld-linux.org>
Wed, 27 Aug 2008 10:05:17 +0000 (10:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- patch from gentoo

Changed files:
    fbpager-gcc43.patch -> 1.1

fbpager-gcc43.patch [new file with mode: 0644]

diff --git a/fbpager-gcc43.patch b/fbpager-gcc43.patch
new file mode 100644 (file)
index 0000000..9289e99
--- /dev/null
@@ -0,0 +1,63 @@
+--- src/FbTk/StringUtil.cc.orig        2008-06-14 17:36:06.000000000 +0000
++++ src/FbTk/StringUtil.cc     2008-06-14 17:39:56.000000000 +0000
+@@ -23,6 +23,9 @@
+ #include "StringUtil.hh"
++
++#include <cstring>
++#include <locale>
+ #include <string>
+ #include <cstdio>
+ #include <cstdlib>
+@@ -37,6 +40,26 @@
+ namespace StringUtil {
++
++/* 
++ * structs needed for std::transform() 
++ * See: http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html#7 
++ */ 
++struct ToUpper { 
++  ToUpper(std::locale const& l) : loc(l) {;} 
++  char operator() (char c) const  { return std::toupper(c,loc); } 
++ private: 
++  std::locale const& loc; 
++}; 
++       
++struct ToLower { 
++  ToLower(std::locale const& l) : loc(l) {;} 
++  char operator() (char c) const  { return std::tolower(c,loc); } 
++private: 
++  std::locale const& loc; 
++}; 
++
++
+ /**
+    Takes a pointer to string *s as an argument,
+    creates a new string n, copies s to n and
+@@ -160,14 +183,20 @@
+ }
+ std::string toLower(const std::string &conv) {
++
++    ToLower __tolower(std::locale::classic());
++
+     std::string ret = conv;
+-    std::transform(ret.begin(), ret.end(), ret.begin(), tolower);
++    std::transform(ret.begin(), ret.end(), ret.begin(), __tolower);
+     return ret;
+ }
+ std::string toUpper(const std::string &conv) {
++
++    ToUpper __toupper(std::locale::classic());
++
+     std::string ret = conv;
+-    std::transform(ret.begin(), ret.end(), ret.begin(), toupper);
++    std::transform(ret.begin(), ret.end(), ret.begin(), __toupper);
+     return ret;
+ }
+
This page took 0.062746 seconds and 4 git commands to generate.