summaryrefslogtreecommitdiff
path: root/TAO/tao/corbacom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/corbacom.cpp')
-rw-r--r--TAO/tao/corbacom.cpp113
1 files changed, 0 insertions, 113 deletions
diff --git a/TAO/tao/corbacom.cpp b/TAO/tao/corbacom.cpp
deleted file mode 100644
index 3347d963477..00000000000
--- a/TAO/tao/corbacom.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// @(#)corbacom.cpp 1.1 95/08/31
-// Copyright 1994-1995 by Sun Microsystems Inc.
-// All Rights Reserved
-//
-// ORB: support for primitive data types
-
-#include "tao/corba.h"
-
-// String utility support; this can need to be integrated with the
-// ORB's own memory allocation subsystem.
-
-CORBA::String
-CORBA::string_copy (const CORBA::Char *str)
-{
- if (!str)
- return 0;
-
- CORBA::String retval = CORBA::string_alloc (ACE_OS::strlen (str));
- // clear the contents of the allocated string
- ACE_OS::memset(retval, '\0', ACE_OS::strlen (str));
-
- return ACE_OS::strcpy (retval, str);
-}
-
-CORBA::String_var &
-CORBA::String_var::operator= (char *p)
-{
- if (this->ptr_ != p)
- {
- if (this->ptr_ != 0)
- CORBA::string_free (this->ptr_);
- this->ptr_ = p;
- }
- return *this;
-}
-
-CORBA::String_var &
-CORBA::String_var::operator= (const char *p)
-{
- if (this->ptr_ != 0)
- CORBA::string_free (this->ptr_);
-
- this->ptr_ = CORBA::string_dup (p);
- return *this;
-}
-
-CORBA::String_var &
-CORBA::String_var::operator= (const CORBA::String_var& r)
-{
- if (this != &r)
- {
- if (this->ptr_ != 0)
- CORBA::string_free (this->ptr_);
- this->ptr_ = CORBA::string_dup (r.ptr_);
- }
- return *this;
-}
-
-#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-// NOTE: assuming that these don't exist unless they're declared in
-// that header file ...
-
-extern "C" unsigned
-wslen (const CORBA::WChar *str)
-{
- u_int len = 0;
-
- while (*str++)
- len++;
- return len;
-}
-
-extern "C" CORBA::WChar *
-wscpy (CORBA::WChar *dest,
- const CORBA::WChar *src)
-{
- CORBA::WChar *retval = dest;
-
- while ((*dest++ = *src++) != 0)
- continue;
- return retval;
-}
-#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-// Wide Character string utility support; this can need to be
-// integrated with the ORB's own memory allocation subsystem.
-
-CORBA::WString
-CORBA::wstring_alloc (CORBA::ULong len)
-{
- return new CORBA::WChar [(size_t) (len + 1)];
-}
-
-CORBA::WString
-CORBA::wstring_copy (const CORBA::WChar *const str)
-{
- if (*str)
- return 0;
-
-#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
- CORBA::WString retval = CORBA::wstring_alloc (wslen (str));
- return wscpy (retval, str);
-#else /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
- CORBA::WString retval = CORBA::wstring_alloc (ACE_OS::strlen (str));
- return ACE_OS::strcpy (retval, str);
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-}
-
-void
-CORBA::wstring_free (CORBA::WChar *const str)
-{
- delete [] str;
-}