From 5cd7ce86c2eebf158eb39f30424439ebb203f5bc Mon Sep 17 00:00:00 2001 From: akashihi Date: Sat, 27 Nov 2010 17:54:26 +0000 Subject: [PATCH] Fix:build:MSVC is very strict on variable defintions placement git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3731 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/support/espeak/phonemelist.c | 7 +++---- navit/navit/support/espeak/tr_languages.c | 6 ++++-- navit/navit/support/espeak/wave.h | 9 +++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/navit/navit/support/espeak/phonemelist.c b/navit/navit/support/espeak/phonemelist.c index 72ac1ab..d663e2e 100755 --- a/navit/navit/support/espeak/phonemelist.c +++ b/navit/navit/support/espeak/phonemelist.c @@ -89,7 +89,8 @@ static int SubstitutePhonemes(Translator *tr, PHONEME_LIST2 *plist_out) if(tr->langopts.phoneme_change != 0) { // this language does changes to phonemes after translation - + int flags; + CHANGEPH ch; if(plist2->sourceix) { // start of a word, find the stressed vowel @@ -125,9 +126,7 @@ static int SubstitutePhonemes(Translator *tr, PHONEME_LIST2 *plist_out) syllable++; } - // make any language specific changes - int flags; - CHANGEPH ch; + // make any language specific changes flags = 0; if(ix == max_stress_posn) flags |= 2; diff --git a/navit/navit/support/espeak/tr_languages.c b/navit/navit/support/espeak/tr_languages.c index 092595a..2416755 100644 --- a/navit/navit/support/espeak/tr_languages.c +++ b/navit/navit/support/espeak/tr_languages.c @@ -1155,6 +1155,8 @@ int ChangePhonemes_ru(Translator *tr, PHONEME_LIST2 *phlist, int n_ph, int index int variant; int vowelix; + int stressed; + int soft; PHONEME_TAB *prev, *next; if(ch->flags & 8) @@ -1214,8 +1216,8 @@ PH('V','#'),PH('I','3'),PH('I','2'),PH('E','3')}; } // do we need a variant of this vowel, depending on the stress and adjacent phonemes ? variant = -1; - int stressed = ch->flags & 2; - int soft=prev->phflags & phPALATAL; + stressed = ch->flags & 2; + soft=prev->phflags & phPALATAL; if (soft && stressed) variant = 2; else diff --git a/navit/navit/support/espeak/wave.h b/navit/navit/support/espeak/wave.h index 8b6e606..de8bf1e 100644 --- a/navit/navit/support/espeak/wave.h +++ b/navit/navit/support/espeak/wave.h @@ -1,9 +1,18 @@ #ifndef WAVE_H #define WAVE_H +#ifdef _MSC_VER + +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int32 uint64_t; + +#else #ifndef PLATFORM_DOS #include "stdint.h" #endif +#endif extern int option_device_number; -- 2.7.4