Use an explicit is phoneme type constant to specify the type-based conditions.

This commit is contained in:
Reece H. Dunn
2017-01-29 00:09:54 +00:00
parent 98703c30de
commit f0d4a98b96
3 changed files with 10 additions and 9 deletions
+7 -7
View File
@@ -103,13 +103,13 @@ static keywtab_t k_conditions[] = {
};
static keywtab_t k_properties[] = {
{ "isPause", 0, phPAUSE },
{ "isVowel", 0, phVOWEL },
{ "isNasal", 0, phNASAL },
{ "isLiquid", 0, phLIQUID },
{ "isUStop", 0, phSTOP },
{ "isVStop", 0, phVSTOP },
{ "isVFricative", 0, phVFRICATIVE },
{ "isPause", 0, CONDITION_IS_PHONEME_TYPE | phPAUSE },
{ "isVowel", 0, CONDITION_IS_PHONEME_TYPE | phVOWEL },
{ "isNasal", 0, CONDITION_IS_PHONEME_TYPE | phNASAL },
{ "isLiquid", 0, CONDITION_IS_PHONEME_TYPE | phLIQUID },
{ "isUStop", 0, CONDITION_IS_PHONEME_TYPE | phSTOP },
{ "isVStop", 0, CONDITION_IS_PHONEME_TYPE | phVSTOP },
{ "isVFricative", 0, CONDITION_IS_PHONEME_TYPE | phVFRICATIVE },
{ "isPalatal", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_PALATAL },
{ "isLong", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_LONG },
+1 -1
View File
@@ -630,7 +630,7 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,
switch (instn & 0xe0)
{
case 0x00:
case CONDITION_IS_PHONEME_TYPE:
// phoneme type, vowel, nasal, fricative, etc
return ph->type == data;
case 0x20:
+2 -1
View File
@@ -332,7 +332,8 @@ typedef struct {
// place of articulation
#define i_isVel 0x28
#define CONDITION_IS_PHFLAG_SET 0x40
#define CONDITION_IS_PHONEME_TYPE 0x00
#define CONDITION_IS_PHFLAG_SET 0x40
#define i_StressLevel 0x800