00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ACE_OS_NS_STRING_H
00018 #define ACE_OS_NS_STRING_H
00019
00020 # include "ace/pre.h"
00021
00022 # include "ace/config-lite.h"
00023
00024 # if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 # endif
00027
00028 #include "ace/Basic_Types.h"
00029
00030 #include "ace/ACE_export.h"
00031
00032 #if defined (ACE_EXPORT_MACRO)
00033 # undef ACE_EXPORT_MACRO
00034 #endif
00035 #define ACE_EXPORT_MACRO ACE_Export
00036
00037 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00038
00039 namespace ACE_OS {
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 ACE_NAMESPACE_INLINE_FUNCTION
00052 const void *memchr (const void *s, int c, size_t len);
00053
00054
00055 ACE_NAMESPACE_INLINE_FUNCTION
00056 void *memchr (void *s, int c, size_t len);
00057
00058 #if defined (ACE_LACKS_MEMCHR)
00059
00060 extern ACE_Export
00061 const void *memchr_emulation (const void *s, int c, size_t len);
00062 #endif
00063
00064
00065 ACE_NAMESPACE_INLINE_FUNCTION
00066 int memcmp (const void *t, const void *s, size_t len);
00067
00068
00069 ACE_NAMESPACE_INLINE_FUNCTION
00070 void *memcpy (void *t, const void *s, size_t len);
00071
00072 #if defined (ACE_HAS_MEMCPY_LOOP_UNROLL)
00073
00074
00075
00076
00077
00078 extern ACE_Export
00079 void *fast_memcpy (void *t, const void *s, size_t len);
00080 #endif
00081
00082
00083 ACE_NAMESPACE_INLINE_FUNCTION
00084 void *memmove (void *t, const void *s, size_t len);
00085
00086
00087 ACE_NAMESPACE_INLINE_FUNCTION
00088 void *memset (void *s, int c, size_t len);
00089
00090
00091 ACE_NAMESPACE_INLINE_FUNCTION
00092 char *strcat (char *s, const char *t);
00093
00094 #if defined (ACE_HAS_WCHAR)
00095
00096 ACE_NAMESPACE_INLINE_FUNCTION
00097 wchar_t *strcat (wchar_t *s, const wchar_t *t);
00098 #endif
00099
00100
00101
00102 ACE_NAMESPACE_INLINE_FUNCTION
00103 const char *strchr (const char *s, int c);
00104
00105 #if defined (ACE_HAS_WCHAR)
00106
00107
00108 ACE_NAMESPACE_INLINE_FUNCTION
00109 const wchar_t *strchr (const wchar_t *s, wchar_t c);
00110 #endif
00111
00112
00113 ACE_NAMESPACE_INLINE_FUNCTION
00114 char *strchr (char *s, int c);
00115
00116 #if defined (ACE_HAS_WCHAR)
00117
00118 ACE_NAMESPACE_INLINE_FUNCTION
00119 wchar_t *strchr (wchar_t *s, wchar_t c);
00120 #endif
00121
00122
00123 ACE_NAMESPACE_INLINE_FUNCTION
00124 int strcmp (const char *s, const char *t);
00125
00126
00127 ACE_NAMESPACE_INLINE_FUNCTION
00128 int strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t);
00129
00130
00131 ACE_NAMESPACE_INLINE_FUNCTION
00132 char *strcpy (char *s, const char *t);
00133
00134 #if defined (ACE_HAS_WCHAR)
00135
00136 ACE_NAMESPACE_INLINE_FUNCTION
00137 wchar_t *strcpy (wchar_t *s, const wchar_t *t);
00138 #endif
00139
00140
00141
00142 ACE_NAMESPACE_INLINE_FUNCTION
00143 size_t strcspn (const char *s, const char *reject);
00144
00145 #if defined (ACE_HAS_WCHAR)
00146
00147
00148 ACE_NAMESPACE_INLINE_FUNCTION
00149 size_t strcspn (const wchar_t *s, const wchar_t *reject);
00150 #endif
00151
00152
00153 ACE_NAMESPACE_INLINE_FUNCTION
00154 char *strdup (const char *s);
00155
00156 #if (defined (ACE_LACKS_STRDUP) && !defined(ACE_STRDUP_EQUIVALENT)) \
00157 || defined (ACE_HAS_STRDUP_EMULATION)
00158 extern ACE_Export
00159 char *strdup_emulation (const char *s);
00160 #endif
00161
00162 #if defined (ACE_HAS_WCHAR)
00163
00164 ACE_NAMESPACE_INLINE_FUNCTION
00165 wchar_t *strdup (const wchar_t *s);
00166
00167 #if (defined (ACE_LACKS_WCSDUP) && !defined(ACE_WCSDUP_EQUIVALENT)) \
00168 || defined (ACE_HAS_WCSDUP_EMULATION)
00169 extern ACE_Export
00170 wchar_t *strdup_emulation (const wchar_t *s);
00171 #endif
00172 #endif
00173
00174
00175
00176 extern ACE_Export
00177 char *strecpy (char *des, const char *src);
00178
00179 #if defined (ACE_HAS_WCHAR)
00180
00181
00182 extern ACE_Export
00183 wchar_t *strecpy (wchar_t *s, const wchar_t *t);
00184 #endif
00185
00186
00187
00188
00189 extern ACE_Export
00190 char *strerror (int errnum);
00191
00192 #if defined (ACE_LACKS_STRERROR)
00193
00194 extern ACE_Export
00195 char *strerror_emulation (int errnum);
00196 #endif
00197
00198
00199
00200
00201
00202
00203 extern ACE_Export
00204 char *strsignal (int signum);
00205
00206
00207 ACE_NAMESPACE_INLINE_FUNCTION
00208 size_t strlen (const char *s);
00209
00210
00211 ACE_NAMESPACE_INLINE_FUNCTION
00212 size_t strlen (const ACE_WCHAR_T *s);
00213
00214
00215 ACE_NAMESPACE_INLINE_FUNCTION
00216 char *strncat (char *s, const char *t, size_t len);
00217
00218
00219 ACE_NAMESPACE_INLINE_FUNCTION
00220 ACE_WCHAR_T *strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00221
00222
00223
00224 extern ACE_Export
00225 const char *strnchr (const char *s, int c, size_t len);
00226
00227
00228
00229 extern ACE_Export
00230 const ACE_WCHAR_T *strnchr (const ACE_WCHAR_T *s, ACE_WCHAR_T c, size_t len);
00231
00232
00233 ACE_NAMESPACE_INLINE_FUNCTION
00234 char *strnchr (char *s, int c, size_t len);
00235
00236
00237 ACE_NAMESPACE_INLINE_FUNCTION
00238 ACE_WCHAR_T *strnchr (ACE_WCHAR_T *s, ACE_WCHAR_T c, size_t len);
00239
00240
00241 ACE_NAMESPACE_INLINE_FUNCTION
00242 int strncmp (const char *s, const char *t, size_t len);
00243
00244
00245 ACE_NAMESPACE_INLINE_FUNCTION
00246 int strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00247
00248
00249 ACE_NAMESPACE_INLINE_FUNCTION
00250 char *strncpy (char *s, const char *t, size_t len);
00251
00252
00253 ACE_NAMESPACE_INLINE_FUNCTION
00254 ACE_WCHAR_T *strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265 ACE_NAMESPACE_INLINE_FUNCTION
00266 size_t strnlen (const char *s, size_t maxlen);
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277 ACE_NAMESPACE_INLINE_FUNCTION
00278 size_t strnlen (const ACE_WCHAR_T *s, size_t maxlen);
00279
00280
00281
00282 extern ACE_Export
00283 const char *strnstr (const char *s, const char *t, size_t len);
00284
00285
00286
00287 extern ACE_Export
00288 const ACE_WCHAR_T *strnstr (const ACE_WCHAR_T *s,
00289 const ACE_WCHAR_T *t,
00290 size_t len);
00291
00292
00293 ACE_NAMESPACE_INLINE_FUNCTION
00294 char *strnstr (char *s, const char *t, size_t len);
00295
00296
00297 ACE_NAMESPACE_INLINE_FUNCTION
00298 ACE_WCHAR_T *strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len);
00299
00300
00301 ACE_NAMESPACE_INLINE_FUNCTION
00302 const char *strpbrk (const char *s1, const char *s2);
00303
00304 #if defined (ACE_HAS_WCHAR)
00305
00306 ACE_NAMESPACE_INLINE_FUNCTION
00307 const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2);
00308 #endif
00309
00310
00311 ACE_NAMESPACE_INLINE_FUNCTION
00312 char *strpbrk (char *s1, const char *s2);
00313
00314 #if defined (ACE_HAS_WCHAR)
00315
00316 ACE_NAMESPACE_INLINE_FUNCTION
00317 wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2);
00318 #endif
00319
00320
00321
00322 ACE_NAMESPACE_INLINE_FUNCTION
00323 const char *strrchr (const char *s, int c);
00324
00325 #if defined (ACE_HAS_WCHAR)
00326
00327
00328 ACE_NAMESPACE_INLINE_FUNCTION
00329 const wchar_t *strrchr (const wchar_t *s, wchar_t c);
00330 #endif
00331
00332
00333 ACE_NAMESPACE_INLINE_FUNCTION
00334 char *strrchr (char *s, int c);
00335
00336 #if defined (ACE_HAS_WCHAR)
00337
00338 ACE_NAMESPACE_INLINE_FUNCTION
00339 wchar_t *strrchr (wchar_t *s, wchar_t c);
00340 #endif
00341
00342 #if defined (ACE_LACKS_STRRCHR)
00343
00344
00345 extern ACE_Export
00346 char *strrchr_emulation (char *s, int c);
00347
00348
00349
00350 extern ACE_Export
00351 const char *strrchr_emulation (const char *s, int c);
00352 #endif
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370 extern ACE_Export
00371 char *strsncpy (char *dst,
00372 const char *src,
00373 size_t maxlen);
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391 extern ACE_Export
00392 ACE_WCHAR_T *strsncpy (ACE_WCHAR_T *dst,
00393 const ACE_WCHAR_T *src,
00394 size_t maxlen);
00395
00396
00397
00398 ACE_NAMESPACE_INLINE_FUNCTION
00399 size_t strspn (const char *s1, const char *s2);
00400
00401 #if defined (ACE_HAS_WCHAR)
00402
00403
00404 ACE_NAMESPACE_INLINE_FUNCTION
00405 size_t strspn (const wchar_t *s1, const wchar_t *s2);
00406 #endif
00407
00408
00409
00410 ACE_NAMESPACE_INLINE_FUNCTION
00411 const char *strstr (const char *s, const char *t);
00412
00413 #if defined (ACE_HAS_WCHAR)
00414
00415
00416 ACE_NAMESPACE_INLINE_FUNCTION
00417 const wchar_t *strstr (const wchar_t *s, const wchar_t *t);
00418 #endif
00419
00420
00421 ACE_NAMESPACE_INLINE_FUNCTION
00422 char *strstr (char *s, const char *t);
00423
00424 #if defined (ACE_HAS_WCHAR)
00425
00426 ACE_NAMESPACE_INLINE_FUNCTION
00427 wchar_t *strstr (wchar_t *s, const wchar_t *t);
00428 #endif
00429
00430
00431 ACE_NAMESPACE_INLINE_FUNCTION
00432 char *strtok (char *s, const char *tokens);
00433
00434 #if defined (ACE_HAS_WCHAR) && !defined (ACE_LACKS_WCSTOK)
00435
00436 ACE_NAMESPACE_INLINE_FUNCTION
00437 wchar_t *strtok (wchar_t *s, const wchar_t *tokens);
00438 #endif
00439
00440
00441
00442
00443 ACE_NAMESPACE_INLINE_FUNCTION
00444 char *strtok_r (char *s, const char *tokens, char **lasts);
00445
00446 #if defined (ACE_HAS_WCHAR)
00447
00448 ACE_NAMESPACE_INLINE_FUNCTION
00449 wchar_t *strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
00450 #endif // ACE_HAS_WCHAR
00451
00452 #if !defined (ACE_HAS_REENTRANT_FUNCTIONS) || defined (ACE_LACKS_STRTOK_R)
00453
00454 extern ACE_Export
00455 char *strtok_r_emulation (char *s, const char *tokens, char **lasts);
00456 #endif
00457
00458 # if defined (ACE_HAS_WCHAR) && defined(ACE_LACKS_WCSTOK)
00459
00460 extern ACE_Export
00461 wchar_t *strtok_r_emulation (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts);
00462 # endif // ACE_HAS_WCHAR && ACE_LACKS_WCSTOK
00463
00464 }
00465
00466 ACE_END_VERSIONED_NAMESPACE_DECL
00467
00468 # if defined (ACE_HAS_INLINED_OSCALLS)
00469 # if defined (ACE_INLINE)
00470 # undef ACE_INLINE
00471 # endif
00472 # define ACE_INLINE inline
00473 # include "ace/OS_NS_string.inl"
00474 # endif
00475
00476 # include "ace/post.h"
00477 #endif