TCTypes.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef _TCBASE_TYPES_H_
00036 #define _TCBASE_TYPES_H_
00037
00038 #include "TCDefines.h"
00039
00040 namespace TC
00041 {
00055 typedef char sint8;
00057 typedef short sint16;
00059 typedef int sint32;
00060 #ifdef _MSC_VER
00061
00062 typedef __int64 sint64;
00063 #else
00064 # ifdef TCOS_64
00065
00066 typedef long sint64;
00067 # else
00068
00069 typedef long long sint64;
00070 # endif
00071 #endif
00072
00074 typedef unsigned char uint8;
00076 typedef unsigned short uint16;
00078 typedef unsigned int uint32;
00079 #ifdef _MSC_VER
00080
00081 typedef unsigned __int64 uint64;
00082 #else
00083 # ifdef TCOS_64
00084
00085 typedef unsigned long uint64;
00086 # else
00087
00088 typedef unsigned long long uint64;
00089 # endif
00090 #endif
00091
00092
00093
00094
00095
00097 typedef unsigned char uchar;
00098
00099 }
00100
00101 #ifdef TCHAVE_NO_BOOL
00102
00108 enum bool
00109 {
00111 true=1,
00113 false=0
00114 };
00115 #endif // TCHAVE_NO_BOOL
00116
00121 #ifdef _MSC_VER
00122 # if _MSC_VER < 1400
00123 # define TC_OWN_STD_DEFINE
00124 # endif
00125 #endif
00126
00127 #ifdef TC_OWN_STD_DEFINE
00128 #include <stddef.h>
00129 #include <stdio.h>
00130 #include <stdlib.h>
00131 #include <string.h>
00132 #include <ctype.h>
00133 namespace std
00134 {
00135 using ::size_t;
00136
00137 using ::strlen;
00138 using ::strcmp;
00139 using ::strcpy;
00140 using ::strrchr;
00141 using ::snprintf;
00142
00143 using ::memcpy;
00144 using ::memset;
00145
00146 using ::isprint;
00147 using ::toupper;
00148 using ::tolower;
00149 using ::isalpha;
00150 using ::sscanf;
00151
00152 using ::FILE;
00153 using ::fopen;
00154 using ::fclose;
00155 using ::fread;
00156 using ::fwrite;
00157 using ::fflush;
00158 using ::feof;
00159
00160 using ::getc;
00161 }
00162 #undef feof
00163 #undef getc
00164
00165 #endif
00166
00167 #endif // _TCBASE_TYPES_H_