From 9fd480afbf4fe3a7140c664d3b5650c898913ca6 Mon Sep 17 00:00:00 2001 From: BenTalagan Date: Tue, 19 Nov 2019 12:30:32 +0100 Subject: [PATCH] Fixing typos and naming --- src/libespeak-ng/dictionary.c | 3 +-- src/libespeak-ng/readclause.c | 4 ++-- src/libespeak-ng/readclause.h | 2 +- src/libespeak-ng/translate.c | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index b1064285..bd144fa8 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -151,8 +151,7 @@ static void InitGroups(Translator *tr) p = (char *)(((intptr_t)p+4) & ~3); // advance to next word boundary tr->langopts.replace_chars = (unsigned char *)p; - // Don't cast to (unsigned int), result may not be garanted depending on compiler - while ( !is_str_fully_empty(p, 4) ) { + while ( !is_str_totally_null(p, 4) ) { p++; } diff --git a/src/libespeak-ng/readclause.c b/src/libespeak-ng/readclause.c index 823934ad..264d289b 100644 --- a/src/libespeak-ng/readclause.c +++ b/src/libespeak-ng/readclause.c @@ -132,8 +132,8 @@ int clause_type_from_codepoint(uint32_t c) return CLAUSE_NONE; } -int is_str_fully_empty(const char* str, int size) { - // Tests if all bytes of str are null uf to size +int is_str_totally_null(const char* str, int size) { + // Tests if all bytes of str are null up to size // This should never be reimplemented with integers, because // this function has to work with unaligned char* // (casting to int when unaligned may result in ungaranteed behaviors) diff --git a/src/libespeak-ng/readclause.h b/src/libespeak-ng/readclause.h index 9a80991c..4eba7756 100644 --- a/src/libespeak-ng/readclause.h +++ b/src/libespeak-ng/readclause.h @@ -35,7 +35,7 @@ typedef struct { extern PARAM_STACK param_stack[]; // Tests if all bytes of str up to size are null -int is_str_fully_empty(const char* str, int size); +int is_str_totally_null(const char* str, int size); int clause_type_from_codepoint(uint32_t c); int towlower2(unsigned int c, Translator *translator); // Supports Turkish I diff --git a/src/libespeak-ng/translate.c b/src/libespeak-ng/translate.c index e34bf919..4802cc71 100644 --- a/src/libespeak-ng/translate.c +++ b/src/libespeak-ng/translate.c @@ -1793,7 +1793,7 @@ static int EmbeddedCommand(unsigned int *source_index_out) static const char *FindReplacementChars(Translator *tr, const char **pfrom, unsigned int c, const char *next, int *ignore_next_n) { const char *from = *pfrom; - while ( !is_str_fully_empty(from, 4) ) { + while ( !is_str_totally_null(from, 4) ) { unsigned int fc = 0; // from character unsigned int nc = c; // next character const char *match_next = next;