File indexing completed on 2025-01-18 09:57:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #ifndef _FCPRIVATE_H_
0026 #define _FCPRIVATE_H_
0027
0028
0029
0030
0031
0032
0033
0034 #define FcPatternVapBuild(result, orig, va) \
0035 { \
0036 FcPattern *__p__ = (orig); \
0037 const char *__o__; \
0038 FcValue __v__; \
0039 \
0040 if (!__p__) \
0041 { \
0042 __p__ = FcPatternCreate (); \
0043 if (!__p__) \
0044 goto _FcPatternVapBuild_bail0; \
0045 } \
0046 for (;;) \
0047 { \
0048 __o__ = va_arg (va, const char *); \
0049 if (!__o__) \
0050 break; \
0051 __v__.type = va_arg (va, int); \
0052 switch (__v__.type) { \
0053 case FcTypeUnknown: \
0054 case FcTypeVoid: \
0055 goto _FcPatternVapBuild_bail1; \
0056 case FcTypeInteger: \
0057 __v__.u.i = va_arg (va, int); \
0058 break; \
0059 case FcTypeDouble: \
0060 __v__.u.d = va_arg (va, double); \
0061 break; \
0062 case FcTypeString: \
0063 __v__.u.s = va_arg (va, const FcChar8 *); \
0064 break; \
0065 case FcTypeBool: \
0066 __v__.u.b = va_arg (va, FcBool); \
0067 break; \
0068 case FcTypeMatrix: \
0069 __v__.u.m = va_arg (va, const FcMatrix *); \
0070 break; \
0071 case FcTypeCharSet: \
0072 __v__.u.c = va_arg (va, const FcCharSet *); \
0073 break; \
0074 case FcTypeFTFace: \
0075 __v__.u.f = va_arg (va, FT_Face); \
0076 break; \
0077 case FcTypeLangSet: \
0078 __v__.u.l = va_arg (va, const FcLangSet *); \
0079 break; \
0080 case FcTypeRange: \
0081 __v__.u.r = va_arg (va, const FcRange *); \
0082 break; \
0083 } \
0084 if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \
0085 goto _FcPatternVapBuild_bail1; \
0086 } \
0087 result = __p__; \
0088 goto _FcPatternVapBuild_return; \
0089 \
0090 _FcPatternVapBuild_bail1: \
0091 if (!orig) \
0092 FcPatternDestroy (__p__); \
0093 _FcPatternVapBuild_bail0: \
0094 result = (void*)0; \
0095 \
0096 _FcPatternVapBuild_return: \
0097 ; \
0098 }
0099
0100
0101 #define FcObjectSetVapBuild(__ret__, __first__, __va__) \
0102 { \
0103 FcObjectSet *__os__; \
0104 const char *__ob__; \
0105 \
0106 __ret__ = 0; \
0107 __os__ = FcObjectSetCreate (); \
0108 if (!__os__) \
0109 goto _FcObjectSetVapBuild_bail0; \
0110 __ob__ = __first__; \
0111 while (__ob__) \
0112 { \
0113 if (!FcObjectSetAdd (__os__, __ob__)) \
0114 goto _FcObjectSetVapBuild_bail1; \
0115 __ob__ = va_arg (__va__, const char *); \
0116 } \
0117 __ret__ = __os__; \
0118 \
0119 _FcObjectSetVapBuild_bail1: \
0120 if (!__ret__ && __os__) \
0121 FcObjectSetDestroy (__os__); \
0122 _FcObjectSetVapBuild_bail0: \
0123 ; \
0124 }
0125
0126 #ifndef FC_ATTRIBUTE_VISIBILITY_HIDDEN
0127 #define FC_ATTRIBUTE_VISIBILITY_HIDDEN __attribute((visibility("hidden")))
0128 #endif
0129
0130 #ifndef FC_ATTRIBUTE_VISIBILITY_EXPORT
0131 #define FC_ATTRIBUTE_VISIBILITY_EXPORT __attribute((visibility("default")))
0132 #endif
0133
0134 #endif