From 4d27bb40cae57bb96022561b36bcc53e69db5cf8 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 6 Jan 2002 13:36:34 +0000 Subject: Moved strcasestr to StringUtil --- src/Theme.cc | 18 ++---------------- 1 file 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 @@ #include "i18n.hh" #include "Basemenu.hh" #include "fluxbox.hh" +#include "StringUtil.hh" #include #include @@ -67,21 +68,6 @@ # define FONT_ELEMENT_SIZE 50 #endif // FONT_ELEMENT_SIZE -#ifndef HAVE_STRCASESTR - -const char * strcasestr(const char *str, const char *ptn) { - const char *s2, *p2; - for( ; *str; str++) { - for(s2=str,p2=ptn; ; s2++,p2++) { - if (!*p2) return str; - if (toupper(*s2) != toupper(*p2)) break; - } - } - return NULL; -} - -#endif - Theme::Theme(Display *display, Window rootwindow, Colormap colormap, int screennum, BImageControl *ic, const char *filename) { m_screennum = screennum; @@ -1161,7 +1147,7 @@ const char *Theme::getFontElement(const char *pattern, char *buf, int bufsiz, .. buf[bufsiz-1] = 0; buf[bufsiz-2] = '*'; while((v = va_arg(va, char *)) != NULL) { - p = strcasestr(pattern, v); + p = StringUtil::strcasestr(pattern, v); if (p) { strncpy(buf, p+1, bufsiz-2); p2 = strchr(buf, '-'); -- cgit v0.11.2