summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-01 19:15:13 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-01 19:15:13 +0000
commit0e81d140a777185bbc875526fc19d68a1dcea83f (patch)
treedebd1060c9c702c629a2e11bd1e565a83e8d4ece
parent6b27d9b4b9d9e40a2627b57b150af4a1b0359a44 (diff)
downloadATCD-0e81d140a777185bbc875526fc19d68a1dcea83f.tar.gz
(strecpy,unique_name): moved to ACE_OS, so it can be self-contained
-rw-r--r--ace/ACE.cpp28
-rw-r--r--ace/ACE.i30
2 files changed, 16 insertions, 42 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 73c77fe0186..12cf9afd221 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -32,13 +32,13 @@ size_t ACE::allocation_granularity_ = 0;
int
ACE::init (void)
{
- return ACE_Object_Manager::init ();
+ return ACE_Object_Manager::instance()->init ();
}
int
ACE::fini (void)
{
- return ACE_Object_Manager::fini ();
+ return ACE_Object_Manager::instance()->fini ();
}
u_int
@@ -99,26 +99,6 @@ ACE::compiler_beta_version (void)
#endif
}
-void
-ACE::unique_name (const void *object,
- LPTSTR name,
- size_t length)
-{
- // The process ID will provide uniqueness between processes on the
- // same machine. The "this" pointer of the <object> will provide
- // uniqueness between other "live" objects in the same process. The
- // uniqueness of this name is therefore only valid for the life of
- // <object>.
- TCHAR temp_name[ACE_UNIQUE_NAME_LEN];
- ACE_OS::sprintf (temp_name,
- ACE_TEXT ("%x%d"),
- object,
- ACE_OS::getpid ());
- ACE_OS::strncpy (name,
- temp_name,
- length);
-}
-
int
ACE::terminate_process (pid_t pid)
{
@@ -240,7 +220,7 @@ ACE::execname (const char *old_name)
-1);
char *end = new_name;
- end = ACE::strecpy (new_name, old_name);
+ end = ACE_OS::strecpy (new_name, old_name);
// Concatenate the .exe suffix onto the end of the executable.
ACE_OS::strcpy (end, ".exe");
@@ -320,7 +300,7 @@ ACE::execname (const wchar_t *old_name)
-1);
wchar_t *end = new_name;
- end = ACE::strecpy (new_name, old_name);
+ end = ACE_OS::strecpy (new_name, old_name);
// Concatenate the .exe suffix onto the end of the executable.
ACE_OS::strcpy (end, L".exe");
diff --git a/ace/ACE.i b/ace/ACE.i
index 224cdbdd706..80f0f0b4645 100644
--- a/ace/ACE.i
+++ b/ace/ACE.i
@@ -44,31 +44,25 @@ ACE::recv (ACE_HANDLE handle, void *buf, size_t len, int flags)
ASYS_INLINE char *
ACE::strecpy (char *s, const char *t)
{
- ACE_TRACE ("ACE::strecpy");
- register char *dscan = s;
- register const char *sscan = t;
-
- while ((*dscan++ = *sscan++) != '\0')
- continue;
-
- return dscan;
+ return ACE_OS::strecpy (s, t);
}
#if defined (ACE_HAS_UNICODE)
ASYS_INLINE wchar_t *
ACE::strecpy (wchar_t *s, const wchar_t *t)
{
- ACE_TRACE ("ACE::strecpy");
- register wchar_t *dscan = s;
- register const wchar_t *sscan = t;
-
- while ((*dscan++ = *sscan++) != '\0')
- continue;
-
- return dscan;
+ return ACE_OS::strecpy (s, t);
}
#endif /* ACE_HAS_UNICODE */
+ASYS_INLINE void
+ACE::unique_name (const void *object,
+ LPTSTR name,
+ size_t length)
+{
+ ACE_OS::unique_name (object, name, length);
+}
+
// Return flags currently associated with handle.
ASYS_INLINE int
@@ -100,13 +94,13 @@ ACE::log2 (u_long num)
return log;
}
-ASYS_INLINE char
+ASYS_INLINE char
ACE::nibble2hex (u_int n)
{
return ACE::hex_chars_[n & 0x0f];
}
-ASYS_INLINE u_char
+ASYS_INLINE u_char
ACE::hex2byte (char c)
{
if (isdigit (c))