/native/external/espeak/platforms/dos/SPEECH.H
C++ Header | 95 lines | 50 code | 23 blank | 22 comment | 2 complexity | ddf286488b7aaf0efd2b769ef55cee95 MD5 | raw file
1/*************************************************************************** 2 * Copyright (C) 2005 to 2007 by Jonathan Duddington * 3 * email: jonsd@users.sourceforge.net * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 3 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write see: * 17 * <http://www.gnu.org/licenses/>. * 18 ***************************************************************************/ 19 20 21#include <sys/types.h> 22 23// conditional compilation options 24 25#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN 26#define ARCH_BIG 27#endif 28 29#define PLATFORM_DOS 30#define NEED_WCHAR_FUNCTIONS 31#define NEED_GETOPT 32typedef unsigned int uint32_t; 33 34#define PATHSEP '\\' 35//#define USE_PORTAUDIO 36#define USE_NANOSLEEP 37#define __cdecl 38#define ESPEAK_API extern "C" 39 40#ifdef LIBRARY 41#define USE_ASYNC 42//#define USE_MBROLA_LIB 43#endif 44 45#ifdef _ESPEAKEDIT 46#define USE_ASYNC 47#define LOG_FRAMES // write keyframe info to log-espeakedit 48#endif 49 50// will look for espeak_data directory here, and also in user's home directory 51#ifndef PATH_ESPEAK_DATA 52 #define PATH_ESPEAK_DATA "/usr/share/espeak-data" 53#endif 54 55 56#ifdef PLATFORM_DOS 57int iswalpha(int c); 58int iswdigit(int c); 59int iswalnum(int c); 60int towlower(int c); 61int iswupper(int c); 62int iswlower(int c); 63int iswspace(int c); 64int iswpunct(int c); 65const wchar_t *wcschr(const wchar_t *str, int c); 66const int wcslen(const wchar_t *str); 67float wcstod(const wchar_t *str, wchar_t **tailptr); 68int towupper(int c); 69#endif 70 71 72 73typedef unsigned short USHORT; 74typedef unsigned char UCHAR; 75typedef double DOUBLEX; 76 77 78 79 80typedef struct { 81 const char *mnem; 82 int value; 83} MNEM_TAB; 84int LookupMnem(MNEM_TAB *table, char *string); 85 86 87 88#define N_PATH_HOME 120 89extern char path_home[N_PATH_HOME]; // this is the espeak-data directory 90 91extern void strncpy0(char *to,const char *from, int size); 92int GetFileLength(const char *filename); 93char *Alloc(int size); 94void Free(void *ptr); 95