summaryrefslogtreecommitdiff
path: root/TAO/utils/nslist/nslist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/utils/nslist/nslist.cpp')
-rw-r--r--TAO/utils/nslist/nslist.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/TAO/utils/nslist/nslist.cpp b/TAO/utils/nslist/nslist.cpp
index 46acd2d6b4a..80dabc861b4 100644
--- a/TAO/utils/nslist/nslist.cpp
+++ b/TAO/utils/nslist/nslist.cpp
@@ -22,6 +22,7 @@
#include "tao/ORB_Constants.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
CORBA::ORB_var orb;
int showIOR = 0;
@@ -41,10 +42,10 @@ get_tag_name (CORBA::ULong tag, ACE_CString& tag_string)
tag_string = "UIOP";
else if (tag == TAO_TAG_SHMEM_PROFILE)
tag_string = "SHMEM";
-#ifdef TAO_TAG_UDP_PROFILE
- else if (tag == TAO_TAG_UDP_PROFILE)
+#ifdef TAO_TAG_DIOP_PROFILE
+ else if (tag == TAO_TAG_DIOP_PROFILE)
tag_string = "GIOP over UDP";
-#endif /* TAO_TAG_UDP_PROFILE */
+#endif /* TAO_TAG_DIOP_PROFILE */
else
tag_string = "Unknown tag: " + tag;
}
@@ -214,7 +215,7 @@ list_context (CosNaming::NamingContext_ptr nc,
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argcw, ACE_TCHAR *argvw[])
{
showIOR = 0;
showNSonly = 0;
@@ -222,14 +223,19 @@ main (int argc, char *argv[])
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ ACE_Argv_Type_Converter argcon (argcw, argvw);
+ orb = CORBA::ORB_init (argcon.get_argc (), argcon.get_ASCII_argv (),
+ "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- char *pname = argv[0];
+ int argc = argcon.get_argc ();
+ ACE_TCHAR** argv = argcon.get_TCHAR_argv ();
+
+ ACE_TCHAR *pname = argv[0];
while (argc > 0)
{
- if (strcmp(*argv, "--ior") == 0)
+ if (ACE_OS::strcmp(*argv, ACE_TEXT ("--ior")) == 0)
{
if (showNSonly)
{
@@ -240,7 +246,7 @@ main (int argc, char *argv[])
}
showIOR = 1;
}
- else if (ACE_OS::strcmp (*argv, "--nsior") == 0)
+ else if (ACE_OS::strcmp (*argv, ACE_TEXT ("--nsior")) == 0)
{
if (showIOR)
{
@@ -251,11 +257,11 @@ main (int argc, char *argv[])
}
showNSonly = 1;
}
- else if (ACE_OS::strcmp (*argv, "--ctxior") == 0)
+ else if (ACE_OS::strcmp (*argv, ACE_TEXT ("--ctxior")) == 0)
{
showCtxIOR = 1;
}
- else if (ACE_OS::strncmp (*argv, "--", 2) == 0)
+ else if (ACE_OS::strncmp (*argv, ACE_TEXT ("--"), 2) == 0)
{
ACE_DEBUG ((LM_DEBUG, "Usage: %s [[ --ior ][ --ctxior ] | --nsior ]\n", pname));
return 1;