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
Reece H. Dunn
19f9ed629b
Remove the debugging code in OUTPUT_FORMAT and LIST_GROUP_INFO as this is not compiled by default.
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
66c2831bed
Use intptr_t from stdint.h instead of a custom long64 typedef.
9 years ago
Reece H. Dunn
cbe8695fcb
Remove the * box around the file headers.
9 years ago
Reece H. Dunn
36be9ac13f
Use the default uncrustify config (with indentation changes) to reformat the code.
9 years ago
Reece H. Dunn
5e0050419d
Remove comments that deliniate the start and end of functions, etc..
9 years ago
Reece H. Dunn
08821f262f
Remove commented out code.
9 years ago