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