diff options
author | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-20 20:46:36 +0000 |
---|---|---|
committer | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-20 20:46:36 +0000 |
commit | 7adb177134b918b415ff1db925a7c6b72bdd13d2 (patch) | |
tree | 7bc3755e7f86e08fd35907a5a5d5f84edd69faaa /PACE | |
parent | ef6873d6652af80614b6c018d5f962ca42c0148a (diff) | |
download | ATCD-7adb177134b918b415ff1db925a7c6b72bdd13d2.tar.gz |
ChangeLogTag: Fri Jul 20 15:44:02 2001 Joe Hoffert <joeh@cs.wustl.edu>
Diffstat (limited to 'PACE')
-rw-r--r-- | PACE/ChangeLog | 10 | ||||
-rw-r--r-- | PACE/pace/win32/string.c | 19 | ||||
-rw-r--r-- | PACE/pace/win32/string.h | 4 | ||||
-rw-r--r-- | PACE/pace/win32/string.inl | 6 |
4 files changed, 34 insertions, 5 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog index 92cd9d69a19..6fad6ac23e2 100644 --- a/PACE/ChangeLog +++ b/PACE/ChangeLog @@ -1,3 +1,13 @@ +Fri Jul 20 15:44:02 2001 Joe Hoffert <joeh@cs.wustl.edu> + + * pace/win32/string.h: + + * pace/win32/string.inl (strtok_r): + + * pace/win32/string.c (strtok_r): + Added support for strtok_r. Stole code from ACE_OS_String. + Was causing a problem with the TAO IDL compiler. + Tue Jul 10 10:43:38 2001 Joe Hoffert <joeh@cs.wustl.edu> * Makefile: diff --git a/PACE/pace/win32/string.c b/PACE/pace/win32/string.c index 758fc63094c..1a1ae055728 100644 --- a/PACE/pace/win32/string.c +++ b/PACE/pace/win32/string.c @@ -18,3 +18,22 @@ #if !defined (PACE_HAS_INLINE) # include "pace/win32/string.inl" #endif /* ! PACE_HAS_INLINE */ + +#if (PACE_HAS_POSIX_CLSR_UOF) +char * +strtok_r (char * s, const char * sep, char ** lasts) +{ + if (s == 0) + s = *lasts; + else + *lasts = s; + if (*s == 0) // We have reached the end + return 0; + int l_org = ACE_OS_String::strlen (s); + int l_sub = ACE_OS_String::strlen (s = ::strtok (s, sep)); + *lasts = s + l_sub; + if (l_sub != l_org) + *lasts += 1; + return s ; +} +#endif /* PACE_HAS_POSIX_CLSR_UOF */ diff --git a/PACE/pace/win32/string.h b/PACE/pace/win32/string.h index 22d21a80e15..fdc5be5ab96 100644 --- a/PACE/pace/win32/string.h +++ b/PACE/pace/win32/string.h @@ -31,6 +31,10 @@ extern "C" { typedef size_t pace_size_t; #endif /* PACE_SIZE_T */ +#if (PACE_HAS_POSIX_CLSR_UOF) +char * strtok_r (char * s, const char * sep, char ** lasts); +#endif /* PACE_HAS_POSIX_CLSR_UOF */ + #if defined (PACE_HAS_CPLUSPLUS) } #endif /* PACE_HAS_CPLUSPLUS */ diff --git a/PACE/pace/win32/string.inl b/PACE/pace/win32/string.inl index 1e157eae8ee..be669a7048c 100644 --- a/PACE/pace/win32/string.inl +++ b/PACE/pace/win32/string.inl @@ -191,11 +191,7 @@ PACE_INLINE char * pace_strtok_r (char * s, const char * sep, char ** lasts) { - PACE_UNUSED_ARG (s); - PACE_UNUSED_ARG (sep); - PACE_UNUSED_ARG (lasts); - PACE_ERRNO_NO_SUPPORT (); - return 0; + return strtok_r (s, sep, lasts); } #endif /* PACE_HAS_POSIX_CLSR_UOF */ |