aboutsummaryrefslogtreecommitdiff
path: root/src/Theme.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-06 13:36:34 (GMT)
committerfluxgen <fluxgen>2002-01-06 13:36:34 (GMT)
commit4d27bb40cae57bb96022561b36bcc53e69db5cf8 (patch)
treec55019224ebfe4bfa72330579df3dfc7eb09ae04 /src/Theme.cc
parent2f82ecd85d70d022bedab2d0844198a14cb40f2d (diff)
downloadfluxbox-4d27bb40cae57bb96022561b36bcc53e69db5cf8.zip
fluxbox-4d27bb40cae57bb96022561b36bcc53e69db5cf8.tar.bz2
Moved strcasestr to StringUtil
Diffstat (limited to 'src/Theme.cc')
-rw-r--r--src/Theme.cc18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/Theme.cc b/src/Theme.cc
index 564a157..c57c850 100644
--- a/src/Theme.cc
+++ b/src/Theme.cc
@@ -57,6 +57,7 @@
57#include "i18n.hh" 57#include "i18n.hh"
58#include "Basemenu.hh" 58#include "Basemenu.hh"
59#include "fluxbox.hh" 59#include "fluxbox.hh"
60#include "StringUtil.hh"
60 61
61#include <X11/Xresource.h> 62#include <X11/Xresource.h>
62#include <stdio.h> 63#include <stdio.h>
@@ -67,21 +68,6 @@
67# define FONT_ELEMENT_SIZE 50 68# define FONT_ELEMENT_SIZE 50
68#endif // FONT_ELEMENT_SIZE 69#endif // FONT_ELEMENT_SIZE
69 70
70#ifndef HAVE_STRCASESTR
71
72const char * strcasestr(const char *str, const char *ptn) {
73 const char *s2, *p2;
74 for( ; *str; str++) {
75 for(s2=str,p2=ptn; ; s2++,p2++) {
76 if (!*p2) return str;
77 if (toupper(*s2) != toupper(*p2)) break;
78 }
79 }
80 return NULL;
81}
82
83#endif
84
85Theme::Theme(Display *display, Window rootwindow, Colormap colormap, int screennum, BImageControl *ic, const char *filename) { 71Theme::Theme(Display *display, Window rootwindow, Colormap colormap, int screennum, BImageControl *ic, const char *filename) {
86 72
87 m_screennum = screennum; 73 m_screennum = screennum;
@@ -1161,7 +1147,7 @@ const char *Theme::getFontElement(const char *pattern, char *buf, int bufsiz, ..
1161 buf[bufsiz-1] = 0; 1147 buf[bufsiz-1] = 0;
1162 buf[bufsiz-2] = '*'; 1148 buf[bufsiz-2] = '*';
1163 while((v = va_arg(va, char *)) != NULL) { 1149 while((v = va_arg(va, char *)) != NULL) {
1164 p = strcasestr(pattern, v); 1150 p = StringUtil::strcasestr(pattern, v);
1165 if (p) { 1151 if (p) {
1166 strncpy(buf, p+1, bufsiz-2); 1152 strncpy(buf, p+1, bufsiz-2);
1167 p2 = strchr(buf, '-'); 1153 p2 = strchr(buf, '-');