Use the place of articulation constants to specify the place-based conditions.

This commit is contained in:
Reece H. Dunn
2017-01-29 00:29:17 +00:00
parent 01e289c3d7
commit 5d2e2a2f8f
3 changed files with 4 additions and 9 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ static keywtab_t k_properties[] = {
{ "isFlag1", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG1 },
{ "isFlag2", 0, CONDITION_IS_PHFLAG_SET | phFLAGBIT_FLAG2 },
{ "isVel", 0, i_isVel },
{ "isVel", 0, CONDITION_IS_PLACE_OF_ARTICULATION | phPLACE_VELAR },
{ "isDiminished", 0, i_isDiminished },
{ "isUnstressed", 0, i_isUnstressed },
+1 -4
View File
@@ -631,13 +631,10 @@ static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist,
switch (instn & 0xe0)
{
case CONDITION_IS_PHONEME_TYPE:
// phoneme type, vowel, nasal, fricative, etc
return ph->type == data;
case 0x20:
// place of articulation
case CONDITION_IS_PLACE_OF_ARTICULATION:
return ((ph->phflags >> 16) & 0xf) == data;
case CONDITION_IS_PHFLAG_SET:
// is a bit set in phoneme flags
return (ph->phflags & (1 << data)) != 0;
case 0x80:
switch (data)
+2 -4
View File
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2005 to 2014 by Jonathan Duddington
* email: jonsd@users.sourceforge.net
* Copyright (C) 2015-2016 Reece H. Dunn
* Copyright (C) 2015-2017 Reece H. Dunn
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -329,10 +329,8 @@ typedef struct {
#define i_isSecondVowel 0x8e
#define i_IsTranslationGiven 0x90
// place of articulation
#define i_isVel 0x28
#define CONDITION_IS_PHONEME_TYPE 0x00
#define CONDITION_IS_PLACE_OF_ARTICULATION 0x20
#define CONDITION_IS_PHFLAG_SET 0x40
#define i_StressLevel 0x800