A11CF0
c5de4ff6c2
Avoid clashes between gender selection code and thousand variant flags
Fixes #1420 also Set max_digits to 32 for russian since it's safe to do now.
2 years ago
Juho Hiltunen
f342b5d319
cleanup: make spelling_stress bool and set default value
2 years ago
kirill-jjj
563db55147
Russian: improve numbers
2 years ago
Juho Hiltunen
4a9f0e21be
code cleanup: move Is*() helper functions to common.c
2 years ago
Juho Hiltunen
64f12fec87
code cleanup: move towlower2()
2 years ago
Juho Hiltunen
ac3b9f6199
code cleanup: move utf8_* functions.
utf8_nbytes() is only used in dictionary.c. Others are moved to common.c
2 years ago
Juho Hiltunen
5e7c105723
code cleanup: move TranslateLetter() and others to translateword.c
2 years ago
Samuel Thibault
8789e1e8e1
Increase buffer size for thousands processing
E.g. yue does not have many thousands separators, so the value may be very
large, possibly as much as maxint.
2 years ago
Samuel Thibault
1da9ad10e8
Add tertiary translator
TranslateWord2 passes translator2 as tr to TranslateWord which may call
TranslateWord3, SpeakIndividualLetters, TranslateLetter, which was calling
SetTranslator2 again, thus freeing the very tr being used. Make that
latter use another translator.
2 years ago
Samuel Thibault
7e608a3273
Make some buffers non-static
These don't actually need to survive function exit.
3 years ago
Samuel Thibault
a660fc04cc
Add more const qualifiers on static arrays
So we know they are just tables, get protected from overflows, and get shared between processes
3 years ago
Samuel Thibault
fc05678e41
CheckThousandsGroup: Fix checking heading character before thousand group
3 years ago
Samuel Thibault
f352f1e43f
CheckThousandsGroup: Avoid reading uninitialized data
For the case when word is smaller than 4 characters, we should not look at
the 3rd or 4th character before checking the previous ones, otherwise
we'd at best read uninitialized data, at worse non-existing data.
3 years ago
Juho Hiltunen
d80f1a80a2
Use ESPEAKNG_DEFAULT_VOICE instead of hard coded "en".
This will make it easier to set a default voice other than
English. This is important for cases when a language will fall back to
the default voice.
Some references to L('e', 'n') still need to be changed.
3 years ago
freddii
61efed30fa
fixed spelling mistakes
4 years ago
Juho Hiltunen
ee944700f8
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
4 years ago
Reece H. Dunn
1e04ce0fbf
Use the NUM2_SWAP_THOUSANDS constant instead of 0x200.
5 years ago
Reece H. Dunn
915d51512a
Create a NUM2_THOUSANDS_VAR_BITS define.
5 years ago
Reece H. Dunn
b8fbcf86ff
Separate the NUM_DFRACTION flags from the rest of the NUM_ bitmask flags.
5 years ago
Juho Hiltunen
b23e8a7269
maintainability: pass Translator as to towlower2() instead of using a global
7 years ago
Juho Hiltunen
f73ebfd126
maintainability: pass current_alphabet as argument to TranslateLetter() instead of using global
7 years ago
Juho Hiltunen
9012f3f0bf
headers: continue with synthdata.h
7 years ago
Juho Hiltunen
231a1d0944
headers: add new file dictionary.h with declarations of functions in dictionary.c
7 years ago
Juho Hiltunen
cd991bd2c9
headers: add new file numbers.h with declarations of functions in numbers.c
7 years ago
Juho Hiltunen
706df97b20
headers: add new file readclause.h with declarations of functions in readclause.c
7 years ago
Juho Hiltunen
079d5a92c5
remove more unnecessary speech.h includes
7 years ago
Juho Hiltunen
78749f14f8
readability fix: use boolean instead of 0 and 1 for loop control
7 years ago
Reece H. Dunn
8768cba0ae
numbers.c: Fix -Wmissing-prototypes warnings.
7 years ago
Reece H. Dunn
74f9f5e34b
wavegen.c: Fix -Wmissing-prototypes warnings.
7 years ago
Reece H. Dunn
9af96da469
Make the encoding.h API public.
8 years ago
Reece H. Dunn
7c16ac543c
Use the text decoder API in readclause.c.
8 years ago
Reece H. Dunn
5975f07095
Replace the *2 wchar/wctype APIs with their standard versions. These will be fixed using compatibility headers.
8 years ago
Reece H. Dunn
71c010b712
Remove unused wchar.h and wctype.h includes.
8 years ago
Ondřej Lysoněk
3817ee1e16
Moved speak_lib.h to espeak-ng directory
Moved include/espeak/speak_lib.h to include/espeak-ng/speak_lib.h and
created a symlink from the original location.
8 years ago
Reece H. Dunn
96c43f3eb2
Clean up the include files to make them consistent.
9 years ago
Reece H. Dunn
9c7179189b
Add a stdint.h compatibility shim.
9 years ago
Reece H. Dunn
2549b21f28
Remove a dead assignment in SetSpellingStress(numbers.c) [clang scan-build]
9 years ago
Reece H. Dunn
72db232ec3
Move include/espeak{-ng => }/speak_lib.h.
9 years ago
Reece H. Dunn
c2811d074e
Make LoadPhData return an espeak_ng_STATUS code.
9 years ago
Reece H. Dunn
80914cc40e
Fix clang -Wunused-macros warnings.
9 years ago
Reece H. Dunn
f38a075575
The next_pause parameter of TranslateWord is not used, so remove it.
9 years ago
Reece H. Dunn
522e7c4d51
Revert commit 14a2fb39cf89c8e5561f833f961d8330059daaae
This commit has been reported to cause distortions in phoneme
pitches and speeds.
9 years ago
Fredrik Nyqvist
14a2fb39cf
Declare variables at their first point of use
Also use size_t instead of int in some places
where it make sense
9 years ago
Reece H. Dunn
3e99752d0c
Check and fix source code formatting.
9 years ago
Reece H. Dunn
f0c2c4cca2
Remove extra newlines from the files to provide consistent spacing.
9 years ago
Reece H. Dunn
d345d74f64
Remove braces around single-line if/while/for/etc. and related cleanup.
9 years ago
Reece H. Dunn
9a837c8182
Remove parentheses around return statements.
9 years ago
Reece H. Dunn
12e0bb122b
Reformat the code using the uncrustify program.
9 years ago
Reece H. Dunn
08b6ad3a00
Fix a logical check in numbers.c
9 years ago
Reece H. Dunn
66c2831bed
Use intptr_t from stdint.h instead of a custom long64 typedef.
9 years ago