player: timer: don't use negative length
[vlc.git] / contrib / src / fontconfig / fontconfig-noxml2.patch
blobae28ea721b2f907f1634404242065b20edad09cf
1 diff -ruN fontconfig/src/fcxml.c fontconfig.new/src/fcxml.c
2 --- fontconfig/src/fcxml.c 2014-07-06 00:38:32.773443543 +0200
3 +++ fontconfig.new/src/fcxml.c 2014-07-05 21:11:51.171349523 +0200
4 @@ -23,6 +23,8 @@
5 */
7 #include "fcint.h"
9 +#if 0
10 #include <fcntl.h>
11 #include <stdarg.h>
12 #include <dirent.h>
13 @@ -56,6 +58,8 @@
14 #include <mbstring.h>
15 #endif
17 +#endif
19 static void
20 FcExprDestroy (FcExpr *e);
22 @@ -86,6 +90,7 @@
23 FcRuleDestroy (n);
26 +#if 0
27 static FcExpr *
28 FcExprCreateInteger (FcConfig *config, int i)
30 @@ -132,6 +137,7 @@
32 return m;
34 +#endif
36 static void
37 FcExprMatrixFreeShallow (FcExprMatrix *m)
38 @@ -156,6 +162,7 @@
39 free (m);
42 +#if 0
43 static FcExpr *
44 FcExprCreateMatrix (FcConfig *config, const FcExprMatrix *matrix)
46 @@ -240,7 +247,7 @@
48 return e;
51 +#endif
52 static void
53 FcExprDestroy (FcExpr *e)
55 @@ -323,6 +330,7 @@
56 free (e);
59 +#if 0
60 typedef enum _FcElement {
61 FcElementNone,
62 FcElementFontconfig,
63 @@ -2973,6 +2981,7 @@
64 const FcChar8 *bs = *((FcChar8 **) b);
65 return FcStrCmp (as, bs);
67 +#endif
69 static FcBool
70 FcConfigParseAndLoadDir (FcConfig *config,
71 @@ -2980,6 +2989,9 @@
72 const FcChar8 *dir,
73 FcBool complain)
75 + return FcFalse;
77 +#if 0
78 DIR *d;
79 struct dirent *e;
80 FcBool ret = FcTrue;
81 @@ -3056,6 +3068,7 @@
82 bail0:
83 return ret || !complain;
85 +#endif
87 #ifdef _WIN32
88 pfnGetSystemWindowsDirectory pGetSystemWindowsDirectory = NULL;
89 @@ -3067,7 +3080,10 @@
90 const FcChar8 *name,
91 FcBool complain)
93 + return FcFalse;
96 +#if 0
97 XML_Parser p;
98 FcChar8 *filename;
99 int fd;
100 @@ -3210,3 +3226,4 @@
101 #define __fcxml__
102 #include "fcaliastail.h"
103 #undef __fcxml__
104 +#endif
105 --- fontconfig-2.12.1/src/fcinit.c.orig 2017-04-08 11:38:02.488354178 +0200
106 +++ fontconfig-2.12.1/src/fcinit.c 2017-04-08 11:38:52.072351969 +0200
107 @@ -45,11 +45,16 @@
108 if (!config)
109 goto bail0;
110 FcConfigSetSysRoot (config, sysroot);
111 - if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
112 + char path[MAX_PATH + 8];
113 + GetWindowsDirectory( path, MAX_PATH + 1 );
114 + strcat( path, "\\fonts" );
115 +// printf( "Fonts dir: %s\n", path );
116 + if (!FcConfigAddDir (config, (FcChar8 *) path))
117 goto bail1;
118 char dir[MAX_PATH+5];
119 SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, dir );
120 strncat( dir, "\\vlc", 4 );
121 +// printf( "Cache dir: %s\n", dir );
122 if (!FcConfigAddCacheDir (config, (FcChar8 *)dir))
123 goto bail1;
124 return config;
125 @@ -193,7 +202,7 @@
126 FcCacheFini ();
127 FcDefaultFini ();
128 FcObjectFini ();
129 - FcConfigPathFini ();
130 +// FcConfigPathFini ();