diff options
Diffstat (limited to 'TAO/examples/POA/Adapter_Activator/server.cpp')
-rw-r--r-- | TAO/examples/POA/Adapter_Activator/server.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/TAO/examples/POA/Adapter_Activator/server.cpp b/TAO/examples/POA/Adapter_Activator/server.cpp index 550f5082ff8..cfb17546d95 100644 --- a/TAO/examples/POA/Adapter_Activator/server.cpp +++ b/TAO/examples/POA/Adapter_Activator/server.cpp @@ -27,6 +27,7 @@ #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_string.h" #include "tao/PortableServer/AdapterActivatorC.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(Adapter_Activator, server, "$Id$") @@ -172,7 +173,7 @@ const char *ior_output_file = "ior"; static int parse_args (int argc, char **argv) { - ACE_Get_Opt get_opts (argc, argv, "f:"); + ACE_Get_Arg_Opt<char> get_opts (argc, argv, "f:"); int c; while ((c = get_opts ()) != -1) @@ -209,9 +210,9 @@ write_iors_to_file (const char *first_ior, ACE_OS::sprintf (ior_output_file_2, "%s_2", ior_output_file); ACE_OS::sprintf (ior_output_file_3, "%s_3", ior_output_file); - FILE *output_file_1 = ACE_OS::fopen (ior_output_file_1, "w"); - FILE *output_file_2 = ACE_OS::fopen (ior_output_file_2, "w"); - FILE *output_file_3 = ACE_OS::fopen (ior_output_file_3, "w"); + FILE *output_file_1 = ACE_OS::fopen (ior_output_file_1, ACE_TEXT("w")); + FILE *output_file_2 = ACE_OS::fopen (ior_output_file_2, ACE_TEXT("w")); + FILE *output_file_3 = ACE_OS::fopen (ior_output_file_3, ACE_TEXT("w")); if (output_file_1 == 0 || output_file_2 == 0 || @@ -262,20 +263,20 @@ write_iors_to_file (const char *first_ior, } 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 first. - CORBA::ORB_var orb = CORBA::ORB_init (argc, - argv, + CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - int result = parse_args (argc, argv); + int result = parse_args (convert.get_argc(), convert.get_ASCII_argv()); if (result != 0) return result; |