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>
|
||||
|
||||
Don't use macro names that start with `_[A-Z]' [2/3].
|
||||
|
14
src/cache/ftccache.h
vendored
14
src/cache/ftccache.h
vendored
@ -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
|
||||
|
||||
|
2
src/cache/ftccmap.c
vendored
2
src/cache/ftccmap.c
vendored
@ -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 */
|
||||
|
2
src/cache/ftcmanag.h
vendored
2
src/cache/ftcmanag.h
vendored
@ -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 ) ) )
|
||||
|
||||
|
4
src/cache/ftcmru.h
vendored
4
src/cache/ftcmru.h
vendored
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user