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
5 years ago
Reece H. Dunn
55c64036e0
Use UTF-8 strings in replace rules, instead of a packed UTF-16 pair.
7 years ago
Reece H. Dunn
424f705525
Revert the new (broken) replacement rule logic.
The replacement tests for bs, hr, and sr are no longer marked as
broken as they work using the old code. The mk tests keep the
broken annotation, as they don't work in the old code either.
This reverts commit 801a8d197c
.
This reverts commit 64d5701e5e
.
This reverts commit 3b51ebf617
.
This reverts commit 1fd235d2c0
.
This reverts commit 9f0667de86
.
7 years ago
Valdis Vitolins
9f0667de86
Part of issue #199 — extend .replace rule to allow using groups of characters
7 years ago
Juho Hiltunen
b23e8a7269
maintainability: pass Translator as to towlower2() instead of using a global
7 years ago
Juho Hiltunen
1bad240de8
maintainability: remove some unused variables and unnecessary extern declarations
7 years ago
Reece H. Dunn
87a2586bb0
Fix formatting of free_rules.
7 years ago
Reece H. Dunn
a08d2c7bfb
Ensure the allocated rules are properly cleaned up in compile_dictrules.
7 years ago
Juho Hiltunen
e04ae259e0
headers: add new file compiledict.h with declarations of functions in compiledict.c
7 years ago
Juho Hiltunen
231a1d0944
headers: add new file dictionary.h with declarations of functions in dictionary.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
738492100a
make all headers (almost) self-contained by using include guards and #include statements within headers
7 years ago
Juho Hiltunen
78749f14f8
readability fix: use boolean instead of 0 and 1 for loop control
7 years ago
Reece H. Dunn
54e87adbb8
Move isspace2 from compiledict.c to translate.c.
7 years ago
Reece H. Dunn
7f42e0aaca
compiledict.c: Fix -Wmissing-prototypes warnings.
7 years ago
Reece H. Dunn
b8b0119b62
dictionary.c: Fix -Wmissing-prototypes warnings.
7 years ago
Reece H. Dunn
74f9f5e34b
wavegen.c: Fix -Wmissing-prototypes warnings.
7 years ago
Reece H. Dunn
ebfa320956
Fix storing the line length in the hash chain.
The length is stored as the first byte in the output from
compile_line. As the data pointer is char, if char is signed then
length could be negative resulting in undefined behaviour. This
commit fixes the issue by reading and writing that byte as a
uint8_t.
This bug was caused by 2a00ca79f6
.
Previously, the entries could only be a maximum of 128 bytes, and
would not be negative on platforms with signed chars. That
commit was made to support long emoji entries, especially for
non-Latin languages where the utf-8 representations could be
longer than 128 bytes.
This change also adds some documentation to make it clearer what
is going on. NOTE: The code should really be using actual struct
objects instead of writing to opaque char buffers.
Reported by Reef Turner <[email protected] >
8 years ago
Reece H. Dunn
e7ac4b819d
hash_counts is never used, so remove it.
Reported by Reef Turner <[email protected] >
8 years ago
Reef Turner
0994206f71
address buffer overrun when dict listx file has no trailling newline
See ar_listx as an example.
8 years ago
Reece H. Dunn
2a00ca79f6
Increase dict_line to support long emoji entries.
8 years ago
Reece H. Dunn
d5d980862e
Guard against overflowing the dict_line bounds when compiling dictionary files.
8 years ago
Reece H. Dunn
8dde51ca87
Remove the now unused emoji_zwj specifier.
8 years ago
Reece H. Dunn
7e85b36b4d
en: (emoji) -- Unicode Emoji 4.0 (Emoji Roles)
8 years ago
Reece H. Dunn
dcc43bc30a
Support _emoji dictionary lists for symbol and emoji pronunciations.
8 years ago
Reece H. Dunn
05cab4f2dc
Extend compile_line to include pronunciation data after a space (e.g. multi-word pronunciation replacements).
8 years ago
Reece H. Dunn
94376c2d5f
Use an enum and named values for the steps in compile_line to make the logic easier to read.
8 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
d5d93be00e
Group the LookupMnem API implementations into mnemonics.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
Valdis Vitolins
92eae4f322
Updates for issue #103 Maximum group number which works is actually 62
9 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.
9 years ago
Valdis Vitolins
252c894e59
Issue espeak-ng/espeak-ng#120
Allow to decrease the score in the rule by adding
9 years ago
Reece H. Dunn
5673065168
Fix a null pointer dereference in compile_rule(compiledict.c). [Coverity]
9 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
aeb1639b2e
Fix the error logic in espeak_ng_CompileDictionary(compiledict.c) [clang scan-build]
9 years ago
Reece H. Dunn
c521c7f9c2
Remove a dead assignment in compile_line(compiledict.c) [clang scan-build]
9 years ago
Reece H. Dunn
2c07be17f9
Remove a dead assignment in compile_rule(compiledict.c) [clang scan-build]
9 years ago
Reece H. Dunn
365e41076f
Remove a dead assignment in compile_rule(compiledict.c) [clang scan-build]
9 years ago
Reece H. Dunn
72db232ec3
Move include/espeak{-ng => }/speak_lib.h.
9 years ago
Reece H. Dunn
3f80fd712e
Use the error context API in the compile_dictrules helper function.
9 years ago
Reece H. Dunn
a3f0795fb7
Use the error context API in espeak_ng_CompileDictionary.
9 years ago
Reece H. Dunn
563e4e3769
Use ENS_ for eSpeak NG error codes, and standardize on a numbering scheme.
9 years ago
Reece H. Dunn
f9ea83430e
Use errno codes in place of ENE_(READ|WRITE)_ERROR.
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
230ddd9fe2
Generate build errors if phoneme or language data files contain errors.
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