/*
- * $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $
+ * fontconfig/src/fcint.h
*
* Copyright © 2000 Keith Packard
*
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
} u;
} FcExpr;
+typedef struct _FcExprPage FcExprPage;
+
+struct _FcExprPage {
+ FcExprPage *next_page;
+ FcExpr *next;
+ FcExpr exprs[(1024 - 2/* two pointers */ - 2/* malloc overhead */) * sizeof (void *) / sizeof (FcExpr)];
+ FcExpr end[0];
+};
+
typedef enum _FcQual {
FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
} FcQual;
FcBool failed;
int len;
int size;
+ FcChar8 buf_static[16 * sizeof (void *)];
} FcStrBuf;
struct _FcCache {
*/
time_t rescanTime; /* last time information was scanned */
int rescanInterval; /* interval between scans */
+
+ int ref; /* reference count */
+
+ FcExprPage *expr_pool; /* pool of FcExpr's */
};
extern FcPrivate FcConfig *_fcConfig;
FcPrivate void
FcDirCacheReference (FcCache *cache, int nref);
+#ifdef _WIN32
+FcPrivate int
+FcStat (const char *file, struct stat *statb);
+#else
+#define FcStat stat
+#endif
+
/* fccfg.c */
+FcPrivate FcExpr *
+FcConfigAllocExpr (FcConfig *config);
+
FcPrivate FcBool
FcConfigAddConfigDir (FcConfig *config,
const FcChar8 *d);
FcPrivate FcCharSet *
FcNameParseCharSet (FcChar8 *string);
+FcPrivate FcBool
+FcNameUnparseValue (FcStrBuf *buf,
+ FcValue *v0,
+ FcChar8 *escape);
+
+FcPrivate FcBool
+FcNameUnparseValueList (FcStrBuf *buf,
+ FcValueListPtr v,
+ FcChar8 *escape);
+
FcPrivate FcCharLeaf *
FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
/* fcfont.c */
FcPrivate int
FcFontDebug (void);
-
+
/* fcfs.c */
FcPrivate FcBool
FcPrivate FcFontSet *
FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
-
-/* fcgram.y */
-FcPrivate int
-FcConfigparse (void);
-
-FcPrivate int
-FcConfigwrap (void);
-
-FcPrivate void
-FcConfigerror (char *fmt, ...);
-
-FcPrivate char *
-FcConfigSaveField (const char *field);
+/* fcxml.c */
FcPrivate void
FcTestDestroy (FcTest *test);
-FcPrivate FcExpr *
-FcExprCreateInteger (int i);
-
-FcPrivate FcExpr *
-FcExprCreateDouble (double d);
-
-FcPrivate FcExpr *
-FcExprCreateString (const FcChar8 *s);
-
-FcPrivate FcExpr *
-FcExprCreateMatrix (const FcMatrix *m);
-
-FcPrivate FcExpr *
-FcExprCreateBool (FcBool b);
-
-FcPrivate FcExpr *
-FcExprCreateNil (void);
-
-FcPrivate FcExpr *
-FcExprCreateField (const char *field);
-
-FcPrivate FcExpr *
-FcExprCreateConst (const FcChar8 *constant);
-
-FcPrivate FcExpr *
-FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right);
-
-FcPrivate void
-FcExprDestroy (FcExpr *e);
-
FcPrivate void
FcEditDestroy (FcEdit *e);
FcPrivate const char *
FcObjectName (FcObject object);
+FcPrivate FcObjectSet *
+FcObjectGetSet (void);
+
FcPrivate FcBool
FcObjectInit (void);
FcPrivate FcChar8 *
FcStrBufDone (FcStrBuf *buf);
+FcPrivate FcChar8 *
+FcStrBufDoneStatic (FcStrBuf *buf);
+
FcPrivate FcBool
FcStrBufChar (FcStrBuf *buf, FcChar8 c);