Commit a8c42530 authored by Patrick Lam's avatar Patrick Lam
Browse files

Fix problem with missing 'en' due to euro.patch: change cache file format

    slightly to coincide with that generated by fc-lang.
parent b10e7762
2006-02-09 Patrick Lam <plam@mit.edu>
* src/fccharset.c (FcCharSetNeededBytes, FcCharSetSerialize,
FcCharSetGetLeaf):
Fix problem with missing 'en' due to euro.patch: change
cache file format slightly to coincide with that generated
by fc-lang.
2006-02-07 Patrick Lam <plam@mit.edu> 2006-02-07 Patrick Lam <plam@mit.edu>
* src/fccache.c (FcCacheReadDirs): * src/fccache.c (FcCacheReadDirs):
......
...@@ -1323,11 +1323,11 @@ FcCharSetNeededBytes (const FcCharSet *c) ...@@ -1323,11 +1323,11 @@ FcCharSetNeededBytes (const FcCharSet *c)
{ {
/* yes, there's redundancy */ /* yes, there's redundancy */
charset_count++; charset_count++;
charset_leaf_idx_count++; charset_leaf_idx_count += c->num;
charset_leaf_count += c->num; charset_leaf_count += c->num;
charset_numbers_count += c->num; charset_numbers_count += c->num;
return sizeof (FcCharSet) + return sizeof (FcCharSet) +
sizeof (int) + /* leaf_idx */ sizeof (int) * c->num + /* leaf_idx */
sizeof (FcCharLeaf) * c->num + /* leaf */ sizeof (FcCharLeaf) * c->num + /* leaf */
sizeof (FcChar16) * c->num; /* number */ sizeof (FcChar16) * c->num; /* number */
} }
...@@ -1421,9 +1421,9 @@ FcCharSetSerialize(int bank, FcCharSet *c) ...@@ -1421,9 +1421,9 @@ FcCharSetSerialize(int bank, FcCharSet *c)
charsets[bi][charset_ptr++] = new; charsets[bi][charset_ptr++] = new;
leaf_idx[bi][charset_leaf_idx_ptr++] = charset_leaf_ptr;
for (i = 0; i < c->num; i++) for (i = 0; i < c->num; i++)
{ {
leaf_idx[bi][charset_leaf_idx_ptr++] = charset_leaf_ptr;
memcpy (&leaves[bi][charset_leaf_ptr++], memcpy (&leaves[bi][charset_leaf_ptr++],
c->u.dyn.leaves[i], sizeof(FcCharLeaf)); c->u.dyn.leaves[i], sizeof(FcCharLeaf));
numbers[bi][charset_numbers_ptr++] = c->u.dyn.numbers[i]; numbers[bi][charset_numbers_ptr++] = c->u.dyn.numbers[i];
...@@ -1467,7 +1467,7 @@ FcCharSetGetLeaf(const FcCharSet *c, int i) ...@@ -1467,7 +1467,7 @@ FcCharSetGetLeaf(const FcCharSet *c, int i)
return c->u.dyn.leaves[i]; return c->u.dyn.leaves[i];
bi = FcCacheBankToIndex(c->bank); bi = FcCacheBankToIndex(c->bank);
return &leaves[bi][leaf_idx[bi][c->u.stat.leafidx_offset]+i]; return &leaves[bi][leaf_idx[bi][c->u.stat.leafidx_offset+i]];
} }
FcChar16 * FcChar16 *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment