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.
This commit is contained in:
parent
9d0b76d7f6
commit
c09a90a2f1
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
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>
|
2016-01-12 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
Don't use macro names that start with `_[A-Z]' [2/3].
|
Don't use macro names that start with `_[A-Z]' [2/3].
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
FT_BEGIN_HEADER
|
FT_BEGIN_HEADER
|
||||||
|
|
||||||
#define _FTC_FACE_ID_HASH( i ) \
|
#define FTC_FACE_ID_HASH( i ) \
|
||||||
( ( (FT_Offset)(i) >> 3 ) ^ ( (FT_Offset)(i) << 7 ) )
|
( ( (FT_Offset)(i) >> 3 ) ^ ( (FT_Offset)(i) << 7 ) )
|
||||||
|
|
||||||
/* handle to cache object */
|
/* handle to cache object */
|
||||||
|
@ -228,7 +228,7 @@ FT_BEGIN_HEADER
|
||||||
{ \
|
{ \
|
||||||
_node = *_pnode; \
|
_node = *_pnode; \
|
||||||
if ( _node == NULL ) \
|
if ( _node == NULL ) \
|
||||||
goto _NewNode; \
|
goto NewNode_; \
|
||||||
\
|
\
|
||||||
if ( _node->hash == _hash && \
|
if ( _node->hash == _hash && \
|
||||||
_nodcomp( _node, query, _cache, &_list_changed ) ) \
|
_nodcomp( _node, query, _cache, &_list_changed ) ) \
|
||||||
|
@ -248,7 +248,7 @@ FT_BEGIN_HEADER
|
||||||
if ( *_pnode == NULL ) \
|
if ( *_pnode == NULL ) \
|
||||||
{ \
|
{ \
|
||||||
FT_ERROR(( "FTC_CACHE_LOOKUP_CMP: oops!!! node missing\n" )); \
|
FT_ERROR(( "FTC_CACHE_LOOKUP_CMP: oops!!! node missing\n" )); \
|
||||||
goto _NewNode; \
|
goto NewNode_; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
_pnode = &((*_pnode)->link); \
|
_pnode = &((*_pnode)->link); \
|
||||||
|
@ -273,12 +273,12 @@ FT_BEGIN_HEADER
|
||||||
FTC_MruNode_Up( (FTC_MruNode*)_nl, \
|
FTC_MruNode_Up( (FTC_MruNode*)_nl, \
|
||||||
(FTC_MruNode)_node ); \
|
(FTC_MruNode)_node ); \
|
||||||
} \
|
} \
|
||||||
goto _Ok; \
|
goto Ok_; \
|
||||||
\
|
\
|
||||||
_NewNode: \
|
NewNode_: \
|
||||||
error = FTC_Cache_NewNode( _cache, _hash, query, &_node ); \
|
error = FTC_Cache_NewNode( _cache, _hash, query, &_node ); \
|
||||||
\
|
\
|
||||||
_Ok: \
|
Ok_: \
|
||||||
node = _node; \
|
node = _node; \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
/* compute a query/node hash */
|
/* compute a query/node hash */
|
||||||
#define FTC_CMAP_HASH( faceid, index, charcode ) \
|
#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 ) )
|
( (charcode) / FTC_CMAP_INDICES_MAX ) )
|
||||||
|
|
||||||
/* the charmap query */
|
/* the charmap query */
|
||||||
|
|
|
@ -161,7 +161,7 @@ FT_BEGIN_HEADER
|
||||||
(a)->y_res == (b)->y_res ) ) )
|
(a)->y_res == (b)->y_res ) ) )
|
||||||
|
|
||||||
#define FTC_SCALER_HASH( q ) \
|
#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)->width + (q)->height*7 + \
|
||||||
( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
|
( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ FT_BEGIN_HEADER
|
||||||
FTC_MruNode_Up( _pfirst, _node ); \
|
FTC_MruNode_Up( _pfirst, _node ); \
|
||||||
\
|
\
|
||||||
node = _node; \
|
node = _node; \
|
||||||
goto _MruOk; \
|
goto MruOk_; \
|
||||||
} \
|
} \
|
||||||
_node = _node->next; \
|
_node = _node->next; \
|
||||||
\
|
\
|
||||||
|
@ -189,7 +189,7 @@ FT_BEGIN_HEADER
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
error = FTC_MruList_New( (list), (key), (FTC_MruNode*)(void*)&(node) ); \
|
error = FTC_MruList_New( (list), (key), (FTC_MruNode*)(void*)&(node) ); \
|
||||||
_MruOk: \
|
MruOk_: \
|
||||||
; \
|
; \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue