00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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
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"
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
00051
00052 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT)
00053
00054 extern ACE_Export
00055 wchar_t *wcscat_emulation (wchar_t *destination,
00056 const wchar_t *source);
00057 #endif
00058
00059 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCHR)
00060
00061 extern ACE_Export
00062 wchar_t *wcschr_emulation (const wchar_t *string, wint_t c);
00063 #endif
00064
00065 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSCMP)
00066
00067 extern ACE_Export
00068 int wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2);
00069 #endif
00070
00071 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCPY)
00072
00073 extern ACE_Export
00074 wchar_t *wcscpy_emulation (wchar_t *destination,
00075 const wchar_t *source);
00076 #endif
00077
00078 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCSPN)
00079
00080 extern ACE_Export
00081 size_t wcscspn_emulation (const wchar_t *string,
00082 const wchar_t *reject);
00083 #endif
00084
00085 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSICMP)
00086
00087 extern ACE_Export
00088 int wcsicmp_emulation (const wchar_t *string1,
00089 const wchar_t *string2);
00090 #endif
00091
00092 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSLEN)
00093
00094 extern ACE_Export
00095 size_t wcslen_emulation (const ACE_WCHAR_T *string);
00096 #endif
00097
00098 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCAT)
00099
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
00105
00106 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCMP)
00107
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
00113
00114 #if !defined (ACE_HAS_WCHAR) || defined (ACE_LACKS_WCSNCPY)
00115
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
00121
00122 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSNICMP)
00123
00124
00125 extern ACE_Export
00126 int wcsnicmp_emulation (const wchar_t *string1,
00127 const wchar_t *string2,
00128 size_t len);
00129 #endif
00130
00131 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSPBRK)
00132
00133 extern ACE_Export
00134 wchar_t *wcspbrk_emulation (const wchar_t *string,
00135 const wchar_t *charset);
00136 #endif
00137
00138 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSRCHR)
00139
00140
00141 extern ACE_Export
00142 wchar_t *wcsrchr_emulation (wchar_t *string, wint_t c);
00143
00144
00145
00146 extern ACE_Export
00147 const wchar_t *wcsrchr_emulation (const wchar_t *string, wint_t c);
00148 #endif
00149
00150 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSPN)
00151
00152 extern ACE_Export
00153 size_t wcsspn_emulation (const wchar_t *string,
00154 const wchar_t *charset);
00155 #endif
00156
00157 #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSSTR)
00158
00159 extern ACE_Export
00160 wchar_t *wcsstr_emulation (const wchar_t *string,
00161 const wchar_t *charset);
00162 #endif
00163
00164
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
00185
00186 }
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
00194 # define ACE_INLINE inline
00195 # include "ace/OS_NS_wchar.inl"
00196 # endif
00197
00198 # include "ace/post.h"
00199 #endif