diff options
Diffstat (limited to 'TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp')
-rw-r--r-- | TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp b/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp index 2acb6bcc18b..12dec500064 100644 --- a/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp +++ b/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp @@ -10,6 +10,7 @@ #include "orbsvcs/NotifyExtC.h" #include "orbsvcs/CosNamingC.h" #include "ace/OS_NS_errno.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (Notify, TAO_Notify_Lanes_Supplier_Client, "$Id$") @@ -27,13 +28,13 @@ TAO_Notify_Lanes_Supplier_Client::~TAO_Notify_Lanes_Supplier_Client () int TAO_Notify_Lanes_Supplier_Client::parse_args (int argc, char *argv[]) { - ACE_Arg_Shifter arg_shifter (argc, argv); + ACE_TArg_Shifter<char> arg_shifter (argc, argv); - const ACE_TCHAR *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { - if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Consumers")))) // Number of consumers that we need to send an event to. + if ((current_arg = arg_shifter.get_the_parameter ("-Consumers"))) // Number of consumers that we need to send an event to. { if (current_arg != 0) { @@ -42,7 +43,7 @@ TAO_Notify_Lanes_Supplier_Client::parse_args (int argc, char *argv[]) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-IORoutput")))) // The file to output the supplier ior to. + else if ((current_arg = arg_shifter.get_the_parameter ("-IORoutput"))) // The file to output the supplier ior to. { if (current_arg != 0) { @@ -212,13 +213,14 @@ TAO_Notify_Lanes_Supplier_Client::svc (void) } int -main (int argc, char *argv []) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); + ACE_TRY_NEW_ENV { // Initialize an ORB - CORBA::ORB_var orb = CORBA::ORB_init (argc, - argv, + CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -235,7 +237,7 @@ main (int argc, char *argv []) /* Create a Client */ TAO_Notify_Lanes_Supplier_Client client (orb_objects); - if (client.parse_args (argc, argv) != 0) + if (client.parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0) { ACE_DEBUG ((LM_DEBUG, "Supplier_Client::Error parsing options\n")); return -1; |