From c6035cf802c60f0526f421f39a55886061df94ee Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 Apr 2012 13:23:59 -0400 Subject: [PATCH] Add names to enums gdb was showing instead of useful stuff, so name all our enums. --- src/hb-blob.h | 2 +- src/hb-common.h | 6 +++--- src/hb-ot-layout-common-private.hh | 2 +- src/hb-ot-layout-gdef-table.hh | 2 +- src/hb-ot-layout-gpos-table.hh | 5 ++--- src/hb-ot-layout-gsub-table.hh | 2 +- src/hb-ot-layout-private.hh | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/hb-blob.h b/src/hb-blob.h index 360310b4..d47cc90d 100644 --- a/src/hb-blob.h +++ b/src/hb-blob.h @@ -36,7 +36,7 @@ HB_BEGIN_DECLS -typedef enum { +typedef enum _hb_memory_mode_t { HB_MEMORY_MODE_DUPLICATE, HB_MEMORY_MODE_READONLY, HB_MEMORY_MODE_WRITABLE, diff --git a/src/hb-common.h b/src/hb-common.h index df929eaf..dd86334b 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -99,7 +99,7 @@ hb_tag_t hb_tag_from_string (const char *s, int len); /* hb_direction_t */ -typedef enum { +typedef enum _hb_direction_t { HB_DIRECTION_INVALID = -1, HB_DIRECTION_LTR = 0, HB_DIRECTION_RTL, @@ -140,7 +140,7 @@ hb_language_get_default (void); /* hb_unicode_general_category_t */ -typedef enum +typedef enum _hb_unicode_general_category_t { HB_UNICODE_GENERAL_CATEGORY_CONTROL, /* Cc */ HB_UNICODE_GENERAL_CATEGORY_FORMAT, /* Cf */ @@ -179,7 +179,7 @@ typedef enum /* http://unicode.org/iso15924/ */ /* http://goo.gl/x9ilM */ -typedef enum +typedef enum _hb_script_t { /* Unicode-1.1 additions */ HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index d478e29d..ff967eac 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -271,7 +271,7 @@ typedef RecordListOf FeatureList; struct LookupFlag : USHORT { - enum { + enum Flags { RightToLeft = 0x0001u, IgnoreBaseGlyphs = 0x0002u, IgnoreLigatures = 0x0004u, diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh index ee9c508c..f3f76fa2 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -327,7 +327,7 @@ struct GDEF { static const hb_tag_t Tag = HB_OT_TAG_GDEF; - enum { + enum GlyphClasses { UnclassifiedGlyph = 0, BaseGlyph = 1, LigatureGlyph = 2, diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index f843fa31..7a3c117e 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -46,8 +46,7 @@ typedef Value ValueRecord[VAR]; struct ValueFormat : USHORT { - enum - { + enum Flags { xPlacement = 0x0001, /* Includes horizontal adjustment for placement */ yPlacement = 0x0002, /* Includes vertical adjustment for placement */ xAdvance = 0x0004, /* Includes horizontal adjustment for advance */ @@ -1336,7 +1335,7 @@ struct PosLookupSubTable { friend struct PosLookup; - enum { + enum Type { Single = 1, Pair = 2, Cursive = 3, diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 941c669c..8f01e139 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -678,7 +678,7 @@ struct SubstLookupSubTable { friend struct SubstLookup; - enum { + enum Type { Single = 1, Multiple = 2, Alternate = 3, diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index bf7e43b6..943fba12 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -44,7 +44,7 @@ #define props_cache() var1.u16[1] /* glyph_props cache */ /* XXX cleanup */ -typedef enum { +typedef enum _hb_ot_layout_glyph_class_t { HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0001, HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 0x0002, HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 0x0004, -- GitLab