diff --git a/src/libespeak-ng/compiledict.c b/src/libespeak-ng/compiledict.c index 76499f6a..34e8b5ec 100644 --- a/src/libespeak-ng/compiledict.c +++ b/src/libespeak-ng/compiledict.c @@ -33,6 +33,7 @@ #include #include +#include "compiledict.h" #include "dictionary.h" #include "readclause.h" @@ -43,8 +44,6 @@ #include "synthesize.h" #include "translate.h" -extern void Write4Bytes(FILE *f, int value); - static FILE *f_log = NULL; extern char *dir_dictionary; diff --git a/src/libespeak-ng/compiledict.h b/src/libespeak-ng/compiledict.h new file mode 100644 index 00000000..949db679 --- /dev/null +++ b/src/libespeak-ng/compiledict.h @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2005 to 2015 by Jonathan Duddington + * email: jonsd@users.sourceforge.net + * Copyright (C) 2015-2018 Reece H. Dunn + * Copyright (C) 2018 Juho Hiltunen + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see: . + */ + +#ifndef ESPEAK_NG_COMPILEDICT_H +#define ESPEAK_NG_COMPILEDICT_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +char *DecodeRule(const char *group_chars, + int group_length, + char *rule, + int control); + +ESPEAK_NG_API espeak_ng_STATUS espeak_ng_CompileDictionary(const char *dsource, + const char *dict_name, + FILE *log, + int flags, + espeak_ng_ERROR_CONTEXT *context); + + +void print_dictionary_flags(unsigned int *flags, + char *buf, + int buf_len); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/src/libespeak-ng/dictionary.h b/src/libespeak-ng/dictionary.h index cd08f1de..e010b6e8 100644 --- a/src/libespeak-ng/dictionary.h +++ b/src/libespeak-ng/dictionary.h @@ -21,6 +21,7 @@ #ifndef ESPEAK_NG_DICTIONARY_H #define ESPEAK_NG_DICTIONARY_H +#include "compiledict.h" #include "synthesize.h" #include "translate.h" diff --git a/src/libespeak-ng/espeak_api.c b/src/libespeak-ng/espeak_api.c index 7e282325..0a5f6fd7 100644 --- a/src/libespeak-ng/espeak_api.c +++ b/src/libespeak-ng/espeak_api.c @@ -27,6 +27,8 @@ #include #include +#include "compiledict.h" + #include "phoneme.h" #include "voice.h" #include "synthesize.h" diff --git a/src/libespeak-ng/translate.h b/src/libespeak-ng/translate.h index adbd255b..082f4c14 100644 --- a/src/libespeak-ng/translate.h +++ b/src/libespeak-ng/translate.h @@ -715,7 +715,6 @@ void DeleteTranslator(Translator *tr); void ProcessLanguageOptions(LANGUAGE_OPTIONS *langopts); void print_dictionary_flags(unsigned int *flags, char *buf, int buf_len); -char *DecodeRule(const char *group_chars, int group_length, char *rule, int control); void ApplySpecialAttribute2(Translator *tr, char *phonemes, int dict_flags);