Commit Graph
64 Commits
Author SHA1 Message Date
Reece H. Dunn 8a777385a8 Use wflags to access wtab->flags in LookupDict2.
Clang static analysis reports a 'Dereference of null pointer'
error when accessing wtab->flags. This is properly guarded
against when setting the wflags variable, so use that variable
instead.
2017-09-12 07:36:54 +01:00
Reece H. Dunn e6ea8fabea Initialise ending in RemoveEnding.
Clang static analysis reports this as several 'Result of operation
is garbage or undefined' errors, when `ending` has not been set
due to no matching endings.
2017-09-12 07:29:07 +01:00
Reece H. Dunn 988db184ea Prevent invalid access to word in LookupDictList.
Clang static analysis reports this as several 'Result of operation
is garbage or undefined' errors.
2017-09-12 07:17:46 +01:00
Reece H. Dunn 22270bd259 Fix reading hash table entries > 128.
This is related to ebfa320956, but
when reading the hash chain entry length, not writing it.

If char is signed, then before this change the length would be
negative, causing problems loading the dictionary.
2017-07-26 21:11:44 +01:00
Reece H. Dunn 921229259d Use int to store the value from GetFileLength.
This fixes the clang warning:

    comparison of unsigned expression < 0 is always false
    [-Wtautological-compare]

Reported by Reef Turner <reef@nvaccess.org>
2017-07-26 19:50:03 +01:00
Reece H. Dunn 48ca2239bb Fix non-Latin character languages falling back to English when reading Latin characters. 2017-05-12 07:35:27 +01:00
Reece H. Dunn 2f8f125c68 Remove voice/language support for alphabet2.
This is not used by any of the espeak-ng voices and languages.
Additionally, this functionality would be superceded by support
for specifying the language used by different scripts in the
language argument on the command line.
2017-05-07 15:10:42 +01:00
Reece H. Dunn 9af96da469 Make the encoding.h API public. 2017-05-02 18:40:16 +01:00
Reece H. Dunn 8749891069 Better specify the CLAUSE_ flags returned by ReadClause. 2017-04-17 22:04:45 +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
Valdis Vitolins 17168a5669 More proper fix for issue #196 2017-02-12 15:56:27 +02:00
Valdis Vitolins fd4b397ad7 Merge branch 'test' 2017-02-11 21:49:02 +02:00
Valdis Vitolins 9558e60e4b Merge branch 'master' of https://github.com/espeak-ng/espeak-ng 2017-02-11 21:48:04 +02:00
Valdis Vitolins 872433d62c Fix for Jump rule to allow no letters in between current and pre/post (literal letter/letter group) 2017-02-11 21:42:09 +02:00
Valdis Vitolins 41f29f3e87 Fix for issue #196 Word end mark _ doesn't work properly with ~ character group 2017-02-11 20:52:52 +02:00
Reece H. Dunn 71c010b712 Remove unused wchar.h and wctype.h includes. 2017-02-10 08:03:40 +00:00
Valdis Vitolins af7fc1b657 Issue #199 Jump statement now supports letter groups 2017-02-05 23:31:24 +02:00
Valdis Vitolins b2057635c4 PRE jump rule e.g. 'xyJ)' implemented 2017-02-05 15:40:28 +00:00
Valdis Vitolins 29f0b673ee Updated comments for POST jump rule 2017-02-05 15:40:14 +00:00
Valdis Vitolins 6bd656cf4a Limit search for jump POST rule to null byte for last word in sentence 2017-02-05 15:40:00 +00:00
Valdis Vitolins 7ad277e39e Fixed typo 2017-01-15 22:13:13 +02:00
Valdis Vitolins 059543ceb0 Fix for issue #195 Different non-Latin diacritized consonants are wrongly considered as one doubled 2017-01-15 21:06:32 +02:00
Reece H. Dunn 2ccaa7f002 Improve the IsLetterGroup comments. 2017-01-10 19:34:12 +00:00
Reece H. Dunn af1fae46de Fix formatting of the previous changes to match style guidelines. 2017-01-10 19:26:40 +00:00
Valdis Vitolins a621ad46e7 Implementation for issue #155 2017-01-09 19:05:54 +02:00
Rui Batista 7b82e39793 Make strcpy calls in load dictionary copy at most 40 bytes so clang __strcpy_check does not get triggered (possible buffer overflow?) 2016-10-05 13:15:48 +01:00
Valdis Vitolins 76ac24fbe4 Fixed TODO comment removed 2016-09-10 15:55:16 +03:00
Valdis Vitolins 92eae4f322 Updates for issue #103 Maximum group number which works is actually 62 2016-09-05 22:05:55 +03:00
Valdis Vitolins dde9872eb7 Fix for issue #103 Maximum group number which works is actually 62 2016-08-31 23:48:32 +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
chrislm 80da24bec7 Removed lengthen penultimate stressed vowels from dictionary.c lines 1469-1475. (See #80).
Fixed length stressed vowels in tr_language.c (see #80).

Improved phonemes, new statements for [a] and long close [o].

Added last improvements in italian dict source tested on april-may 2016.
2016-06-05 16:25:45 +02:00
Reece H. Dunn 565548fffe Fix building 'my' (Burmese) on Windows. 2016-01-31 21:51:18 +00:00
Reece H. Dunn bbd981efb8 Use malloc/strdup instead of Alloc. 2016-01-18 20:34:59 +00:00
Reece H. Dunn 325014da42 Use free instead of Free as free checks for NULL. 2016-01-18 20:23:51 +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 f608860a7a Fix the malloc/realloc usage of phon_out_buf in GetTranslatedPhonemeString(dictionary.c) [msvc /analyze] 2016-01-12 21:46:08 +00:00
Reece H. Dunn 9c7179189b Add a stdint.h compatibility shim. 2016-01-09 13:09:50 +00:00
Reece H. Dunn 11136fb794 Remove a dead assignment in MatchRule(dictionary.c) [clang scan-build] 2016-01-06 22:14:22 +00:00
Reece H. Dunn e815f46ff3 Remove a dead assignment in MatchRule(dictionary.c) [clang scan-build] 2016-01-06 22:13:23 +00:00
Reece H. Dunn d52f00cd24 Fix a buffer size calculation in Lookup. 2016-01-05 13:56:34 +00:00
Reece H. Dunn 72db232ec3 Move include/espeak{-ng => }/speak_lib.h. 2016-01-04 19:45:23 +00:00
Reece H. Dunn 1d14c2a2f1 Always pass plist to WritePhMnemonic [clang scan-build]
The clang scan-build static analysis tool warns of a null pointer
dereference in WritePhMnemonic. This is only for phonSWITCH codes,
which is guarded against in the calls that pass NULL to plist, so
the null dereference should not trigger.

Always passing plist supresses this warning, and prevents any
future errors.
2016-01-03 12:49:01 +00:00
Reece H. Dunn c2811d074e Make LoadPhData return an espeak_ng_STATUS code. 2016-01-01 13:17:11 +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 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
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