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     FcStrSet	*configMapDirs;	    /* mapped names to generate cache entries */
513     /*
514      * List of directories containing fonts,
515      * built by recursively scanning the set
516      * of configured directories
517      */
518     FcStrSet	*fontDirs;
519     /*
520      * List of directories containing cache files.
521      */
522     FcStrSet	*cacheDirs;
523     /*
524      * Names of all of the configuration files used
525      * to create this configuration
526      */
527     FcStrSet	*configFiles;	    /* config files loaded */
528     /*
529      * Substitution instructions for patterns and fonts;
530      * maxObjects is used to allocate appropriate intermediate storage
531      * while performing a whole set of substitutions
532      *
533      * 0.. substitutions for patterns
534      * 1.. substitutions for fonts
535      * 2.. substitutions for scanned fonts
536      */
537     FcPtrList	*subst[FcMatchKindEnd];
538     int		maxObjects;	    /* maximum number of tests in all substs */
539     /*
540      * List of patterns used to control font file selection
541      */
542     FcStrSet	*acceptGlobs;
543     FcStrSet	*rejectGlobs;
544     FcFontSet	*acceptPatterns;
545     FcFontSet	*rejectPatterns;
546     /*
547      * The set of fonts loaded from the listed directories; the
548      * order within the set does not determine the font selection,
549      * except in the case of identical matches in which case earlier fonts
550      * match preferrentially
551      */
552     FcFontSet	*fonts[FcSetApplication + 1];
553     /*
554      * Fontconfig can periodically rescan the system configuration
555      * and font directories.  This rescanning occurs when font
556      * listing requests are made, but no more often than rescanInterval
557      * seconds apart.
558      */
559     time_t	rescanTime;	    /* last time information was scanned */
560     int		rescanInterval;	    /* interval between scans */
561 
562     FcRef	ref;                /* reference count */
563 
564     FcExprPage  *expr_pool;	    /* pool of FcExpr's */
565 
566     FcChar8     *sysRoot;	    /* override the system root directory */
567     FcStrSet	*availConfigFiles;  /* config files available */
568     FcPtrList	*rulesetList;	    /* List of rulesets being installed */
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 		    const FcChar8   *m,
664 		    const FcChar8   *salt);
665 
666 FcPrivate FcBool
667 FcConfigResetFontDirs (FcConfig *config);
668 
669 FcPrivate FcChar8 *
670 FcConfigMapFontPath(FcConfig		*config,
671 		    const FcChar8	*path);
672 
673 FcPrivate const FcChar8 *
674 FcConfigMapSalt (FcConfig      *config,
675 		 const FcChar8 *path);
676 
677 FcPrivate FcBool
678 FcConfigAddCacheDir (FcConfig	    *config,
679 		     const FcChar8  *d);
680 
681 FcPrivate FcBool
682 FcConfigAddConfigFile (FcConfig		*config,
683 		       const FcChar8	*f);
684 
685 FcPrivate FcBool
686 FcConfigAddBlank (FcConfig	*config,
687 		  FcChar32    	blank);
688 
689 FcBool
690 FcConfigAddRule (FcConfig	*config,
691 		 FcRule		*rule,
692 		 FcMatchKind	kind);
693 
694 FcPrivate void
695 FcConfigSetFonts (FcConfig	*config,
696 		  FcFontSet	*fonts,
697 		  FcSetName	set);
698 
699 FcPrivate FcBool
700 FcConfigCompareValue (const FcValue *m,
701 		      unsigned int   op_,
702 		      const FcValue *v);
703 
704 FcPrivate FcBool
705 FcConfigGlobAdd (FcConfig	*config,
706 		 const FcChar8	*glob,
707 		 FcBool		accept);
708 
709 FcPrivate FcBool
710 FcConfigAcceptFilename (FcConfig	*config,
711 			const FcChar8	*filename);
712 
713 FcPrivate FcBool
714 FcConfigPatternsAdd (FcConfig	*config,
715 		     FcPattern	*pattern,
716 		     FcBool	accept);
717 
718 FcPrivate FcBool
719 FcConfigAcceptFont (FcConfig	    *config,
720 		    const FcPattern *font);
721 
722 FcPrivate FcFileTime
723 FcConfigModifiedTime (FcConfig *config);
724 
725 FcPrivate FcBool
726 FcConfigAddCache (FcConfig *config, FcCache *cache,
727 		  FcSetName set, FcStrSet *dirSet, FcChar8 *forDir);
728 
729 FcPrivate FcRuleSet *
730 FcRuleSetCreate (const FcChar8 *name);
731 
732 FcPrivate void
733 FcRuleSetDestroy (FcRuleSet *rs);
734 
735 FcPrivate void
736 FcRuleSetReference (FcRuleSet *rs);
737 
738 FcPrivate void
739 FcRuleSetEnable (FcRuleSet	*rs,
740 		 FcBool		flag);
741 
742 FcPrivate void
743 FcRuleSetAddDescription (FcRuleSet	*rs,
744 			 const FcChar8	*domain,
745 			 const FcChar8	*description);
746 
747 FcPrivate int
748 FcRuleSetAdd (FcRuleSet		*rs,
749 	      FcRule		*rule,
750 	      FcMatchKind	kind);
751 
752 /* fcserialize.c */
753 FcPrivate intptr_t
754 FcAlignSize (intptr_t size);
755 
756 FcPrivate FcSerialize *
757 FcSerializeCreate (void);
758 
759 FcPrivate void
760 FcSerializeDestroy (FcSerialize *serialize);
761 
762 FcPrivate FcBool
763 FcSerializeAlloc (FcSerialize *serialize, const void *object, int size);
764 
765 FcPrivate intptr_t
766 FcSerializeReserve (FcSerialize *serialize, int size);
767 
768 FcPrivate intptr_t
769 FcSerializeOffset (FcSerialize *serialize, const void *object);
770 
771 FcPrivate void *
772 FcSerializePtr (FcSerialize *serialize, const void *object);
773 
774 FcPrivate FcBool
775 FcLangSetSerializeAlloc (FcSerialize *serialize, const FcLangSet *l);
776 
777 FcPrivate FcLangSet *
778 FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l);
779 
780 /* fccharset.c */
781 FcPrivate FcCharSet *
782 FcCharSetPromote (FcValuePromotionBuffer *vbuf);
783 
784 FcPrivate void
785 FcLangCharSetPopulate (void);
786 
787 FcPrivate FcCharSetFreezer *
788 FcCharSetFreezerCreate (void);
789 
790 FcPrivate const FcCharSet *
791 FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs);
792 
793 FcPrivate void
794 FcCharSetFreezerDestroy (FcCharSetFreezer *freezer);
795 
796 FcPrivate FcBool
797 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
798 
799 FcPrivate FcCharSet *
800 FcNameParseCharSet (FcChar8 *string);
801 
802 FcPrivate FcBool
803 FcNameUnparseValue (FcStrBuf    *buf,
804                     FcValue     *v0,
805 		    FcChar8     *escape);
806 
807 FcPrivate FcBool
808 FcNameUnparseValueList (FcStrBuf	*buf,
809 			FcValueListPtr	v,
810 			FcChar8		*escape);
811 
812 FcPrivate FcCharLeaf *
813 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
814 
815 FcPrivate FcBool
816 FcCharSetSerializeAlloc(FcSerialize *serialize, const FcCharSet *cs);
817 
818 FcPrivate FcCharSet *
819 FcCharSetSerialize(FcSerialize *serialize, const FcCharSet *cs);
820 
821 FcPrivate FcChar16 *
822 FcCharSetGetNumbers(const FcCharSet *c);
823 
824 /* fccompat.c */
825 FcPrivate int
826 FcOpen(const char *pathname, int flags, ...);
827 
828 FcPrivate int
829 FcMakeTempfile (char *template);
830 
831 FcPrivate int32_t
832 FcRandom (void);
833 
834 FcPrivate FcBool
835 FcMakeDirectory (const FcChar8 *dir);
836 
837 FcPrivate ssize_t
838 FcReadLink (const FcChar8 *pathname,
839 	    FcChar8       *buf,
840 	    size_t         bufsiz);
841 
842 /* fcdbg.c */
843 
844 FcPrivate void
845 FcValuePrintFile (FILE *f, const FcValue v);
846 
847 FcPrivate void
848 FcValuePrintWithPosition (const FcValue v, FcBool show_pos_mark);
849 
850 FcPrivate void
851 FcValueListPrintWithPosition (FcValueListPtr l, const FcValueListPtr pos);
852 
853 FcPrivate void
854 FcValueListPrint (FcValueListPtr l);
855 
856 FcPrivate void
857 FcLangSetPrint (const FcLangSet *ls);
858 
859 FcPrivate void
860 FcOpPrint (FcOp op);
861 
862 FcPrivate void
863 FcTestPrint (const FcTest *test);
864 
865 FcPrivate void
866 FcExprPrint (const FcExpr *expr);
867 
868 FcPrivate void
869 FcEditPrint (const FcEdit *edit);
870 
871 FcPrivate void
872 FcRulePrint (const FcRule *rule);
873 
874 FcPrivate void
875 FcCharSetPrint (const FcCharSet *c);
876 
877 FcPrivate void
878 FcPatternPrint2 (FcPattern *p1, FcPattern *p2, const FcObjectSet *os);
879 
880 extern FcPrivate int FcDebugVal;
881 
882 #define FcDebug() (FcDebugVal)
883 
884 FcPrivate void
885 FcInitDebug (void);
886 
887 /* fcdefault.c */
888 FcPrivate FcChar8 *
889 FcGetDefaultLang (void);
890 
891 FcPrivate FcChar8 *
892 FcGetPrgname (void);
893 
894 FcPrivate void
895 FcDefaultFini (void);
896 
897 /* fcdir.c */
898 
899 FcPrivate FcBool
900 FcFileIsLink (const FcChar8 *file);
901 
902 FcPrivate FcBool
903 FcFileIsFile (const FcChar8 *file);
904 
905 FcPrivate FcBool
906 FcFileScanConfig (FcFontSet	*set,
907 		  FcStrSet	*dirs,
908 		  const FcChar8 *file,
909 		  FcConfig	*config);
910 
911 FcPrivate FcBool
912 FcDirScanConfig (FcFontSet	*set,
913 		 FcStrSet	*dirs,
914 		 const FcChar8	*dir,
915 		 FcBool		force,
916 		 FcConfig	*config);
917 
918 /* fcfont.c */
919 FcPrivate int
920 FcFontDebug (void);
921 
922 /* fcfs.c */
923 
924 FcPrivate FcBool
925 FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s);
926 
927 FcPrivate FcFontSet *
928 FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
929 
930 FcPrivate FcFontSet *
931 FcFontSetDeserialize (const FcFontSet *set);
932 
933 /* fcplist.c */
934 FcPrivate FcPtrList *
935 FcPtrListCreate (FcDestroyFunc func);
936 
937 FcPrivate void
938 FcPtrListDestroy (FcPtrList *list);
939 
940 FcPrivate void
941 FcPtrListIterInit (const FcPtrList	*list,
942 		   FcPtrListIter	*iter);
943 
944 FcPrivate void
945 FcPtrListIterInitAtLast (FcPtrList	*list,
946 			 FcPtrListIter	*iter);
947 
948 FcPrivate FcBool
949 FcPtrListIterNext (const FcPtrList	*list,
950 		   FcPtrListIter	*iter);
951 
952 FcPrivate FcBool
953 FcPtrListIterIsValid (const FcPtrList		*list,
954 		      const FcPtrListIter	*iter);
955 
956 FcPrivate void *
957 FcPtrListIterGetValue (const FcPtrList		*list,
958 		       const FcPtrListIter	*iter);
959 
960 FcPrivate FcBool
961 FcPtrListIterAdd (FcPtrList	*list,
962 		  FcPtrListIter	*iter,
963 		void		*data);
964 
965 FcPrivate FcBool
966 FcPtrListIterRemove (FcPtrList		*list,
967 		     FcPtrListIter	*iter);
968 
969 /* fcinit.c */
970 FcPrivate FcConfig *
971 FcInitLoadOwnConfig (FcConfig *config);
972 
973 FcPrivate FcConfig *
974 FcInitLoadOwnConfigAndFonts (FcConfig *config);
975 
976 /* fcxml.c */
977 FcPrivate void
978 FcConfigPathFini (void);
979 
980 FcPrivate void
981 FcTestDestroy (FcTest *test);
982 
983 FcPrivate void
984 FcEditDestroy (FcEdit *e);
985 
986 void
987 FcRuleDestroy (FcRule *rule);
988 
989 /* fclang.c */
990 FcPrivate FcLangSet *
991 FcFreeTypeLangSet (const FcCharSet  *charset,
992 		   const FcChar8    *exclusiveLang);
993 
994 FcPrivate FcLangResult
995 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
996 
997 FcPrivate FcLangSet *
998 FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf);
999 
1000 FcPrivate FcLangSet *
1001 FcNameParseLangSet (const FcChar8 *string);
1002 
1003 FcPrivate FcBool
1004 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
1005 
1006 FcPrivate FcChar8 *
1007 FcNameUnparseEscaped (FcPattern *pat, FcBool escape);
1008 
1009 FcPrivate FcBool
1010 FcConfigParseOnly (FcConfig		*config,
1011 		   const FcChar8	*name,
1012 		   FcBool		complain);
1013 
1014 FcPrivate FcChar8 *
1015 FcConfigRealFilename (FcConfig		*config,
1016 		      const FcChar8	*url);
1017 
1018 /* fclist.c */
1019 
1020 FcPrivate FcBool
1021 FcListPatternMatchAny (const FcPattern *p,
1022 		       const FcPattern *font);
1023 
1024 /* fcmatch.c */
1025 
1026 /* fcname.c */
1027 
1028 enum {
1029   FC_INVALID_OBJECT = 0,
1030 #define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT,
1031 #include "fcobjs.h"
1032 #undef FC_OBJECT
1033   FC_ONE_AFTER_MAX_BASE_OBJECT
1034 #define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1)
1035 };
1036 
1037 FcPrivate FcBool
1038 FcNameConstantWithObjectCheck (const FcChar8 *string, const char *object, int *result);
1039 
1040 FcPrivate FcBool
1041 FcNameBool (const FcChar8 *v, FcBool *result);
1042 
1043 FcPrivate FcBool
1044 FcObjectValidType (FcObject object, FcType type);
1045 
1046 FcPrivate FcObject
1047 FcObjectFromName (const char * name);
1048 
1049 FcPrivate const char *
1050 FcObjectName (FcObject object);
1051 
1052 FcPrivate FcObjectSet *
1053 FcObjectGetSet (void);
1054 
1055 #define FcObjectCompare(a, b)	((int) a - (int) b)
1056 
1057 /* fcpat.c */
1058 
1059 FcPrivate FcValue
1060 FcValueCanonicalize (const FcValue *v);
1061 
1062 FcPrivate FcValueListPtr
1063 FcValueListCreate (void);
1064 
1065 FcPrivate void
1066 FcValueListDestroy (FcValueListPtr l);
1067 
1068 FcPrivate FcValueListPtr
1069 FcValueListPrepend (FcValueListPtr vallist,
1070 		    FcValue        value,
1071 		    FcValueBinding binding);
1072 
1073 FcPrivate FcValueListPtr
1074 FcValueListAppend (FcValueListPtr vallist,
1075 		   FcValue        value,
1076 		   FcValueBinding binding);
1077 
1078 FcPrivate FcValueListPtr
1079 FcValueListDuplicate(FcValueListPtr orig);
1080 
1081 FcPrivate FcPatternElt *
1082 FcPatternObjectFindElt (const FcPattern *p, FcObject object);
1083 
1084 FcPrivate FcPatternElt *
1085 FcPatternObjectInsertElt (FcPattern *p, FcObject object);
1086 
1087 FcPrivate FcBool
1088 FcPatternObjectListAdd (FcPattern	*p,
1089 			FcObject	object,
1090 			FcValueListPtr	list,
1091 			FcBool		append);
1092 
1093 FcPrivate FcBool
1094 FcPatternObjectAddWithBinding  (FcPattern	*p,
1095 				FcObject	object,
1096 				FcValue		value,
1097 				FcValueBinding  binding,
1098 				FcBool		append);
1099 
1100 FcPrivate FcBool
1101 FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append);
1102 
1103 FcPrivate FcBool
1104 FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append);
1105 
1106 FcPrivate FcResult
1107 FcPatternObjectGetWithBinding (const FcPattern *p, FcObject object, int id, FcValue *v, FcValueBinding *b);
1108 
1109 FcPrivate FcResult
1110 FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v);
1111 
1112 FcPrivate FcBool
1113 FcPatternObjectDel (FcPattern *p, FcObject object);
1114 
1115 FcPrivate FcBool
1116 FcPatternObjectRemove (FcPattern *p, FcObject object, int id);
1117 
1118 FcPrivate FcBool
1119 FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i);
1120 
1121 FcPrivate FcBool
1122 FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d);
1123 
1124 FcPrivate FcBool
1125 FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s);
1126 
1127 FcPrivate FcBool
1128 FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s);
1129 
1130 FcPrivate FcBool
1131 FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c);
1132 
1133 FcPrivate FcBool
1134 FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
1135 
1136 FcPrivate FcBool
1137 FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
1138 
1139 FcPrivate FcBool
1140 FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r);
1141 
1142 FcPrivate FcResult
1143 FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
1144 
1145 FcPrivate FcResult
1146 FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d);
1147 
1148 FcPrivate FcResult
1149 FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s);
1150 
1151 FcPrivate FcResult
1152 FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s);
1153 
1154 FcPrivate FcResult
1155 FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c);
1156 
1157 FcPrivate FcResult
1158 FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
1159 
1160 FcPrivate FcResult
1161 FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
1162 
1163 FcPrivate FcResult
1164 FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r);
1165 
1166 FcPrivate FcBool
1167 FcPatternAppend (FcPattern *p, FcPattern *s);
1168 
1169 FcPrivate int
1170 FcPatternPosition (const FcPattern *p, const char *object);
1171 
1172 FcPrivate FcBool
1173 FcPatternFindObjectIter (const FcPattern *pat, FcPatternIter *iter, FcObject object);
1174 
1175 FcPrivate FcObject
1176 FcPatternIterGetObjectId (const FcPattern *pat, FcPatternIter *iter);
1177 
1178 FcPrivate FcValueListPtr
1179 FcPatternIterGetValues (const FcPattern *pat, FcPatternIter *iter);
1180 
1181 FcPrivate FcPattern *
1182 FcPatternCacheRewriteFile (const FcPattern *pat, FcCache *cache, const FcChar8 *relocated_font_file);
1183 
1184 FcPrivate FcChar32
1185 FcStringHash (const FcChar8 *s);
1186 
1187 FcPrivate FcBool
1188 FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat);
1189 
1190 FcPrivate FcPattern *
1191 FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat);
1192 
1193 FcPrivate FcBool
1194 FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat);
1195 
1196 FcPrivate FcValueList *
1197 FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat);
1198 
1199 /* fcrender.c */
1200 
1201 /* fcmatrix.c */
1202 
1203 extern FcPrivate const FcMatrix    FcIdentityMatrix;
1204 
1205 FcPrivate void
1206 FcMatrixFree (FcMatrix *mat);
1207 
1208 /* fcrange.c */
1209 
1210 FcPrivate FcRange *
1211 FcRangePromote (double v, FcValuePromotionBuffer *vbuf);
1212 
1213 FcPrivate FcBool
1214 FcRangeIsInRange (const FcRange *a, const FcRange *b);
1215 
1216 FcPrivate FcBool
1217 FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b);
1218 
1219 FcPrivate FcChar32
1220 FcRangeHash (const FcRange *r);
1221 
1222 FcPrivate FcBool
1223 FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r);
1224 
1225 FcPrivate FcRange *
1226 FcRangeSerialize (FcSerialize *serialize, const FcRange *r);
1227 
1228 /* fcstat.c */
1229 
1230 FcPrivate int
1231 FcStat (const FcChar8 *file, struct stat *statb);
1232 
1233 FcPrivate int
1234 FcStatChecksum (const FcChar8 *file, struct stat *statb);
1235 
1236 FcPrivate FcBool
1237 FcIsFsMmapSafe (int fd);
1238 
1239 FcPrivate FcBool
1240 FcIsFsMtimeBroken (const FcChar8 *dir);
1241 
1242 /* fcstr.c */
1243 FcPrivate FcStrSet *
1244 FcStrSetCreateEx (unsigned int control);
1245 
1246 FcPrivate FcBool
1247 FcStrSetAddLangs (FcStrSet *strs, const char *languages);
1248 
1249 FcPrivate void
1250 FcStrSetSort (FcStrSet * set);
1251 
1252 FcPrivate FcBool
1253 FcStrSetMemberAB (FcStrSet *set, const FcChar8 *a, FcChar8 *b, FcChar8 **ret);
1254 
1255 FcPrivate FcBool
1256 FcStrSetAddTriple (FcStrSet *set, const FcChar8 *a, const FcChar8 *b, const FcChar8 *c);
1257 
1258 FcPrivate const FcChar8 *
1259 FcStrTripleSecond (FcChar8 *s);
1260 
1261 FcPrivate const FcChar8 *
1262 FcStrTripleThird (FcChar8 *str);
1263 
1264 FcPrivate FcBool
1265 FcStrSetAddFilenamePairWithSalt (FcStrSet *strs, const FcChar8 *d, const FcChar8 *m, const FcChar8 *salt);
1266 
1267 FcPrivate FcBool
1268 FcStrSetDeleteAll (FcStrSet *set);
1269 
1270 FcPrivate void
1271 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
1272 
1273 FcPrivate void
1274 FcStrBufDestroy (FcStrBuf *buf);
1275 
1276 FcPrivate FcChar8 *
1277 FcStrBufDone (FcStrBuf *buf);
1278 
1279 FcPrivate FcChar8 *
1280 FcStrBufDoneStatic (FcStrBuf *buf);
1281 
1282 FcPrivate FcBool
1283 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
1284 
1285 FcPrivate FcBool
1286 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
1287 
1288 FcPrivate FcBool
1289 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
1290 
1291 FcPrivate int
1292 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1293 
1294 FcPrivate int
1295 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1296 
1297 FcPrivate const FcChar8 *
1298 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
1299 
1300 FcPrivate const FcChar8 *
1301 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
1302 
1303 FcPrivate const FcChar8 *
1304 FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2);
1305 
1306 FcPrivate int
1307 FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
1308 
1309 FcPrivate FcBool
1310 FcStrGlobMatch (const FcChar8 *glob,
1311 		const FcChar8 *string);
1312 
1313 FcPrivate FcBool
1314 FcStrUsesHome (const FcChar8 *s);
1315 
1316 FcPrivate FcBool
1317 FcStrIsAbsoluteFilename (const FcChar8 *s);
1318 
1319 FcPrivate FcChar8 *
1320 FcStrLastSlash (const FcChar8  *path);
1321 
1322 FcPrivate FcChar32
1323 FcStrHashIgnoreCase (const FcChar8 *s);
1324 
1325 FcPrivate FcChar8 *
1326 FcStrCanonFilename (const FcChar8 *s);
1327 
1328 FcPrivate FcBool
1329 FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
1330 
1331 FcPrivate FcChar8 *
1332 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
1333 
1334 /* fcobjs.c */
1335 
1336 FcPrivate void
1337 FcObjectFini (void);
1338 
1339 FcPrivate FcObject
1340 FcObjectLookupIdByName (const char *str);
1341 
1342 FcPrivate FcObject
1343 FcObjectLookupBuiltinIdByName (const char *str);
1344 
1345 FcPrivate const char *
1346 FcObjectLookupOtherNameById (FcObject id);
1347 
1348 FcPrivate const FcObjectType *
1349 FcObjectLookupOtherTypeById (FcObject id);
1350 
1351 FcPrivate const FcObjectType *
1352 FcObjectLookupOtherTypeByName (const char *str);
1353 
1354 /* fchash.c */
1355 FcPrivate FcBool
1356 FcHashStrCopy (const void  *src,
1357 	       void       **dest);
1358 
1359 FcPrivate FcBool
1360 FcHashUuidCopy (const void  *src,
1361 		void       **dest);
1362 
1363 FcPrivate void
1364 FcHashUuidFree (void *data);
1365 
1366 FcPrivate FcHashTable *
1367 FcHashTableCreate (FcHashFunc    hash_func,
1368 		   FcCompareFunc compare_func,
1369 		   FcCopyFunc    key_copy_func,
1370 		   FcCopyFunc    value_copy_func,
1371 		   FcDestroyFunc key_destroy_func,
1372 		   FcDestroyFunc value_destroy_func);
1373 
1374 FcPrivate void
1375 FcHashTableDestroy (FcHashTable *table);
1376 
1377 FcPrivate FcBool
1378 FcHashTableFind (FcHashTable  *table,
1379 		 const void   *key,
1380 		 void        **value);
1381 
1382 FcPrivate FcBool
1383 FcHashTableAdd (FcHashTable *table,
1384 		void        *key,
1385 		void        *value);
1386 
1387 FcPrivate FcBool
1388 FcHashTableReplace (FcHashTable *table,
1389 		    void        *key,
1390 		    void        *value);
1391 
1392 FcPrivate FcBool
1393 FcHashTableRemove (FcHashTable *table,
1394 		   void        *key);
1395 
1396 #endif /* _FC_INT_H_ */
1397