1 --- fontconfig/src/fcint.h.subdir Sat Aug 31 18:17:32 2002
2 +++ fontconfig/src/fcint.h Mon Sep 9 15:09:41 2002
7 +typedef struct _FcGlobalCacheDir FcGlobalCacheDir;
9 typedef struct _FcGlobalCacheSubdir {
10 struct _FcGlobalCacheSubdir *next;
12 + FcGlobalCacheDir *ent;
13 } FcGlobalCacheSubdir;
15 -typedef struct _FcGlobalCacheDir {
16 +struct _FcGlobalCacheDir {
17 struct _FcGlobalCacheDir *next;
18 FcGlobalCacheInfo info;
20 FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE];
21 FcGlobalCacheSubdir *subdirs;
25 typedef struct _FcGlobalCache {
26 FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE];
27 --- fontconfig/src/fcdir.c.subdir Mon Sep 9 13:04:09 2002
28 +++ fontconfig/src/fcdir.c Mon Sep 9 15:09:41 2002
32 ret = FcStrSetAdd (dirs, file);
34 + FcGlobalCacheUpdate (cache, file, 0, FC_FONT_FILE_DIR);
38 --- fontconfig/src/fccache.c.subdir Sat Aug 31 18:17:31 2002
39 +++ fontconfig/src/fccache.c Mon Sep 9 15:09:41 2002
41 parent = FcGlobalCacheDirGet (cache, i.dir, i.dir_len, FcTrue);
44 - subdir = malloc (sizeof (FcGlobalCacheSubdir) +
45 - strlen ((const char *) i.base) + 1);
46 + subdir = malloc (sizeof (FcGlobalCacheSubdir));
49 - FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir) +
50 - strlen ((const char *) i.base) + 1);
51 - subdir->file = (FcChar8 *) (subdir + 1);
52 - strcpy ((char *) subdir->file, (const char *) i.base);
53 + FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir));
55 subdir->next = parent->subdirs;
56 parent->subdirs = subdir;
59 for (s = d->subdirs; s; s = nexts)
62 - FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir) +
63 - strlen ((char *) s->file) + 1);
64 + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir));
67 FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheDir) + d->len + 1);
70 for (subdir = d->subdirs; subdir; subdir = subdir->next)
72 + FcFilePathInfo info = FcFilePathInfoGet (subdir->ent->info.file);
74 if (!FcCacheFontSetAdd (set, dirs, dir, dir_len,
75 - subdir->file, FC_FONT_FILE_DIR))
76 + info.base, FC_FONT_FILE_DIR))
78 cache->broken = FcTrue;
81 + FcGlobalCacheReferenced (cache, &subdir->ent->info);
84 FcGlobalCacheReferenced (cache, &d->info);