OS_NS_wchar.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   OS_NS_wchar.h
00006  *
00007  *  OS_NS_wchar.h,v 1.7 2005/10/28 16:14:54 ossama Exp
00008  *
00009  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00010  *  @author Jesper S. M|ller<stophph@diku.dk>
00011  *  @author and a cast of thousands...
00012  *
00013  *  Originally in OS.h.
00014  */
00015 //=============================================================================
00016 
00017 #ifndef ACE_OS_NS_WCHAR_H
00018 # define ACE_OS_NS_WCHAR_H
00019 
00020 # include /**/ "ace/pre.h"
00021 
00022 # include "ace/config-all.h"
00023 
00024 # if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 #  pragma once
00026 # endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "ace/os_include/os_wchar.h"
00029 #include "ace/Basic_Types.h"
00030 #include "ace/ACE_export.h"
00031 #include "ace/ace_wchar.h" // include for the time being, but this code needs to be moved.  dhinton
00032 
00033 #include "ace/os_include/os_errno.h"
00034 
00035 #if defined (ACE_EXPORT_MACRO)
00036 #  undef ACE_EXPORT_MACRO
00037 #endif
00038 #define ACE_EXPORT_MACRO ACE_Export
00039 
00040 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00041 
00042 namespace ACE_OS
00043 {
00044 
00045   typedef ACE_WCHAR_T WChar;
00046 
00047 #if defined (ACE_HAS_WCHAR)
00048   ACE_NAMESPACE_INLINE_FUNCTION
00049   wint_t fgetwc (FILE* fp);
00050 #endif /* ACE_HAS_WCHAR */
00051 
00052 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT)
00053   /// Emulated wcscat - Appends a string.
00054   extern ACE_Export
00055   wchar_t *wcscat_emulation (wchar_t *destination,
00056                                     const wchar_t *source);
00057 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCAT */
00058 
00059 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR)
00060   /// Emulated wcschr - Finds a character in a string.
00061   extern ACE_Export
00062   wchar_t *wcschr_emulation (const wchar_t *string, wint_t c);
00063 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCHR */
00064 
00065 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP)
00066   /// Emulated wcscmp - Compares strings.
00067   extern ACE_Export
00068   int wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2);
00069 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCMP */
00070 
00071 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY)
00072   /// Emulated wcscpy - Copies a string.
00073   extern ACE_Export
00074   wchar_t *wcscpy_emulation (wchar_t *destination,
00075                              const wchar_t *source);
00076 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCPY */
00077 
00078 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN)
00079   /// Emulated wcscspn.
00080   extern ACE_Export
00081   size_t wcscspn_emulation (const wchar_t *string,
00082                             const wchar_t *reject);
00083 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSCSPN */
00084 
00085 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP)
00086   /// Emulated wcsicmp - Performs a case insensitive comparison of strings.
00087   extern ACE_Export
00088   int wcsicmp_emulation (const wchar_t *string1,
00089                          const wchar_t *string2);
00090 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSICMP */
00091 
00092 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN)
00093   /// Emulated wcslen - Returns the length of a string.
00094   extern ACE_Export
00095   size_t wcslen_emulation (const ACE_WCHAR_T *string);
00096 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSLEN */
00097 
00098 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT)
00099   /// Emulated wcscat - Appends a string.
00100   extern ACE_Export
00101   ACE_WCHAR_T *wcsncat_emulation (ACE_WCHAR_T *destination,
00102                                   const ACE_WCHAR_T *source,
00103                                   size_t count);
00104 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSCAT */
00105 
00106 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP)
00107   /// Emulated wcsncmp - Compares two arrays.
00108   extern ACE_Export
00109   int wcsncmp_emulation (const ACE_WCHAR_T *string1,
00110                          const ACE_WCHAR_T *string2,
00111                          size_t len);
00112 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCMP */
00113 
00114 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY)
00115   /// Emulated wcsncpy - Copies an array.
00116   extern ACE_Export
00117   ACE_WCHAR_T *wcsncpy_emulation (ACE_WCHAR_T *destination,
00118                                   const ACE_WCHAR_T *source,
00119                                   size_t len);
00120 #endif /* !ACE_HAS_WCHAR || ACE_LACKS_WCSNCPY */
00121 
00122 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP)
00123   /// Emulated wcsnicmp - Performs a case insensitive comparison of two
00124   /// arrays
00125   extern ACE_Export
00126   int wcsnicmp_emulation (const wchar_t *string1,
00127                           const wchar_t *string2,
00128                           size_t len);
00129 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSNICMP */
00130 
00131 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK)
00132   /// Emulated wcspbrk - Searches for characters in a string.
00133   extern ACE_Export
00134   wchar_t *wcspbrk_emulation (const wchar_t *string,
00135                               const wchar_t *charset);
00136 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSPBRK */
00137 
00138 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR)
00139   /// Emulated wcsrchr (wchar_t version) - Finds the last occurance of a
00140   /// character in a string.
00141   extern ACE_Export
00142   wchar_t *wcsrchr_emulation (wchar_t *string, wint_t c);
00143 
00144   /// Emulated wcsrchr (const wchar_t version) - Finds the last occurance of a
00145   /// character in a string.
00146   extern ACE_Export
00147   const wchar_t *wcsrchr_emulation (const wchar_t *string, wint_t c);
00148 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSRCHR */
00149 
00150 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN)
00151   /// Emulated wcsspn.
00152   extern ACE_Export
00153   size_t wcsspn_emulation (const wchar_t *string,
00154                            const wchar_t *charset);
00155 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSPN */
00156 
00157 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR)
00158   /// Emulated wcsstr - Performs a case insensitive comparison of two strings.
00159   extern ACE_Export
00160   wchar_t *wcsstr_emulation (const wchar_t *string,
00161                              const wchar_t *charset);
00162 #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSTR */
00163 
00164   // these are named wrong.  should be wcslen, etc... dhinton
00165   ACE_NAMESPACE_INLINE_FUNCTION
00166   u_int wslen (const WChar *);
00167 
00168   ACE_NAMESPACE_INLINE_FUNCTION
00169   WChar *wscpy (WChar *,
00170                 const WChar *);
00171 
00172   ACE_NAMESPACE_INLINE_FUNCTION
00173   int wscmp (const WChar *,
00174              const WChar *);
00175 
00176   ACE_NAMESPACE_INLINE_FUNCTION
00177   int wsncmp (const WChar *,
00178               const WChar *,
00179               size_t len);
00180 
00181 #if defined (ACE_HAS_WCHAR)
00182   ACE_NAMESPACE_INLINE_FUNCTION
00183   wint_t ungetwc (wint_t c, FILE* fp);
00184 #endif /* ACE_HAS_WCHAR */
00185 
00186 } /* namespace ACE_OS */
00187 
00188 ACE_END_VERSIONED_NAMESPACE_DECL
00189 
00190 # if defined (ACE_HAS_INLINED_OSCALLS)
00191 #   if defined (ACE_INLINE)
00192 #     undef ACE_INLINE
00193 #   endif /* ACE_INLINE */
00194 #   define ACE_INLINE inline
00195 #   include "ace/OS_NS_wchar.inl"
00196 # endif /* ACE_HAS_INLINED_OSCALLS */
00197 
00198 # include /**/ "ace/post.h"
00199 #endif /* ACE_OS_NS_STDIO_H */

Generated on Thu Nov 9 09:41:58 2006 for ACE by doxygen 1.3.6