summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-27 01:18:42 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-08-27 01:18:42 +0000
commitaec4ff24292d2c3accd9675faf27a55e8840fd1c (patch)
tree07262db8403ef5809895d0868621efb3d271a358
parent3625ee4e205cc2bb2f43939bbdfdc42b17525dc3 (diff)
downloadATCD-aec4ff24292d2c3accd9675faf27a55e8840fd1c.tar.gz
*** empty log message ***
-rw-r--r--README1
-rw-r--r--TAO/ChangeLog-98c22
-rw-r--r--TAO/tao/ORB.h4
-rw-r--r--TAO/utils/IorParser/Makefile17
-rw-r--r--TAO/utils/IorParser/ior-parser.cpp2
-rw-r--r--TAO/utils/catior/Makefile2
-rw-r--r--TAO/utils/catior/README9
-rw-r--r--TAO/utils/catior/TaoSimple.IOR1
-rw-r--r--TAO/utils/catior/catior.cpp356
-rw-r--r--examples/Shared_Malloc/Makefile5
10 files changed, 253 insertions, 166 deletions
diff --git a/README b/README
index 273c6fc9c38..51edec1d6b2 100644
--- a/README
+++ b/README
@@ -606,6 +606,7 @@ Goran Lowkrantz <Goran.Lowkrantz@infologigruppen.se>
Susan Liebeskind <susan.liebeskind@gtri.gatech.edu>
Dana Hackman <upboms@network-one.com>
Margherita Vittone Wiersma <vittone@fndaub.fnal.gov>
+Priya Narasimhan <priya@lambda.ece.ucsb.edu>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson and is now at ObjectSpace. Paul devised the recursive
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 34062a5cb84..3c5a8f0e254 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,13 +1,23 @@
+Wed Aug 26 20:13:27 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * utils/IOR-parser/*: Added this another utility (which was
+ donated by Priya Narasimhan <priya@lambda.ece.ucsb.edu>) that
+ takes in a stringified IOR and decodes it, printing out the
+ information contained in it.
+
+ * tao/ORB.h (CORBA): Added default arguments to the final two
+ parameters of ORB_init() to simplify common use-cases.
+
+Wed Aug 26 19:13:33 1998 Darrell Brunsch <brunsch@cs.wustl.edu>
+
+ * utils/catior/*: Added this utility (which was donated by Jeff
+ Hopper <jhopper@nosc.mil>) that takes in a stringified IOR and
+ decodes it, printing out the information contained in it.
+
Wed Aug 26 17:00:38 1998 Nanbor Wang <nanbor@cs.wustl.edu>
* TAO_IDL/driver/drv_preproc.cpp (DRV_check_for_include): Removed
an unused local variable <nm>.
-Wed Aug 26 19:13:33 1998 Darrell Brunsch <brunsch@cs.wustl.edu>
-
- * utils/catior/*: Added this little utility (which was donated
- by Jeff Hopper <jhopper@nosc.mil>) which will take in a
- stringified IOR and decode it, printing out the information
- contained in it.
Wed Aug 26 18:15:37 1998 Nagarajan Surendran <naga@cs.wustl.edu>
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 3a445d02251..82d78fed852 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -744,8 +744,8 @@ public:
static ORB_ptr ORB_init (int &argc,
char *const *argv,
- const char *orb_name,
- Environment &env);
+ const char *orb_name = 0,
+ Environment &env = CORBA_Environment::default_environment ());
// ORB initialisation, per OMG document 94-9-46.
enum
diff --git a/TAO/utils/IorParser/Makefile b/TAO/utils/IorParser/Makefile
index cc7ff383adc..5e8b7bb755b 100644
--- a/TAO/utils/IorParser/Makefile
+++ b/TAO/utils/IorParser/Makefile
@@ -39,6 +39,21 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
# DO NOT DELETE THIS LINE -- g++dep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
+.obj/ior-handler.o .obj/ior-handler.so .shobj/ior-handler.o .shobj/ior-handler.so: ior-handler.cpp ior-handler.h \
+ $(ACE_ROOT)/ace/OS.h \
+ $(ACE_ROOT)/ace/inc_user_config.h \
+ $(ACE_ROOT)/ace/config.h \
+ $(ACE_ROOT)/ace/config-g++-common.h \
+ $(ACE_ROOT)/ace/streams.h \
+ $(ACE_ROOT)/ace/Basic_Types.h \
+ $(ACE_ROOT)/ace/Basic_Types.i \
+ $(ACE_ROOT)/ace/OS.i \
+ $(ACE_ROOT)/ace/Trace.h \
+ $(ACE_ROOT)/ace/Log_Msg.h \
+ $(ACE_ROOT)/ace/Log_Record.h \
+ $(ACE_ROOT)/ace/ACE.h \
+ $(ACE_ROOT)/ace/ACE.i \
+ $(ACE_ROOT)/ace/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/utils/IorParser/ior-parser.cpp b/TAO/utils/IorParser/ior-parser.cpp
index 4162384f28b..6099966470c 100644
--- a/TAO/utils/IorParser/ior-parser.cpp
+++ b/TAO/utils/IorParser/ior-parser.cpp
@@ -16,7 +16,7 @@
//
// ============================================================================
-#include "iorParser.h"
+#include "ior-handler.h"
IorHandler parser;
diff --git a/TAO/utils/catior/Makefile b/TAO/utils/catior/Makefile
index 18eaedec828..b8d9f1768b4 100644
--- a/TAO/utils/catior/Makefile
+++ b/TAO/utils/catior/Makefile
@@ -12,6 +12,8 @@ ifndef TAO_ROOT
TAO_ROOT = $(ACE_ROOT)/TAO
endif # ! TAO_ROOT
+LDLIBS = -lTAO
+
BIN = catior
BUILD = $(VBIN)
diff --git a/TAO/utils/catior/README b/TAO/utils/catior/README
index 2244961d0ac..eff8a25c227 100644
--- a/TAO/utils/catior/README
+++ b/TAO/utils/catior/README
@@ -1,6 +1,6 @@
$Id$
-CatIOR is a small utility that takes in a stringified IOR and decode
+CatIOR is a small utility that takes in a stringified IOR and decode
it, printing out the information contained in it.
Usage
@@ -9,4 +9,9 @@ Usage
catior -f <filename>
Takes in a file which contains the IOR and will then output the
-encoded information to stdout. \ No newline at end of file
+encoded information to stdout.
+
+There is a sample file in this directory called TaoSimple.IOR that is
+an IOR generated using the example $TAO_ROOT/tests/Simple. You can
+run the "catior" utility against that to see what the output looks
+like.
diff --git a/TAO/utils/catior/TaoSimple.IOR b/TAO/utils/catior/TaoSimple.IOR
new file mode 100644
index 00000000000..830ed119a9c
--- /dev/null
+++ b/TAO/utils/catior/TaoSimple.IOR
@@ -0,0 +1 @@
+IOR:000000000000001649444c3a73696d706c655f6f626a6563743a312e3000000000000001000000000000003600010000000000036d750000aada00000000002250333564623666626130303062383766612f6368696c645f706f612f736572766572 \ No newline at end of file
diff --git a/TAO/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp
index 6ac37cdd06e..4e8e8124e73 100644
--- a/TAO/utils/catior/catior.cpp
+++ b/TAO/utils/catior/catior.cpp
@@ -19,10 +19,11 @@
#include "ace/Get_Opt.h"
#include <tao/corba.h>
#include <tao/debug.h>
-#include <tao/typecode.h>
-#include <tao/iiop_object.h>
+#include <tao/Typecode.h>
+#include <tao/IIOP_Object.h>
// Destringify URL style IIOP objref.
+
static CORBA::Object_ptr
iiop_string_to_object (CORBA::String string,
CORBA::Environment &env)
@@ -33,7 +34,7 @@ iiop_string_to_object (CORBA::String string,
if (!string || !*string)
return 0;
- // type ID not encoded in this string ... makes narrowing rather
+ // Type ID not encoded in this string ... makes narrowing rather
// expensive, though it does ensure that type-safe narrowing code
// gets thoroughly excercised/debugged! Without a typeID, the
// _narrow will be required to make an expensive remote "is_a" call.
@@ -41,13 +42,18 @@ iiop_string_to_object (CORBA::String string,
IIOP_Object *data;
// null type ID.
- ACE_NEW_RETURN (data, IIOP_Object ((char *) 0), 0);
-
- // Remove the "N.N//" prefix, and verify the version's one
- // that we accept
-
- if (isdigit (string [0]) && isdigit (string [2]) && string [1] == '.'
- && string [3] == '/' && string [4] == '/')
+ ACE_NEW_RETURN (data,
+ IIOP_Object ((char *) 0),
+ 0);
+
+ // Remove the "N.N//" prefix, and verify the version's one that we
+ // accept
+
+ if (isdigit (string [0])
+ && isdigit (string [2])
+ && string [1] == '.'
+ && string [3] == '/'
+ && string [4] == '/')
{
data->profile.iiop_version.major = (char) (string [0] - '0');
data->profile.iiop_version.minor = (char) (string [2] - '0');
@@ -71,6 +77,7 @@ iiop_string_to_object (CORBA::String string,
// Pull off the "hostname:port/" part of the objref
char *cp = ACE_OS::strchr (string, ':');
+
if (cp == 0)
{
env.exception (new CORBA_DATA_CONVERSION (CORBA::COMPLETED_NO));
@@ -79,6 +86,7 @@ iiop_string_to_object (CORBA::String string,
}
data->profile.host = CORBA::string_alloc (1 + cp - string);
+
for (cp = data->profile.host;
*string != ':';
*cp++ = *string++)
@@ -102,7 +110,7 @@ iiop_string_to_object (CORBA::String string,
data->profile.object_addr (0);
string = ++cp;
- // Parse the object key
+ // Parse the object key.
TAO_POA::decode_string_to_sequence (data->profile.object_key,
string);
@@ -110,19 +118,21 @@ iiop_string_to_object (CORBA::String string,
TAO_ServantBase *servant =
TAO_ORB_Core_instance ()->orb ()->_get_collocated_servant (data);
- // This will increase the ref_count on data by one
- CORBA_Object *obj = new CORBA_Object (data, servant, servant != 0);
+ // This will increase the ref_count on data by one.
+ CORBA_Object *obj;
- // Set the ref_count on data to 1, which is correct, because only
- // obj has now a reference to it.
- // data->_decr_refcnt ();
+ ACE_NEW_RETURN (obj,
+ CORBA_Object (data, servant, servant != 0),
+ 0);
+ // Set the ref_count on data to 1, which is correct, because only
+ // obj has now a reference to it. data->_decr_refcnt ();
return obj;
}
CORBA::Boolean
-catior(CORBA::String str,
- CORBA::Environment &env)
+catior (CORBA::String str,
+ CORBA::Environment &env)
{
// Unhex the bytes, and make a CDR deencapsulation stream from the
// resulting data.
@@ -133,18 +143,19 @@ catior(CORBA::String str,
CDR::mb_align (&mb);
char *buffer = mb.rd_ptr ();
- char *tmp = (char *) str;
- size_t len = 0;
+ char *tmp = (char *) str;
+ size_t len = 0;
- CORBA::Boolean continue_decoding;
- // the prefix of the IOR must be removed,
- // and the string must start with the encapsulation byte
- //
+ CORBA::Boolean continue_decoding;
+
+ // The prefix of the IOR must be removed, and the string must start
+ // with the encapsulation byte
+
while (tmp [0] && tmp [1])
{
u_char byte;
- if (!(isxdigit (tmp [0]) && isxdigit (tmp [1])))
+ if (! (isxdigit (tmp [0]) && isxdigit (tmp [1])))
break;
byte = (u_char) (ACE::hex2byte (tmp [0]) << 4);
@@ -163,11 +174,11 @@ catior(CORBA::String str,
// Create deencapsulation stream ... then unmarshal objref from that
// stream.
- CORBA::Boolean byteOrder;
+ CORBA::Boolean byteOrder;
{
- TAO_InputCDR encapStream(&mb);
- continue_decoding = encapStream.read_boolean(byteOrder);
+ TAO_InputCDR encapStream (&mb);
+ continue_decoding = encapStream.read_boolean (byteOrder);
}
mb.rd_ptr (1);
@@ -175,23 +186,29 @@ catior(CORBA::String str,
TAO_InputCDR stream (&mb, byteOrder);
if (byteOrder == CORBA::B_TRUE)
- cout << "The Byte Order:\tLittle Endian " << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "The Byte Order:\tLittle Endian\n"));
else
- cout << "The Byte Order:\tBig Endian " << endl;
-
+ ACE_DEBUG ((LM_DEBUG,
+ "The Byte Order:\tBig Endian\n"));
// First, read the type hint. This will be the type_id encoded in an
// object reference.
- CORBA::String type_hint;
+ CORBA::String type_hint;
+
if ((continue_decoding = stream.decode (CORBA::_tc_string, &type_hint, 0, env))
== CORBA::B_FALSE)
{
- ACE_DEBUG ((LM_DEBUG, "cannot read type id\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ "cannot read type id\n"));
return CORBA::TypeCode::TRAVERSE_STOP;
}
- cout << "The Type Id:\t" << type_hint << endl;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "The Type Id:\t\"%s\"\n",
+ type_hint));
- // release any memory associated with the type_hint
+ // Release any memory associated with the type_hint
CORBA::string_free (type_hint);
// Read the profiles, discarding all until an IIOP profile comes by.
@@ -206,38 +223,46 @@ catior(CORBA::String str,
CORBA::ULong profiles = 0;
// IIOP_Object *objdata = 0;
- // get the count of profiles that follow
- if( (continue_decoding = stream.read_ulong (profiles)) == CORBA::B_FALSE)
+ continue_decoding = stream.read_ulong (profiles);
+
+ // Get the count of profiles that follow.
+ if (continue_decoding == CORBA::B_FALSE)
{
- ACE_DEBUG ((LM_DEBUG, "cannot read the profile count\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ "cannot read the profile count\n"));
return CORBA::TypeCode::TRAVERSE_STOP;
}
- CORBA::ULong profile_counter = 0;
+
+ CORBA::ULong profile_counter = 0;
// No profiles means a NIL objref.
if (profiles == 0)
- {
- return CORBA_TypeCode::TRAVERSE_CONTINUE;
- }
+ return CORBA_TypeCode::TRAVERSE_CONTINUE;
else
while (profiles-- != 0)
{
- cout << "Profile Count:\t" << ++profile_counter << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "Profile Count:\t%d\n",
+ ++profile_counter));
// We keep decoding until we find a valid IIOP profile.
CORBA::ULong tag;
+
+ continue_decoding = stream.read_ulong (tag);
- // get the profile ID tag
- if ( (continue_decoding = stream.read_ulong (tag)) == CORBA::B_FALSE)
+ // Get the profile ID tag.
+ if (continue_decoding == CORBA::B_FALSE)
{
- ACE_DEBUG ((LM_DEBUG, "cannot read profile tag\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ "cannot read profile tag\n"));
continue;
}
if (tag != TAO_IOP_TAG_INTERNET_IOP)
{
continue_decoding = stream.skip_string ();
- ACE_DEBUG ((LM_DEBUG, "unknown tag %d skipping\n", tag));
+ ACE_DEBUG ((LM_DEBUG,
+ "unknown tag %d skipping\n", tag));
continue;
}
@@ -247,26 +272,30 @@ catior(CORBA::String str,
// isn't part of it any more.
CORBA::ULong encap_len;
+ continue_decoding = stream.read_ulong (encap_len);
+
// ProfileData is encoded as a sequence of octet. So first get
// the length of the sequence.
- if ( (continue_decoding = stream.read_ulong (encap_len)) == CORBA::B_FALSE)
+ if (continue_decoding == CORBA::B_FALSE)
{
- ACE_DEBUG ((LM_DEBUG, "cannot read encap length\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ "cannot read encap length\n"));
continue;
}
// Create the decoding stream from the encapsulation in the
// buffer, and skip the encapsulation.
- TAO_InputCDR str(stream, encap_len);
+ TAO_InputCDR str (stream, encap_len);
continue_decoding = str.good_bit ()
- && stream.skip_bytes(encap_len);
+ && stream.skip_bytes (encap_len);
if (!continue_decoding)
{
ACE_DEBUG ((LM_DEBUG,
- "problem decoding encapsulated stream, "
- "len = %d\n", encap_len));
+ "problem decoding encapsulated stream, "
+ "len = %d\n",
+ encap_len));
continue;
}
@@ -275,171 +304,200 @@ catior(CORBA::String str,
//
// XXX this doesn't actually go back and skip the whole
// encapsulation...
- CORBA::Octet iiop_version_major, iiop_version_minor;
- if (!(str.read_octet (iiop_version_major)
+ CORBA::Octet iiop_version_major, iiop_version_minor;
+ if (! (str.read_octet (iiop_version_major)
&& iiop_version_major == IIOP::MY_MAJOR
&& str.read_octet (iiop_version_minor)
&& iiop_version_minor <= IIOP::MY_MINOR))
{
- ACE_DEBUG ((LM_DEBUG, "detected new v%d.%d IIOP profile",
+ ACE_DEBUG ((LM_DEBUG,
+ "detected new v%d.%d IIOP profile",
iiop_version_major,
iiop_version_minor));
continue;
}
- cout << "IIOP Version:\t" << dec << (int)iiop_version_major << ".";
- cout << (int)iiop_version_minor << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "IIOP Version:\t%d.%d\n",
+ iiop_version_major,
+ iiop_version_minor));
- // Get host and port
- CORBA::UShort port_number;
- CORBA::String hostname;
+ // Get host and port.
+ CORBA::UShort port_number;
+ CORBA::String hostname;
if (str.decode (CORBA::_tc_string,
&hostname,
0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE
|| !str.read_ushort (port_number))
{
- ACE_DEBUG ((LM_DEBUG, "error decoding IIOP host/port"));
+ ACE_DEBUG ((LM_DEBUG,
+ "error decoding IIOP host/port"));
return CORBA::TypeCode::TRAVERSE_STOP;
}
- cout << "Host Name:\t" << hostname << endl;
- cout << "Port Number:\t" << port_number << endl;
- CORBA::string_free(hostname);
+ ACE_DEBUG ((LM_DEBUG,
+ "Host Name:\t%s\n",
+ hostname));
+ ACE_DEBUG ((LM_DEBUG,
+ "Port Number:\t%d\n",
+ port_number));
+ CORBA::string_free (hostname);
// ... and object key.
- cout << "Object Key:\t" << endl;
- CORBA::ULong objKeyLength = 0;
- continue_decoding = str.read_ulong(objKeyLength);
-
- cout << "Object Key Length:\t" << objKeyLength << endl;
+
+ CORBA::ULong objKeyLength = 0;
+ continue_decoding = str.read_ulong (objKeyLength);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Object Key len:\t%d\n",
+ objKeyLength));
- CORBA::Octet anOctet;
- CORBA::String objKey = CORBA::string_alloc(objKeyLength+1);
+ ACE_DEBUG ((LM_DEBUG,
+ "Object Key as hex:\n"));
+
+ CORBA::Octet anOctet;
+ CORBA::String objKey = CORBA::string_alloc (objKeyLength + 1);
- short counter = -1;
- for(unsigned int i=0;i<objKeyLength;i++)
+ short counter = -1;
+
+ for (u_int i = 0; i < objKeyLength; i++)
{
- if(++counter == 8) { cout << endl; counter = 0; }
- str.read_octet(anOctet);
- cout << hex << (int)anOctet << " ";
- objKey[i] = (char)anOctet;
+ if (++counter == 8)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "\n"));
+ counter = 0;
+ }
+ str.read_octet (anOctet);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "%x ",
+ anOctet));
+ objKey[i] = (char) anOctet;
}
+
objKey[i] = '\0';
- cout << endl << "The Object Key as string:" << endl << objKey << endl;
- CORBA::string_free(objKey);
-
+ ACE_DEBUG ((LM_DEBUG,
+ "\nThe Object Key as string:\n%s\n",
+ objKey));
+ CORBA::string_free (objKey);
}
-
- return CORBA::B_TRUE;
-
+ return CORBA::B_TRUE;
}
int
-main(int argc, char* argv[])
+main (int argc, char *argv[])
{
ACE_Get_Opt get_opt (argc, argv, "f:n:");
- CORBA::ORB_ptr orb_ptr = TAO_ORB_Core_instance()->orb();
+ CORBA::ORB_ptr orb_ptr = CORBA::ORB_init (argc, argv);
- CORBA::Environment env;
- orb_ptr->init_orb_globals(env);
+ CORBA::Environment env;
-
- char opt;
+ char opt;
while ((opt = get_opt ()) != EOF)
{
switch (opt)
{
case 'n':
- {
- // read the CosName from the NamingService
- // convert the object_ptr to a CORBA::String_var
- // via the call to object_to_string
- cout << "opening a connection to the NamingService" << endl;
- cout << "resolving the CosName " << get_opt.optarg << endl;
- }
- break;
+ // read the CosName from the NamingService convert the
+ // object_ptr to a CORBA::String_var via the call to
+ // object_to_string.
+ ACE_DEBUG ((LM_DEBUG,
+ "opening a connection to the NamingService\n"
+ "resolving the CosName %s\n",
+ get_opt.optarg));
+ break;
case 'f':
{
// read the file into a CORBA::String_var
- cout << "reading the file " << get_opt.optarg << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "reading the file %s\n",
+ get_opt.optarg));
- ifstream ifstr (get_opt.optarg);
+ ifstream ifstr (get_opt.optarg);
- if(!ifstr.good())
+ if (!ifstr.good ())
{
- ifstr.close();
- return -1;
+ ifstr.close ();
+ return -1;
}
- char ch;
- ACE_CString aString;
- while(!ifstr.eof())
+ char ch;
+ ACE_CString aString;
+
+ while (!ifstr.eof ())
{
- ifstr.get(ch);
+ ifstr.get (ch);
aString += ch;
}
- cout << endl;
- cout << "here is the IOR " << endl << aString << endl << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "\nhere is the IOR\n%s\n\n",
+ aString.fast_rep ()));
- CORBA::String str;
- if(aString.find("IOR:") == 0)
+ CORBA::String str;
+ if (aString.find ("IOR:") == 0)
{
- cout << "decoding an IOR:" << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "decoding an IOR:\n"));
- // strip the IOR: off the string
- ACE_CString prefix = "IOR:";
- short prefixLength = prefix.length();
+ // Strip the IOR: off the string.
+ ACE_CString prefix = "IOR:";
+ short prefixLength = prefix.length ();
- ACE_CString subString = aString.substring(prefixLength,aString.length()-prefixLength);
- subString[subString.length()-1] = '\0';
- str = subString.rep();
+ ACE_CString subString =
+ aString.substring (prefixLength,
+ aString.length () - prefixLength);
+ subString[subString.length () - 1] = '\0';
+ str = subString.rep ();
}
- else if (aString.find("iiop:") == 0)
+ else if (aString.find ("iiop:") == 0)
{
- cout << "decoding an IIOP IOR " << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "decoding an IIOP IOR\n"));
- ACE_CString prefix = "IIOP:";
- short prefixLength = prefix.length() + 1;
- cout << "prefix length = " << prefixLength << endl;
- cout << aString.substring(prefixLength,aString.length()-prefixLength) << endl;
- str = aString.rep();
+ ACE_CString prefix = "IIOP:";
+ short prefixLength = prefix.length () + 1;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "prefix length = %d\n%s\n",
+ prefixLength,
+ aString.substring (prefixLength,
+ aString.length () - prefixLength).fast_rep ()));
+ str = aString.rep ();
}
else
- {
- cout << "Don't know how to decode this IOR " << endl;
- return -1;
- }
-
- CORBA::Boolean b = catior(str, env);
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Don't know how to decode this IOR\n"),
+ -1);
+ CORBA::Boolean b = catior (str, env);
if (b == CORBA::B_TRUE)
- cout << "catior returned true " << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "catior returned true\n"));
else
- cout << "catior returned false" << endl;
-
- ifstr.close();
-
+ ACE_DEBUG ((LM_DEBUG,
+ "catior returned false\n"));
+ ifstr.close ();
}
- break;
+ break;
case '?':
default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "-f filename "
- "-n CosName "
- "\n"
- "Reads an IOR "
- "and dumps the contents to stdout "
- "\n",
- argv[0]));
- return -1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Usage: %s "
+ "-f filename "
+ "-n CosName "
+ "\n"
+ "Reads an IOR "
+ "and dumps the contents to stdout "
+ "\n",
+ argv[0]),
+ 1);
}
}
-
return 0;
-} \ No newline at end of file
+}
diff --git a/examples/Shared_Malloc/Makefile b/examples/Shared_Malloc/Makefile
index ac2e044e5d7..deefbccd218 100644
--- a/examples/Shared_Malloc/Makefile
+++ b/examples/Shared_Malloc/Makefile
@@ -17,11 +17,6 @@ FILES = Malloc \
SRC = $(addsuffix .cpp,$(FILES))
OBJ = $(addsuffix .o,$(FILES))
-#SHOBJ = $(addsuffix .so,$(FILES))
-
-#LDLIBS = $(addprefix $(VSHDIR),$(SHOBJ))
-
-#VLDLIBS = $(LDLIBS:%=%$(VAR))
BUILD = $(VBIN)