Imported Upstream version 2.13.1
[platform/upstream/fontconfig.git] / src / fcint.h
1 /*
2  * fontconfig/src/fcint.h
3  *
4  * Copyright © 2000 Keith Packard
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of the author(s) not be used in
11  * advertising or publicity pertaining to distribution of the software without
12  * specific, written prior permission.  The authors make no
13  * representations about the suitability of this software for any purpose.  It
14  * is provided "as is" without express or implied warranty.
15  *
16  * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18  * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22  * PERFORMANCE OF THIS SOFTWARE.
23  */
24
25 #ifndef _FCINT_H_
26 #define _FCINT_H_
27
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31
32 #include "fcstdint.h"
33
34 #include <stdlib.h>
35 #include <stdio.h>
36 #include <string.h>
37 #include <ctype.h>
38 #include <assert.h>
39 #include <errno.h>
40 #include <limits.h>
41 #include <float.h>
42 #include <math.h>
43 #include <unistd.h>
44 #include <stddef.h>
45 #include <sys/types.h>
46 #include <sys/stat.h>
47 #include <time.h>
48 #include <fontconfig/fontconfig.h>
49 #include <fontconfig/fcprivate.h>
50 #include "fcdeprecate.h"
51 #include "fcmutex.h"
52 #include "fcatomic.h"
53
54 #ifndef FC_CONFIG_PATH
55 #define FC_CONFIG_PATH "fonts.conf"
56 #endif
57
58 #ifdef _WIN32
59 #  include "fcwindows.h"
60 typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
61 typedef HRESULT (WINAPI *pfnSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
62 extern pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory;
63 extern pfnSHGetFolderPathA pSHGetFolderPathA;
64 #  define FC_SEARCH_PATH_SEPARATOR ';'
65 #  define FC_DIR_SEPARATOR         '\\'
66 #  define FC_DIR_SEPARATOR_S       "\\"
67 #else
68 #  define FC_SEARCH_PATH_SEPARATOR ':'
69 #  define FC_DIR_SEPARATOR         '/'
70 #  define FC_DIR_SEPARATOR_S       "/"
71 #endif
72
73 #ifdef PATH_MAX
74 #define FC_PATH_MAX     PATH_MAX
75 #else
76 #define FC_PATH_MAX     128
77 #endif
78
79 #if __GNUC__ >= 4
80 #define FC_UNUSED       __attribute__((unused))
81 #else
82 #define FC_UNUSED
83 #endif
84
85 #define FC_DBG_MATCH    1
86 #define FC_DBG_MATCHV   2
87 #define FC_DBG_EDIT     4
88 #define FC_DBG_FONTSET  8
89 #define FC_DBG_CACHE    16
90 #define FC_DBG_CACHEV   32
91 #define FC_DBG_PARSE    64
92 #define FC_DBG_SCAN     128
93 #define FC_DBG_SCANV    256
94 #define FC_DBG_CONFIG   1024
95 #define FC_DBG_LANGSET  2048
96 #define FC_DBG_MATCH2   4096
97
98 #define _FC_ASSERT_STATIC1(_line, _cond) typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1] FC_UNUSED
99 #define _FC_ASSERT_STATIC0(_line, _cond) _FC_ASSERT_STATIC1 (_line, (_cond))
100 #define FC_ASSERT_STATIC(_cond) _FC_ASSERT_STATIC0 (__LINE__, (_cond))
101
102 #define FC_MIN(a,b) ((a) < (b) ? (a) : (b))
103 #define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
104
105 /* slim_internal.h */
106 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
107 #define FcPrivate               __attribute__((__visibility__("hidden")))
108 #define HAVE_GNUC_ATTRIBUTE 1
109 #include "fcalias.h"
110 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
111 #define FcPrivate               __hidden
112 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
113 #define FcPrivate
114 #endif
115
116 /* NLS */
117 #ifdef ENABLE_NLS
118 #include <libintl.h>
119 #define _(x)            (dgettext(GETTEXT_PACKAGE, x))
120 #else
121 #define dgettext(d, s)  (s)
122 #define _(x)            (x)
123 #endif
124
125 #define N_(x)   x
126
127 FC_ASSERT_STATIC (sizeof (FcRef) == sizeof (int));
128
129 #define FcStrdup(s) ((FcChar8 *) strdup ((const char *) (s)))
130 #define FcFree(s) (free ((FcChar8 *) (s)))
131
132 /*
133  * Serialized data structures use only offsets instead of pointers
134  * A low bit of 1 indicates an offset.
135  */
136
137 /* Is the provided pointer actually an offset? */
138 #define FcIsEncodedOffset(p)    ((((intptr_t) (p)) & 1) != 0)
139
140 /* Encode offset in a pointer of type t */
141 #define FcOffsetEncode(o,t)     ((t *) ((o) | 1))
142
143 /* Decode a pointer into an offset */
144 #define FcOffsetDecode(p)       (((intptr_t) (p)) & ~1)
145
146 /* Compute pointer offset */
147 #define FcPtrToOffset(b,p)      ((intptr_t) (p) - (intptr_t) (b))
148
149 /* Given base address, offset and type, return a pointer */
150 #define FcOffsetToPtr(b,o,t)    ((t *) ((intptr_t) (b) + (o)))
151
152 /* Given base address, encoded offset and type, return a pointer */
153 #define FcEncodedOffsetToPtr(b,p,t) FcOffsetToPtr(b,FcOffsetDecode(p),t)
154
155 /* Given base address, pointer and type, return an encoded offset */
156 #define FcPtrToEncodedOffset(b,p,t) FcOffsetEncode(FcPtrToOffset(b,p),t)
157
158 /* Given a structure, offset member and type, return pointer */
159 #define FcOffsetMember(s,m,t)       FcOffsetToPtr(s,(s)->m,t)
160
161 /* Given a structure, encoded offset member and type, return pointer to member */
162 #define FcEncodedOffsetMember(s,m,t) FcOffsetToPtr(s,FcOffsetDecode((s)->m), t)
163
164 /* Given a structure, member and type, convert the member to a pointer */
165 #define FcPointerMember(s,m,t)  (FcIsEncodedOffset((s)->m) ? \
166                                  FcEncodedOffsetMember (s,m,t) : \
167                                  (s)->m)
168
169 /*
170  * Serialized values may hold strings, charsets and langsets as pointers,
171  * unfortunately FcValue is an exposed type so we can't just always use
172  * offsets
173  */
174 #define FcValueString(v)        FcPointerMember(v,u.s,FcChar8)
175 #define FcValueCharSet(v)       FcPointerMember(v,u.c,const FcCharSet)
176 #define FcValueLangSet(v)       FcPointerMember(v,u.l,const FcLangSet)
177 #define FcValueRange(v)         FcPointerMember(v,u.r,const FcRange)
178
179 typedef struct _FcValueList *FcValueListPtr;
180
181 typedef struct _FcValueList {
182     struct _FcValueList *next;
183     FcValue             value;
184     FcValueBinding      binding;
185 } FcValueList;
186
187 #define FcValueListNext(vl)     FcPointerMember(vl,next,FcValueList)
188                         
189 typedef int FcObject;
190
191 /* The 1024 is to leave some room for future added internal objects, such
192  * that caches from newer fontconfig can still be used with older fontconfig
193  * without getting confused. */
194 #define FC_EXT_OBJ_INDEX        1024
195 #define FC_OBJ_ID(_n_)  ((_n_) & (~FC_EXT_OBJ_INDEX))
196
197 typedef struct _FcPatternElt *FcPatternEltPtr;
198
199 /*
200  * Pattern elts are stuck in a structure connected to the pattern,
201  * so they get moved around when the pattern is resized. Hence, the
202  * values field must be a pointer/offset instead of just an offset
203  */
204 typedef struct _FcPatternElt {
205     FcObject            object;
206     FcValueList         *values;
207 } FcPatternElt;
208
209 #define FcPatternEltValues(pe)  FcPointerMember(pe,values,FcValueList)
210
211 struct _FcPattern {
212     int             num;
213     int             size;
214     intptr_t        elts_offset;
215     FcRef           ref;
216 };
217
218 #define FcPatternElts(p)        FcOffsetMember(p,elts_offset,FcPatternElt)
219
220 #define FcFontSetFonts(fs)      FcPointerMember(fs,fonts,FcPattern *)
221
222 #define FcFontSetFont(fs,i)     (FcIsEncodedOffset((fs)->fonts) ? \
223                                  FcEncodedOffsetToPtr(fs, \
224                                                       FcFontSetFonts(fs)[i], \
225                                                       FcPattern) : \
226                                  fs->fonts[i])
227                                                 
228 typedef enum _FcOp {
229     FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet,
230     FcOpNil,
231     FcOpField, FcOpConst,
232     FcOpAssign, FcOpAssignReplace,
233     FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
234     FcOpDelete, FcOpDeleteAll,
235     FcOpQuest,
236     FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
237     FcOpContains, FcOpListing, FcOpNotContains,
238     FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
239     FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
240     FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
241     FcOpInvalid
242 } FcOp;
243
244 typedef enum _FcOpFlags {
245         FcOpFlagIgnoreBlanks = 1U << 0
246 } FcOpFlags;
247
248 #define FC_OP_GET_OP(_x_)       ((_x_) & 0xffff)
249 #define FC_OP_GET_FLAGS(_x_)    (((_x_) & 0xffff0000) >> 16)
250 #define FC_OP(_x_,_f_)          (FC_OP_GET_OP (_x_) | ((_f_) << 16))
251
252 typedef struct _FcExprMatrix {
253   struct _FcExpr *xx, *xy, *yx, *yy;
254 } FcExprMatrix;
255
256 typedef struct _FcExprName {
257   FcObject      object;
258   FcMatchKind   kind;
259 } FcExprName;
260
261 struct _FcRange {
262     double begin;
263     double end;
264 };
265
266
267 typedef struct _FcExpr {
268     FcOp   op;
269     union {
270         int             ival;
271         double          dval;
272         const FcChar8   *sval;
273         FcExprMatrix    *mexpr;
274         FcBool          bval;
275         FcCharSet       *cval;
276         FcLangSet       *lval;
277         FcRange         *rval;
278
279         FcExprName      name;
280         const FcChar8   *constant;
281         struct {
282             struct _FcExpr *left, *right;
283         } tree;
284     } u;
285 } FcExpr;
286
287 typedef struct _FcExprPage FcExprPage;
288
289 struct _FcExprPage {
290   FcExprPage *next_page;
291   FcExpr *next;
292   FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
293   FcExpr end[FLEXIBLE_ARRAY_MEMBER];
294 };
295
296 typedef enum _FcQual {
297     FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
298 } FcQual;
299
300 #define FcMatchDefault  ((FcMatchKind) -1)
301
302 typedef struct _FcTest {
303     FcMatchKind         kind;
304     FcQual              qual;
305     FcObject            object;
306     FcOp                op;
307     FcExpr              *expr;
308 } FcTest;
309
310 typedef struct _FcEdit {
311     FcObject        object;
312     FcOp            op;
313     FcExpr          *expr;
314     FcValueBinding  binding;
315 } FcEdit;
316
317 typedef void (* FcDestroyFunc) (void *data);
318
319 typedef struct _FcPtrList       FcPtrList;
320 /* need to sync with FcConfigFileInfoIter at fontconfig.h */
321 typedef struct _FcPtrListIter {
322     void *dummy1;
323     void *dummy2;
324     void *dummy3;
325 } FcPtrListIter;
326
327 typedef enum _FcRuleType {
328     FcRuleUnknown, FcRuleTest, FcRuleEdit
329 } FcRuleType;
330
331 typedef struct _FcRule {
332     struct _FcRule *next;
333     FcRuleType      type;
334     union {
335         FcTest *test;
336         FcEdit *edit;
337     } u;
338 } FcRule;
339
340 typedef struct _FcRuleSet {
341     FcRef       ref;
342     FcChar8     *name;
343     FcChar8     *description;
344     FcChar8     *domain;
345     FcBool      enabled;
346     FcPtrList   *subst[FcMatchKindEnd];
347 } FcRuleSet;
348
349 typedef struct _FcCharLeaf {
350     FcChar32    map[256/32];
351 } FcCharLeaf;
352
353 struct _FcCharSet {
354     FcRef           ref;        /* reference count */
355     int             num;        /* size of leaves and numbers arrays */
356     intptr_t        leaves_offset;
357     intptr_t        numbers_offset;
358 };
359
360 #define FcCharSetLeaves(c)      FcOffsetMember(c,leaves_offset,intptr_t)
361 #define FcCharSetLeaf(c,i)      (FcOffsetToPtr(FcCharSetLeaves(c), \
362                                                FcCharSetLeaves(c)[i], \
363                                                FcCharLeaf))
364 #define FcCharSetNumbers(c)     FcOffsetMember(c,numbers_offset,FcChar16)
365
366 #define FCSS_DEFAULT            0 /* default behavior */
367 #define FCSS_ALLOW_DUPLICATES   1 /* allows for duplicate strings in the set */
368 #define FCSS_GROW_BY_64         2 /* grows buffer by 64 elements instead of 1 */
369
370 #define FcStrSetHasControlBit(s,c)  (s->control & c)
371 #define FcStrSetHasControlBits(s,c) ( (c) == (s->control & (c)) )
372
373 struct _FcStrSet {
374     FcRef           ref;        /* reference count */
375     int             num;
376     int             size;
377     FcChar8         **strs;
378     unsigned int    control;    /* control bits for set behavior */
379 };
380
381 struct _FcStrList {
382     FcStrSet        *set;
383     int             n;
384 };
385
386 typedef struct _FcStrBuf {
387     FcChar8 *buf;
388     FcBool  allocated;
389     FcBool  failed;
390     int     len;
391     int     size;
392     FcChar8 buf_static[16 * sizeof (void *)];
393 } FcStrBuf;
394
395 typedef struct _FcHashTable     FcHashTable;
396
397 typedef FcChar32 (* FcHashFunc)    (const void *data);
398 typedef int      (* FcCompareFunc) (const void *v1, const void *v2);
399 typedef FcBool   (* FcCopyFunc)    (const void *src, void **dest);
400
401
402 struct _FcCache {
403     unsigned int magic;              /* FC_CACHE_MAGIC_MMAP or FC_CACHE_ALLOC */
404     int         version;            /* FC_CACHE_VERSION_NUMBER */
405     intptr_t    size;               /* size of file */
406     intptr_t    dir;                /* offset to dir name */
407     intptr_t    dirs;               /* offset to subdirs */
408     int         dirs_count;         /* number of subdir strings */
409     intptr_t    set;                /* offset to font set */
410     int         checksum;           /* checksum of directory state */
411     int64_t     checksum_nano;      /* checksum of directory state */
412 };
413
414 #undef FcCacheDir
415 #undef FcCacheSubdir
416 #define FcCacheDir(c)   FcOffsetMember(c,dir,FcChar8)
417 #define FcCacheDirs(c)  FcOffsetMember(c,dirs,intptr_t)
418 #define FcCacheSet(c)   FcOffsetMember(c,set,FcFontSet)
419 #define FcCacheSubdir(c,i)  FcOffsetToPtr (FcCacheDirs(c),\
420                                            FcCacheDirs(c)[i], \
421                                            FcChar8)
422
423 /*
424  * Used while constructing a directory cache object
425  */
426
427 #define FC_SERIALIZE_HASH_SIZE  8191
428
429 typedef union _FcAlign {
430     double      d;
431     int         i;
432     intptr_t    ip;
433     FcBool      b;
434     void        *p;
435 } FcAlign;
436
437 typedef struct _FcSerializeBucket {
438     struct _FcSerializeBucket *next;
439     const void  *object;
440     intptr_t    offset;
441 } FcSerializeBucket;
442
443 typedef struct _FcCharSetFreezer FcCharSetFreezer;
444
445 typedef struct _FcSerialize {
446     intptr_t            size;
447     FcCharSetFreezer    *cs_freezer;
448     void                *linear;
449     FcSerializeBucket   *buckets[FC_SERIALIZE_HASH_SIZE];
450 } FcSerialize;
451
452 /*
453  * To map adobe glyph names to unicode values, a precomputed hash
454  * table is used
455  */
456
457 typedef struct _FcGlyphName {
458     FcChar32    ucs;            /* unicode value */
459     FcChar8     name[1];        /* name extends beyond struct */
460 } FcGlyphName;
461
462 /*
463  * To perform case-insensitive string comparisons, a table
464  * is used which holds three different kinds of folding data.
465  *
466  * The first is a range of upper case values mapping to a range
467  * of their lower case equivalents.  Within each range, the offset
468  * between upper and lower case is constant.
469  *
470  * The second is a range of upper case values which are interleaved
471  * with their lower case equivalents.
472  *
473  * The third is a set of raw unicode values mapping to a list
474  * of unicode values for comparison purposes.  This allows conversion
475  * of ß to "ss" so that SS, ss and ß all match.  A separate array
476  * holds the list of unicode values for each entry.
477  *
478  * These are packed into a single table.  Using a binary search,
479  * the appropriate entry can be located.
480  */
481
482 #define FC_CASE_FOLD_RANGE          0
483 #define FC_CASE_FOLD_EVEN_ODD       1
484 #define FC_CASE_FOLD_FULL           2
485
486 typedef struct _FcCaseFold {
487     FcChar32    upper;
488     FcChar16    method : 2;
489     FcChar16    count : 14;
490     short       offset;     /* lower - upper for RANGE, table id for FULL */
491 } FcCaseFold;
492
493 #define FC_MAX_FILE_LEN     4096
494
495 #define FC_CACHE_MAGIC_MMAP         0xFC02FC04
496 #define FC_CACHE_MAGIC_ALLOC        0xFC02FC05
497
498 struct _FcAtomic {
499     FcChar8     *file;          /* original file name */
500     FcChar8     *new;           /* temp file name -- write data here */
501     FcChar8     *lck;           /* lockfile name (used for locking) */
502     FcChar8     *tmp;           /* tmpfile name (used for locking) */
503 };
504
505 struct _FcConfig {
506     /*
507      * File names loaded from the configuration -- saved here as the
508      * cache file must be consulted before the directories are scanned,
509      * and those directives may occur in any order
510      */
511     FcStrSet    *configDirs;        /* directories to scan for fonts */
512     /*
513      * List of directories containing fonts,
514      * built by recursively scanning the set
515      * of configured directories
516      */
517     FcStrSet    *fontDirs;
518     /*
519      * List of directories containing cache files.
520      */
521     FcStrSet    *cacheDirs;
522     /*
523      * Names of all of the configuration files used
524      * to create this configuration
525      */
526     FcStrSet    *configFiles;       /* config files loaded */
527     /*
528      * Substitution instructions for patterns and fonts;
529      * maxObjects is used to allocate appropriate intermediate storage
530      * while performing a whole set of substitutions
531      *
532      * 0.. substitutions for patterns
533      * 1.. substitutions for fonts
534      * 2.. substitutions for scanned fonts
535      */
536     FcPtrList   *subst[FcMatchKindEnd];
537     int         maxObjects;         /* maximum number of tests in all substs */
538     /*
539      * List of patterns used to control font file selection
540      */
541     FcStrSet    *acceptGlobs;
542     FcStrSet    *rejectGlobs;
543     FcFontSet   *acceptPatterns;
544     FcFontSet   *rejectPatterns;
545     /*
546      * The set of fonts loaded from the listed directories; the
547      * order within the set does not determine the font selection,
548      * except in the case of identical matches in which case earlier fonts
549      * match preferrentially
550      */
551     FcFontSet   *fonts[FcSetApplication + 1];
552     /*
553      * Fontconfig can periodically rescan the system configuration
554      * and font directories.  This rescanning occurs when font
555      * listing requests are made, but no more often than rescanInterval
556      * seconds apart.
557      */
558     time_t      rescanTime;         /* last time information was scanned */
559     int         rescanInterval;     /* interval between scans */
560
561     FcRef       ref;                /* reference count */
562
563     FcExprPage  *expr_pool;         /* pool of FcExpr's */
564
565     FcChar8     *sysRoot;           /* override the system root directory */
566     FcStrSet    *availConfigFiles;  /* config files available */
567     FcPtrList   *rulesetList;       /* List of rulesets being installed */
568     FcHashTable *uuid_table;        /* UUID table for cachedirs */
569 };
570
571 typedef struct _FcFileTime {
572     time_t  time;
573     FcBool  set;
574 } FcFileTime;
575
576 typedef struct _FcCharMap FcCharMap;
577
578 typedef struct _FcStatFS    FcStatFS;
579
580 struct _FcStatFS {
581     FcBool is_remote_fs;
582     FcBool is_mtime_broken;
583 };
584
585 typedef struct _FcValuePromotionBuffer FcValuePromotionBuffer;
586
587 struct _FcValuePromotionBuffer {
588   union {
589     double d;
590     int i;
591     long l;
592     char c[256]; /* Enlarge as needed */
593   } u;
594 };
595
596 /* fccache.c */
597
598 FcPrivate FcCache *
599 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
600
601 FcPrivate FcCache *
602 FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
603
604 FcPrivate FcCache *
605 FcDirCacheRebuild (FcCache *cache, struct stat *dir_stat, FcStrSet *dirs);
606
607 FcPrivate FcBool
608 FcDirCacheWrite (FcCache *cache, FcConfig *config);
609
610 FcPrivate FcBool
611 FcDirCacheCreateTagFile (const FcChar8 *cache_dir);
612
613 FcPrivate void
614 FcCacheObjectReference (void *object);
615
616 FcPrivate void
617 FcCacheObjectDereference (void *object);
618
619 FcPrivate void *
620 FcCacheAllocate (FcCache *cache, size_t len);
621
622 FcPrivate void
623 FcCacheFini (void);
624
625
626 FcPrivate void
627 FcDirCacheReference (FcCache *cache, int nref);
628
629 FcPrivate int
630 FcDirCacheLock (const FcChar8 *dir,
631                 FcConfig      *config);
632
633 FcPrivate void
634 FcDirCacheUnlock (int fd);
635
636 /* fccfg.c */
637
638 FcPrivate FcBool
639 FcConfigInit (void);
640
641 FcPrivate void
642 FcConfigFini (void);
643
644 FcPrivate FcChar8 *
645 FcConfigXdgCacheHome (void);
646
647 FcPrivate FcChar8 *
648 FcConfigXdgConfigHome (void);
649
650 FcPrivate FcChar8 *
651 FcConfigXdgDataHome (void);
652
653 FcPrivate FcExpr *
654 FcConfigAllocExpr (FcConfig *config);
655
656 FcPrivate FcBool
657 FcConfigAddConfigDir (FcConfig      *config,
658                       const FcChar8 *d);
659
660 FcPrivate FcBool
661 FcConfigAddFontDir (FcConfig        *config,
662                     const FcChar8   *d);
663
664 FcPrivate FcBool
665 FcConfigAddCacheDir (FcConfig       *config,
666                      const FcChar8  *d);
667
668 FcPrivate FcBool
669 FcConfigAddConfigFile (FcConfig         *config,
670                        const FcChar8    *f);
671
672 FcPrivate FcBool
673 FcConfigAddBlank (FcConfig      *config,
674                   FcChar32      blank);
675
676 FcBool
677 FcConfigAddRule (FcConfig       *config,
678                  FcRule         *rule,
679                  FcMatchKind    kind);
680
681 FcPrivate void
682 FcConfigSetFonts (FcConfig      *config,
683                   FcFontSet     *fonts,
684                   FcSetName     set);
685
686 FcPrivate FcBool
687 FcConfigCompareValue (const FcValue *m,
688                       unsigned int   op_,
689                       const FcValue *v);
690
691 FcPrivate FcBool
692 FcConfigGlobAdd (FcConfig       *config,
693                  const FcChar8  *glob,
694                  FcBool         accept);
695
696 FcPrivate FcBool
697 FcConfigAcceptFilename (FcConfig        *config,
698                         const FcChar8   *filename);
699
700 FcPrivate FcBool
701 FcConfigPatternsAdd (FcConfig   *config,
702                      FcPattern  *pattern,
703                      FcBool     accept);
704
705 FcPrivate FcBool
706 FcConfigAcceptFont (FcConfig        *config,
707                     const FcPattern *font);
708
709 FcPrivate FcFileTime
710 FcConfigModifiedTime (FcConfig *config);
711
712 FcPrivate FcBool
713 FcConfigAddCache (FcConfig *config, FcCache *cache,
714                   FcSetName set, FcStrSet *dirSet, FcChar8 *forDir);
715
716 FcPrivate FcRuleSet *
717 FcRuleSetCreate (const FcChar8 *name);
718
719 FcPrivate void
720 FcRuleSetDestroy (FcRuleSet *rs);
721
722 FcPrivate void
723 FcRuleSetReference (FcRuleSet *rs);
724
725 FcPrivate void
726 FcRuleSetEnable (FcRuleSet      *rs,
727                  FcBool         flag);
728
729 FcPrivate void
730 FcRuleSetAddDescription (FcRuleSet      *rs,
731                          const FcChar8  *domain,
732                          const FcChar8  *description);
733
734 FcPrivate int
735 FcRuleSetAdd (FcRuleSet         *rs,
736               FcRule            *rule,
737               FcMatchKind       kind);
738
739 /* fcserialize.c */
740 FcPrivate intptr_t
741 FcAlignSize (intptr_t size);
742
743 FcPrivate FcSerialize *
744 FcSerializeCreate (void);
745
746 FcPrivate void
747 FcSerializeDestroy (FcSerialize *serialize);
748
749 FcPrivate FcBool
750 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
751
752 FcPrivate intptr_t
753 FcSerializeReserve (FcSerialize *serialize, int size);
754
755 FcPrivate intptr_t
756 FcSerializeOffset (FcSerialize *serialize, const void *object);
757
758 FcPrivate void *
759 FcSerializePtr (FcSerialize *serialize, const void *object);
760
761 FcPrivate FcBool
762 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
763
764 FcPrivate FcLangSet *
765 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
766
767 /* fccharset.c */
768 FcPrivate FcCharSet *
769 FcCharSetPromote (FcValuePromotionBuffer *vbuf);
770
771 FcPrivate void
772 FcLangCharSetPopulate (void);
773
774 FcPrivate FcCharSetFreezer *
775 FcCharSetFreezerCreate (void);
776
777 FcPrivate const FcCharSet *
778 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
779
780 FcPrivate void
781 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
782
783 FcPrivate FcBool
784 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
785
786 FcPrivate FcCharSet *
787 FcNameParseCharSet (FcChar8 *string);
788
789 FcPrivate FcBool
790 FcNameUnparseValue (FcStrBuf    *buf,
791                     FcValue     *v0,
792                     FcChar8     *escape);
793
794 FcPrivate FcBool
795 FcNameUnparseValueList (FcStrBuf        *buf,
796                         FcValueListPtr  v,
797                         FcChar8         *escape);
798
799 FcPrivate FcCharLeaf *
800 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
801
802 FcPrivate FcBool
803 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
804
805 FcPrivate FcCharSet *
806 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
807
808 FcPrivate FcChar16 *
809 FcCharSetGetNumbers(const FcCharSet *c);
810
811 /* fccompat.c */
812 FcPrivate int
813 FcOpen(const char *pathname, int flags, ...);
814
815 FcPrivate int
816 FcMakeTempfile (char *template);
817
818 FcPrivate int32_t
819 FcRandom (void);
820
821 FcPrivate FcBool
822 FcMakeDirectory (const FcChar8 *dir);
823
824 FcPrivate ssize_t
825 FcReadLink (const FcChar8 *pathname,
826             FcChar8       *buf,
827             size_t         bufsiz);
828
829 /* fcdbg.c */
830
831 FcPrivate void
832 FcValuePrintFile (FILE *f, const FcValue v);
833
834 FcPrivate void
835 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
836
837 FcPrivate void
838 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
839
840 FcPrivate void
841 FcValueListPrint (FcValueListPtr l);
842
843 FcPrivate void
844 FcLangSetPrint (const FcLangSet *ls);
845
846 FcPrivate void
847 FcOpPrint (FcOp op);
848
849 FcPrivate void
850 FcTestPrint (const FcTest *test);
851
852 FcPrivate void
853 FcExprPrint (const FcExpr *expr);
854
855 FcPrivate void
856 FcEditPrint (const FcEdit *edit);
857
858 FcPrivate void
859 FcRulePrint (const FcRule *rule);
860
861 FcPrivate void
862 FcCharSetPrint (const FcCharSet *c);
863
864 FcPrivate void
865 FcPatternPrint2 (FcPattern *p1, FcPattern *p2, const FcObjectSet *os);
866
867 extern FcPrivate int FcDebugVal;
868
869 #define FcDebug() (FcDebugVal)
870
871 FcPrivate void
872 FcInitDebug (void);
873
874 /* fcdefault.c */
875 FcPrivate FcChar8 *
876 FcGetDefaultLang (void);
877
878 FcPrivate FcChar8 *
879 FcGetPrgname (void);
880
881 FcPrivate void
882 FcDefaultFini (void);
883
884 /* fcdir.c */
885
886 FcPrivate FcBool
887 FcFileIsLink (const FcChar8 *file);
888
889 FcPrivate FcBool
890 FcFileIsFile (const FcChar8 *file);
891
892 FcPrivate FcBool
893 FcFileScanConfig (FcFontSet     *set,
894                   FcStrSet      *dirs,
895                   const FcChar8 *file,
896                   FcConfig      *config);
897
898 FcPrivate FcBool
899 FcDirScanConfig (FcFontSet      *set,
900                  FcStrSet       *dirs,
901                  const FcChar8  *dir,
902                  FcBool         force,
903                  FcConfig       *config);
904
905 /* fcfont.c */
906 FcPrivate int
907 FcFontDebug (void);
908
909 /* fcfs.c */
910
911 FcPrivate FcBool
912 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
913
914 FcPrivate FcFontSet *
915 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
916
917 FcPrivate FcFontSet *
918 FcFontSetDeserialize (const FcFontSet *set);
919
920 /* fcplist.c */
921 FcPrivate FcPtrList *
922 FcPtrListCreate (FcDestroyFunc func);
923
924 FcPrivate void
925 FcPtrListDestroy (FcPtrList *list);
926
927 FcPrivate void
928 FcPtrListIterInit (const FcPtrList      *list,
929                    FcPtrListIter        *iter);
930
931 FcPrivate void
932 FcPtrListIterInitAtLast (FcPtrList      *list,
933                          FcPtrListIter  *iter);
934
935 FcPrivate FcBool
936 FcPtrListIterNext (const FcPtrList      *list,
937                    FcPtrListIter        *iter);
938
939 FcPrivate FcBool
940 FcPtrListIterIsValid (const FcPtrList           *list,
941                       const FcPtrListIter       *iter);
942
943 FcPrivate void *
944 FcPtrListIterGetValue (const FcPtrList          *list,
945                        const FcPtrListIter      *iter);
946
947 FcPrivate FcBool
948 FcPtrListIterAdd (FcPtrList     *list,
949                   FcPtrListIter *iter,
950                 void            *data);
951
952 FcPrivate FcBool
953 FcPtrListIterRemove (FcPtrList          *list,
954                      FcPtrListIter      *iter);
955
956 /* fcinit.c */
957 FcPrivate FcConfig *
958 FcInitLoadOwnConfig (FcConfig *config);
959
960 FcPrivate FcConfig *
961 FcInitLoadOwnConfigAndFonts (FcConfig *config);
962
963 /* fcxml.c */
964 FcPrivate void
965 FcConfigPathFini (void);
966
967 FcPrivate void
968 FcTestDestroy (FcTest *test);
969
970 FcPrivate void
971 FcEditDestroy (FcEdit *e);
972
973 void
974 FcRuleDestroy (FcRule *rule);
975
976 /* fclang.c */
977 FcPrivate FcLangSet *
978 FcFreeTypeLangSet (const FcCharSet  *charset,
979                    const FcChar8    *exclusiveLang);
980
981 FcPrivate FcLangResult
982 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
983
984 FcPrivate FcLangSet *
985 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
986
987 FcPrivate FcLangSet *
988 FcNameParseLangSet (const FcChar8 *string);
989
990 FcPrivate FcBool
991 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
992
993 FcPrivate FcChar8 *
994 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
995
996 FcPrivate FcBool
997 FcConfigParseOnly (FcConfig             *config,
998                    const FcChar8        *name,
999                    FcBool               complain);
1000
1001 FcPrivate FcChar8 *
1002 FcConfigRealFilename (FcConfig          *config,
1003                       const FcChar8     *url);
1004
1005 /* fclist.c */
1006
1007 FcPrivate FcBool
1008 FcListPatternMatchAny (const FcPattern *p,
1009                        const FcPattern *font);
1010
1011 /* fcmatch.c */
1012
1013 /* fcname.c */
1014
1015 enum {
1016   FC_INVALID_OBJECT = 0,
1017 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
1018 #include "fcobjs.h"
1019 #undef FC_OBJECT
1020   FC_ONE_AFTER_MAX_BASE_OBJECT
1021 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
1022 };
1023
1024 FcPrivate FcBool
1025 FcNameBool (const FcChar8 *v, FcBool *result);
1026
1027 FcPrivate FcBool
1028 FcObjectValidType (FcObject object, FcType type);
1029
1030 FcPrivate FcObject
1031 FcObjectFromName (const char * name);
1032
1033 FcPrivate const char *
1034 FcObjectName (FcObject object);
1035
1036 FcPrivate FcObjectSet *
1037 FcObjectGetSet (void);
1038
1039 #define FcObjectCompare(a, b)   ((int) a - (int) b)
1040
1041 /* fcpat.c */
1042
1043 FcPrivate FcValue
1044 FcValueCanonicalize (const FcValue *v);
1045
1046 FcPrivate FcValueListPtr
1047 FcValueListCreate (void);
1048
1049 FcPrivate void
1050 FcValueListDestroy (FcValueListPtr l);
1051
1052 FcPrivate FcValueListPtr
1053 FcValueListPrepend (FcValueListPtr vallist,
1054                     FcValue        value,
1055                     FcValueBinding binding);
1056
1057 FcPrivate FcValueListPtr
1058 FcValueListAppend (FcValueListPtr vallist,
1059                    FcValue        value,
1060                    FcValueBinding binding);
1061
1062 FcPrivate FcValueListPtr
1063 FcValueListDuplicate(FcValueListPtr orig);
1064
1065 FcPrivate FcPatternElt *
1066 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
1067
1068 FcPrivate FcPatternElt *
1069 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
1070
1071 FcPrivate FcBool
1072 FcPatternObjectListAdd (FcPattern       *p,
1073                         FcObject        object,
1074                         FcValueListPtr  list,
1075                         FcBool          append);
1076
1077 FcPrivate FcBool
1078 FcPatternObjectAddWithBinding  (FcPattern       *p,
1079                                 FcObject        object,
1080                                 FcValue         value,
1081                                 FcValueBinding  binding,
1082                                 FcBool          append);
1083
1084 FcPrivate FcBool
1085 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
1086
1087 FcPrivate FcBool
1088 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
1089
1090 FcPrivate FcResult
1091 FcPatternObjectGetWithBinding (const FcPattern *p, FcObject object, int id, FcValue *v, FcValueBinding *b);
1092
1093 FcPrivate FcResult
1094 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
1095
1096 FcPrivate FcBool
1097 FcPatternObjectDel (FcPattern *p, FcObject object);
1098
1099 FcPrivate FcBool
1100 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
1101
1102 FcPrivate FcBool
1103 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
1104
1105 FcPrivate FcBool
1106 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
1107
1108 FcPrivate FcBool
1109 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
1110
1111 FcPrivate FcBool
1112 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
1113
1114 FcPrivate FcBool
1115 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
1116
1117 FcPrivate FcBool
1118 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
1119
1120 FcPrivate FcBool
1121 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
1122
1123 FcPrivate FcBool
1124 FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r);
1125
1126 FcPrivate FcResult
1127 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
1128
1129 FcPrivate FcResult
1130 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
1131
1132 FcPrivate FcResult
1133 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
1134
1135 FcPrivate FcResult
1136 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
1137
1138 FcPrivate FcResult
1139 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
1140
1141 FcPrivate FcResult
1142 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1143
1144 FcPrivate FcResult
1145 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1146
1147 FcPrivate FcResult
1148 FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r);
1149
1150 FcPrivate FcBool
1151 FcPatternAppend (FcPattern *p, FcPattern *s);
1152
1153 FcPrivate int
1154 FcPatternPosition (const FcPattern *p, const char *object);
1155
1156 FcPrivate FcBool
1157 FcPatternFindObjectIter (const FcPattern *pat, FcPatternIter *iter, FcObject object);
1158
1159 FcPrivate FcObject
1160 FcPatternIterGetObjectId (const FcPattern *pat, FcPatternIter *iter);
1161
1162 FcPrivate FcValueListPtr
1163 FcPatternIterGetValues (const FcPattern *pat, FcPatternIter *iter);
1164
1165 FcPrivate FcPattern *
1166 FcPatternCacheRewriteFile (const FcPattern *pat, FcCache *cache, const FcChar8 *relocated_font_file);
1167
1168 FcPrivate FcChar32
1169 FcStringHash (const FcChar8 *s);
1170
1171 FcPrivate FcBool
1172 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1173
1174 FcPrivate FcPattern *
1175 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1176
1177 FcPrivate FcBool
1178 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1179
1180 FcPrivate FcValueList *
1181 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1182
1183 /* fcrender.c */
1184
1185 /* fcmatrix.c */
1186
1187 extern FcPrivate const FcMatrix    FcIdentityMatrix;
1188
1189 FcPrivate void
1190 FcMatrixFree (FcMatrix *mat);
1191
1192 /* fcrange.c */
1193
1194 FcPrivate FcRange *
1195 FcRangePromote (double v, FcValuePromotionBuffer *vbuf);
1196
1197 FcPrivate FcBool
1198 FcRangeIsInRange (const FcRange *a, const FcRange *b);
1199
1200 FcPrivate FcBool
1201 FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b);
1202
1203 FcPrivate FcChar32
1204 FcRangeHash (const FcRange *r);
1205
1206 FcPrivate FcBool
1207 FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r);
1208
1209 FcPrivate FcRange *
1210 FcRangeSerialize (FcSerialize *serialize, const FcRange *r);
1211
1212 /* fcstat.c */
1213
1214 FcPrivate int
1215 FcStat (const FcChar8 *file, struct stat *statb);
1216
1217 FcPrivate int
1218 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1219
1220 FcPrivate FcBool
1221 FcIsFsMmapSafe (int fd);
1222
1223 FcPrivate FcBool
1224 FcIsFsMtimeBroken (const FcChar8 *dir);
1225
1226 /* fcstr.c */
1227 FcPrivate FcStrSet *
1228 FcStrSetCreateEx (unsigned int control);
1229
1230 FcPrivate FcBool
1231 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1232
1233 FcPrivate void
1234 FcStrSetSort (FcStrSet * set);
1235
1236 FcPrivate void
1237 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1238
1239 FcPrivate void
1240 FcStrBufDestroy (FcStrBuf *buf);
1241
1242 FcPrivate FcChar8 *
1243 FcStrBufDone (FcStrBuf *buf);
1244
1245 FcPrivate FcChar8 *
1246 FcStrBufDoneStatic (FcStrBuf *buf);
1247
1248 FcPrivate FcBool
1249 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1250
1251 FcPrivate FcBool
1252 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1253
1254 FcPrivate FcBool
1255 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1256
1257 FcPrivate int
1258 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1259
1260 FcPrivate int
1261 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1262
1263 FcPrivate const FcChar8 *
1264 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1265
1266 FcPrivate const FcChar8 *
1267 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1268
1269 FcPrivate const FcChar8 *
1270 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1271
1272 FcPrivate int
1273 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1274
1275 FcPrivate FcBool
1276 FcStrGlobMatch (const FcChar8 *glob,
1277                 const FcChar8 *string);
1278
1279 FcPrivate FcBool
1280 FcStrUsesHome (const FcChar8 *s);
1281
1282 FcPrivate FcBool
1283 FcStrIsAbsoluteFilename (const FcChar8 *s);
1284
1285 FcPrivate FcChar8 *
1286 FcStrBuildFilename (const FcChar8 *path,
1287                     ...);
1288
1289 FcPrivate FcChar8 *
1290 FcStrLastSlash (const FcChar8  *path);
1291
1292 FcPrivate FcChar32
1293 FcStrHashIgnoreCase (const FcChar8 *s);
1294
1295 FcPrivate FcChar8 *
1296 FcStrCanonFilename (const FcChar8 *s);
1297
1298 FcPrivate FcBool
1299 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1300
1301 FcPrivate FcChar8 *
1302 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1303
1304 /* fcobjs.c */
1305
1306 FcPrivate void
1307 FcObjectFini (void);
1308
1309 FcPrivate FcObject
1310 FcObjectLookupIdByName (const char *str);
1311
1312 FcPrivate FcObject
1313 FcObjectLookupBuiltinIdByName (const char *str);
1314
1315 FcPrivate const char *
1316 FcObjectLookupOtherNameById (FcObject id);
1317
1318 FcPrivate const FcObjectType *
1319 FcObjectLookupOtherTypeById (FcObject id);
1320
1321 FcPrivate const FcObjectType *
1322 FcObjectLookupOtherTypeByName (const char *str);
1323
1324 /* fchash.c */
1325 FcPrivate FcBool
1326 FcHashStrCopy (const void  *src,
1327                void       **dest);
1328
1329 FcPrivate FcBool
1330 FcHashUuidCopy (const void  *src,
1331                 void       **dest);
1332
1333 FcPrivate void
1334 FcHashUuidFree (void *data);
1335
1336 FcPrivate FcHashTable *
1337 FcHashTableCreate (FcHashFunc    hash_func,
1338                    FcCompareFunc compare_func,
1339                    FcCopyFunc    key_copy_func,
1340                    FcCopyFunc    value_copy_func,
1341                    FcDestroyFunc key_destroy_func,
1342                    FcDestroyFunc value_destroy_func);
1343
1344 FcPrivate void
1345 FcHashTableDestroy (FcHashTable *table);
1346
1347 FcPrivate FcBool
1348 FcHashTableFind (FcHashTable  *table,
1349                  const void   *key,
1350                  void        **value);
1351
1352 FcPrivate FcBool
1353 FcHashTableAdd (FcHashTable *table,
1354                 void        *key,
1355                 void        *value);
1356
1357 FcPrivate FcBool
1358 FcHashTableReplace (FcHashTable *table,
1359                     void        *key,
1360                     void        *value);
1361
1362 FcPrivate FcBool
1363 FcHashTableRemove (FcHashTable *table,
1364                    void        *key);
1365
1366 #endif /* _FC_INT_H_ */