diff options
author | Wildemann Stefan <stefan.wildemann@corpuls.com> | 2018-06-05 15:30:23 +0200 |
---|---|---|
committer | Stefan Wildemann <gta04@metalstrolche.de> | 2018-06-05 22:59:49 +0200 |
commit | 324dba9fc18004b4b081aa4bbe1bb237b7dc69a0 (patch) | |
tree | ed396d6eed6622dd189a5ff5b3d0aa671d8a301c | |
parent | 905195bf41b2e368c0a58238a6387d230a3b59ba (diff) | |
download | navit-324dba9fc18004b4b081aa4bbe1bb237b7dc69a0.tar.gz |
Make private functions static in espeak.
Convert the obviously private functions to static in order to fix
warnings. There are a lot not so obvious left that are used in other
files by extern statement. Silly.
-rw-r--r-- | navit/support/espeak/compiledict.c | 8 | ||||
-rw-r--r-- | navit/support/espeak/espeak.c | 5 | ||||
-rw-r--r-- | navit/support/espeak/klatt.c | 4 | ||||
-rw-r--r-- | navit/support/espeak/numbers.c | 4 | ||||
-rw-r--r-- | navit/support/espeak/readclause.c | 2 | ||||
-rw-r--r-- | navit/support/espeak/sonic.c | 4 | ||||
-rw-r--r-- | navit/support/espeak/speak_lib.c | 3 | ||||
-rw-r--r-- | navit/support/espeak/synthdata.c | 2 | ||||
-rw-r--r-- | navit/support/espeak/tr_languages.c | 4 | ||||
-rw-r--r-- | navit/support/espeak/translate.c | 14 | ||||
-rw-r--r-- | navit/support/espeak/wavegen.c | 10 |
11 files changed, 32 insertions, 28 deletions
diff --git a/navit/support/espeak/compiledict.c b/navit/support/espeak/compiledict.c index 3dd0cff00..567db0c90 100644 --- a/navit/support/espeak/compiledict.c +++ b/navit/support/espeak/compiledict.c @@ -32,7 +32,7 @@ #include "translate.h" extern void Write4Bytes(FILE *f, int value); -int HashDictionary(const char *string); +extern int HashDictionary(const char *string); static FILE *f_log = NULL; extern char *dir_dictionary; @@ -182,7 +182,7 @@ static FILE *fopen_log(const char *fname,const char *access) } -const char *LookupMnemName(MNEM_TAB *table, const int value) +static const char *LookupMnemName(MNEM_TAB *table, const int value) //========================================================== /* Lookup a mnemonic string in a table, return its name */ { @@ -917,7 +917,7 @@ static int group3_ix; -int isHexDigit(int c) +static int isHexDigit(int c) { if((c >= '0') && (c <= '9')) return(c - '0'); @@ -1387,7 +1387,7 @@ static char *compile_rule(char *input) } // end of compile_rule -int __cdecl string_sorter(char **a, char **b) +static int __cdecl string_sorter(char **a, char **b) {//=========================================== char *pa, *pb; int ix; diff --git a/navit/support/espeak/espeak.c b/navit/support/espeak/espeak.c index 5641f3c9f..028650272 100644 --- a/navit/support/espeak/espeak.c +++ b/navit/support/espeak/espeak.c @@ -28,6 +28,7 @@ #include <time.h> #include <sys/stat.h> +#include "speech.h" #include "speak_lib.h" // This version of the command-line speak program uses the @@ -125,7 +126,7 @@ void strncpy0(char *dest, const char *source, int size) } -void DisplayVoices(FILE *f_out, char *language) +static void DisplayVoices(FILE *f_out, char *language) {//============================================ int ix; const char *p; @@ -213,7 +214,7 @@ static void Write4Bytes(FILE *f, int value) -int OpenWavFile(char *path, int rate) +static int OpenWavFile(char *path, int rate) //=================================== { static unsigned char wave_hdr[44] = { diff --git a/navit/support/espeak/klatt.c b/navit/support/espeak/klatt.c index b15f77c23..c191534a5 100644 --- a/navit/support/espeak/klatt.c +++ b/navit/support/espeak/klatt.c @@ -1061,7 +1061,7 @@ static double klattp_inc[N_KLATTP]; -int Wavegen_Klatt(int resume) +static int Wavegen_Klatt(int resume) {//========================== int pk; int x; @@ -1180,7 +1180,7 @@ int Wavegen_Klatt(int resume) } -void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v, int control) +static void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v, int control) {//=========================================================================================== int ix; DOUBLEX next; diff --git a/navit/support/espeak/numbers.c b/navit/support/espeak/numbers.c index 66343a9b4..0289ab4ec 100644 --- a/navit/support/espeak/numbers.c +++ b/navit/support/espeak/numbers.c @@ -587,7 +587,7 @@ static const int number_ranges[] = { 0 }; // these must be in ascending order -int NonAsciiNumber(int letter) +static int NonAsciiNumber(int letter) {//============================ // Change non-ascii digit into ascii digit '0' to '9', (or -1 if not) const int *p; @@ -1975,7 +1975,7 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, int suppress_null } // end of LookupNum3 -bool CheckThousandsGroup(char *word, int group_len) +static bool CheckThousandsGroup(char *word, int group_len) {//================================================ // Is this a group of 3 digits which looks like a thousands group? int ix; diff --git a/navit/support/espeak/readclause.c b/navit/support/espeak/readclause.c index 64d232ebc..ec7b6711f 100644 --- a/navit/support/espeak/readclause.c +++ b/navit/support/espeak/readclause.c @@ -1528,7 +1528,7 @@ static int attr_prosody_value(int param_type, const wchar_t *pw, int *value_out) } // end of attr_prosody_value -int AddNameData(const char *name, int wide) +static int AddNameData(const char *name, int wide) {//======================================== // Add the name to the namedata and return its position // (Used by the Windows SAPI wrapper) diff --git a/navit/support/espeak/sonic.c b/navit/support/espeak/sonic.c index 82febba50..0627dee2c 100644 --- a/navit/support/espeak/sonic.c +++ b/navit/support/espeak/sonic.c @@ -55,8 +55,9 @@ struct sonicStreamStruct { int prevMinDiff; }; +#if 0 /* Just used for debugging */ -void sonicMSG(char *format, ...) +static void sonicMSG(char *format, ...) { char buffer[4096]; va_list ap; @@ -69,6 +70,7 @@ void sonicMSG(char *format, ...) fprintf(file, "%s", buffer); fclose(file); } +#endif /* Scale the samples by the factor. */ static void scaleSamples( diff --git a/navit/support/espeak/speak_lib.c b/navit/support/espeak/speak_lib.c index 2af3d90aa..fe6cec36a 100644 --- a/navit/support/espeak/speak_lib.c +++ b/navit/support/espeak/speak_lib.c @@ -763,11 +763,12 @@ ESPEAK_API void espeak_SetUriCallback(int (* UriCallback)(int, const char*, cons uri_callback = UriCallback; } - +#if 0 ESPEAK_API void espeak_SetPhonemeCallback(int (* PhonemeCallback)(const char*)) {//=========================================================================== phoneme_callback = PhonemeCallback; } +#endif ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output_type, int buf_length, const char *path, int options) {//============================================================================================================= diff --git a/navit/support/espeak/synthdata.c b/navit/support/espeak/synthdata.c index f36a694da..440a600ad 100644 --- a/navit/support/espeak/synthdata.c +++ b/navit/support/espeak/synthdata.c @@ -68,7 +68,7 @@ int vowel_transition[4]; int vowel_transition0; int vowel_transition1; -int FormantTransition2(frameref_t *seq, int *n_frames, unsigned int data1, unsigned int data2, PHONEME_TAB *other_ph, int which); +extern int FormantTransition2(frameref_t *seq, int *n_frames, unsigned int data1, unsigned int data2, PHONEME_TAB *other_ph, int which); diff --git a/navit/support/espeak/tr_languages.c b/navit/support/espeak/tr_languages.c index a287bc376..b1913f205 100644 --- a/navit/support/espeak/tr_languages.c +++ b/navit/support/espeak/tr_languages.c @@ -425,7 +425,7 @@ static void SetCyrillicLetters(Translator *tr) } // end of SetCyrillicLetters -void SetIndicLetters(Translator *tr) +static void SetIndicLetters(Translator *tr) {//================================= // Set letter types for Indic scripts, Devanagari, Tamill, etc static const char dev_consonants2[] = {0x02,0x03,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x7b,0x7c,0x7e,0x7f,0}; @@ -451,7 +451,7 @@ void SetIndicLetters(Translator *tr) } -void SetupTranslator(Translator *tr, const short *lengths, const unsigned char *amps) +static void SetupTranslator(Translator *tr, const short *lengths, const unsigned char *amps) {//================================================================================== if(lengths != NULL) memcpy(tr->stress_lengths,lengths,sizeof(tr->stress_lengths)); diff --git a/navit/support/espeak/translate.c b/navit/support/espeak/translate.c index 2b06331aa..890fa31ba 100644 --- a/navit/support/espeak/translate.c +++ b/navit/support/espeak/translate.c @@ -450,7 +450,7 @@ int IsDigit(unsigned int c) return(0); } -int IsSpace(unsigned int c) +static int IsSpace(unsigned int c) {//======================== if(c == 0) return(0); @@ -618,8 +618,8 @@ char *strchr_w(const char *s, int c) return(strchr((char *)s,c)); // (char *) is needed for Borland compiler } - -int IsAllUpper(const char *word) +#if 0 +static int IsAllUpper(const char *word) {//============================= int c; while((*word != 0) && !isspace2(*word)) @@ -630,7 +630,7 @@ int IsAllUpper(const char *word) } return(1); } - +#endif static char *SpeakIndividualLetters(Translator *tr, char *word, char *phonemes, int spell_word) {//============================================================================================ @@ -727,7 +727,7 @@ static int CheckDottedAbbrev(char *word1, WORD_TAB *wtab) extern char *phondata_ptr; -int ChangeEquivalentPhonemes(Translator *tr, int lang2, char *phonemes) +static int ChangeEquivalentPhonemes(Translator *tr, int lang2, char *phonemes) {//==================================================================== // tr: the original language // lang2: phoneme table number for the temporary language @@ -1677,7 +1677,7 @@ static int CountSyllables(unsigned char *phonemes) } -void Word_EmbeddedCmd(void) +static void Word_EmbeddedCmd(void) {//==================== // Process embedded commands for emphasis, sayas, and break int embedded_cmd; @@ -2544,7 +2544,7 @@ static int TranslateChar(Translator *tr, char *ptr, int prev_in, unsigned int c, static const char *UCase_ga[] = {"bp","bhf","dt","gc","hA","mb","nd","ng","ts","tA","nA",NULL}; -int UpperCaseInWord(Translator *tr, char *word, int c) +static int UpperCaseInWord(Translator *tr, char *word, int c) {//===================================================== int ix; int len; diff --git a/navit/support/espeak/wavegen.c b/navit/support/espeak/wavegen.c index d38ccf3c2..b1f3a6af5 100644 --- a/navit/support/espeak/wavegen.c +++ b/navit/support/espeak/wavegen.c @@ -857,7 +857,7 @@ static void WavegenSetEcho(void) -int PeaksToHarmspect(wavegen_peaks_t *peaks, int pitch, int *htab, int control) +static int PeaksToHarmspect(wavegen_peaks_t *peaks, int pitch, int *htab, int control) {//============================================================================ // Calculate the amplitude of each harmonics from the formants // Only for formants 0 to 5 @@ -1169,7 +1169,7 @@ static int ApplyBreath(void) -int Wavegen(void) +static int Wavegen(void) {//========== unsigned short waveph; unsigned short theta; @@ -1693,7 +1693,7 @@ void SetPitch2(voice_t *voice, int pitch1, int pitch2, int *pitch_base, int *pit } -void SetPitch(int length, unsigned char *env, int pitch1, int pitch2) +static void SetPitch(int length, unsigned char *env, int pitch1, int pitch2) {//================================================================== // length in samples @@ -1730,7 +1730,7 @@ if(option_log_frames) -void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v) +static void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v) {//======================================================================== int ix; DOUBLEX next; @@ -1865,7 +1865,7 @@ void Write4Bytes(FILE *f, int value) -int WavegenFill2(int fill_zeros) +static int WavegenFill2(int fill_zeros) {//============================ // Pick up next wavegen commands from the queue // return: 0 output buffer has been filled |