summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/TIE
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/POA/TIE')
-rw-r--r--TAO/examples/POA/TIE/client.cpp10
-rw-r--r--TAO/examples/POA/TIE/server.cpp18
2 files changed, 16 insertions, 12 deletions
diff --git a/TAO/examples/POA/TIE/client.cpp b/TAO/examples/POA/TIE/client.cpp
index 9f29271ff6d..9844c3c8490 100644
--- a/TAO/examples/POA/TIE/client.cpp
+++ b/TAO/examples/POA/TIE/client.cpp
@@ -19,6 +19,7 @@
#include "ace/Profile_Timer.h"
#include "testC.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(TIE, client, "$Id$")
@@ -28,7 +29,7 @@ static int iterations = 1;
static int
parse_args (int argc, char **argv)
{
- ACE_Get_Opt get_opts (argc, argv, "a:b:c:d:e:f:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "a:b:c:d:e:f:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -172,17 +173,18 @@ public:
};
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Initialize options based on command-line arguments.
- int parse_args_result = parse_args (argc, argv);
+ int parse_args_result = parse_args (convert.get_argc(), convert.get_ASCII_argv());
if (parse_args_result != 0)
return parse_args_result;
diff --git a/TAO/examples/POA/TIE/server.cpp b/TAO/examples/POA/TIE/server.cpp
index 1c53b7ebb97..884e170f738 100644
--- a/TAO/examples/POA/TIE/server.cpp
+++ b/TAO/examples/POA/TIE/server.cpp
@@ -18,12 +18,14 @@
#include "ace/SString.h"
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(TIE, server, "$Id$")
int
-main (int argc, char **argv)
+ACE_TMAIN (int argc, ACE_TCHAR **argv)
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_DECLARE_NEW_CORBA_ENV;
char str[256];
@@ -33,7 +35,7 @@ main (int argc, char **argv)
ACE_OS::strcpy (str, "CORBA::ORB_init");
// Initialize the ORB first.
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Obtain the RootPOA.
@@ -175,10 +177,10 @@ main (int argc, char **argv)
orb->object_to_string (a_tie.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- FILE *output_file_1 = ACE_OS::fopen ("ior_1", "w");
- FILE *output_file_2 = ACE_OS::fopen ("ior_2", "w");
- FILE *output_file_3 = ACE_OS::fopen ("ior_3", "w");
- FILE *output_file_4 = ACE_OS::fopen ("ior_4", "w");
+ FILE *output_file_1 = ACE_OS::fopen ("ior_1", ACE_TEXT("w"));
+ FILE *output_file_2 = ACE_OS::fopen ("ior_2", ACE_TEXT("w"));
+ FILE *output_file_3 = ACE_OS::fopen ("ior_3", ACE_TEXT("w"));
+ FILE *output_file_4 = ACE_OS::fopen ("ior_4", ACE_TEXT("w"));
if (output_file_1)
ACE_OS::fprintf (output_file_1,
@@ -214,8 +216,8 @@ main (int argc, char **argv)
orb->object_to_string (c_tie.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- FILE *output_file_5 = ACE_OS::fopen ("ior_5", "w");
- FILE *output_file_6 = ACE_OS::fopen ("ior_6", "w");
+ FILE *output_file_5 = ACE_OS::fopen ("ior_5", ACE_TEXT("w"));
+ FILE *output_file_6 = ACE_OS::fopen ("ior_6", ACE_TEXT("w"));
if (output_file_5)
ACE_OS::fprintf (output_file_5,