Juho Hiltunen
78749f14f8
readability fix: use boolean instead of 0 and 1 for loop control
2018-02-17 18:17:00 +02:00
Reece H. Dunn
54e87adbb8
Move isspace2 from compiledict.c to translate.c.
2017-10-24 07:29:58 +01:00
Reece H. Dunn
7f42e0aaca
compiledict.c: Fix -Wmissing-prototypes warnings.
2017-10-11 07:51:36 +01:00
Reece H. Dunn
b8b0119b62
dictionary.c: Fix -Wmissing-prototypes warnings.
2017-10-11 07:46:17 +01:00
Reece H. Dunn
74f9f5e34b
wavegen.c: Fix -Wmissing-prototypes warnings.
2017-10-10 21:37:46 +01:00
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 <reef@nvaccess.org >
2017-07-26 20:44:27 +01:00
Reece H. Dunn
e7ac4b819d
hash_counts is never used, so remove it.
...
Reported by Reef Turner <reef@nvaccess.org >
2017-07-26 20:21:05 +01:00
Reef Turner
0994206f71
address buffer overrun when dict listx file has no trailling newline
...
See ar_listx as an example.
2017-07-25 14:29:45 +08:00
Reece H. Dunn
2a00ca79f6
Increase dict_line to support long emoji entries.
2017-06-04 19:47:30 +01:00
Reece H. Dunn
d5d980862e
Guard against overflowing the dict_line bounds when compiling dictionary files.
2017-06-04 19:38:40 +01:00
Reece H. Dunn
8dde51ca87
Remove the now unused emoji_zwj specifier.
2017-05-25 07:23:21 +01:00
Reece H. Dunn
7e85b36b4d
en: (emoji) -- Unicode Emoji 4.0 (Emoji Roles)
2017-05-18 07:16:05 +01:00
Reece H. Dunn
dcc43bc30a
Support _emoji dictionary lists for symbol and emoji pronunciations.
2017-05-14 11:05:43 +01:00
Reece H. Dunn
05cab4f2dc
Extend compile_line to include pronunciation data after a space (e.g. multi-word pronunciation replacements).
2017-05-14 08:39:29 +01:00
Reece H. Dunn
94376c2d5f
Use an enum and named values for the steps in compile_line to make the logic easier to read.
2017-05-11 19:40:43 +01:00
Reece H. Dunn
9af96da469
Make the encoding.h API public.
2017-05-02 18:40:16 +01:00
Reece H. Dunn
7c16ac543c
Use the text decoder API in readclause.c.
2017-03-31 13:17:37 +01:00
Reece H. Dunn
d5d93be00e
Group the LookupMnem API implementations into mnemonics.c.
2017-03-27 21:08:07 +01:00
Reece H. Dunn
5975f07095
Replace the *2 wchar/wctype APIs with their standard versions. These will be fixed using compatibility headers.
2017-02-13 07:43:23 +00:00
Reece H. Dunn
71c010b712
Remove unused wchar.h and wctype.h includes.
2017-02-10 08:03:40 +00:00
Valdis Vitolins
92eae4f322
Updates for issue #103 Maximum group number which works is actually 62
2016-09-05 22:05:55 +03:00
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.
2016-08-28 10:57:10 +01:00
Valdis Vitolins
252c894e59
Issue espeak-ng/espeak-ng#120
...
Allow to decrease the score in the rule by adding
2016-08-07 16:13:16 +03:00
Reece H. Dunn
5673065168
Fix a null pointer dereference in compile_rule(compiledict.c). [Coverity]
2016-01-22 20:22:24 +00:00
Reece H. Dunn
96c43f3eb2
Clean up the include files to make them consistent.
2016-01-16 17:54:39 +00:00
Reece H. Dunn
9c7179189b
Add a stdint.h compatibility shim.
2016-01-09 13:09:50 +00:00
Reece H. Dunn
aeb1639b2e
Fix the error logic in espeak_ng_CompileDictionary(compiledict.c) [clang scan-build]
2016-01-06 22:41:57 +00:00
Reece H. Dunn
c521c7f9c2
Remove a dead assignment in compile_line(compiledict.c) [clang scan-build]
2016-01-06 22:19:51 +00:00
Reece H. Dunn
2c07be17f9
Remove a dead assignment in compile_rule(compiledict.c) [clang scan-build]
2016-01-06 22:18:15 +00:00
Reece H. Dunn
365e41076f
Remove a dead assignment in compile_rule(compiledict.c) [clang scan-build]
2016-01-06 22:17:29 +00:00
Reece H. Dunn
72db232ec3
Move include/espeak{-ng => }/speak_lib.h.
2016-01-04 19:45:23 +00:00
Reece H. Dunn
3f80fd712e
Use the error context API in the compile_dictrules helper function.
2016-01-04 13:52:25 +00:00
Reece H. Dunn
a3f0795fb7
Use the error context API in espeak_ng_CompileDictionary.
2016-01-04 11:28:18 +00:00
Reece H. Dunn
563e4e3769
Use ENS_ for eSpeak NG error codes, and standardize on a numbering scheme.
2016-01-02 12:20:25 +00:00
Reece H. Dunn
f9ea83430e
Use errno codes in place of ENE_(READ|WRITE)_ERROR.
2016-01-02 11:58:12 +00:00
Reece H. Dunn
f38a075575
The next_pause parameter of TranslateWord is not used, so remove it.
2015-12-30 08:58:36 +00:00
Reece H. Dunn
230ddd9fe2
Generate build errors if phoneme or language data files contain errors.
2015-12-29 15:00:31 +00:00
Reece H. Dunn
522e7c4d51
Revert commit 14a2fb39cf
...
This commit has been reported to cause distortions in phoneme
pitches and speeds.
2015-12-28 17:54:17 +00:00
Reece H. Dunn
5d295bdd30
Merge remote-tracking branch 'nyqvist/master'
...
Conflicts:
src/libespeak-ng/compiledict.c
src/libespeak-ng/readclause.c
src/libespeak-ng/speak_lib.c
src/libespeak-ng/voices.c
src/libespeak-ng/wave_sada.c
src/libespeak-ng/wavegen.c
2015-12-28 13:14:46 +00:00
Reece H. Dunn
19f9ed629b
Remove the debugging code in OUTPUT_FORMAT and LIST_GROUP_INFO as this is not compiled by default.
2015-12-28 11:26:18 +00:00
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
2015-12-28 12:05:17 +01:00
Reece H. Dunn
3e99752d0c
Check and fix source code formatting.
2015-12-27 22:34:53 +00:00
Reece H. Dunn
f0c2c4cca2
Remove extra newlines from the files to provide consistent spacing.
2015-12-23 11:32:03 +00:00
Reece H. Dunn
d345d74f64
Remove braces around single-line if/while/for/etc. and related cleanup.
2015-12-22 20:40:10 +00:00
Reece H. Dunn
9a837c8182
Remove parentheses around return statements.
2015-12-22 16:24:01 +00:00
Reece H. Dunn
12e0bb122b
Reformat the code using the uncrustify program.
2015-12-22 15:06:50 +00:00
Reece H. Dunn
66c2831bed
Use intptr_t from stdint.h instead of a custom long64 typedef.
2015-12-18 21:41:28 +00:00
Reece H. Dunn
cbe8695fcb
Remove the * box around the file headers.
2015-12-17 23:45:36 +00:00
Reece H. Dunn
36be9ac13f
Use the default uncrustify config (with indentation changes) to reformat the code.
2015-12-17 07:40:24 +00:00
Reece H. Dunn
5e0050419d
Remove comments that deliniate the start and end of functions, etc..
2015-12-15 22:26:02 +00:00