[1.25.17] Fix rule trace for suffix rules (were omitted in espeakedit).

lang=de  improve de_rules.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@34 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2007-06-04 22:46:11 +00:00
parent c793da464f
commit 0fa20438c1
17 changed files with 856 additions and 319 deletions
+16 -6
View File
@@ -1445,10 +1445,12 @@ char *Translator::DecodeRule(const char *group, char *rule)
int match_type;
int finished=0;
int value;
int flags;
int suffix_char;
int condition_num=0;
char buf[60];
char buf_pre[60];
char suffix[12];
char suffix[20];
static char output[60];
static char symbols[] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',
@@ -1495,11 +1497,19 @@ char *Translator::DecodeRule(const char *group, char *rule)
if(rb == RULE_ENDING)
{
if(rule[0] & (SUFX_P>>8))
sprintf(suffix,"P%d",rule[1] & 0x7f);
else
sprintf(suffix,"$%d(%x)",rule[1] & 0x7f,rule[0] & 0x7f);
rule += 2;
static char *flag_chars = "ei vtfq t";
flags = ((rule[0] & 0x7f)<< 8) + (rule[1] & 0x7f);
suffix_char = 'S';
if(flags & (SUFX_P >> 8))
suffix_char = 'P';
sprintf(suffix,"%c%d",suffix_char,rule[2] & 0x7f);
rule += 3;
for(ix=0;ix<9;ix++)
{
if(flags & 1)
sprintf(&suffix[strlen(suffix)],"%c",flag_chars[ix]);
flags = (flags >> 1);
}
strcpy(p,suffix);
p += strlen(suffix);
c = ' ';