Commit c09a90a2f16023db0167f95919865ca59770c939

Werner Lemberg 2016-01-12T22:28:14

Don't use macro names that start with `_[A-Z]' [3/3]. Such macro names are reserved for both C and C++. * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/. Update all callers. (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'. * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.

diff --git a/ChangeLog b/ChangeLog
index 768bb74..eb3fd4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2016-01-12  Werner Lemberg  <wl@gnu.org>
 
+	Don't use macro names that start with `_[A-Z]' [3/3].
+
+	Such macro names are reserved for both C and C++.
+
+	* src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
+	Update all callers.
+	(FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
+	* src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
+
+2016-01-12  Werner Lemberg  <wl@gnu.org>
+
 	Don't use macro names that start with `_[A-Z]' [2/3].
 
 	Such macro names are reserved for both C and C++.
diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h
index 1b5bd3b..8a700d7 100644
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -24,8 +24,8 @@
 
 FT_BEGIN_HEADER
 
-#define _FTC_FACE_ID_HASH( i )                                  \
-          ( ( (FT_Offset)(i) >> 3 ) ^ ( (FT_Offset)(i) << 7 ) )
+#define FTC_FACE_ID_HASH( i )                                  \
+         ( ( (FT_Offset)(i) >> 3 ) ^ ( (FT_Offset)(i) << 7 ) )
 
   /* handle to cache object */
   typedef struct FTC_CacheRec_*  FTC_Cache;
@@ -228,7 +228,7 @@ FT_BEGIN_HEADER
     {                                                                    \
       _node = *_pnode;                                                   \
       if ( _node == NULL )                                               \
-        goto _NewNode;                                                   \
+        goto NewNode_;                                                   \
                                                                          \
       if ( _node->hash == _hash                             &&           \
            _nodcomp( _node, query, _cache, &_list_changed ) )            \
@@ -248,7 +248,7 @@ FT_BEGIN_HEADER
         if ( *_pnode == NULL )                                           \
         {                                                                \
           FT_ERROR(( "FTC_CACHE_LOOKUP_CMP: oops!!! node missing\n" ));  \
-          goto _NewNode;                                                 \
+          goto NewNode_;                                                 \
         }                                                                \
         else                                                             \
           _pnode = &((*_pnode)->link);                                   \
@@ -273,12 +273,12 @@ FT_BEGIN_HEADER
         FTC_MruNode_Up( (FTC_MruNode*)_nl,                               \
                         (FTC_MruNode)_node );                            \
     }                                                                    \
-    goto _Ok;                                                            \
+    goto Ok_;                                                            \
                                                                          \
-  _NewNode:                                                              \
+  NewNode_:                                                              \
     error = FTC_Cache_NewNode( _cache, _hash, query, &_node );           \
                                                                          \
-  _Ok:                                                                   \
+  Ok_:                                                                   \
     node = _node;                                                        \
   FT_END_STMNT
 
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index b826222..116ec3f 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -50,7 +50,7 @@
 
   /* compute a query/node hash */
 #define FTC_CMAP_HASH( faceid, index, charcode )         \
-          ( _FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
+          ( FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
             ( (charcode) / FTC_CMAP_INDICES_MAX )      )
 
   /* the charmap query */
diff --git a/src/cache/ftcmanag.h b/src/cache/ftcmanag.h
index 9c9cf89..0db36c6 100644
--- a/src/cache/ftcmanag.h
+++ b/src/cache/ftcmanag.h
@@ -161,7 +161,7 @@ FT_BEGIN_HEADER
           (a)->y_res == (b)->y_res ) ) )
 
 #define FTC_SCALER_HASH( q )                                 \
-    ( _FTC_FACE_ID_HASH( (q)->face_id ) +                     \
+    ( FTC_FACE_ID_HASH( (q)->face_id ) +                     \
       (q)->width + (q)->height*7 +                           \
       ( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
 
diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h
index ad259da..3b2a153 100644
--- a/src/cache/ftcmru.h
+++ b/src/cache/ftcmru.h
@@ -181,7 +181,7 @@ FT_BEGIN_HEADER
             FTC_MruNode_Up( _pfirst, _node );                               \
                                                                             \
           node = _node;                                                     \
-          goto _MruOk;                                                      \
+          goto MruOk_;                                                      \
         }                                                                   \
         _node = _node->next;                                                \
                                                                             \
@@ -189,7 +189,7 @@ FT_BEGIN_HEADER
     }                                                                       \
                                                                             \
     error = FTC_MruList_New( (list), (key), (FTC_MruNode*)(void*)&(node) ); \
-  _MruOk:                                                                   \
+  MruOk_:                                                                   \
     ;                                                                       \
   FT_END_STMNT