| return n_bytes+1; | return n_bytes+1; | ||||
| } | } | ||||
| 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) | |||||
| return (*str == 0 && memcmp(str, str+1, size-1) == 0); | |||||
| } | |||||
| int towlower2(unsigned int c, Translator *translator) | int towlower2(unsigned int c, Translator *translator) | ||||
| { | { | ||||
| // check for non-standard upper to lower case conversions | // check for non-standard upper to lower case conversions | ||||
| return ucd_tolower(c); | return ucd_tolower(c); | ||||
| } | } | ||||
| extern ESPEAK_NG_API int GetFileLength(const char *filename); | extern ESPEAK_NG_API int GetFileLength(const char *filename); | ||||
| extern ESPEAK_NG_API void strncpy0(char *to, const char *from, int size); | extern ESPEAK_NG_API void strncpy0(char *to, const char *from, int size); | ||||
| int is_str_totally_null(const char* str, int size); // Tests if all bytes of str up to size are null | |||||
| int towlower2(unsigned int c, Translator *translator); // Supports Turkish I | int towlower2(unsigned int c, Translator *translator); // Supports Turkish I | ||||
| ESPEAK_NG_API int utf8_in(int *c, const char *buf); | ESPEAK_NG_API int utf8_in(int *c, const char *buf); |
| #include "dictionary.h" | #include "dictionary.h" | ||||
| #include "numbers.h" // for LookupAccentedLetter, Look... | #include "numbers.h" // for LookupAccentedLetter, Look... | ||||
| #include "phoneme.h" // for PHONEME_TAB, phVOWEL, phon... | #include "phoneme.h" // for PHONEME_TAB, phVOWEL, phon... | ||||
| #include "readclause.h" // for WordToString2, is_str_tota... | |||||
| #include "readclause.h" // for WordToString2 | |||||
| #include "speech.h" // for path_home | #include "speech.h" // for path_home | ||||
| #include "compiledict.h" // for DecodeRule | #include "compiledict.h" // for DecodeRule | ||||
| #include "synthdata.h" // for PhonemeCode, InterpretPhoneme | #include "synthdata.h" // for PhonemeCode, InterpretPhoneme |
| return CLAUSE_NONE; | return CLAUSE_NONE; | ||||
| } | } | ||||
| 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) | |||||
| return (*str == 0 && memcmp(str, str+1, size-1) == 0); | |||||
| } | |||||
| static int IsRomanU(unsigned int c) | static int IsRomanU(unsigned int c) | ||||
| { | { | ||||
| if ((c == 'I') || (c == 'V') || (c == 'X') || (c == 'L')) | if ((c == 'I') || (c == 'V') || (c == 'X') || (c == 'L')) |
| extern PARAM_STACK param_stack[]; | extern PARAM_STACK param_stack[]; | ||||
| // Tests if all bytes of str up to size are null | |||||
| int is_str_totally_null(const char* str, int size); | |||||
| int clause_type_from_codepoint(uint32_t c); | int clause_type_from_codepoint(uint32_t c); | ||||
| int Eof(void); | int Eof(void); | ||||
| const char *WordToString2(unsigned int word); | const char *WordToString2(unsigned int word); |