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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
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