[1.42.03 release]

Allow .txt release for *_rules and *_list files.
Rules lookup, consider multi-byte characters when calculating matchign points.
Fix bug in Roman Number translation.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@232 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2009-12-08 17:59:06 +00:00
parent e404310b8f
commit de52d78665
19 changed files with 1362 additions and 1018 deletions
+18 -3
View File
@@ -2085,6 +2085,7 @@ wxString CompileAllDictionaries()
wxString filename;
wxFileName fname;
wxString dictstr;
wxString filetype;
wxString report = _T("");
int err;
int errors = 0;
@@ -2135,18 +2136,32 @@ wxString CompileAllDictionaries()
fprintf(f_phused,"Phonemes which are used in the *_rules and *_list files\n");
}
bool cont = dir.GetFirst(&filename, _T("*_rules"), wxDIR_FILES);
bool cont = dir.GetFirst(&filename, _T("*_rules*"), wxDIR_FILES);
while ( cont )
{
fname = wxFileName(filename);
filetype = fname.GetName().AfterLast('_');
if((filetype != _T("rules")) && (filetype != _T("rules.txt")))
{
cont = dir.GetNext(&filename);
continue;
}
dictstr = fname.GetName().BeforeLast('_');
strcpy(dictname,dictstr.mb_str(wxConvLocal));
dict_count++;
strcpy(voicename,dictname);
// read the *_rules file to see if a phoneme table is specified though a voice name
sprintf(path,"%s%s_rules",path_dsource,dictname);
if((f_in = fopen(path,"r")) != NULL)
sprintf(path,"%s%s_rules.txt",path_dsource,dictname);
if((f_in = fopen(path,"r")) == NULL)
{
sprintf(path,"%s%s_rules",path_dsource,dictname);
f_in = fopen(path,"r");
}
if(f_in != NULL)
{
unsigned int ix;
unsigned int c;