#include <config.h>
#endif
+/* unused */
typedef struct _FcSymbolic {
const char *name;
int value;
#define FC_MEM_VSTACK 26
#define FC_MEM_ATTR 27
#define FC_MEM_PSTACK 28
+#define FC_MEM_STATICSTR 29
-#define FC_MEM_NUM 29
+#define FC_MEM_NUM 30
typedef enum _FcValueBinding {
FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
} FcValueBinding;
+typedef struct _FcStrSetPtr {
+ FcStorage storage;
+ union {
+ int stat;
+ struct _FcStrSet *dyn;
+ } u;
+} FcStrSetPtr;
+
+typedef struct _FcValueListPtr {
+ FcStorage storage;
+ union {
+ int stat;
+ struct _FcValueList *dyn;
+ } u;
+} FcValueListPtr;
+
typedef struct _FcValueList {
- struct _FcValueList *next;
+ FcValueListPtr next;
+
FcValue value;
FcValueBinding binding;
} FcValueList;
+typedef struct _FcPatternEltPtr {
+ FcStorage storage;
+ union {
+ int stat;
+ struct _FcPatternElt *dyn;
+ } u;
+} FcPatternEltPtr;
+
typedef struct _FcPatternElt {
- const char *object;
- FcValueList *values;
+ FcObjectPtr object;
+ FcValueListPtr values;
} FcPatternElt;
-
struct _FcPattern {
int num;
int size;
- FcPatternElt *elts;
+ FcPatternEltPtr elts;
int ref;
};
struct _FcCharSet {
int ref; /* reference count */
int num; /* size of leaves and numbers arrays */
- FcCharLeaf **leaves;
- FcChar16 *numbers;
+ FcStorage storage;
+ union {
+ struct {
+ FcCharLeaf **leaves;
+ FcChar16 *numbers;
+ } dyn;
+ struct {
+ int leafidx_offset;
+ int numbers_offset;
+ } stat;
+ } u;
};
struct _FcStrSet {
int ref; /* reference count */
int num;
int size;
- FcChar8 **strs;
+ FcStorage storage;
+ union {
+ FcChar8 **strs;
+ int stridx_offset;
+ } u;
};
struct _FcStrList {
FcChar8 name[1]; /* name extends beyond struct */
} FcGlyphName;
+/*
+ * To perform case-insensitive string comparisons, a table
+ * is used which holds three different kinds of folding data.
+ *
+ * The first is a range of upper case values mapping to a range
+ * of their lower case equivalents. Within each range, the offset
+ * between upper and lower case is constant.
+ *
+ * The second is a range of upper case values which are interleaved
+ * with their lower case equivalents.
+ *
+ * The third is a set of raw unicode values mapping to a list
+ * of unicode values for comparison purposes. This allows conversion
+ * of ß to "ss" so that SS, ss and ß all match. A separate array
+ * holds the list of unicode values for each entry.
+ *
+ * These are packed into a single table. Using a binary search,
+ * the appropriate entry can be located.
+ */
+
+#define FC_CASE_FOLD_RANGE 0
+#define FC_CASE_FOLD_EVEN_ODD 1
+#define FC_CASE_FOLD_FULL 2
+
+typedef struct _FcCaseFold {
+ FcChar32 upper;
+ FcChar16 method : 2;
+ FcChar16 count : 14;
+ short offset; /* lower - upper for RANGE, table id for FULL */
+} FcCaseFold;
+
#define FC_MAX_FILE_LEN 4096
/*
FcCharLeaf *
FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
+void
+FcCharSetPtrDestroy (FcCharSetPtr fcs);
+
+void
+FcCharSetClearStatic(void);
+
+FcBool
+FcCharSetPrepareSerialize(FcCharSet *c);
+
+FcCharSetPtr
+FcCharSetSerialize(FcCharSet *c);
+
+FcCharSetPtr
+FcCharSetPtrCreateDynamic(FcCharSet *c);
+
+FcCharLeaf *
+FcCharSetGetLeaf(const FcCharSet *c, int i);
+
+FcChar16 *
+FcCharSetGetNumbers(const FcCharSet *c);
+
/* fcdbg.c */
void
-FcValueListPrint (const FcValueList *l);
+FcValueListPrint (const FcValueListPtr l);
void
FcLangSetPrint (const FcLangSet *ls);
int
FcDebug (void);
+FcCharSet *
+FcCharSetPtrU (FcCharSetPtr mi);
+
/* fcdir.c */
FcBool
FcFreeTypeGetPrivateMap (FT_Encoding encoding);
/* fcfs.c */
+
+void
+FcFontSetClearStatic (void);
+
+FcBool
+FcFontSetPrepareSerialize (FcFontSet * s);
+
+FcBool
+FcFontSetSerialize (FcFontSet * s);
+
/* fcgram.y */
int
FcConfigparse (void);
char *
FcConfigSaveField (const char *field);
-FcTest *
-FcTestCreate (FcMatchKind kind,
- FcQual qual,
- const FcChar8 *field,
- FcOp compare,
- FcExpr *expr);
-
void
FcTestDestroy (FcTest *test);
void
FcExprDestroy (FcExpr *e);
-FcEdit *
-FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding);
-
void
FcEditDestroy (FcEdit *e);
FcBool
FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
+void
+FcLangSetClearStatic (void);
+
+FcBool
+FcLangSetPrepareSerialize (FcLangSet *l);
+
+FcLangSetPtr
+FcLangSetSerialize (FcLangSet *l);
+
+FcLangSet *
+FcLangSetPtrU (FcLangSetPtr li);
+
+FcLangSetPtr
+FcLangSetPtrCreateDynamic (FcLangSet *l);
+
+void
+FcLangSetPtrDestroy (FcLangSetPtr li);
+
/* fclist.c */
FcBool
/* fcmatch.c */
+/* fcmmap.c */
+
+void
+FcCacheClearStatic(void);
+
+FcBool
+FcCachePrepareSerialize(FcConfig * config);
+
+FcBool
+FcCacheSerialize (FcConfig * config);
+
+
/* fcname.c */
FcBool
-FcNameBool (FcChar8 *v, FcBool *result);
+FcNameBool (const FcChar8 *v, FcBool *result);
/* fcpat.c */
void
-FcValueListDestroy (FcValueList *l);
-
+FcValueListDestroy (FcValueListPtr l);
+
FcPatternElt *
FcPatternFindElt (const FcPattern *p, const char *object);
FcPatternFreeze (FcPattern *p);
void
-FcPatternThawAll (void);
+FcPatternFini (void);
FcBool
FcPatternAppend (FcPattern *p, FcPattern *s);
-const char *
+void
+FcObjectClearStatic(void);
+
+FcObjectPtr
FcObjectStaticName (const char *name);
+FcBool
+FcObjectPrepareSerialize (FcObjectPtr si);
+
+const char *
+FcObjectPtrU (FcObjectPtr p);
+
+int
+FcObjectPtrCompare (FcObjectPtr a, FcObjectPtr b);
+
+FcObjectPtr
+FcObjectPtrCreateDynamic (const char * s);
+
+void
+FcObjectPtrDestroy (FcObjectPtr p);
+
+FcBool
+FcPatternPrepareSerialize (FcPattern *p);
+
+void
+FcValueListClearStatic (void);
+
+void
+FcPatternClearStatic (void);
+
+FcValueList *
+FcValueListPtrU(FcValueListPtr p);
+
+FcPatternElt *
+FcPatternEltU (FcPatternEltPtr pei);
+
+FcValueListPtr
+FcValueListPtrCreateDynamic(FcValueList * p);
+
+FcBool
+FcValueListPrepareSerialize (FcValueList *p);
+
+FcValueListPtr
+FcValueListSerialize(FcValueList *pi);
+
+FcPattern *
+FcPatternSerialize (FcPattern * p);
+
/* fcrender.c */
/* fcmatrix.c */
-extern const FcMatrix FcIdentityMatrix;
+extern const FcMatrixPtr FcIdentityMatrix;
void
FcMatrixFree (FcMatrix *mat);
+void
+FcMatrixPtrDestroy (FcMatrixPtr mi);
+
+FcBool
+FcMatrixPrepareSerialize(FcMatrix *m);
+
+FcMatrixPtr
+FcMatrixSerialize(FcMatrix *m);
+
+FcMatrix *
+FcMatrixPtrU (FcMatrixPtr mi);
+
+FcMatrixPtr
+FcMatrixPtrCreateDynamic (FcMatrix *m);
+
+void
+FcMatrixClearStatic (void);
+
/* fcstr.c */
+FcStrSet *
+FcStrSetPtrU (const FcStrSetPtr set);
+
+FcStrSetPtr
+FcStrSetPtrCreateDynamic (const FcStrSet * set);
+
+void
+FcStrSetClearStatic (void);
+
+FcBool
+FcStrSetPrepareSerialize (const FcStrSet *set);
+
+void
+FcStrSetSort (FcStrSet * set);
+
+FcChar8 *
+FcStrSetGet (const FcStrSet *set, int i);
+
FcChar8 *
FcStrPlus (const FcChar8 *s1, const FcChar8 *s2);
FcBool
FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
+FcStrSetPtr
+FcStrSetSerialize (FcStrSet *set);
+
int
FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
FcChar8 *
FcStrLastSlash (const FcChar8 *path);
+FcChar32
+FcStrHashIgnoreCase (const FcChar8 *s);
+
#endif /* _FC_INT_H_ */