From af75ed03e8aba1cb814ac9353230b273bff2cf24 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Thu, 31 Dec 2015 10:21:02 +0000 Subject: [PATCH] Fix building on Windows systems. --- src/libespeak-ng/voices.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libespeak-ng/voices.c b/src/libespeak-ng/voices.c index 636b66f7..39ad360b 100644 --- a/src/libespeak-ng/voices.c +++ b/src/libespeak-ng/voices.c @@ -267,8 +267,10 @@ void ReadTonePoints(char *string, int *tone_pts) &tone_pts[8], &tone_pts[9]); } -static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname) +static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname, const char *leafname) { + (void)leafname; // unused (except for PLATFORM_WINDOWS) + // Read a Voice file, allocate a VOICE_DATA and set data from the // file's language, gender, name lines @@ -1457,7 +1459,7 @@ static void GetVoices(const char *path) continue; // pass voice file name within the voices directory - voice_data = ReadVoiceFile(f_voice, fname+len_path_voices); + voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, FindFileData.cFileName); fclose(f_voice); if (voice_data != NULL) @@ -1493,7 +1495,7 @@ static void GetVoices(const char *path) continue; // pass voice file name within the voices directory - voice_data = ReadVoiceFile(f_voice, fname+len_path_voices); + voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, ent->d_name); fclose(f_voice); if (voice_data != NULL)