Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

platform.h

00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 1997-2001, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *
00009 *  FILE NAME : platform.h
00010 *
00011 *   Date        Name        Description
00012 *   05/13/98    nos         Creation (content moved here from ptypes.h).
00013 *   03/02/99    stephen     Added AS400 support.
00014 *   03/30/99    stephen     Added Linux support.
00015 *   04/13/99    stephen     Reworked for autoconf.
00016 *******************************************************************************
00017 */
00018 
00019 /* Define the platform we're on. */
00020 #ifndef U_LINUX
00021 #define U_LINUX
00022 #endif
00023 
00024 /* Define whether inttypes.h is available */
00025 #ifndef U_HAVE_INTTYPES_H
00026 #define U_HAVE_INTTYPES_H 1
00027 #endif
00028 
00029 /*
00030  * Define what support for C++ streams is available.
00031  *     If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
00032  * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
00033  * one should qualify streams using the std namespace in ICU header
00034  * files.
00035  *     If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
00036  * available instead (198506 is the date when Stroustrup published
00037  * "An Extensible I/O Facility for C++" at the summer USENIX conference).
00038  *     If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
00039  * support for them will be silently suppressed in ICU.
00040  *
00041  */
00042 
00043 #ifndef U_IOSTREAM_SOURCE
00044 #define U_IOSTREAM_SOURCE 199711
00045 #endif
00046 
00047 /* Determines whether specific types are available */
00048 #ifndef U_HAVE_INT8_T
00049 #define U_HAVE_INT8_T 1
00050 #endif
00051 
00052 #ifndef U_HAVE_UINT8_T
00053 #define U_HAVE_UINT8_T 0
00054 #endif
00055 
00056 #ifndef U_HAVE_INT16_T
00057 #define U_HAVE_INT16_T 1
00058 #endif
00059 
00060 #ifndef U_HAVE_UINT16_T
00061 #define U_HAVE_UINT16_T 0
00062 #endif
00063 
00064 #ifndef U_HAVE_INT32_T
00065 #define U_HAVE_INT32_T 1
00066 #endif
00067 
00068 #ifndef U_HAVE_UINT32_T
00069 #define U_HAVE_UINT32_T 0
00070 #endif
00071 
00072 #ifndef U_HAVE_INT64_T
00073 #define U_HAVE_INT64_T 1
00074 #endif
00075 
00076 #ifndef U_HAVE_UINT64_T
00077 #define U_HAVE_UINT64_T 0
00078 #endif
00079 
00080 
00081 /* Define whether namespace is supported */
00082 #ifndef U_HAVE_NAMESPACE
00083 #define U_HAVE_NAMESPACE 1
00084 #endif
00085 
00086 /* Determines the endianness of the platform */
00087 #define U_IS_BIG_ENDIAN 0
00088 
00089 /* 1 or 0 to enable or disable threads.  If undefined, default is: enable threads. */
00090 #define ICU_USE_THREADS 1
00091 
00092 /* Determine whether to disable renaming or not. This overrides the
00093    setting in umachine.h which is for all platforms. */
00094 #ifndef U_DISABLE_RENAMING
00095 #define U_DISABLE_RENAMING 0
00096 #endif
00097 
00098 /* Define the library suffix in a C syntax. */
00099 #define U_HAVE_ICU_LIBRARY_SUFFIX_NAME 0
00100 #if U_HAVE_ICU_LIBRARY_SUFFIX_NAME
00101 #define U_ICU_LIBRARY_SUFFIX_C_NAME 
00102 #endif
00103 
00104 /*===========================================================================*/
00105 /* Platform/Language determination                                           */
00106 /*===========================================================================*/
00107 
00108 #ifdef macintosh
00109 #ifdef XP_MAC
00110 #undef XP_MAC
00111 #endif
00112 #define XP_MAC 1
00113 #include <string.h>
00114 #endif
00115 
00116 /*===========================================================================*/
00117 /* Generic data types                                                        */
00118 /*===========================================================================*/
00119 
00120 /* If your platform does not have the <inttypes.h> header, you may
00121    need to edit the typedefs below. */
00122 #if U_HAVE_INTTYPES_H
00123 
00124 #include <inttypes.h>
00125 /* autoconf 2.13 sometimes can't properly find uint8_t, so we depend on <inttypes.h>. */
00126 /* os/390 on the other hand, never defines int8_t in <inttypes.h>. */
00127 /* So we have this work around */
00128 #ifdef OS390
00129 #if ! U_HAVE_INT8_T
00130 typedef signed char int8_t;
00131 #endif
00132 #if ! U_HAVE_UINT8_T
00133 typedef unsigned char uint8_t;
00134 #endif
00135 #endif /* OS390 */
00136 
00137 #else /* U_HAVE_INTTYPES_H */
00138 
00139 #include <sys/types.h>
00140 #if STDC_HEADERS
00141s> getErrorIndex(void) const;
00121 
00122 private:
00129     UTextOffset index;
00130 
00134     UTextOffset errorIndex;
00135 };
00136 
00137 inline ParsePosition&
00138 ParsePosition::operator=(const ParsePosition& copy)
00139 {
00140   index = copy.index;
00141   errorIndex = copy.errorIndex;
00142   return *this;
00143 }
00144 
00145 inline UBool
00146 ParsePosition::operator==(const ParsePosition& copy) const
00147 {
00148   if(index != copy.index || errorIndex != copy.errorIndex)
00149   return FALSE;
00150   else
00151   return TRUE;
00152 }
00153 
00154 inline UBool
00155 ParsePosition::operator!=(const ParsePosition& copy) const
00156 {
00157   return !operator==(copy);
00158 }
00159 
00160 inline UTextOffset
00161 ParsePosition::getIndex() const
00162 {
00163   return index;
00164 }
00165 
00166 inline void
00167 ParsePosition::setIndex(UTextOffset offset)
00168 {
00169   this->index = offset;
00170 }
00171 
00172 inline UTextOffset
00173 ParsePosition::getErrorIndex() const
00174 {
00175   return errorIndex;
00176 }
00177 
00178 inline void
00179 ParsePosition::setErrorIndex(UTextOffset ei)
00180 {
00181   this->errorIndex = ei;
00182 }
00183 U_NAMESPACE_END
00184 
00185 #endif

Generated on Sun Mar 3 16:06:48 2002 for ICU 2.0 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002
./usr/share/doc/icu-doc/html/platform_8h-source.html0100644000000000000000000004720307440531314021277 0ustar rootroot platform.h Source File
Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

platform.h

00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 1997-2001, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *
00009 *  FILE NAME : platform.h
00010 *
00011 *   Date        Name        Description
00012 *   05/13/98    nos         Creation (content moved here from ptypes.h).
00013 *   03/02/99    stephen     Added AS400 support.
00014 *   03/30/99    stephen     Added Linux support.
00015 *   04/13/99    stephen     Reworked for autoconf.
00016 *******************************************************************************
00017 */
00018 
00019 /* Define the platform we're on. */
00020 #ifndef U_LINUX
00021 #define U_LINUX
00022 #endif
00023 
00024 /* Define whether inttypes.h is available */
00025 #ifndef U_HAVE_INTTYPES_H
00026 #define U_HAVE_INTTYPES_H 1
00027 #endif
00028 
00029 /*
00030  * Define what support for C++ streams is available.
00031  *     If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
00032  * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
00033  * one should qualify streams using the std namespace in ICU header
00034  * files.
00035  *     If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
00036  * available instead (198506 is the date when Stroustrup published
00037  * "An Extensible I/O Facility for C++" at the summer USENIX conference).
00038  *     If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
00039