[int] Remove fc_value_* macros that did nothing other than renaming
This commit is contained in:
parent
888f9427ae
commit
963820fcbf
|
@ -421,12 +421,6 @@ typedef struct _FcCaseFold {
|
||||||
|
|
||||||
#define FC_MAX_FILE_LEN 4096
|
#define FC_MAX_FILE_LEN 4096
|
||||||
|
|
||||||
/* XXX remove these when we're ready */
|
|
||||||
|
|
||||||
#define fc_value_string(v) FcValueString(v)
|
|
||||||
#define fc_value_charset(v) FcValueCharSet(v)
|
|
||||||
#define fc_value_langset(v) FcValueLangSet(v)
|
|
||||||
|
|
||||||
#define FC_CACHE_MAGIC_MMAP 0xFC02FC04
|
#define FC_CACHE_MAGIC_MMAP 0xFC02FC04
|
||||||
#define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
|
#define FC_CACHE_MAGIC_ALLOC 0xFC02FC05
|
||||||
#define FC_CACHE_CONTENT_VERSION 3 /* also check FC_CACHE_VERSION */
|
#define FC_CACHE_CONTENT_VERSION 3 /* also check FC_CACHE_VERSION */
|
||||||
|
|
|
@ -61,7 +61,7 @@ FcCompareNumber (FcValue *value1, FcValue *value2)
|
||||||
static double
|
static double
|
||||||
FcCompareString (FcValue *v1, FcValue *v2)
|
FcCompareString (FcValue *v1, FcValue *v2)
|
||||||
{
|
{
|
||||||
return (double) FcStrCmpIgnoreCase (fc_value_string(v1), fc_value_string(v2)) != 0;
|
return (double) FcStrCmpIgnoreCase (FcValueString(v1), FcValueString(v2)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double
|
static double
|
||||||
|
@ -69,8 +69,8 @@ FcCompareFamily (FcValue *v1, FcValue *v2)
|
||||||
{
|
{
|
||||||
/* rely on the guarantee in FcPatternAddWithBinding that
|
/* rely on the guarantee in FcPatternAddWithBinding that
|
||||||
* families are always FcTypeString. */
|
* families are always FcTypeString. */
|
||||||
const FcChar8* v1_string = fc_value_string(v1);
|
const FcChar8* v1_string = FcValueString(v1);
|
||||||
const FcChar8* v2_string = fc_value_string(v2);
|
const FcChar8* v2_string = FcValueString(v2);
|
||||||
|
|
||||||
if (FcToLower(*v1_string) != FcToLower(*v2_string) &&
|
if (FcToLower(*v1_string) != FcToLower(*v2_string) &&
|
||||||
*v1_string != ' ' && *v2_string != ' ')
|
*v1_string != ' ' && *v2_string != ' ')
|
||||||
|
@ -137,7 +137,7 @@ FcCompareBool (FcValue *v1, FcValue *v2)
|
||||||
static double
|
static double
|
||||||
FcCompareCharSet (FcValue *v1, FcValue *v2)
|
FcCompareCharSet (FcValue *v1, FcValue *v2)
|
||||||
{
|
{
|
||||||
return (double) FcCharSetSubtractCount (fc_value_charset(v1), fc_value_charset(v2));
|
return (double) FcCharSetSubtractCount (FcValueCharSet(v1), FcValueCharSet(v2));
|
||||||
}
|
}
|
||||||
|
|
||||||
static double
|
static double
|
||||||
|
|
12
src/fcpat.c
12
src/fcpat.c
|
@ -75,15 +75,15 @@ FcValueCanonicalize (const FcValue *v)
|
||||||
switch (v->type)
|
switch (v->type)
|
||||||
{
|
{
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
new.u.s = fc_value_string(v);
|
new.u.s = FcValueString(v);
|
||||||
new.type = FcTypeString;
|
new.type = FcTypeString;
|
||||||
break;
|
break;
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
new.u.c = fc_value_charset(v);
|
new.u.c = FcValueCharSet(v);
|
||||||
new.type = FcTypeCharSet;
|
new.type = FcTypeCharSet;
|
||||||
break;
|
break;
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
new.u.l = fc_value_langset(v);
|
new.u.l = FcValueLangSet(v);
|
||||||
new.type = FcTypeLangSet;
|
new.type = FcTypeLangSet;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -228,7 +228,7 @@ FcValueHash (const FcValue *v)
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
return FcDoubleHash (v->u.d);
|
return FcDoubleHash (v->u.d);
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
return FcStringHash (fc_value_string(v));
|
return FcStringHash (FcValueString(v));
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
return (FcChar32) v->u.b;
|
return (FcChar32) v->u.b;
|
||||||
case FcTypeMatrix:
|
case FcTypeMatrix:
|
||||||
|
@ -237,12 +237,12 @@ FcValueHash (const FcValue *v)
|
||||||
FcDoubleHash (v->u.m->yx) ^
|
FcDoubleHash (v->u.m->yx) ^
|
||||||
FcDoubleHash (v->u.m->yy));
|
FcDoubleHash (v->u.m->yy));
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
return (FcChar32) fc_value_charset(v)->num;
|
return (FcChar32) FcValueCharSet(v)->num;
|
||||||
case FcTypeFTFace:
|
case FcTypeFTFace:
|
||||||
return FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->family_name) ^
|
return FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->family_name) ^
|
||||||
FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->style_name);
|
FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->style_name);
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
return FcLangSetHash (fc_value_langset(v));
|
return FcLangSetHash (FcValueLangSet(v));
|
||||||
}
|
}
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue