fcint.h revision 7872e0a1
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 void 913FcDefaultFini (void); 914 915/* fcdir.c */ 916 917FcPrivate FcBool 918FcFileIsLink (const FcChar8 *file); 919 920FcPrivate FcBool 921FcFileIsFile (const FcChar8 *file); 922 923FcPrivate FcBool 924FcFileScanConfig (FcFontSet *set, 925 FcStrSet *dirs, 926 const FcChar8 *file, 927 FcConfig *config); 928 929FcPrivate FcBool 930FcDirScanConfig (FcFontSet *set, 931 FcStrSet *dirs, 932 const FcChar8 *dir, 933 FcBool force, 934 FcConfig *config); 935 936/* fcfont.c */ 937FcPrivate int 938FcFontDebug (void); 939 940/* fcfs.c */ 941 942FcPrivate FcBool 943FcFontSetSerializeAlloc (FcSerialize *serialize, const FcFontSet *s); 944 945FcPrivate FcFontSet * 946FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s); 947 948FcPrivate FcFontSet * 949FcFontSetDeserialize (const FcFontSet *set); 950 951/* fcplist.c */ 952FcPrivate FcPtrList * 953FcPtrListCreate (FcDestroyFunc func); 954 955FcPrivate void 956FcPtrListDestroy (FcPtrList *list); 957 958FcPrivate void 959FcPtrListIterInit (const FcPtrList *list, 960 FcPtrListIter *iter); 961 962FcPrivate void 963FcPtrListIterInitAtLast (FcPtrList *list, 964 FcPtrListIter *iter); 965 966FcPrivate FcBool 967FcPtrListIterNext (const FcPtrList *list, 968 FcPtrListIter *iter); 969 970FcPrivate FcBool 971FcPtrListIterIsValid (const FcPtrList *list, 972 const FcPtrListIter *iter); 973 974FcPrivate void * 975FcPtrListIterGetValue (const FcPtrList *list, 976 const FcPtrListIter *iter); 977 978FcPrivate FcBool 979FcPtrListIterAdd (FcPtrList *list, 980 FcPtrListIter *iter, 981 void *data); 982 983FcPrivate FcBool 984FcPtrListIterRemove (FcPtrList *list, 985 FcPtrListIter *iter); 986 987/* fcinit.c */ 988FcPrivate FcConfig * 989FcInitLoadOwnConfig (FcConfig *config); 990 991FcPrivate FcConfig * 992FcInitLoadOwnConfigAndFonts (FcConfig *config); 993 994/* fcxml.c */ 995FcPrivate void 996FcConfigPathFini (void); 997 998FcPrivate void 999FcTestDestroy (FcTest *test); 1000 1001FcPrivate void 1002FcEditDestroy (FcEdit *e); 1003 1004void 1005FcRuleDestroy (FcRule *rule); 1006 1007/* fclang.c */ 1008FcPrivate FcLangSet * 1009FcFreeTypeLangSet (const FcCharSet *charset, 1010 const FcChar8 *exclusiveLang); 1011 1012FcPrivate FcLangResult 1013FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); 1014 1015FcPrivate FcLangSet * 1016FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *buf); 1017 1018FcPrivate FcLangSet * 1019FcNameParseLangSet (const FcChar8 *string); 1020 1021FcPrivate FcBool 1022FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); 1023 1024FcPrivate FcChar8 * 1025FcNameUnparseEscaped (FcPattern *pat, FcBool escape); 1026 1027FcPrivate FcBool 1028FcConfigParseOnly (FcConfig *config, 1029 const FcChar8 *name, 1030 FcBool complain); 1031 1032FcPrivate FcChar8 * 1033FcConfigRealFilename (FcConfig *config, 1034 const FcChar8 *url); 1035 1036/* fclist.c */ 1037 1038FcPrivate FcBool 1039FcListPatternMatchAny (const FcPattern *p, 1040 const FcPattern *font); 1041 1042/* fcmatch.c */ 1043 1044/* fcname.c */ 1045 1046enum { 1047 FC_INVALID_OBJECT = 0, 1048#define FC_OBJECT(NAME, Type, Cmp) FC_##NAME##_OBJECT, 1049#include "fcobjs.h" 1050#undef FC_OBJECT 1051 FC_ONE_AFTER_MAX_BASE_OBJECT 1052#define FC_MAX_BASE_OBJECT (FC_ONE_AFTER_MAX_BASE_OBJECT - 1) 1053}; 1054 1055FcPrivate FcBool 1056FcNameConstantWithObjectCheck (const FcChar8 *string, const char *object, int *result); 1057 1058FcPrivate FcBool 1059FcNameBool (const FcChar8 *v, FcBool *result); 1060 1061FcPrivate FcBool 1062FcObjectValidType (FcObject object, FcType type); 1063 1064FcPrivate FcObject 1065FcObjectFromName (const char * name); 1066 1067FcPrivate const char * 1068FcObjectName (FcObject object); 1069 1070FcPrivate FcObjectSet * 1071FcObjectGetSet (void); 1072 1073#define FcObjectCompare(a, b) ((int) a - (int) b) 1074 1075/* fcpat.c */ 1076 1077FcPrivate FcValue 1078FcValueCanonicalize (const FcValue *v); 1079 1080FcPrivate FcValueListPtr 1081FcValueListCreate (void); 1082 1083FcPrivate void 1084FcValueListDestroy (FcValueListPtr l); 1085 1086FcPrivate FcValueListPtr 1087FcValueListPrepend (FcValueListPtr vallist, 1088 FcValue value, 1089 FcValueBinding binding); 1090 1091FcPrivate FcValueListPtr 1092FcValueListAppend (FcValueListPtr vallist, 1093 FcValue value, 1094 FcValueBinding binding); 1095 1096FcPrivate FcValueListPtr 1097FcValueListDuplicate(FcValueListPtr orig); 1098 1099FcPrivate FcPatternElt * 1100FcPatternObjectFindElt (const FcPattern *p, FcObject object); 1101 1102FcPrivate FcPatternElt * 1103FcPatternObjectInsertElt (FcPattern *p, FcObject object); 1104 1105FcPrivate FcBool 1106FcPatternObjectListAdd (FcPattern *p, 1107 FcObject object, 1108 FcValueListPtr list, 1109 FcBool append); 1110 1111FcPrivate FcBool 1112FcPatternObjectAddWithBinding (FcPattern *p, 1113 FcObject object, 1114 FcValue value, 1115 FcValueBinding binding, 1116 FcBool append); 1117 1118FcPrivate FcBool 1119FcPatternObjectAdd (FcPattern *p, FcObject object, FcValue value, FcBool append); 1120 1121FcPrivate FcBool 1122FcPatternObjectAddWeak (FcPattern *p, FcObject object, FcValue value, FcBool append); 1123 1124FcPrivate FcResult 1125FcPatternObjectGetWithBinding (const FcPattern *p, FcObject object, int id, FcValue *v, FcValueBinding *b); 1126 1127FcPrivate FcResult 1128FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v); 1129 1130FcPrivate FcBool 1131FcPatternObjectDel (FcPattern *p, FcObject object); 1132 1133FcPrivate FcBool 1134FcPatternObjectRemove (FcPattern *p, FcObject object, int id); 1135 1136FcPrivate FcBool 1137FcPatternObjectAddInteger (FcPattern *p, FcObject object, int i); 1138 1139FcPrivate FcBool 1140FcPatternObjectAddDouble (FcPattern *p, FcObject object, double d); 1141 1142FcPrivate FcBool 1143FcPatternObjectAddString (FcPattern *p, FcObject object, const FcChar8 *s); 1144 1145FcPrivate FcBool 1146FcPatternObjectAddMatrix (FcPattern *p, FcObject object, const FcMatrix *s); 1147 1148FcPrivate FcBool 1149FcPatternObjectAddCharSet (FcPattern *p, FcObject object, const FcCharSet *c); 1150 1151FcPrivate FcBool 1152FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b); 1153 1154FcPrivate FcBool 1155FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls); 1156 1157FcPrivate FcBool 1158FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r); 1159 1160FcPrivate FcResult 1161FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i); 1162 1163FcPrivate FcResult 1164FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int n, double *d); 1165 1166FcPrivate FcResult 1167FcPatternObjectGetString (const FcPattern *p, FcObject object, int n, FcChar8 ** s); 1168 1169FcPrivate FcResult 1170FcPatternObjectGetMatrix (const FcPattern *p, FcObject object, int n, FcMatrix **s); 1171 1172FcPrivate FcResult 1173FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int n, FcCharSet **c); 1174 1175FcPrivate FcResult 1176FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b); 1177 1178FcPrivate FcResult 1179FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls); 1180 1181FcPrivate FcResult 1182FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r); 1183 1184FcPrivate FcBool 1185FcPatternAppend (FcPattern *p, FcPattern *s); 1186 1187FcPrivate int 1188FcPatternPosition (const FcPattern *p, const char *object); 1189 1190FcPrivate FcBool 1191FcPatternFindObjectIter (const FcPattern *pat, FcPatternIter *iter, FcObject object); 1192 1193FcPrivate FcObject 1194FcPatternIterGetObjectId (const FcPattern *pat, FcPatternIter *iter); 1195 1196FcPrivate FcValueListPtr 1197FcPatternIterGetValues (const FcPattern *pat, FcPatternIter *iter); 1198 1199FcPrivate FcPattern * 1200FcPatternCacheRewriteFile (const FcPattern *pat, FcCache *cache, const FcChar8 *relocated_font_file); 1201 1202FcPrivate FcChar32 1203FcStringHash (const FcChar8 *s); 1204 1205FcPrivate FcBool 1206FcPatternSerializeAlloc (FcSerialize *serialize, const FcPattern *pat); 1207 1208FcPrivate FcPattern * 1209FcPatternSerialize (FcSerialize *serialize, const FcPattern *pat); 1210 1211FcPrivate FcBool 1212FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *pat); 1213 1214FcPrivate FcValueList * 1215FcValueListSerialize (FcSerialize *serialize, const FcValueList *pat); 1216 1217/* fcrender.c */ 1218 1219/* fcmatrix.c */ 1220 1221extern FcPrivate const FcMatrix FcIdentityMatrix; 1222 1223FcPrivate void 1224FcMatrixFree (FcMatrix *mat); 1225 1226/* fcrange.c */ 1227 1228FcPrivate FcRange * 1229FcRangePromote (double v, FcValuePromotionBuffer *vbuf); 1230 1231FcPrivate FcBool 1232FcRangeIsInRange (const FcRange *a, const FcRange *b); 1233 1234FcPrivate FcBool 1235FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b); 1236 1237FcPrivate FcChar32 1238FcRangeHash (const FcRange *r); 1239 1240FcPrivate FcBool 1241FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r); 1242 1243FcPrivate FcRange * 1244FcRangeSerialize (FcSerialize *serialize, const FcRange *r); 1245 1246/* fcstat.c */ 1247 1248FcPrivate int 1249FcStat (const FcChar8 *file, struct stat *statb); 1250 1251FcPrivate int 1252FcStatChecksum (const FcChar8 *file, struct stat *statb); 1253 1254FcPrivate FcBool 1255FcIsFsMmapSafe (int fd); 1256 1257FcPrivate FcBool 1258FcIsFsMtimeBroken (const FcChar8 *dir); 1259 1260/* fcstr.c */ 1261FcPrivate FcStrSet * 1262FcStrSetCreateEx (unsigned int control); 1263 1264FcPrivate FcBool 1265FcStrSetInsert (FcStrSet *set, const FcChar8 *s, int pos); 1266 1267FcPrivate FcBool 1268FcStrSetAddLangs (FcStrSet *strs, const char *languages); 1269 1270FcPrivate void 1271FcStrSetSort (FcStrSet * set); 1272 1273FcPrivate FcBool 1274FcStrSetMemberAB (FcStrSet *set, const FcChar8 *a, FcChar8 *b, FcChar8 **ret); 1275 1276FcPrivate FcBool 1277FcStrSetAddTriple (FcStrSet *set, const FcChar8 *a, const FcChar8 *b, const FcChar8 *c); 1278 1279FcPrivate const FcChar8 * 1280FcStrTripleSecond (FcChar8 *s); 1281 1282FcPrivate const FcChar8 * 1283FcStrTripleThird (FcChar8 *str); 1284 1285FcPrivate FcBool 1286FcStrSetAddFilenamePairWithSalt (FcStrSet *strs, const FcChar8 *d, const FcChar8 *m, const FcChar8 *salt); 1287 1288FcPrivate FcBool 1289FcStrSetDeleteAll (FcStrSet *set); 1290 1291FcPrivate void 1292FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size); 1293 1294FcPrivate void 1295FcStrBufDestroy (FcStrBuf *buf); 1296 1297FcPrivate FcChar8 * 1298FcStrBufDone (FcStrBuf *buf); 1299 1300FcPrivate FcChar8 * 1301FcStrBufDoneStatic (FcStrBuf *buf); 1302 1303FcPrivate FcBool 1304FcStrBufChar (FcStrBuf *buf, FcChar8 c); 1305 1306FcPrivate FcBool 1307FcStrBufString (FcStrBuf *buf, const FcChar8 *s); 1308 1309FcPrivate FcBool 1310FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len); 1311 1312FcPrivate int 1313FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); 1314 1315FcPrivate int 1316FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims); 1317 1318FcPrivate const FcChar8 * 1319FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); 1320 1321FcPrivate const FcChar8 * 1322FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); 1323 1324FcPrivate const FcChar8 * 1325FcStrContainsWord (const FcChar8 *s1, const FcChar8 *s2); 1326 1327FcPrivate int 1328FcStrMatchIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims); 1329 1330FcPrivate FcBool 1331FcStrGlobMatch (const FcChar8 *glob, 1332 const FcChar8 *string); 1333 1334FcPrivate FcBool 1335FcStrUsesHome (const FcChar8 *s); 1336 1337FcPrivate FcBool 1338FcStrIsAbsoluteFilename (const FcChar8 *s); 1339 1340FcPrivate FcChar8 * 1341FcStrLastSlash (const FcChar8 *path); 1342 1343FcPrivate FcChar32 1344FcStrHashIgnoreCase (const FcChar8 *s); 1345 1346FcPrivate FcChar32 1347FcStrHashIgnoreBlanksAndCase (const FcChar8 *s); 1348 1349FcPrivate FcChar8 * 1350FcStrRealPath (const FcChar8 *path); 1351 1352FcPrivate FcChar8 * 1353FcStrCanonFilename (const FcChar8 *s); 1354 1355FcPrivate FcBool 1356FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str); 1357 1358FcPrivate FcChar8 * 1359FcStrSerialize (FcSerialize *serialize, const FcChar8 *str); 1360 1361/* fcobjs.c */ 1362 1363FcPrivate void 1364FcObjectFini (void); 1365 1366FcPrivate FcObject 1367FcObjectLookupIdByName (const char *str); 1368 1369FcPrivate FcObject 1370FcObjectLookupBuiltinIdByName (const char *str); 1371 1372FcPrivate const char * 1373FcObjectLookupOtherNameById (FcObject id); 1374 1375FcPrivate const FcObjectType * 1376FcObjectLookupOtherTypeById (FcObject id); 1377 1378FcPrivate const FcObjectType * 1379FcObjectLookupOtherTypeByName (const char *str); 1380 1381/* fchash.c */ 1382FcPrivate FcBool 1383FcHashStrCopy (const void *src, 1384 void **dest); 1385 1386FcPrivate FcBool 1387FcHashUuidCopy (const void *src, 1388 void **dest); 1389 1390FcPrivate void 1391FcHashUuidFree (void *data); 1392 1393FcPrivate FcHashTable * 1394FcHashTableCreate (FcHashFunc hash_func, 1395 FcCompareFunc compare_func, 1396 FcCopyFunc key_copy_func, 1397 FcCopyFunc value_copy_func, 1398 FcDestroyFunc key_destroy_func, 1399 FcDestroyFunc value_destroy_func); 1400 1401FcPrivate void 1402FcHashTableDestroy (FcHashTable *table); 1403 1404FcPrivate FcBool 1405FcHashTableFind (FcHashTable *table, 1406 const void *key, 1407 void **value); 1408 1409FcPrivate FcBool 1410FcHashTableAdd (FcHashTable *table, 1411 void *key, 1412 void *value); 1413 1414FcPrivate FcBool 1415FcHashTableReplace (FcHashTable *table, 1416 void *key, 1417 void *value); 1418 1419FcPrivate FcBool 1420FcHashTableRemove (FcHashTable *table, 1421 void *key); 1422 1423#endif /* _FC_INT_H_ */ 1424