]> git.wh0rd.org - fontconfig.git/commitdiff
[fc-arch] Beautify the arch template
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 18 Nov 2009 19:08:00 +0000 (14:08 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 18 Nov 2009 19:15:12 +0000 (14:15 -0500)
fc-arch/fc-arch.c
fc-arch/fcarch.tmpl.h

index 09a9d820a3e3be6f03ccdef2aee85c4b2446a5b1..1ef0cf18ab56a7084d55d4b89f2c1c79f0204031 100644 (file)
@@ -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),
index 09eccdc0198d2e46bae0d9db3d986555a245e56b..8d592e955f4907ca2d3304c7099697231d212193 100644 (file)
 @@@ 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