diff --git a/src/libespeak-ng/langopts.c b/src/libespeak-ng/langopts.c index 4dcdf3e1..c73e9041 100644 --- a/src/libespeak-ng/langopts.c +++ b/src/libespeak-ng/langopts.c @@ -27,8 +27,6 @@ #include #include -static int LookupTune(const char *name); - #include #include #include @@ -39,6 +37,9 @@ static int LookupTune(const char *name); #include "voice.h" // for CheckTranslator() #include "synthdata.h" // for n_tunes, tunes +static int CheckTranslator(Translator *tr, const MNEM_TAB *keyword_tab, int key); +static int LookupTune(const char *name); + enum { V_NAME = 1, V_LANGUAGE, @@ -265,3 +266,14 @@ static int LookupTune(const char *name) { return -1; } +int CheckTranslator(Translator *tr, const MNEM_TAB *keyword_tab, int key) +{ + // Return 0 if translator is set. + // Return 1 and print an error message for specified key if not + // used for parsing language options + if (tr) + return 0; + + fprintf(stderr, "Cannot set %s: language not set, or is invalid.\n", LookupMnemName(keyword_tab, key)); + return 1; +} \ No newline at end of file diff --git a/src/libespeak-ng/voice.h b/src/libespeak-ng/voice.h index 60fdf3af..21b1b119 100644 --- a/src/libespeak-ng/voice.h +++ b/src/libespeak-ng/voice.h @@ -84,7 +84,6 @@ extern espeak_VOICE current_voice_selected; extern voice_t *voice; extern int tone_points[12]; -int CheckTranslator(Translator *tr, const MNEM_TAB *keyword_tab, int key); const char *SelectVoice(espeak_VOICE *voice_select, int *found); espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name); voice_t *LoadVoice(const char *voice_name, int control); diff --git a/src/libespeak-ng/voices.c b/src/libespeak-ng/voices.c index cb3bc703..edffb961 100644 --- a/src/libespeak-ng/voices.c +++ b/src/libespeak-ng/voices.c @@ -498,18 +498,6 @@ void ReadNumbers(char *p, int *flags, int maxValue, const MNEM_TAB *keyword_tab } } -int CheckTranslator(Translator *tr, const MNEM_TAB *keyword_tab, int key) -{ - // Return 0 if translator is set. - // Return 1 and print an error message for specified key if not - // used for parsing language options - if (tr) - return 0; - - fprintf(stderr, "Cannot set %s: language not set, or is invalid.\n", LookupMnemName(keyword_tab, key)); - return 1; -} - voice_t *LoadVoice(const char *vname, int control) { // control, bit 0 1= no_default