Commit ad05bac6053a70a43f8aabe23a20df6a1bb57754

Werner Lemberg 2012-03-14T18:34:36

[sfnt] Make arrays static like all others. * src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2), src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame fields.

diff --git a/ChangeLog b/ChangeLog
index d723dfc..be7bd1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-03-14  Yann Droneaud  <yann@droneaud.fr>
+
+	[sfnt] Make arrays static like all others.
+
+	* src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2),
+	src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame
+	fields.
+
 2012-03-14  Huw Davies  <huw@codeweavers.com>
 
 	[sfnt] A refinement of the previous commit.
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index d6d91ab..2beb57b 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -623,7 +623,7 @@
     FT_Error        error;
     TT_MaxProfile*  maxProfile = &face->max_profile;
 
-    const FT_Frame_Field  maxp_fields[] =
+    static const FT_Frame_Field  maxp_fields[] =
     {
 #undef  FT_STRUCTURE
 #define FT_STRUCTURE  TT_MaxProfile
@@ -634,7 +634,7 @@
       FT_FRAME_END
     };
 
-    const FT_Frame_Field  maxp_fields_extra[] =
+    static const FT_Frame_Field  maxp_fields_extra[] =
     {
       FT_FRAME_START( 26 ),
         FT_FRAME_USHORT( maxPoints ),
@@ -951,7 +951,7 @@
     FT_Error  error;
     TT_OS2*   os2;
 
-    const FT_Frame_Field  os2_fields[] =
+    static const FT_Frame_Field  os2_fields[] =
     {
 #undef  FT_STRUCTURE
 #define FT_STRUCTURE  TT_OS2
@@ -1003,7 +1003,7 @@
       FT_FRAME_END
     };
 
-    const FT_Frame_Field  os2_fields_extra[] =
+    static const FT_Frame_Field  os2_fields_extra[] =
     {
       FT_FRAME_START( 8 ),
         FT_FRAME_ULONG( ulCodePageRange1 ),
@@ -1011,7 +1011,7 @@
       FT_FRAME_END
     };
 
-    const FT_Frame_Field  os2_fields_extra2[] =
+    static const FT_Frame_Field  os2_fields_extra2[] =
     {
       FT_FRAME_START( 10 ),
         FT_FRAME_SHORT ( sxHeight ),
diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c
index 73ac8b2..8f7b2a9 100644
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Load the metrics tables common to TTF and OTF fonts (body).          */
 /*                                                                         */
-/*  Copyright 2006-2009, 2011 by                                           */
+/*  Copyright 2006-2009, 2011-2012 by                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -260,7 +260,7 @@
     FT_Error        error;
     TT_HoriHeader*  header;
 
-    const FT_Frame_Field  metrics_header_fields[] =
+    static const FT_Frame_Field  metrics_header_fields[] =
     {
 #undef  FT_STRUCTURE
 #define FT_STRUCTURE  TT_HoriHeader