]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcint.h
Make FcOpNotContains use FcStrStr for strings so that it matches semantics
[fontconfig.git] / src / fcint.h
index cf86ad417a2ab07e24e65e563defe4d4f3e11f22..24bf246a5e45824784a41ee85f15b7cba97da631 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $
  *
- * Copyright © 2000 Keith Packard
+ * Copyright Â© 2000 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
@@ -69,6 +69,7 @@ typedef struct _FcSymbolic {
 #define FC_DBG_SCAN    128
 #define FC_DBG_SCANV   256
 #define FC_DBG_MEMORY  512
+#define FC_DBG_CONFIG  1024
 
 #define FC_MEM_CHARSET     0
 #define FC_MEM_CHARLEAF            1
@@ -99,8 +100,9 @@ typedef struct _FcSymbolic {
 #define FC_MEM_VSTACK      26
 #define FC_MEM_ATTR        27
 #define FC_MEM_PSTACK      28
+#define FC_MEM_STATICSTR    29
 
-#define FC_MEM_NUM         29
+#define FC_MEM_NUM         30
 
 typedef enum _FcValueBinding {
     FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
@@ -229,6 +231,39 @@ typedef struct _FcGlyphName {
     FcChar8    name[1];        /* name extends beyond struct */
 } FcGlyphName;
 
+/*
+ * To perform case-insensitive string comparisons, a table
+ * is used which holds three different kinds of folding data.
+ * 
+ * The first is a range of upper case values mapping to a range
+ * of their lower case equivalents.  Within each range, the offset
+ * between upper and lower case is constant.
+ *
+ * The second is a range of upper case values which are interleaved
+ * with their lower case equivalents.
+ * 
+ * The third is a set of raw unicode values mapping to a list
+ * of unicode values for comparison purposes.  This allows conversion
+ * of ß to "ss" so that SS, ss and ß all match.  A separate array
+ * holds the list of unicode values for each entry.
+ *
+ * These are packed into a single table.  Using a binary search,
+ * the appropriate entry can be located.
+ */
+
+#define FC_CASE_FOLD_RANGE         0
+#define FC_CASE_FOLD_EVEN_ODD      1
+#define FC_CASE_FOLD_FULL          2
+
+typedef struct _FcCaseFold {
+    FcChar32   upper;
+    FcChar16   method : 2;
+    FcChar16   count : 14;
+    short      offset;     /* lower - upper for RANGE, table id for FULL */
+} FcCaseFold;
+
+#define FC_MAX_FILE_LEN            4096
+
 /*
  * The per-user ~/.fonts.cache-<version> file is loaded into
  * this data structure.  Each directory gets a substructure
@@ -519,6 +554,9 @@ FcDebug (void);
 
 /* fcdir.c */
 
+FcBool
+FcFileIsDir (const FcChar8 *file);
+
 FcBool
 FcFileScanConfig (FcFontSet    *set,
                  FcStrSet      *dirs,
@@ -571,13 +609,6 @@ FcConfigerror (char *fmt, ...);
 char *
 FcConfigSaveField (const char *field);
 
-FcTest *
-FcTestCreate (FcMatchKind   kind,
-             FcQual        qual,
-             const FcChar8 *field,
-             FcOp          compare,
-             FcExpr        *expr);
-
 void
 FcTestDestroy (FcTest *test);
 
@@ -611,9 +642,6 @@ FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right);
 void
 FcExprDestroy (FcExpr *e);
 
-FcEdit *
-FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding);
-
 void
 FcEditDestroy (FcEdit *e);
 
@@ -659,7 +687,7 @@ FcListPatternMatchAny (const FcPattern *p,
 /* fcname.c */
 
 FcBool
-FcNameBool (FcChar8 *v, FcBool *result);
+FcNameBool (const FcChar8 *v, FcBool *result);
 
 /* fcpat.c */
 void
@@ -739,4 +767,7 @@ FcStrUsesHome (const FcChar8 *s);
 FcChar8 *
 FcStrLastSlash (const FcChar8  *path);
 
+FcChar32
+FcStrHashIgnoreCase (const FcChar8 *s);
+
 #endif /* _FC_INT_H_ */