From 1bad240de8759b16e859f9a128ef7e89529903e4 Mon Sep 17 00:00:00 2001 From: Juho Hiltunen Date: Sat, 24 Mar 2018 14:07:01 +0200 Subject: [PATCH] maintainability: remove some unused variables and unnecessary extern declarations --- src/libespeak-ng/compiledict.c | 1 - src/libespeak-ng/phoneme.h | 2 -- src/libespeak-ng/spect.c | 4 ---- src/libespeak-ng/synthdata.c | 4 ---- src/libespeak-ng/synthesize.h | 6 ------ src/libespeak-ng/translate.c | 2 -- src/libespeak-ng/translate.h | 2 -- src/libespeak-ng/wavegen.c | 2 -- 8 files changed, 23 deletions(-) diff --git a/src/libespeak-ng/compiledict.c b/src/libespeak-ng/compiledict.c index 92b5e54d..108be5b3 100644 --- a/src/libespeak-ng/compiledict.c +++ b/src/libespeak-ng/compiledict.c @@ -45,7 +45,6 @@ #include "translate.h" static FILE *f_log = NULL; -extern char *dir_dictionary; extern char word_phonemes[N_WORD_PHONEMES]; // a word translated into phoneme codes diff --git a/src/libespeak-ng/phoneme.h b/src/libespeak-ng/phoneme.h index 97c0635a..305fcba6 100644 --- a/src/libespeak-ng/phoneme.h +++ b/src/libespeak-ng/phoneme.h @@ -224,8 +224,6 @@ phoneme_feature_t phoneme_feature_from_string(const char *feature); #define phonPAUSE_CLAUSE 27 #define phonVOWELTYPES 28 // 28 to 33 -extern const unsigned char pause_phonemes[8]; // 0, vshort, short, pause, long, glottalstop - #define N_PHONEME_TABS 150 // number of phoneme tables #define N_PHONEME_TAB 256 // max phonemes in a phoneme table #define N_PHONEME_TAB_NAME 32 // must be multiple of 4 diff --git a/src/libespeak-ng/spect.c b/src/libespeak-ng/spect.c index dee031f0..d3ff999a 100644 --- a/src/libespeak-ng/spect.c +++ b/src/libespeak-ng/spect.c @@ -36,12 +36,9 @@ #include "spect.h" #include "ieee80.h" -extern unsigned char pk_shape1[]; -extern int pk_select; extern char voice_name[]; static int frame_width; -int pk_select; static int default_freq[N_PEAKS] = { 200, 500, 1200, 3000, 3500, 4000, 6900, 7800, 9000 }; @@ -245,7 +242,6 @@ SpectSeq *SpectSeqCreate() spect->frames = NULL; spect->name = NULL; - pk_select = 1; spect->grid = 1; spect->duration = 0; spect->pitch1 = 0; diff --git a/src/libespeak-ng/synthdata.c b/src/libespeak-ng/synthdata.c index 25fde001..ac73a2d9 100644 --- a/src/libespeak-ng/synthdata.c +++ b/src/libespeak-ng/synthdata.c @@ -61,13 +61,9 @@ int phoneme_tab_number = 0; int wavefile_ix; // a wavefile to play along with the synthesis int wavefile_amp; -int wavefile_ix2; -int wavefile_amp2; int seq_len_adjust; int vowel_transition[4]; -int vowel_transition0; -int vowel_transition1; static espeak_ng_STATUS ReadPhFile(void **ptr, const char *fname, int *size, espeak_ng_ERROR_CONTEXT *context) { diff --git a/src/libespeak-ng/synthesize.h b/src/libespeak-ng/synthesize.h index 65c72729..da2c88b2 100644 --- a/src/libespeak-ng/synthesize.h +++ b/src/libespeak-ng/synthesize.h @@ -444,10 +444,7 @@ extern int samplerate_native; extern int wavefile_ix; extern int wavefile_amp; -extern int wavefile_ix2; -extern int wavefile_amp2; extern int vowel_transition[4]; -extern int vowel_transition0, vowel_transition1; #define N_ECHO_BUF 5500 // max of 250mS at 22050 Hz extern int echo_head; @@ -478,16 +475,13 @@ extern unsigned char *envelope_data[N_ENVELOPE_DATA]; extern int formant_rate[]; // max rate of change of each formant extern SPEED_FACTORS speed; -extern long count_samples; extern unsigned char *out_ptr; extern unsigned char *out_start; extern unsigned char *out_end; -extern int event_list_ix; extern espeak_EVENT *event_list; extern t_espeak_callback *synth_callback; extern const char *version_string; extern const int version_phdata; -extern double sonicSpeed; #define N_SOUNDICON_TAB 80 // total entries in soundicon_tab #define N_SOUNDICON_SLOTS 4 // number of slots reserved for dynamic loading of audio files diff --git a/src/libespeak-ng/translate.c b/src/libespeak-ng/translate.c index 329e8425..b69a5a33 100644 --- a/src/libespeak-ng/translate.c +++ b/src/libespeak-ng/translate.c @@ -527,8 +527,6 @@ static int CheckDottedAbbrev(char *word1) return count; } -extern char *phondata_ptr; - static int TranslateWord3(Translator *tr, char *word_start, WORD_TAB *wtab, char *word_out) { // word1 is terminated by space (0x20) character diff --git a/src/libespeak-ng/translate.h b/src/libespeak-ng/translate.h index 28206cb1..428c2ac4 100644 --- a/src/libespeak-ng/translate.h +++ b/src/libespeak-ng/translate.h @@ -281,7 +281,6 @@ typedef struct { int flags; } ALPHABET; -extern ALPHABET alphabets[]; extern ALPHABET *current_alphabet; // alphabet flags #define AL_DONT_NAME 0x01 // don't speak the alphabet name @@ -654,7 +653,6 @@ extern int option_sayas; extern int option_wordgap; extern int count_characters; -extern int count_words; extern int count_sentences; extern int skip_characters; extern int skip_words; diff --git a/src/libespeak-ng/wavegen.c b/src/libespeak-ng/wavegen.c index f584ad04..6eb4ce36 100644 --- a/src/libespeak-ng/wavegen.c +++ b/src/libespeak-ng/wavegen.c @@ -127,8 +127,6 @@ static int embedded_max[N_EMBEDDED_VALUES] = { 0, 0x7fff, 750, 300, 99, 99, 99, int current_source_index = 0; -extern FILE *f_wave; - #if HAVE_SONIC_H static sonicStream sonicSpeedupStream = NULL; double sonicSpeed = 1.0;