diff --git a/Makefile.am b/Makefile.am index 18ca46af..8aabbf12 100644 --- a/Makefile.am +++ b/Makefile.am @@ -157,9 +157,10 @@ src_libespeak_ng_la_SOURCES = $(common_SOURCE) $(libespeak_ng_SOURCE) $(wave_SO bin_PROGRAMS += src/speak-ng -src_speak_ng_LDFLAGS = $(wave_LIBS) -lpthread -lm -src_speak_ng_CFLAGS = $(common_FLAGS) $(wave_FLAGS) -I src/libespeak-ng -src_speak_ng_SOURCES = src/speak-ng.c $(common_SOURCE) $(wave_SOURCE) +src_speak_ng_LDADD = src/libespeak-ng.la +src_speak_ng_LDFLAGS = -static +src_speak_ng_CFLAGS = $(common_FLAGS) $(wave_FLAGS) -I src/libespeak-ng +src_speak_ng_SOURCES = src/speak-ng.c bin_PROGRAMS += src/espeak-ng diff --git a/src/speak-ng.c b/src/speak-ng.c index 5564fe7b..02cafbac 100644 --- a/src/speak-ng.c +++ b/src/speak-ng.c @@ -51,10 +51,6 @@ #include "voice.h" #include "translate.h" -#ifndef S_ISDIR -#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -#endif - extern void Write4Bytes(FILE *f, int value); @@ -62,8 +58,6 @@ char path_home[N_PATH_HOME]; // this is the espeak-data directory char filetype[5]; char wavefile[200]; -int (* uri_callback)(int, const char *, const char *) = NULL; -int (* phoneme_callback)(const char *) = NULL; FILE *f_wave = NULL; int quiet = 0; @@ -135,35 +129,6 @@ USHORT voice_pcnt[N_PEAKS+1][3]; -int GetFileLength(const char *filename) -{//==================================== - struct stat statbuf; - - if(stat(filename,&statbuf) != 0) - return(0); - - if(S_ISDIR(statbuf.st_mode)) - return(-2); // a directory - - return(statbuf.st_size); -} // end of GetFileLength - - -char *Alloc(int size) -{//================== - char *p; - if((p = (char *)malloc(size)) == NULL) - fprintf(stderr,"Can't allocate memory\n"); - return(p); -} - -void Free(void *ptr) -{//================= - if(ptr != NULL) - free(ptr); -} - - void DisplayVoices(FILE *f_out, char *language) {//============================================ int ix; @@ -236,10 +201,6 @@ void DisplayVoices(FILE *f_out, char *language) } // end of DisplayVoices -void WVoiceChanged(voice_t *wvoice) -{ -} - static int OpenWaveFile(const char *path, int rate) //================================================= { @@ -310,14 +271,6 @@ static void CloseWaveFile() -void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr) -{//====================================================================================== -// Do nothing in the command-line version. - if(type == 2) - end_of_sentence = 1; -} // end of MarkerEvent - - static int WavegenFile(void) {//========================= int finished;