[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kcontrol/kfontinst/kfontinst
From: Craig Drummond <craig () kde ! org>
Date: 2004-12-09 16:56:54
Message-ID: 20041209165654.92CAD1BA9E () office ! kde ! org
[Download RAW message or body]
CVS commit by craig:
use kasciistricmp instead of own fe_stricmp
M +18 -40 FontEngine.cpp 1.42
--- kdebase/kcontrol/kfontinst/kfontinst/FontEngine.cpp #1.41:1.42
@@ -58,6 +58,5 @@
#include "CompressedFile.h"
#include "Misc.h"
-#include <kurl.h>
-#include <kconfig.h>
+#include <kglobal.h>
#include <ctype.h>
#include <string.h>
@@ -100,25 +99,4 @@ namespace KFI
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-static int fe_stricmp(const char *s1, const char *s2)
-{
- char c1,
- c2;
-
- for(;;)
- {
- c1=*s1++;
- c2=*s2++;
- if(!c1 || !c2)
- break;
- if(isupper(c1))
- c1=tolower (c1);
- if(isupper(c2))
- c2=tolower (c2);
- if(c1!=c2)
- break;
- }
- return (int)c2-(int)c1;
-}
-
#ifdef HAVE_FONT_ENC
CFontEngine::~CFontEngine()
@@ -290,31 +268,31 @@ CFontEngine::EWeight CFontEngine::strToW
if(NULL==str)
return WEIGHT_MEDIUM; // WEIGHT_UNKNOWN;
- else if(fe_stricmp(str, "Bold")==0)
+ else if(kasciistricmp(str, "Bold")==0)
return WEIGHT_BOLD;
- else if(fe_stricmp(str, "Black")==0)
+ else if(kasciistricmp(str, "Black")==0)
return WEIGHT_BLACK;
- else if(fe_stricmp(str, "ExtraBold")==0)
+ else if(kasciistricmp(str, "ExtraBold")==0)
return WEIGHT_EXTRA_BOLD;
- else if(fe_stricmp(str, "UltraBold")==0)
+ else if(kasciistricmp(str, "UltraBold")==0)
return WEIGHT_ULTRA_BOLD;
- else if(fe_stricmp(str, "ExtraLight")==0)
+ else if(kasciistricmp(str, "ExtraLight")==0)
return WEIGHT_EXTRA_LIGHT;
- else if(fe_stricmp(str, "UltraLight")==0)
+ else if(kasciistricmp(str, "UltraLight")==0)
return WEIGHT_ULTRA_LIGHT;
- else if(fe_stricmp(str, "Light")==0)
+ else if(kasciistricmp(str, "Light")==0)
return WEIGHT_LIGHT;
- else if(fe_stricmp(str, "Medium")==0 || fe_stricmp(str, "Normal")==0 || \
fe_stricmp(str, "Roman")==0) + else if(kasciistricmp(str, "Medium")==0 || \
kasciistricmp(str, "Normal")==0 || kasciistricmp(str, "Roman")==0) return \
WEIGHT_MEDIUM;
- else if(fe_stricmp(str, "Regular")==0)
+ else if(kasciistricmp(str, "Regular")==0)
return WEIGHT_MEDIUM; // WEIGHT_REGULAR;
- else if(fe_stricmp(str, "Demi")==0)
+ else if(kasciistricmp(str, "Demi")==0)
return WEIGHT_DEMI;
- else if(fe_stricmp(str, "SemiBold")==0)
+ else if(kasciistricmp(str, "SemiBold")==0)
return WEIGHT_SEMI_BOLD;
- else if(fe_stricmp(str, "DemiBold")==0)
+ else if(kasciistricmp(str, "DemiBold")==0)
return WEIGHT_DEMI_BOLD;
- else if(fe_stricmp(str, "Thin")==0)
+ else if(kasciistricmp(str, "Thin")==0)
return WEIGHT_THIN;
- else if(fe_stricmp(str, "Book")==0)
+ else if(kasciistricmp(str, "Book")==0)
return WEIGHT_BOOK;
else
@@ -1682,5 +1660,5 @@ bool CFontEngine::openFontSnf(const QStr
value=readStrSnf(snf);
- if(!foundXlfd && fe_stricmp(name, "FONT")==0 && \
strlen(value)) + if(!foundXlfd && \
kasciistricmp(name, "FONT")==0 && strlen(value)) {
foundXlfd=true;
@@ -1810,5 +1788,5 @@ bool CFontEngine::openFontPcf(const QStr
for(prop=0; prop<numProps && !foundXlfd; \
++prop)
- \
if(fe_stricmp(&str[props[prop].name], "FONT")==0) + \
if(kasciistricmp(&str[props[prop].name], "FONT")==0) {
if(props[prop].isString && \
strlen(&str[props[prop].value]))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic