code cleanup: move check for SSML comments and declarations to
ProcessSsmlTag()
Note the line in readclause.c:
if ((c2 == '/') || iswalpha(c2) || c2 == '!' || c2 == '?') {
It might be enough to pass everything to ProcessSsmlTag. What are the
cases that are skipped because of this?
code cleanup: Move self_closing checks to ProcessSsmlTag()
This is a bit slower since we don't pass n_xml_buf as an argument but
rather get it with a call to wcslen. It is much cleaner though, since
the name ProcessSsmlTag() implies that all processing should be done
there.
code cleanup: Check all local includes with include-what-you-use
Going through files in src/libespeak-ng/, include-what-you-use removed a
few unnecessary includes and included explanations on why a certain
header should be included. This makes tracking globals and dependencies easier.
Running the codebase through IWYU should be repeated after each major
code restIncludes to standard c library weren't checked to avoid
breaking builds with other platforms.
See https://github.com/include-what-you-use/include-what-you-use
code cleanup: remove unused int vowel_transition[4]
There's two variables with the same name:
1) in struct PHONEME_DATA, used by *phdata, *phdata_next and *phdata_prev
2) an unnecessary one that's only being memset() twice but never used
for anything
code cleanup: change global int current_phoneme table to static
It's only used in SpeakNextClause() and related to SelectPhonemeTable().
Another solution void be to keep SelectPhonemeTable() as a void function
and do a current_phoneme_table = voice->phoneme_tab_ix after the call to
SelectPhonemeTable().
code cleanup: pass voice_t wvoice as a parameter instead of using a global
SetSynth_Klatt() was using wvoice in two ways:
1) global wvoice was used directly
2) global wvoice was also passed in Wavegen_Klatt() as an argument "v"
Now the code only uses the function argument wvoice
Contributes to #68.