fc-arch/fc-arch.c | 10 +++++----- fc-arch/fcarch.tmpl.h | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 13 deletions(-) New commits: commit d5ebf48e34e9235cf10e9f7beb49af74823c3fc6 Author: Behdad Esfahbod <behdad@xxxxxxxxxx> Date: Wed Nov 18 14:08:00 2009 -0500 [fc-arch] Beautify the arch template diff --git a/fc-arch/fc-arch.c b/fc-arch/fc-arch.c index 09a9d82..1ef0cf1 100644 --- a/fc-arch/fc-arch.c +++ b/fc-arch/fc-arch.c @@ -24,8 +24,8 @@ #include "fcint.h" #include <ctype.h> -#define ENDIAN_TEST 0x12345678 -#define MACHINE_SIGNATURE_SIZE (9*23 + 1) +#define ENDIAN_TEST 0x01020304 +#define MACHINE_SIGNATURE_SIZE 1024 static char * FcCacheMachineSignature (void) @@ -34,9 +34,9 @@ FcCacheMachineSignature (void) int32_t magic = ENDIAN_TEST; char * m = (char *)&magic; - sprintf (buf, "%2x%2x%2x%2x_" - "%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_" - "%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x_%08x", + sprintf (buf, "%01x%01x%01x%01x_" + "%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_" + "%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x_%02x", m[0], m[1], m[2], m[3], (unsigned int)sizeof (FcAlign), (unsigned int)sizeof (char), diff --git a/fc-arch/fcarch.tmpl.h b/fc-arch/fcarch.tmpl.h index 09eccdc..8d592e9 100644 --- a/fc-arch/fcarch.tmpl.h +++ b/fc-arch/fcarch.tmpl.h @@ -28,11 +28,37 @@ @@@ name. Architecture names are used to construct file names, so @@@ use something reasonable and don't include any spaces @@@ -@@@ name endian FcAlign char char* int intptr_t Pattern EltPtr Elt * Elt ObjPtr VLPtr Value Binding VL * StrSet * CharSet Leaf** Char16 * Char16 Leaf Char32 Cache -x86 78563412_00000008_00000001_00000004_00000004_00000004_00000010_00000004_00000004_00000008_00000004_00000004_0000000c_00000004_00000004_00000004_00000010_00000004_00000004_00000002_00000020_00000004_00000020 -x86-64 78563412_00000008_00000001_00000008_00000004_00000008_00000018_00000008_00000008_00000010_00000004_00000008_00000010_00000004_00000008_00000008_00000018_00000008_00000008_00000002_00000020_00000004_00000038 -ppc 12345678_00000008_00000001_00000004_00000004_00000004_00000010_00000004_00000004_00000008_00000004_00000004_00000010_00000004_00000004_00000004_00000010_00000004_00000004_00000002_00000020_00000004_00000020 -ppc64 12345678_00000008_00000001_00000008_00000004_00000008_00000018_00000008_00000008_00000010_00000004_00000008_00000010_00000004_00000008_00000008_00000018_00000008_00000008_00000002_00000020_00000004_00000038 -m68k 12345678_00000008_00000001_00000004_00000004_00000004_00000010_00000004_00000004_00000008_00000004_00000004_0000000c_00000004_00000004_00000004_00000010_00000004_00000004_00000002_00000020_00000004_00000020 -mipsel 78563412_00000008_00000001_00000004_00000004_00000004_00000010_00000004_00000004_00000008_00000004_00000004_00000010_00000004_00000004_00000004_00000010_00000004_00000004_00000002_00000020_00000004_00000020 -sparc64 12345678_00000008_00000001_00000008_00000004_00000008_00000018_00000008_00000008_00000010_00000004_00000008_00000010_00000004_00000008_00000008_00000018_00000008_00000008_00000002_00000020_00000004_00000038 +@@@ So far the differences boil down to: endianness, 32 vs 64 bit, and on +@@@ 32bit archs, whether double is aligned to one word or two words. +@@@ +@@@ ,name +@@@ | ,endian +@@@ | | ,FcAlign +@@@ | | | ,char +@@@ | | | | ,char* +@@@ | | | | | ,int +@@@ | | | | | | ,intptr_t +@@@ | | | | | | | ,Pattern +@@@ | | | | | | | | ,EltPtr +@@@ | | | | | | | | | ,Elt * +@@@ | | | | | | | | | | ,Elt +@@@ | | | | | | | | | | | ,ObjPtr +@@@ | | | | | | | | | | | | ,ValueListPtr +@@@ | | | | | | | | | | | | | ,Value +@@@ | | | | | | | | | | | | | | ,ValueBinding +@@@ | | | | | | | | | | | | | | | ,ValueList * +@@@ | | | | | | | | | | | | | | | | ,StrSet * +@@@ | | | | | | | | | | | | | | | | | ,CharSet +@@@ | | | | | | | | | | | | | | | | | | ,CharLeaf ** +@@@ | | | | | | | | | | | | | | | | | | | ,Char16 * +@@@ | | | | | | | | | | | | | | | | | | | | ,Char16 +@@@ | | | | | | | | | | | | | | | | | | | | | ,CharLeaf +@@@ | | | | | | | | | | | | | | | | | | | | | | ,Char32 +@@@ | | | | | | | | | | | | | | | | | | | | | | | ,Cache +@@@ | | | | | | | | | | | | | | | | | | | | | | | | +x86 4321_08_01_04_04_04_10_04_04_08_04_04_0c_04_04_04_10_04_04_02_20_04_20 +mipsel 4321_08_01_04_04_04_10_04_04_08_04_04_10_04_04_04_10_04_04_02_20_04_20 +x86-64 4321_08_01_08_04_08_18_08_08_10_04_08_10_04_08_08_18_08_08_02_20_04_38 +m68k 1234_08_01_04_04_04_10_04_04_08_04_04_0c_04_04_04_10_04_04_02_20_04_20 +ppc 1234_08_01_04_04_04_10_04_04_08_04_04_10_04_04_04_10_04_04_02_20_04_20 +ppc64 1234_08_01_08_04_08_18_08_08_10_04_08_10_04_08_08_18_08_08_02_20_04_38 _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig