TCTypes.h

Go to the documentation of this file.
00001 //*******************************************************************************
00002 //
00003 // *******   ***   ***               *
00004 //    *     *     *                  *
00005 //    *    *      *                *****
00006 //    *    *       ***  *   *   **   *    **    ***
00007 //    *    *          *  * *   *     *   ****  * * *
00008 //    *     *         *   *      *   * * *     * * *
00009 //    *      ***   ***    *     **   **   **   *   *
00010 //                        *
00011 //*******************************************************************************
00012 // see http://sourceforge.net/projects/tcsystem/ for details.
00013 // Copyright (C) 2003 - 2008 Thomas Goessler. All Rights Reserved. 
00014 //*******************************************************************************
00015 //
00016 // TCSystem is the legal property of its developers.
00017 // Please refer to the COPYRIGHT file distributed with this source distribution.
00018 // 
00019 // This library is free software; you can redistribute it and/or             
00020 // modify it under the terms of the GNU Lesser General Public                
00021 // License as published by the Free Software Foundation; either              
00022 // version 2.1 of the License, or (at your option) any later version.        
00023 //                                                                           
00024 // This library is distributed in the hope that it will be useful,           
00025 // but WITHOUT ANY WARRANTY; without even the implied warranty of            
00026 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         
00027 // Lesser General Public License for more details.                           
00028 //                                                                           
00029 // You should have received a copy of the GNU Lesser General Public          
00030 // License along with this library; if not, write to the Free Software       
00031 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
00032 //*******************************************************************************
00033 //  $Id: TCTypes.h 801 2008-01-23 19:46:25Z the_____tiger $
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    // typedef for 32bit float does not need to be defined -> is float
00093    // typedef for 64bit float does not need to be defined -> is double
00094    // signed char 8bit does not need to be defined -> is char
00095 
00097    typedef unsigned char uchar;
00098 
00099 } // namespac TC
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_

Copyright (c) Thomas Goessler 2003 - 2008