aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-02-17 23:36:43 (GMT)
committerfluxgen <fluxgen>2003-02-17 23:36:43 (GMT)
commitead4aa8b5448a19b66a230c6a8c817f35ac4394e (patch)
treeac54a6576b939aa00c17ec3ee26f983defcef84d /src
parentcac009a7ad8650d85f8b40a330ed4bc4c146e5c7 (diff)
downloadfluxbox-ead4aa8b5448a19b66a230c6a8c817f35ac4394e.zip
fluxbox-ead4aa8b5448a19b66a230c6a8c817f35ac4394e.tar.bz2
using StringUtil
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/XmbFontImp.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc
index 9367c46..431b598 100644
--- a/src/FbTk/XmbFontImp.cc
+++ b/src/FbTk/XmbFontImp.cc
@@ -19,12 +19,15 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: XmbFontImp.cc,v 1.4 2002/12/02 19:31:05 fluxgen Exp $ 22// $Id: XmbFontImp.cc,v 1.5 2003/02/17 23:36:43 fluxgen Exp $
23 23
24#include "XmbFontImp.hh" 24#include "XmbFontImp.hh"
25 25
26#include "App.hh" 26#include "App.hh"
27 27
28//!! TODO: Change this
29#include "../StringUtil.hh"
30
28#ifdef HAVE_CONFIG_H 31#ifdef HAVE_CONFIG_H
29#include "config.h" 32#include "config.h"
30#endif //HAVE_CONFIG_H 33#endif //HAVE_CONFIG_H
@@ -47,7 +50,7 @@ using namespace std;
47namespace { 50namespace {
48 51
49#ifndef HAVE_STRCASESTR 52#ifndef HAVE_STRCASESTR
50// 53//!! TODO this is moved to StringUtil
51// Tries to find a string in another and 54// Tries to find a string in another and
52// ignoring the case of the characters 55// ignoring the case of the characters
53// Returns 0 on success else pointer to str. 56// Returns 0 on success else pointer to str.
@@ -101,7 +104,7 @@ const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...) {
101 buf[bufsiz-1] = 0; 104 buf[bufsiz-1] = 0;
102 buf[bufsiz-2] = '*'; 105 buf[bufsiz-2] = '*';
103 while((v = va_arg(va, char *)) != 0) { 106 while((v = va_arg(va, char *)) != 0) {
104 p = ::strcasestr(pattern, v); 107 p = StringUtil::strcasestr(pattern, v);
105 if (p) { 108 if (p) {
106 std::strncpy(buf, p+1, bufsiz-2); 109 std::strncpy(buf, p+1, bufsiz-2);
107 p2 = strchr(buf, '-'); 110 p2 = strchr(buf, '-');