Rename HB_GNUC_UNUSED -> HB_UNUSED

This commit is contained in:
Behdad Esfahbod 2010-04-29 13:56:44 -04:00
parent 7d3a126334
commit 33d13fdda9
13 changed files with 81 additions and 81 deletions

View File

@ -594,7 +594,7 @@ hb_utf8_next (const uint8_t *text,
void void
hb_buffer_add_utf8 (hb_buffer_t *buffer, hb_buffer_add_utf8 (hb_buffer_t *buffer,
const char *text, const char *text,
unsigned int text_length HB_GNUC_UNUSED, unsigned int text_length HB_UNUSED,
unsigned int item_offset, unsigned int item_offset,
unsigned int item_length) unsigned int item_length)
{ {
@ -628,7 +628,7 @@ hb_utf16_next (const uint16_t *text,
void void
hb_buffer_add_utf16 (hb_buffer_t *buffer, hb_buffer_add_utf16 (hb_buffer_t *buffer,
const uint16_t *text, const uint16_t *text,
unsigned int text_length HB_GNUC_UNUSED, unsigned int text_length HB_UNUSED,
unsigned int item_offset, unsigned int item_offset,
unsigned int item_length) unsigned int item_length)
{ {
@ -640,7 +640,7 @@ hb_buffer_add_utf16 (hb_buffer_t *buffer,
void void
hb_buffer_add_utf32 (hb_buffer_t *buffer, hb_buffer_add_utf32 (hb_buffer_t *buffer,
const uint32_t *text, const uint32_t *text,
unsigned int text_length HB_GNUC_UNUSED, unsigned int text_length HB_UNUSED,
unsigned int item_offset, unsigned int item_offset,
unsigned int item_length) unsigned int item_length)
{ {

View File

@ -40,37 +40,37 @@
*/ */
static hb_codepoint_t static hb_codepoint_t
hb_font_get_glyph_nil (hb_font_t *font HB_GNUC_UNUSED, hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data HB_GNUC_UNUSED, const void *user_data HB_UNUSED,
hb_codepoint_t unicode HB_GNUC_UNUSED, hb_codepoint_t unicode HB_UNUSED,
hb_codepoint_t variation_selector HB_GNUC_UNUSED) hb_codepoint_t variation_selector HB_UNUSED)
{ return 0; } { return 0; }
static hb_bool_t static hb_bool_t
hb_font_get_contour_point_nil (hb_font_t *font HB_GNUC_UNUSED, hb_font_get_contour_point_nil (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data HB_GNUC_UNUSED, const void *user_data HB_UNUSED,
unsigned int point_index HB_GNUC_UNUSED, unsigned int point_index HB_UNUSED,
hb_codepoint_t glyph HB_GNUC_UNUSED, hb_codepoint_t glyph HB_UNUSED,
hb_position_t *x HB_GNUC_UNUSED, hb_position_t *x HB_UNUSED,
hb_position_t *y HB_GNUC_UNUSED) hb_position_t *y HB_UNUSED)
{ return false; } { return false; }
static void static void
hb_font_get_glyph_metrics_nil (hb_font_t *font HB_GNUC_UNUSED, hb_font_get_glyph_metrics_nil (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data HB_GNUC_UNUSED, const void *user_data HB_UNUSED,
hb_codepoint_t glyph HB_GNUC_UNUSED, hb_codepoint_t glyph HB_UNUSED,
hb_glyph_metrics_t *metrics HB_GNUC_UNUSED) hb_glyph_metrics_t *metrics HB_UNUSED)
{ } { }
static hb_position_t static hb_position_t
hb_font_get_kerning_nil (hb_font_t *font HB_GNUC_UNUSED, hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data HB_GNUC_UNUSED, const void *user_data HB_UNUSED,
hb_codepoint_t first_glyph HB_GNUC_UNUSED, hb_codepoint_t first_glyph HB_UNUSED,
hb_codepoint_t second_glyph HB_GNUC_UNUSED) hb_codepoint_t second_glyph HB_UNUSED)
{ return 0; } { return 0; }
hb_font_funcs_t _hb_font_funcs_nil = { hb_font_funcs_t _hb_font_funcs_nil = {

View File

@ -34,8 +34,8 @@
#include FT_TRUETYPE_TABLES_H #include FT_TRUETYPE_TABLES_H
static hb_codepoint_t static hb_codepoint_t
hb_ft_get_glyph (hb_font_t *font HB_GNUC_UNUSED, hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data, const void *user_data,
hb_codepoint_t unicode, hb_codepoint_t unicode,
hb_codepoint_t variation_selector) hb_codepoint_t variation_selector)
@ -54,8 +54,8 @@ hb_ft_get_glyph (hb_font_t *font HB_GNUC_UNUSED,
} }
static hb_bool_t static hb_bool_t
hb_ft_get_contour_point (hb_font_t *font HB_GNUC_UNUSED, hb_ft_get_contour_point (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data, const void *user_data,
unsigned int point_index, unsigned int point_index,
hb_codepoint_t glyph, hb_codepoint_t glyph,
@ -83,8 +83,8 @@ hb_ft_get_contour_point (hb_font_t *font HB_GNUC_UNUSED,
} }
static void static void
hb_ft_get_glyph_metrics (hb_font_t *font HB_GNUC_UNUSED, hb_ft_get_glyph_metrics (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data, const void *user_data,
hb_codepoint_t glyph, hb_codepoint_t glyph,
hb_glyph_metrics_t *metrics) hb_glyph_metrics_t *metrics)
@ -110,8 +110,8 @@ hb_ft_get_glyph_metrics (hb_font_t *font HB_GNUC_UNUSED,
} }
static hb_position_t static hb_position_t
hb_ft_get_kerning (hb_font_t *font HB_GNUC_UNUSED, hb_ft_get_kerning (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
const void *user_data, const void *user_data,
hb_codepoint_t first_glyph, hb_codepoint_t first_glyph,
hb_codepoint_t second_glyph) hb_codepoint_t second_glyph)

View File

@ -62,7 +62,7 @@ typedef struct {
#define HB_DEBUG_OBJECT HB_DEBUG+0 #define HB_DEBUG_OBJECT HB_DEBUG+0
#endif #endif
static HB_GNUC_UNUSED inline hb_bool_t /* always returns TRUE */ static HB_UNUSED inline hb_bool_t /* always returns TRUE */
_hb_object_debug_out (const void *obj, _hb_object_debug_out (const void *obj,
hb_reference_count_t *ref_count, hb_reference_count_t *ref_count,
const char *function) const char *function)

View File

@ -133,7 +133,7 @@ ASSERT_STATIC (sizeof (Type) + 1 <= sizeof (_Null##Type))
#define SANITIZE_ARG_DEF \ #define SANITIZE_ARG_DEF \
hb_sanitize_context_t *context, \ hb_sanitize_context_t *context, \
unsigned int sanitize_depth HB_GNUC_UNUSED unsigned int sanitize_depth HB_UNUSED
#define SANITIZE_ARG \ #define SANITIZE_ARG \
context, \ context, \
(HB_DEBUG_SANITIZE ? sanitize_depth + 1 : 0) (HB_DEBUG_SANITIZE ? sanitize_depth + 1 : 0)
@ -146,7 +146,7 @@ struct hb_sanitize_context_t
}; };
static HB_GNUC_UNUSED void static HB_UNUSED void
_hb_sanitize_init (hb_sanitize_context_t *context, _hb_sanitize_init (hb_sanitize_context_t *context,
hb_blob_t *blob) hb_blob_t *blob)
{ {
@ -160,8 +160,8 @@ _hb_sanitize_init (hb_sanitize_context_t *context,
blob, context->start, context->end, context->end - context->start); blob, context->start, context->end, context->end - context->start);
} }
static HB_GNUC_UNUSED void static HB_UNUSED void
_hb_sanitize_fini (hb_sanitize_context_t *context HB_GNUC_UNUSED, _hb_sanitize_fini (hb_sanitize_context_t *context HB_UNUSED,
hb_blob_t *blob) hb_blob_t *blob)
{ {
if (HB_DEBUG_SANITIZE) if (HB_DEBUG_SANITIZE)
@ -171,7 +171,7 @@ _hb_sanitize_fini (hb_sanitize_context_t *context HB_GNUC_UNUSED,
hb_blob_unlock (blob); hb_blob_unlock (blob);
} }
static HB_GNUC_UNUSED inline bool static HB_UNUSED inline bool
_hb_sanitize_check (SANITIZE_ARG_DEF, _hb_sanitize_check (SANITIZE_ARG_DEF,
const char *base, const char *base,
unsigned int len) unsigned int len)
@ -191,7 +191,7 @@ _hb_sanitize_check (SANITIZE_ARG_DEF,
return ret; return ret;
} }
static HB_GNUC_UNUSED inline bool static HB_UNUSED inline bool
_hb_sanitize_array (SANITIZE_ARG_DEF, _hb_sanitize_array (SANITIZE_ARG_DEF,
const char *base, const char *base,
unsigned int record_size, unsigned int record_size,
@ -211,10 +211,10 @@ _hb_sanitize_array (SANITIZE_ARG_DEF,
return HB_LIKELY (!overflows) && _hb_sanitize_check (SANITIZE_ARG, base, record_size * len); return HB_LIKELY (!overflows) && _hb_sanitize_check (SANITIZE_ARG, base, record_size * len);
} }
static HB_GNUC_UNUSED inline bool static HB_UNUSED inline bool
_hb_sanitize_edit (SANITIZE_ARG_DEF, _hb_sanitize_edit (SANITIZE_ARG_DEF,
const char *base HB_GNUC_UNUSED, const char *base HB_UNUSED,
unsigned int len HB_GNUC_UNUSED) unsigned int len HB_UNUSED)
{ {
context->edit_count++; context->edit_count++;

View File

@ -91,7 +91,7 @@ struct CaretValueFormat1
friend struct CaretValue; friend struct CaretValue;
private: private:
inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id HB_GNUC_UNUSED) const inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id HB_UNUSED) const
{ {
/* TODO vertical */ /* TODO vertical */
return _hb_16dot16_mul_round (context->font->x_scale, coordinate); return _hb_16dot16_mul_round (context->font->x_scale, coordinate);
@ -138,7 +138,7 @@ struct CaretValueFormat3
{ {
friend struct CaretValue; friend struct CaretValue;
inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id HB_GNUC_UNUSED) const inline int get_caret_value (hb_ot_layout_context_t *context, hb_codepoint_t glyph_id HB_UNUSED) const
{ {
/* TODO vertical */ /* TODO vertical */
return _hb_16dot16_mul_round (context->font->x_scale, coordinate) + return _hb_16dot16_mul_round (context->font->x_scale, coordinate) +

View File

@ -194,7 +194,7 @@ struct AnchorFormat1
friend struct Anchor; friend struct Anchor;
private: private:
inline void get_anchor (hb_ot_layout_context_t *layout_context, hb_codepoint_t glyph_id HB_GNUC_UNUSED, inline void get_anchor (hb_ot_layout_context_t *layout_context, hb_codepoint_t glyph_id HB_UNUSED,
hb_position_t *x, hb_position_t *y) const hb_position_t *x, hb_position_t *y) const
{ {
*x = _hb_16dot16_mul_round (layout_context->font->x_scale, xCoordinate); *x = _hb_16dot16_mul_round (layout_context->font->x_scale, xCoordinate);
@ -250,7 +250,7 @@ struct AnchorFormat3
friend struct Anchor; friend struct Anchor;
private: private:
inline void get_anchor (hb_ot_layout_context_t *layout_context, hb_codepoint_t glyph_id HB_GNUC_UNUSED, inline void get_anchor (hb_ot_layout_context_t *layout_context, hb_codepoint_t glyph_id HB_UNUSED,
hb_position_t *x, hb_position_t *y) const hb_position_t *x, hb_position_t *y) const
{ {
*x = _hb_16dot16_mul_round (layout_context->font->x_scale, xCoordinate); *x = _hb_16dot16_mul_round (layout_context->font->x_scale, xCoordinate);

View File

@ -46,8 +46,8 @@
hb_apply_context_t *context, \ hb_apply_context_t *context, \
hb_ot_layout_context_t *layout_context, \ hb_ot_layout_context_t *layout_context, \
hb_buffer_t *buffer, \ hb_buffer_t *buffer, \
unsigned int context_length HB_GNUC_UNUSED, \ unsigned int context_length HB_UNUSED, \
unsigned int apply_depth HB_GNUC_UNUSED unsigned int apply_depth HB_UNUSED
#define APPLY_ARG \ #define APPLY_ARG \
context, \ context, \
layout_context, \ layout_context, \
@ -73,7 +73,7 @@ struct ContextFuncs
}; };
static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, const char *data HB_GNUC_UNUSED) static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, const char *data HB_UNUSED)
{ {
return glyph_id == value; return glyph_id == value;
} }

View File

@ -595,8 +595,8 @@ hb_ot_layout_position_lookup (hb_font_t *font,
} }
void void
hb_ot_layout_position_finish (hb_font_t *font HB_GNUC_UNUSED, hb_ot_layout_position_finish (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
hb_buffer_t *buffer) hb_buffer_t *buffer)
{ {
unsigned int i, j; unsigned int i, j;

View File

@ -114,7 +114,7 @@ setup_lookups (hb_face_t *face,
hb_bool_t hb_bool_t
_hb_ot_substitute_complex (hb_font_t *font HB_GNUC_UNUSED, _hb_ot_substitute_complex (hb_font_t *font HB_UNUSED,
hb_face_t *face, hb_face_t *face,
hb_buffer_t *buffer, hb_buffer_t *buffer,
hb_feature_t *features, hb_feature_t *features,

View File

@ -117,16 +117,16 @@
#endif #endif
#if __GNUC__ >= 3 #if __GNUC__ >= 3
#define HB_GNUC_PURE __attribute__((pure)) #define HB_PURE_FUNC __attribute__((pure))
#define HB_GNUC_CONST __attribute__((const)) #define HB_CONST_FUNC __attribute__((const))
#else #else
#define HB_GNUC_PURE #define HB_PURE_FUNC
#define HB_GNUC_CONST #define HB_CONST_FUNC
#endif #endif
#if __GNUC__ >= 4 #if __GNUC__ >= 4
#define HB_GNUC_UNUSED __attribute__((unused)) #define HB_UNUSED __attribute__((unused))
#else #else
#define HB_GNUC_UNUSED #define HB_UNUSED
#endif #endif
@ -161,7 +161,7 @@
* in libgcc in case a target does not have one, which should be just as * in libgcc in case a target does not have one, which should be just as
* good as the open-coded solution below, (which is "HACKMEM 169"). * good as the open-coded solution below, (which is "HACKMEM 169").
*/ */
static HB_GNUC_UNUSED inline unsigned int static HB_UNUSED inline unsigned int
_hb_popcount32 (uint32_t mask) _hb_popcount32 (uint32_t mask)
{ {
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@ -240,7 +240,7 @@ typedef int hb_mutex_t;
#define HB_DEBUG 0 #define HB_DEBUG 0
#endif #endif
static HB_GNUC_UNUSED inline hb_bool_t /* always returns TRUE */ static HB_UNUSED inline hb_bool_t /* always returns TRUE */
_hb_trace (const char *what, _hb_trace (const char *what,
const char *function, const char *function,
const void *obj, const void *obj,

View File

@ -113,8 +113,8 @@ static void
hb_substitute_default (hb_font_t *font, hb_substitute_default (hb_font_t *font,
hb_face_t *face, hb_face_t *face,
hb_buffer_t *buffer, hb_buffer_t *buffer,
hb_feature_t *features HB_GNUC_UNUSED, hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_GNUC_UNUSED) unsigned int num_features HB_UNUSED)
{ {
hb_mirror_chars (buffer); hb_mirror_chars (buffer);
hb_map_glyphs (font, face, buffer); hb_map_glyphs (font, face, buffer);
@ -131,11 +131,11 @@ hb_substitute_complex (hb_font_t *font,
} }
static void static void
hb_substitute_fallback (hb_font_t *font HB_GNUC_UNUSED, hb_substitute_fallback (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
hb_buffer_t *buffer HB_GNUC_UNUSED, hb_buffer_t *buffer HB_UNUSED,
hb_feature_t *features HB_GNUC_UNUSED, hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_GNUC_UNUSED) unsigned int num_features HB_UNUSED)
{ {
/* TODO Arabic */ /* TODO Arabic */
} }
@ -147,8 +147,8 @@ static void
hb_position_default (hb_font_t *font, hb_position_default (hb_font_t *font,
hb_face_t *face, hb_face_t *face,
hb_buffer_t *buffer, hb_buffer_t *buffer,
hb_feature_t *features HB_GNUC_UNUSED, hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_GNUC_UNUSED) unsigned int num_features HB_UNUSED)
{ {
unsigned int count; unsigned int count;
@ -174,11 +174,11 @@ hb_position_complex (hb_font_t *font,
} }
static void static void
hb_position_fallback (hb_font_t *font HB_GNUC_UNUSED, hb_position_fallback (hb_font_t *font HB_UNUSED,
hb_face_t *face HB_GNUC_UNUSED, hb_face_t *face HB_UNUSED,
hb_buffer_t *buffer HB_GNUC_UNUSED, hb_buffer_t *buffer HB_UNUSED,
hb_feature_t *features HB_GNUC_UNUSED, hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_GNUC_UNUSED) unsigned int num_features HB_UNUSED)
{ {
/* TODO Mark pos */ /* TODO Mark pos */
} }
@ -187,8 +187,8 @@ static void
hb_truetype_kern (hb_font_t *font, hb_truetype_kern (hb_font_t *font,
hb_face_t *face, hb_face_t *face,
hb_buffer_t *buffer, hb_buffer_t *buffer,
hb_feature_t *features HB_GNUC_UNUSED, hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_GNUC_UNUSED) unsigned int num_features HB_UNUSED)
{ {
unsigned int count; unsigned int count;

View File

@ -33,10 +33,10 @@
*/ */
static hb_codepoint_t hb_unicode_get_mirroring_nil (hb_codepoint_t unicode) { return unicode; } static hb_codepoint_t hb_unicode_get_mirroring_nil (hb_codepoint_t unicode) { return unicode; }
static hb_category_t hb_unicode_get_general_category_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return HB_CATEGORY_OTHER_LETTER; } static hb_category_t hb_unicode_get_general_category_nil (hb_codepoint_t unicode HB_UNUSED) { return HB_CATEGORY_OTHER_LETTER; }
static hb_script_t hb_unicode_get_script_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return HB_SCRIPT_UNKNOWN; } static hb_script_t hb_unicode_get_script_nil (hb_codepoint_t unicode HB_UNUSED) { return HB_SCRIPT_UNKNOWN; }
static unsigned int hb_unicode_get_combining_class_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return 0; } static unsigned int hb_unicode_get_combining_class_nil (hb_codepoint_t unicode HB_UNUSED) { return 0; }
static unsigned int hb_unicode_get_eastasian_width_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return 1; } static unsigned int hb_unicode_get_eastasian_width_nil (hb_codepoint_t unicode HB_UNUSED) { return 1; }
hb_unicode_funcs_t _hb_unicode_funcs_nil = { hb_unicode_funcs_t _hb_unicode_funcs_nil = {
HB_REFERENCE_COUNT_INVALID, /* ref_count */ HB_REFERENCE_COUNT_INVALID, /* ref_count */