| 1 |
/* |
| 2 |
* Copyright (C) 2005 to 2007 by Jonathan Duddington |
| 3 |
* email: [email protected] |
| 4 |
* Copyright (C) 2013-2015 Reece H. Dunn |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License as published by |
| 8 |
* the Free Software Foundation; either version 3 of the License, or |
| 9 |
* (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program; if not, see: <http://www.gnu.org/licenses/>. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef ESPEAK_NG_COMMON_H |
| 21 |
#define ESPEAK_NG_COMMON_H |
| 22 |
|
| 23 |
#include "espeak_ng.h" |
| 24 |
#include "FileInMemory.h" |
| 25 |
#include "translate.h" |
| 26 |
|
| 27 |
extern ESPEAK_NG_API int GetFileLength(const char *filename); |
| 28 |
extern ESPEAK_NG_API void strncpy0(char *to, const char *from, int size); |
| 29 |
|
| 30 |
void espeak_srand(long seed); |
| 31 |
long espeak_rand(long min, long max); |
| 32 |
|
| 33 |
int IsAlpha(unsigned int c); |
| 34 |
int IsBracket(int c); |
| 35 |
int IsDigit(unsigned int c); |
| 36 |
int IsDigit09(unsigned int c); |
| 37 |
int IsSpace(unsigned int c); |
| 38 |
int isspace2(unsigned int c); |
| 39 |
int is_str_totally_null(const char* str, int size); // Tests if all bytes of str up to size are null |
| 40 |
int Read4Bytes(FileInMemory f); |
| 41 |
unsigned int StringToWord(const char *string); |
| 42 |
int towlower2(unsigned int c, Translator *translator); // Supports Turkish I |
| 43 |
|
| 44 |
ESPEAK_NG_API int utf8_in(int *c, const char *buf); |
| 45 |
int utf8_in2(int *c, const char *buf, int backwards); |
| 46 |
int utf8_out(unsigned int c, char *buf); |
| 47 |
|
| 48 |
#ifdef __cplusplus |
| 49 |
|
| 50 |
#endif |
| 51 |
|
| 52 |
#endif // SPEECH_H |