diff options
author | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-07-01 12:18:33 +0000 |
---|---|---|
committer | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-07-01 12:18:33 +0000 |
commit | ceef2a31cd9cf0e2f0b4a5932f92c237d2882b93 (patch) | |
tree | fe3ce8683ad4fd9ac5a5352a731e0db80317fa95 /TAO/orbsvcs | |
parent | 85e7c3751050106c53de1338d2ac64b2e06f98f6 (diff) | |
download | ATCD-ceef2a31cd9cf0e2f0b4a5932f92c237d2882b93.tar.gz |
ChangeLogTag: Tue Jul 01 12:18:00 UTC 2008 Simon Massey <sma at prismtech dot com>
Diffstat (limited to 'TAO/orbsvcs')
33 files changed, 200 insertions, 190 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp b/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp index 9423f6a2002..d826a192ac4 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp @@ -25,36 +25,36 @@ IdAssignment::~IdAssignment (void) int IdAssignment::parse_args (int argc, - char *argv[]) + ACE_TCHAR *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - const char *current_arg = 0; + const ACE_TCHAR *current_arg = 0; while (arg_shifter.is_anything_left ()) { - if (0 != (current_arg = arg_shifter.get_the_parameter ("-iter"))) + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-iter")))) { this->iter_ = ACE_OS::atoi (current_arg); // The number of times to repeat the test. arg_shifter.consume_arg (); } - if (0 != (current_arg = arg_shifter.get_the_parameter ("-ec_count"))) + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ec_count")))) { this->ec_count_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - if (0 != (current_arg = arg_shifter.get_the_parameter ("-ca_count"))) + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ca_count")))) { this->consumer_admin_count_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - if (0 != (current_arg = arg_shifter.get_the_parameter ("-sa_count"))) + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-sa_count")))) { this->supplier_admin_count_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if (arg_shifter.cur_arg_strncasecmp ("-?") == 0) + else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-?")) == 0) { ACE_DEBUG((LM_DEBUG, "usage: %s " @@ -62,7 +62,6 @@ IdAssignment::parse_args (int argc, "-ec_count <count>", "-ca_count <count>", "-sa_count <count>\n", - argv[0], argv[0])); arg_shifter.consume_arg (); @@ -80,7 +79,7 @@ IdAssignment::parse_args (int argc, void IdAssignment::init (int argc, - char *argv[]) + ACE_TCHAR *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); @@ -400,7 +399,7 @@ IdAssignment::run_test(void) //******************************************************************************** } -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { diff --git a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp index 0b836c4bd63..c44cf9bbbba 100644 --- a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Consumer.cpp @@ -19,7 +19,7 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); // TimeT is in 10ths of a microsecond static TimeBase::TimeT blocking_timeout = 2 * 1000 * 1000 * 10; // 2 secs // Must match the number sent by supplier. (-1 if blocking_timeout less than 1) @@ -29,12 +29,12 @@ static Notify_Structured_Push_Consumer* consumer_1 = 0; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:e:t:"); int c; @@ -104,7 +104,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -120,7 +120,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp index c70e0a4dd81..78f7123f945 100644 --- a/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Blocking/Structured_Supplier.cpp @@ -26,7 +26,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static int max_events = 20; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR* ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -73,12 +73,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d"); int c; @@ -163,7 +163,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; ACE_Auto_Ptr< sig_i > sig_impl; @@ -192,9 +192,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Consumer.cpp index 5f2a8dfae09..26d061f6266 100644 --- a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Consumer.cpp @@ -19,19 +19,19 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static unsigned int expected = 10; static Notify_Structured_Push_Consumer* consumer_1 = 0; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:e:"); int c; @@ -90,7 +90,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -106,7 +106,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp index db62da34d18..b0d8dcec52e 100644 --- a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/Structured_Supplier.cpp @@ -26,7 +26,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static int max_events = 10; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -76,11 +76,11 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:"); int c; @@ -173,7 +173,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; ACE_Auto_Ptr< sig_i > sig_impl; @@ -202,8 +202,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " - "writing IOR: %s", ior_output_file), + "Cannot open output file %s for " + "writing IOR: %s", + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp index 2985122fb7a..e275cc1d742 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp @@ -18,7 +18,7 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static CORBA::Short discard_policy = CosNotification::AnyOrder; static int sent = 40; static Notify_Sequence_Push_Consumer* consumer_1 = 0; @@ -30,12 +30,12 @@ static Notify_Sequence_Push_Consumer* consumer_1 = 0; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:l:h:d:"); int c; @@ -49,20 +49,20 @@ Consumer_Client::parse_args (int argc, char *argv[]) case 'd': { - const char* discard = get_opts.optarg; - if (ACE_OS::strcmp (discard, "fifo") == 0) + const ACE_TCHAR* discard = get_opts.optarg; + if (ACE_OS::strcmp (discard, ACE_TEXT ("fifo")) == 0) { discard_policy = CosNotification::FifoOrder; } - else if (ACE_OS::strcmp (discard, "priority") == 0) + else if (ACE_OS::strcmp (discard, ACE_TEXT ("priority")) == 0) { discard_policy = CosNotification::PriorityOrder; } - else if (ACE_OS::strcmp (discard, "lifo") == 0) + else if (ACE_OS::strcmp (discard, ACE_TEXT ("lifo")) == 0) { discard_policy = CosNotification::LifoOrder; } - else if (ACE_OS::strcmp (discard, "deadline") == 0) + else if (ACE_OS::strcmp (discard, ACE_TEXT ("deadline")) == 0) { discard_policy = CosNotification::DeadlineOrder; #if !defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) @@ -127,7 +127,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -143,7 +143,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); ACE_ASSERT(! CORBA::is_nil (sig.in ())); diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp index e26e788f839..acb6e1cc7d1 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp @@ -36,7 +36,7 @@ static int num_events = 40; // allows us to validate the discard policy. static const CORBA::Long BATCH_SIZE = 4; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -87,12 +87,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d"); int c; @@ -198,7 +198,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; ACE_Auto_Ptr< sig_i > sig_impl; diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Structured_Consumer.cpp index 896fcb1b9b9..be996896ca6 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Structured_Consumer.cpp @@ -11,7 +11,7 @@ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_strings.h" -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static CORBA::Short discard_policy = CosNotification::FifoOrder; CORBA::Long max_events_per_consumer = 4; static Notify_Structured_Push_Consumer* consumer_1; @@ -19,12 +19,12 @@ static Notify_Structured_Push_Consumer* consumer_1; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:e:d:"); int c; @@ -38,20 +38,20 @@ Consumer_Client::parse_args (int argc, char *argv[]) case 'd': { - const char* discard = get_opts.optarg; - if (ACE_OS::strcasecmp (discard, "fifo") == 0) + const ACE_TCHAR *discard = get_opts.optarg; + if (ACE_OS::strcasecmp (discard, ACE_TEXT ("fifo")) == 0) { discard_policy = CosNotification::FifoOrder; } - else if (ACE_OS::strcasecmp (discard, "priority") == 0) + else if (ACE_OS::strcasecmp (discard, ACE_TEXT ("priority")) == 0) { discard_policy = CosNotification::PriorityOrder; } - else if (ACE_OS::strcasecmp (discard, "lifo") == 0) + else if (ACE_OS::strcasecmp (discard, ACE_TEXT ("lifo")) == 0) { discard_policy = CosNotification::LifoOrder; } - else if (ACE_OS::strcasecmp (discard, "deadline") == 0) + else if (ACE_OS::strcasecmp (discard, ACE_TEXT ("deadline")) == 0) { discard_policy = CosNotification::DeadlineOrder; #if !defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) @@ -121,7 +121,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -137,7 +137,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp index 6ac0beea5c7..9a9dbd885e1 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Structured_Supplier.cpp @@ -27,7 +27,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static CORBA::Boolean use_deadline_ordering = 0; static int num_events = 40; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -78,12 +78,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d"); int c; @@ -180,7 +180,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; ACE_Auto_Ptr< sig_i > sig_impl; diff --git a/TAO/orbsvcs/tests/Notify/MC/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/MC/Structured_Consumer.cpp index 25a1f4ff018..6552152f279 100644 --- a/TAO/orbsvcs/tests/Notify/MC/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/MC/Structured_Consumer.cpp @@ -17,7 +17,7 @@ // Data Section // ****************************************************************** -static const char* ior = "file://test_monitor.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://test_monitor.ior"); static const char* ready = "ready.txt"; static unsigned int expected = 2000; static Notify_Structured_Push_Consumer* consumer_1 = 0; @@ -25,12 +25,12 @@ static Notify_Structured_Push_Consumer* consumer_1 = 0; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:e:"); int c; @@ -89,7 +89,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; @@ -110,7 +110,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); MonitorTestInterface_var sig = MonitorTestInterface::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/MC/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/MC/Structured_Supplier.cpp index 1ee3d42b90f..659d9c8d1b4 100644 --- a/TAO/orbsvcs/tests/Notify/MC/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/MC/Structured_Supplier.cpp @@ -19,7 +19,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static int max_events = 2000; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); static const char* ior = "file://test_monitor.ior"; // ****************************************************************** @@ -29,11 +29,11 @@ static const char* ior = "file://test_monitor.ior"; class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:"); int c; @@ -126,7 +126,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try diff --git a/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Consumer.cpp index 2c7065e81b2..eacf2f752e1 100644 --- a/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Consumer.cpp @@ -19,7 +19,7 @@ // ****************************************************************** static Notify_Structured_Push_Consumer* consumers[1024] = {0}; -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static unsigned int consumer_count = 1; static unsigned int expected = 1; @@ -30,12 +30,12 @@ static unsigned int expected = 1; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:e:c:f"); int c; @@ -118,7 +118,7 @@ disconnect_consumers (void) // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -133,7 +133,7 @@ int main (int argc, char* argv[]) client.create_event_channel ("MyEventChannel", 1); CORBA::Object_var object = - client.orb ()->string_to_object (ior); + client.orb ()->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp index d42e0c93188..7799a485fc9 100644 --- a/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/MT_Dispatching/Structured_Supplier.cpp @@ -27,7 +27,7 @@ static const unsigned int supplier_max = 32; static TAO_Notify_Tests_StructuredPushSupplier* suppliers[supplier_max] = {0}; static unsigned int supplier_count = 1; static int event_count = 1; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -75,12 +75,12 @@ private: class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:fc:"); int c; @@ -183,7 +183,7 @@ disconnect_suppliers (void) // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; try @@ -209,9 +209,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp index 03626895a55..b3f3cc5f1c8 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp @@ -11,7 +11,7 @@ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_sys_stat.h" -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static CORBA::Short order_policy = CosNotification::FifoOrder; static int expected = 30; // Must match the amount sent by supplier static Notify_Sequence_Push_Consumer* consumer_1; @@ -20,12 +20,12 @@ static bool use_ordering = false; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "ok:e:d:"); int c; @@ -47,16 +47,16 @@ Consumer_Client::parse_args (int argc, char *argv[]) case 'd': { - const char* order = get_opts.optarg; - if (ACE_OS::strcmp (order, "fifo") == 0) + const ACE_TCHAR *order = get_opts.optarg; + if (ACE_OS::strcmp (order, ACE_TEXT ("fifo")) == 0) { order_policy = CosNotification::FifoOrder; } - else if (ACE_OS::strcmp (order, "priority") == 0) + else if (ACE_OS::strcmp (order, ACE_TEXT ("priority")) == 0) { order_policy = CosNotification::PriorityOrder; } - else if (ACE_OS::strcmp (order, "deadline") == 0) + else if (ACE_OS::strcmp (order, ACE_TEXT ("deadline")) == 0) { order_policy = CosNotification::DeadlineOrder; #if !defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) @@ -121,7 +121,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, consumer_1->_connect (admin); } -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { @@ -136,7 +136,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp index 9eaad1e7967..e274e2ca58f 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp @@ -18,7 +18,7 @@ static TAO_Notify_Tests_SequencePushSupplier* supplier_1 = 0; static CORBA::Short order_policy = CosNotification::FifoOrder; static int num_events = 30; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); static const int BATCH_SIZE = 5; class sig_i : public POA_sig @@ -64,11 +64,11 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d:"); int c; @@ -78,16 +78,16 @@ Supplier_Client::parse_args (int argc, char *argv[]) { case 'd': { - const char* order = get_opts.optarg; - if (ACE_OS::strcasecmp (order, "fifo") == 0) + const ACE_TCHAR *order = get_opts.optarg; + if (ACE_OS::strcasecmp (order, ACE_TEXT ("fifo")) == 0) { order_policy = CosNotification::FifoOrder; } - else if (ACE_OS::strcasecmp (order, "priority") == 0) + else if (ACE_OS::strcasecmp (order, ACE_TEXT ("priority")) == 0) { order_policy = CosNotification::PriorityOrder; } - else if (ACE_OS::strcasecmp (order, "deadline") == 0) + else if (ACE_OS::strcasecmp (order, ACE_TEXT ("deadline")) == 0) { order_policy = CosNotification::DeadlineOrder; #if !defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) @@ -191,7 +191,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; try @@ -223,9 +223,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Consumer.cpp index 4164884e289..a71dd25e495 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Consumer.cpp @@ -9,7 +9,7 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_unistd.h" -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static CORBA::Short order_policy = CosNotification::FifoOrder; static int expected = 30; static Notify_Structured_Push_Consumer* consumer_1; @@ -18,11 +18,11 @@ static bool use_ordering = false; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "ok:e:d:"); int c; @@ -44,16 +44,16 @@ Consumer_Client::parse_args (int argc, char *argv[]) case 'd': { - const char* order = get_opts.optarg; - if (ACE_OS::strcmp (order, "fifo") == 0) + const ACE_TCHAR *order = get_opts.optarg; + if (ACE_OS::strcmp (order, ACE_TEXT ("fifo")) == 0) { order_policy = CosNotification::FifoOrder; } - else if (ACE_OS::strcmp (order, "priority") == 0) + else if (ACE_OS::strcmp (order, ACE_TEXT ("priority")) == 0) { order_policy = CosNotification::PriorityOrder; } - else if (ACE_OS::strcmp (order, "deadline") == 0) + else if (ACE_OS::strcmp (order, ACE_TEXT ("deadline")) == 0) { order_policy = CosNotification::DeadlineOrder; #if !defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) @@ -116,7 +116,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, consumer_1->_connect (admin); } -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { @@ -131,7 +131,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp index da297e04130..20c170b7014 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp @@ -18,7 +18,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static CORBA::Short order_policy = CosNotification::FifoOrder; static int num_events = 30; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); class sig_i : public POA_sig { @@ -63,12 +63,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d:"); int c; @@ -78,16 +78,16 @@ Supplier_Client::parse_args (int argc, char *argv[]) { case 'd': { - const char* order = get_opts.optarg; - if (ACE_OS::strcmp (order, "fifo") == 0) + const ACE_TCHAR* order = get_opts.optarg; + if (ACE_OS::strcmp (order, ACE_TEXT ("fifo")) == 0) { order_policy = CosNotification::FifoOrder; } - else if (ACE_OS::strcmp (order, "priority") == 0) + else if (ACE_OS::strcmp (order, ACE_TEXT ("priority")) == 0) { order_policy = CosNotification::PriorityOrder; } - else if (ACE_OS::strcmp (order, "deadline") == 0) + else if (ACE_OS::strcmp (order, ACE_TEXT ("deadline")) == 0) { order_policy = CosNotification::DeadlineOrder; #if !defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) @@ -187,7 +187,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, supplier_1->connect (admin); } -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; try @@ -219,9 +219,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp index 9467447509f..53ef8ed7bfc 100644 --- a/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Persistent_POA/Structured_Supplier.cpp @@ -23,7 +23,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static int max_events = 20; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); static const char* notify2ior = "notify2.ior"; // ****************************************************************** @@ -71,12 +71,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d"); int c; @@ -161,7 +161,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; ACE_Auto_Ptr< sig_i > sig_impl; @@ -223,9 +223,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/PluggableTopology/main.cpp b/TAO/orbsvcs/tests/Notify/PluggableTopology/main.cpp index ea040206afc..f1cb98b71af 100644 --- a/TAO/orbsvcs/tests/Notify/PluggableTopology/main.cpp +++ b/TAO/orbsvcs/tests/Notify/PluggableTopology/main.cpp @@ -80,7 +80,7 @@ namespace { } -int main(int, char**) +int ACE_TMAIN (int, ACE_TCHAR *[]) { try { diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Consumer.cpp index 34b829f9524..bdbd8911ad7 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Consumer.cpp @@ -18,7 +18,7 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static unsigned int low = 32; static unsigned int high = 32; @@ -29,12 +29,12 @@ static unsigned int high = 32; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:l:h:d:"); int c; @@ -129,7 +129,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -145,7 +145,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp index 99e64b8d641..77f2e5c4bde 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/Sequence_Supplier.cpp @@ -26,7 +26,7 @@ const int PER_BATCH = 16; static TAO_Notify_Tests_SequencePushSupplier* supplier_1 = 0; static int num_batches = 6; // 6 sets of 16 -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -74,12 +74,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:d"); int c; @@ -194,7 +194,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; int status = 0; @@ -222,9 +222,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp index 21a4cd4a3b2..1bcf86a485e 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp @@ -18,11 +18,11 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static unsigned int low = 10; static unsigned int high = 20; static CORBA::Boolean filter = 1; -static const char* constraintString = "Number == 10"; +static const ACE_TCHAR *constraintString = ACE_TEXT ("Number == 10"); // ****************************************************************** // Subroutine Section @@ -31,11 +31,11 @@ static const char* constraintString = "Number == 10"; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:l:h:d:c:"); int c; @@ -108,7 +108,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { @@ -123,7 +123,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); @@ -146,7 +146,7 @@ int main (int argc, char* argv[]) constraint_list.length(1); constraint_list[0].event_types.length (0); - constraint_list[0].constraint_expr = CORBA::string_dup(constraintString); + constraint_list[0].constraint_expr = CORBA::string_dup(ACE_TEXT_ALWAYS_CHAR (constraintString)); filter->add_constraints (constraint_list); diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp index 204c211622a..16363e004f5 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Supplier.cpp @@ -28,7 +28,7 @@ const int PER_BATCH = 4; static TAO_Notify_Tests_SequencePushSupplier* supplier_1 = 0; static int num_batches = 10; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -76,11 +76,11 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:"); int c; @@ -195,7 +195,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; int status = 0; @@ -224,9 +224,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp index 0a99d90c3f0..04ac603b753 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp @@ -24,11 +24,11 @@ static const char* GRAMMAR = "TCL"; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "fe:"); int x; @@ -66,7 +66,7 @@ create_consumer (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, consumer->_connect (admin, ec); } -int main (int argc, char * argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp index a9ca558ee4a..63c8e9a874e 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp @@ -121,7 +121,7 @@ static void create_supplier (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, supplier->connect (admin); } -int main (int argc, char * argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; try diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Consumer.cpp index ecda07e9a39..9e322c7cdb6 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Consumer.cpp @@ -25,11 +25,11 @@ static const char* GRAMMAR = "TCL"; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "f:s:e:"); int x; @@ -42,14 +42,14 @@ Consumer_Client::parse_args (int argc, char *argv[]) break; case 'f': - if (ACE_OS::strcasecmp ("OR", get_opts.optarg) == 0) + if (ACE_OS::strcasecmp (ACE_TEXT ("OR"), get_opts.optarg) == 0) consumerFilter = OrOp; else consumerFilter = AndOp; break; case 's': - if (ACE_OS::strcasecmp ("OR", get_opts.optarg) == 0) + if (ACE_OS::strcasecmp (ACE_TEXT ("OR"), get_opts.optarg) == 0) supplierFilter = OrOp; else supplierFilter = AndOp; @@ -83,7 +83,7 @@ create_consumer (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, consumer->_connect (admin, ec); } -int main (int argc, char * argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { try { diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp index 1dd0218557e..ae1c957d087 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp @@ -66,12 +66,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "e:f:"); int x; @@ -81,7 +81,7 @@ Supplier_Client::parse_args (int argc, char *argv[]) { case 'f': useFilters = true; - if (ACE_OS::strcasecmp ("OR", get_opts.optarg) == 0) + if (ACE_OS::strcasecmp (ACE_TEXT ("OR"), get_opts.optarg) == 0) use_or_operator = true; break; @@ -186,7 +186,7 @@ void add_admin_filter (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, admin->add_filter (filter.in ()); } -int main (int argc, char * argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; try diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp index c145169dae8..764762867c5 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp @@ -35,7 +35,7 @@ Notify_Test_Client::~Notify_Test_Client () } int -Notify_Test_Client::init (int argc, char *argv []) +Notify_Test_Client::init (int argc, ACE_TCHAR *argv[]) { int status = this->init_ORB (argc, argv); if (status == 0) @@ -47,14 +47,14 @@ Notify_Test_Client::init (int argc, char *argv []) } int -Notify_Test_Client::parse_args (int /*argc*/, char** /*argv*/) +Notify_Test_Client::parse_args (int /*argc*/, ACE_TCHAR *[] /*argv*/) { return 0; } int -Notify_Test_Client::init_ORB (int argc, char *argv []) +Notify_Test_Client::init_ORB (int argc, ACE_TCHAR *argv[]) { this->orb_ = CORBA::ORB_init (argc, argv); diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h index 50dae888298..bcc4eafd2c6 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h @@ -37,10 +37,10 @@ public: Notify_Test_Client (void); virtual ~Notify_Test_Client (); - virtual int init (int argc, char *argv []); + virtual int init (int argc, ACE_TCHAR *argv []); // starts the orb and resolves the notify factory via a naming service. - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR* argv[]); // Allow the user to override this empty method int ORB_run (void); @@ -75,7 +75,7 @@ public: protected: int init_ORB (int argc, - char *argv []); + ACE_TCHAR *argv []); // Initializes the ORB. void resolve_naming_service (void); diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp index 6ed26aeaee9..aed91f8c021 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Consumer.cpp @@ -19,7 +19,7 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static CORBA::Boolean filter = 0; static unsigned int consumers = 2; static unsigned int batch_size = 10; @@ -34,12 +34,12 @@ static unsigned int expected = 100; // 100 sets of 10 class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:c:e:f"); int c; @@ -141,7 +141,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -164,7 +164,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp index 77219aa1a54..1f940d5642c 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Sequence_Supplier.cpp @@ -26,7 +26,7 @@ static TAO_Notify_Tests_SequencePushSupplier* supplier_1 = 0; static int max_events = 100; // 100 sets of 10 static const CORBA::ULong amount = 10; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -74,12 +74,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:"); int c; @@ -174,7 +174,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; int status = 0; @@ -203,9 +203,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp index 2e08e1570fa..9a35b4bcd02 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Consumer.cpp @@ -18,7 +18,7 @@ // Data Section // ****************************************************************** -static const char* ior = "file://supplier.ior"; +static const ACE_TCHAR *ior = ACE_TEXT ("file://supplier.ior"); static CORBA::Boolean filter = 0; static unsigned int consumers = 2; static unsigned int expected = 1000; @@ -32,12 +32,12 @@ static unsigned int expected = 1000; class Consumer_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Consumer_Client::parse_args (int argc, char *argv[]) +Consumer_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "k:e:c:f"); int c; @@ -140,7 +140,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int status = 0; try @@ -163,7 +163,7 @@ int main (int argc, char* argv[]) CORBA::ORB_ptr orb = client.orb (); CORBA::Object_var object = - orb->string_to_object (ior); + orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior)); sig_var sig = sig::_narrow (object.in ()); diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp index 85921ac91c4..6b035b501e5 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Structured_Supplier.cpp @@ -25,7 +25,7 @@ static TAO_Notify_Tests_StructuredPushSupplier* supplier_1 = 0; static int max_events = 1000; -static const char* ior_output_file = "supplier.ior"; +static const ACE_TCHAR *ior_output_file = ACE_TEXT ("supplier.ior"); // ****************************************************************** // Subroutine Section @@ -74,12 +74,12 @@ private: class Supplier_Client : public Notify_Test_Client { public: - virtual int parse_args (int argc, char* argv[]); + virtual int parse_args (int argc, ACE_TCHAR *argv[]); }; int -Supplier_Client::parse_args (int argc, char *argv[]) +Supplier_Client::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:e:"); int c; @@ -169,7 +169,7 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, // Main Section // ****************************************************************** -int main (int argc, char* argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; int status = 0; @@ -197,9 +197,10 @@ int main (int argc, char* argv[]) FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for " + "Cannot open output file %s for " "writing IOR: %s", - ior_output_file), + ior_output_file, + ACE_TEXT_CHAR_TO_TCHAR (ior.in ())), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); |