1 /** 2 * Yudit Unicode Editor Source File 3 * 4 * GNU Copyright (C) 1997-2006 Gaspar Sinai <gaspar@yudit.org> 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, version 2, 8 * dated June 1991. See file COPYYING for details. 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 to the Free Software 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 20 #ifndef STypes_h 21 #define STypes_h 22 23 #define SD_YUDIT_VERSION "3.0.7" 24 25 // Get the SS_WORD16_t and u_int_32 26 #include <sys/types.h> 27 #include "stoolkit/SBinVector.h" 28 #include "stoolkit/SStringVector.h" 29 30 #ifdef HAVE_UTYPES 31 typedef u_int8_t SS_WORD8; 32 typedef u_int16_t SS_WORD16; 33 typedef u_int32_t SS_WORD32; 34 typedef int32_t SS_SINT_32 35 typedef int16_t SS_SINT_16 36 37 #ifdef HAVE_LONG_LONG 38 typedef u_int64_t SS_WORD64; 39 #else /* HAVE_LONG_LONG */ 40 typedef u_int32_t SS_WORD64; 41 #endif /* HAVE_LONG_LONG */ 42 43 #else /* HAVE_UTYPES */ 44 typedef unsigned char SS_WORD8; 45 typedef unsigned short SS_WORD16; 46 typedef unsigned int SS_WORD32; 47 typedef int SS_SINT_32; 48 typedef short SS_SINT_16; 49 50 #ifdef HAVE_LONG_LONG 51 typedef unsigned long long SS_WORD64; 52 #else /* HAVE_LONG_LONG */ 53 typedef unsigned long SS_WORD64; 54 #endif /* HAVE_LONG_LONG */ 55 56 #endif /* HAVE_UTYPES */ 57 58 typedef SS_WORD16 SS_UCS2; 59 typedef SS_WORD32 SS_UCS4; 60 61 typedef SBinVector<SS_UCS2> SV_UCS2; 62 typedef SBinVector<SS_UCS4> SV_UCS4; 63 64 /* processors calcualte with intergers fast */ 65 typedef unsigned int SS_UINT; 66 typedef int SS_INT; 67 68 typedef SBinVector<SS_UINT> SV_UINT; 69 typedef SBinVector<SS_INT> SV_INT; 70 71 /* 72 * SStringVector column0 = SStringTable[0]; 73 */ 74 typedef SVector<SStringVector> SStringTable; 75 76 typedef int SAlignment; 77 78 typedef SS_WORD16 SS_GlyphIndex; 79 typedef SBinVector<SS_GlyphIndex> SV_GlyphIndex; 80 81 typedef SBinVector<int> SSyntaxRow; 82 typedef SBinVector<SSyntaxRow*> SSyntaxData; 83 typedef SBinVector<SV_UCS4*> SUnicodeData; 84 85 #define SD_Left ((SAlignment)-1) 86 #define SD_Right ((SAlignment)1) 87 #define SD_Center ((SAlignment)0) 88 89 /* char can be only positive on some platforms */ 90 #define SD_NOSHAPE ((char)0x7f) 91 92 /* This many lines are pre-expanded around cursor, for efficiencey */ 93 #define SD_PRE_EXPAND 50 94 #define DEBUG_PARSER 0 95 96 #define SD_MATCH_EOD 0x7ffffff 97 // to provide timer based solution 98 #define SD_MATCH_AGAIN 0x7fffffe 99 100 101 #endif /* STypes_h */ 102