From c628f8847dffe8ebb391b4868b5d9ae308cb4e42 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 14 Sep 2006 22:04:18 +0000 Subject: Change enums to macros, to get in synch with ICU shaper. No functional 2006-09-14 Behdad Esfahbod * modules/indic/indic-ot-class-tables.c: Change enums to macros, to get in synch with ICU shaper. No functional changes. --- modules/indic/indic-ot-class-tables.c | 117 +++++++++++++++++----------------- 1 file changed, 58 insertions(+), 59 deletions(-) (limited to 'modules/indic/indic-ot-class-tables.c') diff --git a/modules/indic/indic-ot-class-tables.c b/modules/indic/indic-ot-class-tables.c index 95089674..a0c32aa4 100644 --- a/modules/indic/indic-ot-class-tables.c +++ b/modules/indic/indic-ot-class-tables.c @@ -36,65 +36,64 @@ #include "indic-ot.h" -enum -{ - /* - * Split matra table indices - */ - _x1 = 1 << CF_INDEX_SHIFT, - _x2 = 2 << CF_INDEX_SHIFT, - _x3 = 3 << CF_INDEX_SHIFT, - _x4 = 4 << CF_INDEX_SHIFT, - _x5 = 5 << CF_INDEX_SHIFT, - _x6 = 6 << CF_INDEX_SHIFT, - _x7 = 7 << CF_INDEX_SHIFT, - _x8 = 8 << CF_INDEX_SHIFT, - _x9 = 9 << CF_INDEX_SHIFT, - - /* - * Simple classes - */ - _xx = CC_RESERVED, - _ma = CC_MODIFYING_MARK_ABOVE, - _mp = CC_MODIFYING_MARK_POST, - _iv = CC_INDEPENDENT_VOWEL, - _ct = CC_CONSONANT | CF_CONSONANT, - _cn = CC_CONSONANT_WITH_NUKTA | CF_CONSONANT, - _nu = CC_NUKTA, - _dv = CC_DEPENDENT_VOWEL, - _dl = _dv | CF_MATRA_PRE, - _db = _dv | CF_MATRA_BELOW, - _da = _dv | CF_MATRA_ABOVE, - _dr = _dv | CF_MATRA_POST, - _lm = _dv | CF_LENGTH_MARK, - _vr = CC_VIRAMA, - _al = CC_AL_LAKUNA, - - /* - * Split matras - */ - _s1 = _dv | _x1, - _s2 = _dv | _x2, - _s3 = _dv | _x3, - _s4 = _dv | _x4, - _s5 = _dv | _x5, - _s6 = _dv | _x6, - _s7 = _dv | _x7, - _s8 = _dv | _x8, - _s9 = _dv | _x9, - - /* - * consonants with special forms - * NOTE: this assumes that no consonants with nukta have - * special forms... (Bengali RA?) - */ - _bb = _ct | CF_BELOW_BASE, - _pb = _ct | CF_POST_BASE, - _vt = _bb | CF_VATTU, - _rv = _vt | CF_REPH, - _rp = _pb | CF_REPH, - _rb = _bb | CF_REPH -}; + +/* + * Split matra table indices + */ +#define _x1 (1 << CF_INDEX_SHIFT) +#define _x2 (2 << CF_INDEX_SHIFT) +#define _x3 (3 << CF_INDEX_SHIFT) +#define _x4 (4 << CF_INDEX_SHIFT) +#define _x5 (5 << CF_INDEX_SHIFT) +#define _x6 (6 << CF_INDEX_SHIFT) +#define _x7 (7 << CF_INDEX_SHIFT) +#define _x8 (8 << CF_INDEX_SHIFT) +#define _x9 (9 << CF_INDEX_SHIFT) + +/* + * Simple classes + */ +#define _xx (CC_RESERVED) +#define _ma (CC_MODIFYING_MARK_ABOVE) +#define _mp (CC_MODIFYING_MARK_POST) +#define _iv (CC_INDEPENDENT_VOWEL) +#define _ct (CC_CONSONANT | CF_CONSONANT) +#define _cn (CC_CONSONANT_WITH_NUKTA | CF_CONSONANT) +#define _nu (CC_NUKTA) +#define _dv (CC_DEPENDENT_VOWEL) +#define _dl (_dv | CF_MATRA_PRE) +#define _db (_dv | CF_MATRA_BELOW) +#define _da (_dv | CF_MATRA_ABOVE) +#define _dr (_dv | CF_MATRA_POST) +#define _lm (_dv | CF_LENGTH_MARK) +#define _vr (CC_VIRAMA) +#define _al (CC_AL_LAKUNA) + +/* + * Split matras + */ +#define _s1 (_dv | _x1) +#define _s2 (_dv | _x2) +#define _s3 (_dv | _x3) +#define _s4 (_dv | _x4) +#define _s5 (_dv | _x5) +#define _s6 (_dv | _x6) +#define _s7 (_dv | _x7) +#define _s8 (_dv | _x8) +#define _s9 (_dv | _x9) + +/* + * consonants with special forms + * NOTE: this assumes that no consonants with nukta have + * special forms... (Bengali RA?) + */ +#define _bb (_ct | CF_BELOW_BASE) +#define _pb (_ct | CF_POST_BASE) +#define _vt (_bb | CF_VATTU) +#define _rv (_vt | CF_REPH) +#define _rp (_pb | CF_REPH) +#define _rb (_bb | CF_REPH) + /* * Character class tables -- cgit v1.2.1