Main Page | Modules | File List

cxtypes.h

00001 /* $Id: cxtypes.h.top,v 1.3 2006/06/12 09:54:44 rpalsa Exp $
00002  *
00003  * This file is part of the ESO C Extension Library
00004  * Copyright (C) 2001-2006 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 /*
00022  * This is a generated file. All changes to this file might be lost!
00023  */
00024 
00025 #ifndef _CX_TYPES_H
00026 #define _CX_TYPES_H
00027 
00028 #include <limits.h>
00029 #include <float.h>
00030 
00031 #include <cxmacros.h>
00032 
00033 CX_BEGIN_DECLS
00034 
00035 /*
00036  * Some mathematical constants. Some strict ISO C implementations
00037  * don't provide them as symbols.
00038  */
00039 
00040 #define CX_E     2.7182818284590452354e0
00041 #define CX_LN2   6.9314718055994530942e-1
00042 #define CX_LN10  2.3025850929940456840e0
00043 #define CX_PI    3.14159265358979323846e0
00044 #define CX_PI_2  1.57079632679489661923e0
00045 #define CX_PI_4  0.78539816339744830962e0
00046 #define CX_SQRT2 1.4142135623730950488e0
00047 
00048 
00049 /*
00050  * Limits for numerical data types
00051  */
00052 
00053 #define CX_MINSHORT  SHRT_MIN
00054 #define CX_MAXSHORT  SHRT_MAX
00055 #define CX_MAXUSHORT USHRT_MAX
00056 #define CX_MININT    INT_MIN
00057 #define CX_MAXINT    INT_MAX
00058 #define CX_MAXUINT   UINT_MAX
00059 #define CX_MINLONG   LONG_MIN
00060 #define CX_MAXLONG   LONG_MAX
00061 #define CX_MAXULONG  ULONG_MAX
00062 
00063 #define CX_MINFLOAT  FLT_MIN
00064 #define CX_MAXFLOAT  FLT_MAX
00065 #define CX_MINDOUBLE DBL_MIN
00066 #define CX_MAXDOUBLE DBL_MAX
00067 
00068 
00069 #define CX_MININT64  ((cxint64)  0x8000000000000000)
00070 #define CX_MAXINT64  ((cxint64)  0x7fffffffffffffff)
00071 #define CX_MAXUINT64 ((cxuint64) 0xffffffffffffffff)
00072 
00073 
00074 /*
00075  * Sized types
00076  */
00077 
00078 typedef signed char cxint8;
00079 typedef unsigned char cxuint8;
00080 typedef signed short cxint16;
00081 typedef unsigned short cxuint16;
00082 typedef signed int cxint32;
00083 typedef unsigned int cxuint32;
00084 
00085 
00086 CX_GNUC_EXTENSION typedef signed long long cxint64;
00087 CX_GNUC_EXTENSION typedef unsigned long long cxuint64;
00088 
00089 typedef cxint32 cxssize;
00090 typedef cxuint32 cxsize;
00091 
00092 /*
00093  * For completeness: Definitions for standard types
00094  */
00095 
00096 typedef char cxchar;
00097 typedef short cxshort;
00098 typedef int cxint;
00099 typedef long cxlong;
00100 
00101 typedef unsigned char cxbyte;
00102 
00103 typedef unsigned char cxuchar;
00104 typedef unsigned short cxushort;
00105 typedef unsigned int cxuint;
00106 typedef unsigned long cxulong;
00107 
00108 typedef float cxfloat;
00109 typedef double cxdouble;
00110 
00111 typedef void * cxptr;
00112 typedef const void * cxcptr;
00113 
00114 typedef int cxbool;
00115 
00116 
00117 /*
00118  * Generic, frequently used types.
00119  */
00120 
00121 typedef cxint (*cx_compare_func) (cxcptr a, cxcptr b);
00122 typedef cxint (*cx_compare_data_func) (cxcptr a, cxcptr b, cxptr data);
00123 
00124 typedef cxbool (*cx_equal_func) (cxcptr a, cxcptr b);
00125 
00126 typedef void (*cx_free_func) (cxptr data);
00127 
00128 CX_END_DECLS
00129 
00130 #endif /* _CX_TYPES_H */

Generated on Sat Mar 24 01:33:08 2007 for C Standard Library Extensions by  doxygen 1.3.9.1