/*
- * $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.3 2002/02/19 08:33:23 keithp Exp $
+ * $RCSId: xc/lib/fontconfig/src/fcinit.c,v 1.7 2002/08/22 07:36:44 keithp Exp $
*
- * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2001 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
config = FcConfigCreate ();
if (!config)
goto bail0;
- if (!FcConfigAddDir (config, (FcChar8 *) FC_FALLBACK_FONTS))
+ if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
goto bail1;
return config;
return 0;
}
+int
+FcGetVersion (void)
+{
+ return FC_VERSION;
+}
+
/*
* Load the configuration files
*/
if (!config)
return FcTrue;
FcConfigSetCurrent (config);
+ if (FcDebug() & FC_DBG_MEMORY)
+ FcMemReport ();
return FcTrue;
}
+/*
+ * Free all library-allocated data structures.
+ */
+void
+FcFini (void)
+{
+ if (_fcConfig)
+ FcConfigDestroy (_fcConfig);
+
+ FcPatternThawAll ();
+ FcCharSetThawAll ();
+}
+
/*
* Reread the configuration and available font lists
*/
int free_count;
int free_mem;
} FcInUse[FC_MEM_NUM] = {
- { "charset", 0, 0 },
- { "charnode", 0 ,0 },
- { "fontset", 0, 0 },
- { "fontptr", 0, 0 },
- { "objectset", 0, 0 },
- { "objectptr", 0, 0 },
- { "matrix", 0, 0 },
- { "pattern", 0, 0 },
- { "patelt", 0, 0 },
- { "vallist", 0, 0 },
- { "substate", 0, 0 },
- { "string", 0, 0 },
- { "listbuck", 0, 0 },
+ { "charset" },
+ { "charleaf" },
+ { "fontset" },
+ { "fontptr" },
+ { "objectset" },
+ { "objectptr" },
+ { "matrix" },
+ { "pattern" },
+ { "patelt" },
+ { "vallist" },
+ { "substate" },
+ { "string" },
+ { "listbuck" },
+ { "strset" },
+ { "strlist" },
+ { "config" },
+ { "langset" },
+ { "atomic" },
+ { "blanks" },
+ { "cache" },
+ { "strbuf" },
+ { "subst" },
+ { "objecttype" },
+ { "constant" },
+ { "test" },
+ { "expr" },
+ { "vstack" },
+ { "attr" },
+ { "pstack" },
};
static int FcAllocCount, FcAllocMem;
static int FcAllocNotify, FcFreeNotify;
+void
+FcValueListReport (void);
+
void
FcMemReport (void)
{
FcAllocMem - FcFreeMem);
FcAllocNotify = 0;
FcFreeNotify = 0;
+ FcValueListReport ();
}
void