diff options
50 files changed, 216 insertions, 165 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 28a4b115707..41da57ae5ea 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,56 @@ +Wed Oct 8 12:54:45 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.h + * orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.h + * orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h + * orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.h + * orbsvcs/orbsvcs/Scheduler_Factory.cpp + * orbsvcs/orbsvcs/Scheduler_Factory.h + * orbsvcs/tests/Bug_2925_Regression/server.cpp + * orbsvcs/tests/Bug_2926_Regression/server.cpp + * orbsvcs/tests/Concurrency/CC_client.cpp + * orbsvcs/tests/Concurrency/CC_client.h + * orbsvcs/tests/CosEvent/Basic/Random.cpp + * orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp + * orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h + * orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp + * orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h + * orbsvcs/tests/EC_Mcast/EC_Mcast.cpp + * orbsvcs/tests/EC_Mcast/EC_Mcast.h + * orbsvcs/tests/EC_MT_Mcast/MCast.cpp + * orbsvcs/tests/EC_Multiple/EC_Multiple.cpp + * orbsvcs/tests/EC_Multiple/EC_Multiple.h + * orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp + * orbsvcs/tests/EC_Throughput/ECT_Consumer.h + * orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp + * orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h + * orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp + * orbsvcs/tests/EC_Throughput/ECT_Supplier.h + * orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp + * orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h + * orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp + * orbsvcs/tests/EC_Throughput/ECT_Throughput.h + * orbsvcs/tests/Event/Basic/BCast.cpp + * orbsvcs/tests/Event/Basic/Observer.cpp + * orbsvcs/tests/Event/Basic/Observer.h + * orbsvcs/tests/Event/Basic/Random.cpp + * orbsvcs/tests/Event/lib/Consumer.cpp + * orbsvcs/tests/Event/lib/Consumer.h + * orbsvcs/tests/Event/lib/Driver.cpp + * orbsvcs/tests/Event/lib/Driver.h + * orbsvcs/tests/Event/lib/Supplier.cpp + * orbsvcs/tests/Event/lib/Supplier.h + * orbsvcs/tests/Event/Mcast/AddrServer/Client.cpp + * orbsvcs/tests/Event/Mcast/AddrServer/TestAddrServer.cpp + * orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp + * orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h + * orbsvcs/tests/Event/Mcast/Complex/consumer.cpp + * orbsvcs/tests/Event/Mcast/Complex/supplier.cpp + * orbsvcs/tests/Event/Performance/Connect.cpp + * orbsvcs/tests/Event/Performance/Connect.h + * orbsvcs/tests/Event/Performance/Inversion.cpp + ACE_TCHAR fixes + Wed Oct 8 11:31:45 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> * orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/server.cpp diff --git a/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.h b/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.h index 2d8c7855d1b..9d0d8e9975f 100644 --- a/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.h +++ b/TAO/orbsvcs/Logging_Service/Basic_Logging_Service/Basic_Logging_Service.h @@ -80,10 +80,10 @@ protected: const char* service_name_; // The name we use to bind with the NameService - const char* ior_file_name_; + const ACE_TCHAR* ior_file_name_; // The name of the file where we output the factory IOR. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of the file where we output the process id. bool bind_to_naming_service_; diff --git a/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.h b/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.h index 18e9a139b10..56227152933 100644 --- a/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.h +++ b/TAO/orbsvcs/Logging_Service/Event_Logging_Service/Event_Logging_Service.h @@ -81,10 +81,10 @@ protected: const char* service_name_; // The name we use to bind with the NameService - const char* ior_file_name_; + const ACE_TCHAR* ior_file_name_; // The name of the file where we output the factory IOR. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of the file where we output the process id. bool bind_to_naming_service_; diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h index 52c597c4dbc..1d45ed7bc5a 100644 --- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h +++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h @@ -91,10 +91,10 @@ protected: const char* service_name_; // The name we use to bind with the NameService - const char* ior_file_name_; + const ACE_TCHAR* ior_file_name_; // The name of the file where we output the factory IOR. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of the file where we output the process id. bool bind_to_naming_service_; diff --git a/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.h b/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.h index cc1201ed2e2..03c06590b1d 100644 --- a/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.h +++ b/TAO/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service.h @@ -79,10 +79,10 @@ private: const char* service_name_; // The name we use to bind with the NameService - const char* ior_file_name_; + const ACE_TCHAR* ior_file_name_; // The name of the file were we output the factory IOR. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid bool bind_to_naming_service_; diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp index 269eb9c09e8..1ca3d9c6f47 100644 --- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp @@ -300,7 +300,7 @@ int ACE_Scheduler_Factory::dump_schedule const RtecScheduler::Dependency_Set& dependencies, const RtecScheduler::Config_Info_Set& configs, const RtecScheduler::Scheduling_Anomaly_Set& anomalies, - const char* file_name, + const ACE_TCHAR* file_name, const char* rt_info_format, const char* dependency_format, const char* config_info_format, @@ -343,7 +343,7 @@ int ACE_Scheduler_Factory::dump_schedule FILE* file = stdout; if (file_name != 0) { - file = ACE_OS::fopen (ACE_TEXT_CHAR_TO_TCHAR(file_name), ACE_TEXT("w")); + file = ACE_OS::fopen (file_name, ACE_TEXT("w")); if (file == 0) return -1; } diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h index 216a38e3212..d530f84a073 100644 --- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h @@ -172,7 +172,7 @@ public: const RtecScheduler::Dependency_Set& dependencies, const RtecScheduler::Config_Info_Set& configs, const RtecScheduler::Scheduling_Anomaly_Set& anomalies, - const char* file_name = 0, + const ACE_TCHAR* file_name = 0, const char* rt_info_format = 0, const char* dependency_format = 0, const char* config_info_format = 0, diff --git a/TAO/orbsvcs/tests/Bug_2925_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2925_Regression/server.cpp index 5f612065014..461b751a19f 100644 --- a/TAO/orbsvcs/tests/Bug_2925_Regression/server.cpp +++ b/TAO/orbsvcs/tests/Bug_2925_Regression/server.cpp @@ -41,7 +41,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) success |= 0x01; break; case 'o': - ior_output_file = ACE_TEXT_ALWAYS_CHAR(get_opts.opt_arg ()); + ior_output_file = get_opts.opt_arg (); success |= 0x02; break; } diff --git a/TAO/orbsvcs/tests/Bug_2926_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2926_Regression/server.cpp index 8078322be8e..c4bdf91925c 100644 --- a/TAO/orbsvcs/tests/Bug_2926_Regression/server.cpp +++ b/TAO/orbsvcs/tests/Bug_2926_Regression/server.cpp @@ -9,25 +9,23 @@ char const * const scpc_orbId = "testDllOrb"; -char const * const scpc_loadOrb = ACE_DYNAMIC_SERVICE_DIRECTIVE( +ACE_TCHAR const * const scpc_loadOrb = ACE_DYNAMIC_SERVICE_DIRECTIVE( "testDllOrb", "bug2926", "_make_DllORB", "testDllOrb -ORBDebugLevel 0 -ORBId testDllOrb -ORBDottedDecimalAddresses 1" ); -char const * const scpc_unloadOrb = ACE_REMOVE_SERVICE_DIRECTIVE("testDllOrb"); +ACE_TCHAR const * const scpc_unloadOrb = ACE_REMOVE_SERVICE_DIRECTIVE("testDllOrb"); - -char const * const scpc_loadNotifyService = ACE_DYNAMIC_SERVICE_DIRECTIVE( +ACE_TCHAR const * const scpc_loadNotifyService = ACE_DYNAMIC_SERVICE_DIRECTIVE( "testNotifyService", "TAO_CosNotification_Serv", "_make_TAO_CosNotify_Service", "" ); -char const * const scpc_unloadNotifyService = ACE_REMOVE_SERVICE_DIRECTIVE("testNotifyService"); - +ACE_TCHAR const * const scpc_unloadNotifyService = ACE_REMOVE_SERVICE_DIRECTIVE("testNotifyService"); void loadunloadcycle() { diff --git a/TAO/orbsvcs/tests/Concurrency/CC_client.cpp b/TAO/orbsvcs/tests/Concurrency/CC_client.cpp index ad65d1d3f60..4415eb811f5 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_client.cpp +++ b/TAO/orbsvcs/tests/Concurrency/CC_client.cpp @@ -65,7 +65,7 @@ CC_Client::~CC_Client (void) // Reads the lock set factory ior from a file int -CC_Client::read_ior (char *filename) +CC_Client::read_ior (ACE_TCHAR *filename) { // Open the file for reading. this->f_handle_ = ACE_OS::open (filename,0); @@ -127,7 +127,7 @@ CC_Client::parse_args (void) break; case 'k': // read the cubit IOR from the command-line. this->cc_factory_key_ = - ACE_OS::strdup (get_opts.opt_arg ()); + ACE_OS::strdup (ACE_TEXT_ALWAYS_CHAR(get_opts.opt_arg ())); break; case 'x': this->shutdown_ = 1; @@ -178,7 +178,7 @@ CC_Client::run (void) FILE *f; // Open the command file for parsing if the filename!=stdin - if(ACE_OS::strcmp(this->script_file_, "stdin")!=0) + if(ACE_OS::strcmp(this->script_file_, ACE_TEXT("stdin"))!=0) { f = ACE_OS::fopen(this->script_file_, "r"); if(f==0) @@ -239,11 +239,11 @@ CC_Client::run_basic_tests (void) } int -CC_Client::check_extended_test_params(char *params) +CC_Client::check_extended_test_params(ACE_TCHAR *params) { // Format (regexp): [0-9]+;.*;.* int no_of_params = 0; - char *cp = params; // pointer to walk along the string + ACE_TCHAR *cp = params; // pointer to walk along the string enum {TAO_START, TAO_NUMBER, TAO_ARG, TAO_ERROR} state = TAO_START; while(*cp!='\0') @@ -292,7 +292,7 @@ CC_Client::check_extended_test_params(char *params) } int -CC_Client::run_extended_tests (char *params) +CC_Client::run_extended_tests (ACE_TCHAR *params) { int success = CC_FAIL; int no_of_args = 0; @@ -310,7 +310,7 @@ CC_Client::run_extended_tests (char *params) ACE_DEBUG((LM_DEBUG, "Number of arguments: %i\n", no_of_args)); - char *cmd = ACE_OS::strtok (params, ";"); + char *cmd = ACE_OS::strtok (ACE_TEXT_ALWAYS_CHAR(params), ";"); char *arg1 = ACE_OS::strtok (0, ";"); // char *arg2 = ACE_OS::strtok (0, ";"); diff --git a/TAO/orbsvcs/tests/Concurrency/CC_client.h b/TAO/orbsvcs/tests/Concurrency/CC_client.h index 09722098760..870459d47e6 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_client.h +++ b/TAO/orbsvcs/tests/Concurrency/CC_client.h @@ -73,18 +73,18 @@ private: int parse_args (void); // Function to parse the command line arguments. - int read_ior (char *filename); + int read_ior (ACE_TCHAR *filename); // Function to read the ior from the given file. int run_basic_tests (void); // Runs the basic tests (on a single lock set). Returns CC_SUCCESS // upon success CC_FAIL otherwise. - int run_extended_tests (char *params); + int run_extended_tests (ACE_TCHAR *params); // Runs the extended tests (on more lock sets). Returns CC_SUCCESS // upon success CC_FAIL otherwise. - int check_extended_test_params(char *params); + int check_extended_test_params(ACE_TCHAR *params); // Checks the parameters given to the run_extended_tests() function. // returns -1 if an error is found. @@ -126,14 +126,14 @@ private: int run_extended_tests_; // flag to tell which test should be run. - char *extended_tests_params_; + ACE_TCHAR *extended_tests_params_; // Parameters to the extended tests. The parameters are of the // following format: <test>:<parm1>:<parm2>... int use_script_file_; // Flag to tell whethter to use a script file to run the tests. - char *script_file_; + ACE_TCHAR *script_file_; // The script file to run void print_usage (void); diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp index a7d07dc54a5..75f4e5fcd15 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp @@ -53,41 +53,41 @@ RND_Driver::run (int argc, ACE_TCHAR *argv[]) while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); - if (ACE_OS::strcasecmp (arg, "-suppliers") == 0) + if (ACE_OS::strcasecmp (arg, ACE_TEXT("-suppliers")) == 0) { arg_shifter.consume_arg (); if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nsuppliers_ = n; arg_shifter.consume_arg (); } } - else if (ACE_OS::strcasecmp (arg, "-consumers") == 0) + else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-consumers")) == 0) { arg_shifter.consume_arg (); if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nconsumers_ = n; arg_shifter.consume_arg (); } } - else if (ACE_OS::strcasecmp (arg, "-max_recursion") == 0) + else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-max_recursion")) == 0) { arg_shifter.consume_arg (); if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 0) this->max_recursion_ = n; diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp index a029c1108cf..e2dad9a73b6 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp @@ -81,7 +81,7 @@ Driver::run (int argc, ACE_TCHAR* argv[]) this->event_a_, this->event_b_, - this->pid_file_name_?this->pid_file_name_:"nil") ); + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil")) ); if (this->pid_file_name_ != 0) { @@ -288,7 +288,7 @@ Driver::disconnect_consumers (void) } int -Driver::parse_args (int argc, char *argv []) +Driver::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("dc:n:h:p:")); int opt; @@ -308,7 +308,7 @@ Driver::parse_args (int argc, char *argv []) case 'h': { char* aux; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h index 3389fd1c50c..43136a67049 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h @@ -103,7 +103,7 @@ private: int event_b_; // We send two types of events, with different contents. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid TAO_SYNCH_MUTEX recv_count_mutex_; diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp index 6acf341c23b..bcb95d23cfb 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp @@ -72,7 +72,7 @@ ECMS_Driver::run (int argc, ACE_TCHAR* argv[]) this->event_a_, this->event_b_, - this->pid_file_name_?this->pid_file_name_:"nil") ); + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil")) ); if (this->pid_file_name_ != 0) { @@ -307,7 +307,7 @@ ECMS_Driver::disconnect_suppliers (void) } int -ECMS_Driver::parse_args (int argc, char *argv []) +ECMS_Driver::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("ds:n:t:h:p:b:")); int opt; @@ -335,7 +335,7 @@ ECMS_Driver::parse_args (int argc, char *argv []) case 'h': { char* aux; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h index 9390c8ea998..cf6cedf110a 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h @@ -134,7 +134,7 @@ private: int event_b_; // We send two types of events, with different contents. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid }; diff --git a/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp b/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp index 0563a021801..de0a0ba44b3 100644 --- a/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp +++ b/TAO/orbsvcs/tests/EC_MT_Mcast/MCast.cpp @@ -362,7 +362,7 @@ int parse_args (int argc, ACE_TCHAR *argv[]) switch (c) { case 'm': - udp_mcast_address = get_opts.opt_arg (); + udp_mcast_address = ACE_TEXT_ALWAYS_CHAR(get_opts.opt_arg ()); break; case '?': diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp index 6e1274fc473..699d4144c5a 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp +++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp @@ -75,8 +75,8 @@ ECM_Driver::run (int argc, ACE_TCHAR* argv[]) this->event_period_, this->event_count_, - this->config_filename_?this->config_filename_:"nil", - this->pid_filename_?this->pid_filename_:"nil") ); + this->config_filename_?this->config_filename_:ACE_TEXT("nil"), + this->pid_filename_?this->pid_filename_:ACE_TEXT("nil")) ); int i; for (i = 0; i < this->local_federations_count_; ++i) @@ -309,7 +309,7 @@ ECM_Driver::dump_results (void) // **************************************************************** int -ECM_Driver::parse_args (int argc, char *argv []) +ECM_Driver::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("l:p:c:n:t:f:")); int opt; @@ -338,7 +338,7 @@ ECM_Driver::parse_args (int argc, char *argv []) { char* aux; int i = 0; - for (char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + for (char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); arg != 0 && i < ECM_Driver::MAX_LOCAL_FEDERATIONS; arg = ACE_OS::strtok_r (0, ",", &aux), ++i) { @@ -525,7 +525,7 @@ ECM_Driver::skip_blanks (FILE* file, { // No action. } - + if (c == EOF) { ACE_ERROR_RETURN ((LM_ERROR, @@ -533,7 +533,7 @@ ECM_Driver::skip_blanks (FILE* file, error_msg), -1); } - + ACE_OS::ungetc (c, file); return 0; } diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h index 41f7f5591d5..c9d20cce869 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h +++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h @@ -460,10 +460,10 @@ private: int event_count_; // How many events will the suppliers send - char* config_filename_; + ACE_TCHAR* config_filename_; // The name of the file where we read the configuration. - const char* pid_filename_; + const ACE_TCHAR* pid_filename_; // The name of a file where the process stores its pid int local_federations_count_; diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index 400566bcaf4..7820b709119 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -210,8 +210,8 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) this->lpc_event_a_, this->lpc_event_b_, - this->schedule_file_?this->schedule_file_:"nil", - this->pid_file_name_?this->pid_file_name_:"nil") ); + this->schedule_file_?this->schedule_file_:ACE_TEXT("nil"), + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil")) ); print_priority_info ("Test_ECG::run (Main)"); @@ -936,7 +936,7 @@ Test_ECG::shutdown_consumer (int id) { ACE_DEBUG ((LM_DEBUG, "Shutdown consumer %d\n", id)); this->running_consumers_--; - + if (this->running_consumers_ == 0) { if (TAO_ORB_Core_instance ()->orb () == 0) @@ -970,17 +970,17 @@ void Test_ECG::dump_results (void) { const int bufsize = 512; - char buf[bufsize]; + ACE_TCHAR buf[bufsize]; int i; for (i = 0; i < this->hp_consumers_; ++i) { - ACE_OS::sprintf (buf, "HP%02d", i); + ACE_OS::sprintf (buf, ACE_TEXT("HP%02d"), i); this->dump_results (buf, this->stats_[i]); } for (i = 0; i < this->lp_consumers_; ++i) { - ACE_OS::sprintf (buf, "LP%02d", i); + ACE_OS::sprintf (buf, ACE_TEXT("LP%02d"), i); this->dump_results (buf, this->stats_[i + this->hp_consumers_]); } CORBA::ULong tmp = ACE_U64_TO_U32 (this->test_stop_ - this->test_start_); @@ -989,7 +989,7 @@ Test_ECG::dump_results (void) } void -Test_ECG::dump_results (const char* name, Stats& stats) +Test_ECG::dump_results (const ACE_TCHAR* name, Stats& stats) { // @@ We are reporting the information without specifics about double usec = ACE_U64_TO_U32 (stats.total_time_) / 1000.0; @@ -1025,7 +1025,7 @@ Test_ECG::local_source (RtecEventComm::EventSourceID id) const } int -Test_ECG::parse_args (int argc, char *argv []) +Test_ECG::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("l:r:s:i:xh:w:p:d:")); int opt; @@ -1035,23 +1035,23 @@ Test_ECG::parse_args (int argc, char *argv []) switch (opt) { case 'l': - this->lcl_name_ = get_opt.opt_arg (); + this->lcl_name_ = ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()); break; case 'r': - this->rmt_name_ = get_opt.opt_arg (); + this->rmt_name_ = ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()); break; case 's': - if (ACE_OS::strcasecmp (get_opt.opt_arg (), "global") == 0) + if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT("global")) == 0) { this->scheduling_type_ = Test_ECG::ss_global; } - else if (ACE_OS::strcasecmp (get_opt.opt_arg (), "local") == 0) + else if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT("local")) == 0) { this->scheduling_type_ = Test_ECG::ss_local; } - else if (ACE_OS::strcasecmp (get_opt.opt_arg (), "runtime") == 0) + else if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT("runtime")) == 0) { this->scheduling_type_ = Test_ECG::ss_runtime; } @@ -1072,7 +1072,7 @@ Test_ECG::parse_args (int argc, char *argv []) case 'i': { char* aux = 0; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->consumer_disconnects_ = ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); this->supplier_disconnects_ = ACE_OS::atoi (arg); @@ -1082,7 +1082,7 @@ Test_ECG::parse_args (int argc, char *argv []) case 'h': { char* aux = 0; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->hp_suppliers_ = ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); @@ -1107,7 +1107,7 @@ Test_ECG::parse_args (int argc, char *argv []) case 'w': { char* aux = 0; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->lp_suppliers_ = ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h index b676704001a..f45036a9900 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h @@ -230,7 +230,7 @@ private: // Block event delivery until all the consumers are ready. struct Stats; - void dump_results (const char* name, Stats& stats); + void dump_results (const ACE_TCHAR* name, Stats& stats); // Dump the results for a particular consumer. int local_source (RtecEventComm::EventSourceID id) const; @@ -326,11 +326,11 @@ private: // two other types. The types for high-priority clients can be // different from the types to low priority clients. - const char* schedule_file_; + const ACE_TCHAR* schedule_file_; // Ask the schedule to compute and dump its schedule after the test // execution. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid struct Stats { diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp index 29385f74690..26d765f6145 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp @@ -96,7 +96,7 @@ Test_Consumer::disconnect (void) } void -Test_Consumer::dump_results (const char* name, +Test_Consumer::dump_results (const ACE_TCHAR* name, ACE_UINT32 gsf) { this->throughput_.dump_results (name, gsf); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h index 9bd6323c48a..cf94e33386d 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h @@ -53,7 +53,7 @@ public: void disconnect (void); // Disconnect from the EC. - void dump_results (const char* name, + void dump_results (const ACE_TCHAR* name, ACE_UINT32 global_scale_factor); // Print out the results diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp index f201c2420d3..8d93fa1ee73 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp @@ -85,7 +85,7 @@ ECT_Consumer_Driver::run (int argc, ACE_TCHAR* argv[]) this->type_start_, this->type_count_, - this->pid_file_name_?this->pid_file_name_:"nil") ); + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil")) ); } if (this->pid_file_name_ != 0) @@ -269,7 +269,7 @@ ECT_Consumer_Driver::disconnect_consumers (void) } int -ECT_Consumer_Driver::parse_args (int argc, char *argv []) +ECT_Consumer_Driver::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("xdc:s:h:p:o:")); int opt; @@ -293,7 +293,7 @@ ECT_Consumer_Driver::parse_args (int argc, char *argv []) case 'h': { char* aux; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h index c0b61601fdb..fa8121e15da 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h @@ -84,7 +84,7 @@ private: int shutdown_event_channel_; // If not zero it will shutdown the event channel upon exit. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid CORBA::ORB_var orb_; diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp index 3616728f938..3357ec50f68 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp @@ -238,7 +238,7 @@ Test_Supplier::consumer_proxy (void) } void -Test_Supplier::dump_results (const char* name, +Test_Supplier::dump_results (const ACE_TCHAR* name, ACE_UINT32 gsf) { this->throughput_.dump_results (name, gsf); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h index 073e85e601d..1c09a0d2efe 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h @@ -61,7 +61,7 @@ public: // We talk to the EC (as a supplier) using this proxy, no duplicates // are done here... - void dump_results (const char* name, + void dump_results (const ACE_TCHAR* name, ACE_UINT32 global_scale_factor); // Dump the results... diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp index 07a5f752d17..3cafc9acc7f 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp @@ -96,7 +96,7 @@ ECT_Supplier_Driver::run (int argc, ACE_TCHAR* argv[]) this->type_start_, this->type_count_, - this->pid_file_name_?this->pid_file_name_:"nil") ); + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil")) ); } if (this->pid_file_name_ != 0) @@ -265,8 +265,8 @@ ECT_Supplier_Driver::dump_results (void) ACE_Throughput_Stats throughput; for (int i = 0; i < this->n_suppliers_; ++i) { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02d", i); + ACE_TCHAR buf[BUFSIZ]; + ACE_OS::sprintf (buf, ACE_TEXT("supplier_%02d"), i); this->suppliers_[i]->dump_results (buf, gsf); this->suppliers_[i]->accumulate (throughput); @@ -275,7 +275,7 @@ ECT_Supplier_Driver::dump_results (void) } int -ECT_Supplier_Driver::parse_args (int argc, char *argv []) +ECT_Supplier_Driver::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("ds:u:n:t:b:h:p:")); int opt; @@ -307,7 +307,7 @@ ECT_Supplier_Driver::parse_args (int argc, char *argv []) case 'h': { char* aux; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h index 7e49cc71264..44ef3755309 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h @@ -83,7 +83,7 @@ private: int type_count_; // We send two types of events, with different contents. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid }; diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp index 3a63a8dd2dd..267d2cd920f 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp @@ -123,7 +123,7 @@ ECT_Throughput::run (int argc, ACE_TCHAR* argv[]) this->supplier_type_count_, this->supplier_type_shift_, - this->pid_file_name_?this->pid_file_name_:"nil", + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil"), this->ec_concurrency_hwm_ ) ); } @@ -416,8 +416,8 @@ ECT_Throughput::dump_results (void) ACE_Throughput_Stats consumers; for (int j = 0; j < this->n_consumers_; ++j) { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02d", j); + ACE_TCHAR buf[BUFSIZ]; + ACE_OS::sprintf (buf, ACE_TEXT("consumer_%02d"), j); this->consumers_[j]->dump_results (buf, gsf); this->consumers_[j]->accumulate (consumers); @@ -427,8 +427,8 @@ ECT_Throughput::dump_results (void) ACE_Throughput_Stats suppliers; for (int i = 0; i < this->n_suppliers_; ++i) { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02d", i); + ACE_TCHAR buf[BUFSIZ]; + ACE_OS::sprintf (buf, ACE_TEXT("supplier_%02d"), i); this->suppliers_[i]->dump_results (buf, gsf); this->suppliers_[i]->accumulate (suppliers); @@ -437,7 +437,7 @@ ECT_Throughput::dump_results (void) } int -ECT_Throughput::parse_args (int argc, char *argv []) +ECT_Throughput::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("dc:s:u:n:t:b:h:l:p:w:")); int opt; @@ -473,7 +473,7 @@ ECT_Throughput::parse_args (int argc, char *argv []) case 'h': { char* aux; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->consumer_type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); @@ -486,7 +486,7 @@ ECT_Throughput::parse_args (int argc, char *argv []) case 'l': { char* aux; - char* arg = ACE_OS::strtok_r (get_opt.opt_arg (), ",", &aux); + char* arg = ACE_OS::strtok_r (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ()), ",", &aux); this->supplier_type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); arg = ACE_OS::strtok_r (0, ",", &aux); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h index 6b7f41449dd..084a636c7d3 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h @@ -111,7 +111,7 @@ private: // Supplier2: [start + 2*shift, start + 2*shift + count) // And so on. - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; // The name of a file where the process stores its pid CORBA::ORB_var orb_; diff --git a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp index ebcc534da39..e1cf32f36bb 100644 --- a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp @@ -37,18 +37,18 @@ EC_BCast::parse_args (int& argc, ACE_TCHAR* argv[]) while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); - if (ACE_OS::strcmp (arg, "-port") == 0) + if (ACE_OS::strcmp (arg, ACE_TEXT("-port")) == 0) { arg_shifter.consume_arg (); this->bcast_port_ = ACE_OS::atoi (arg_shifter.get_current ()); } - else if (ACE_OS::strcmp (arg, "-address") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-address")) == 0) { arg_shifter.consume_arg (); - this->bcast_address_ = arg_shifter.get_current (); + this->bcast_address_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); } arg_shifter.ignore_arg (); @@ -84,7 +84,7 @@ EC_BCast::execute_test (void) this->build_consumer_qos (0, sub, shutdown_event_type); // Obtain UDP address in the string format for Gateway initialization. - char address_server_arg [256]; + ACE_TCHAR address_server_arg [256]; ACE_INET_Addr udp_addr; if (udp_addr.set (this->bcast_port_, this->bcast_address_) == -1 || udp_addr.addr_to_string (address_server_arg, 256) == -1) @@ -102,7 +102,7 @@ EC_BCast::execute_test (void) TAO_ECG_Mcast_Gateway gateway; if (gateway.init (sub, - address_server_arg, + ACE_TEXT_ALWAYS_CHAR(address_server_arg), lAttributes) == -1) return; diff --git a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp index efa1187f338..1b0a42e01f1 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp @@ -77,8 +77,8 @@ EC_Master::run (int argc, ACE_TCHAR* argv[]) } { - char** targv; - ACE_NEW_RETURN (targv, char*[argc], 1); + ACE_TCHAR** targv; + ACE_NEW_RETURN (targv, ACE_TCHAR*[argc], 1); for (int i = 0; i != this->n_channels_; ++i) { @@ -149,7 +149,7 @@ EC_Master::run (int argc, ACE_TCHAR* argv[]) } void -EC_Master::initialize_orb_and_poa (int &argc, char* argv[]) +EC_Master::initialize_orb_and_poa (int &argc, ACE_TCHAR* argv[]) { this->orb_ = CORBA::ORB_init (argc, argv); @@ -174,20 +174,20 @@ EC_Master::initialize_orb_and_poa (int &argc, char* argv[]) } int -EC_Master::parse_args (int &argc, char *argv []) +EC_Master::parse_args (int &argc, ACE_TCHAR *argv []) { ACE_Arg_Shifter arg_shifter (argc, argv); while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); - if (ACE_OS::strcmp (arg, "-channels") == 0) + if (ACE_OS::strcmp (arg, ACE_TEXT("-channels")) == 0) { arg_shifter.consume_arg (); this->n_channels_ = ACE_OS::atoi (arg_shifter.get_current ()); } - else if (ACE_OS::strcmp (arg, "-seed") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-seed")) == 0) { arg_shifter.consume_arg (); this->seed_ = ACE_OS::atoi (arg_shifter.get_current ()); @@ -233,7 +233,7 @@ EC_Observer::~EC_Observer (void) } void -EC_Observer::initialize_orb_and_poa (int&, char*[]) +EC_Observer::initialize_orb_and_poa (int&, ACE_TCHAR*[]) { } diff --git a/TAO/orbsvcs/tests/Event/Basic/Observer.h b/TAO/orbsvcs/tests/Event/Basic/Observer.h index cb51f1adb57..498e5bc6873 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Observer.h +++ b/TAO/orbsvcs/tests/Event/Basic/Observer.h @@ -48,7 +48,7 @@ public: EC_Observer* channel (int i) const; private: - int parse_args (int &argc, char *argv []); + int parse_args (int &argc, ACE_TCHAR *argv []); private: /// The seed diff --git a/TAO/orbsvcs/tests/Event/Basic/Random.cpp b/TAO/orbsvcs/tests/Event/Basic/Random.cpp index 80db85284cb..8cba24c7e04 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Random.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Random.cpp @@ -60,48 +60,48 @@ RND_Driver::run (int argc, ACE_TCHAR *argv[]) while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); - if (ACE_OS::strcasecmp (arg, "-suppliers") == 0) + if (ACE_OS::strcasecmp (arg, ACE_TEXT("-suppliers")) == 0) { arg_shifter.consume_arg (); if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nsuppliers_ = n; arg_shifter.consume_arg (); } } - else if (ACE_OS::strcasecmp (arg, "-consumers") == 0) + else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-consumers")) == 0) { arg_shifter.consume_arg (); if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nconsumers_ = n; arg_shifter.consume_arg (); } } - else if (ACE_OS::strcasecmp (arg, "-max_recursion") == 0) + else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-max_recursion")) == 0) { arg_shifter.consume_arg (); if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 0) this->max_recursion_ = n; arg_shifter.consume_arg (); } } - else if (ACE_OS::strcasecmp (arg, "-verbose") == 0) + else if (ACE_OS::strcasecmp (arg, ACE_TEXT("-verbose")) == 0) { arg_shifter.consume_arg (); diff --git a/TAO/orbsvcs/tests/Event/Mcast/AddrServer/Client.cpp b/TAO/orbsvcs/tests/Event/Mcast/AddrServer/Client.cpp index fa8cd9fd1cb..6255f267333 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/AddrServer/Client.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/AddrServer/Client.cpp @@ -19,7 +19,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) for (int i = 1; i < argc; i++) { - if (ACE_OS::strcasecmp(argv[i], "-k") == 0) + if (ACE_OS::strcasecmp(argv[i], ACE_TEXT("-k")) == 0) { if (argv[i+1] != 0) ior = argv[++i]; @@ -87,7 +87,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) inet_addr.set (udp_addr.port, udp_addr.ipaddr); } - char buffer[256]; + ACE_TCHAR buffer[256]; inet_addr.addr_to_string (buffer,256); ACE_DEBUG ((LM_DEBUG,"Should be IPv4: %s\n",buffer)); ACE_OS::memset (buffer,0,255); diff --git a/TAO/orbsvcs/tests/Event/Mcast/AddrServer/TestAddrServer.cpp b/TAO/orbsvcs/tests/Event/Mcast/AddrServer/TestAddrServer.cpp index b766b206c42..e0ab8b490e4 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/AddrServer/TestAddrServer.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/AddrServer/TestAddrServer.cpp @@ -11,7 +11,7 @@ TestAddrServer_i::TestAddrServer_i (const ACE_INET_Addr& addr, this->addr_ = addr; this->addr6_ = addr6; - char abuf[256]; + ACE_TCHAR abuf[256]; addr_.addr_to_string (abuf,256); ACE_DEBUG ((LM_DEBUG,"Test Addr (v4) = %s\n",abuf)); @@ -41,7 +41,7 @@ TestAddrServer_i::get_address (const RtecEventComm::EventHeader& h, RtecUDPAdmin::UDP_Address_out outaddr) { ACE_INET_Addr &addr = (h.type == 0) ? this->addr_ : this->addr6_; - char abuf[256]; + ACE_TCHAR abuf[256]; addr.addr_to_string (abuf,256); ACE_DEBUG ((LM_DEBUG,"get_address returning = %s\n",abuf)); diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp index 39bedd6096c..9b3800d166d 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp @@ -9,7 +9,7 @@ #include "ace/OS_NS_stdio.h" Gateway_EC::Gateway_EC (void) - : ec_ior_file_ ("gateway-ec.ior") + : ec_ior_file_ (ACE_TEXT("gateway-ec.ior")) { } @@ -26,7 +26,7 @@ Gateway_EC::check_for_nil (CORBA::Object_ptr obj, const char *message) } int -Gateway_EC::parse_args (int argc, char *argv []) +Gateway_EC::parse_args (int argc, ACE_TCHAR *argv []) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("i:")); int opt; @@ -75,7 +75,7 @@ Gateway_EC::write_ior_file (CORBA::ORB_ptr orb, } int -Gateway_EC::run (int argc, char ** argv) +Gateway_EC::run (int argc, ACE_TCHAR ** argv) { // Event Channel Configuration. TAO_EC_Default_Factory::init_svcs (); diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h index 537e23c23e1..c749c44b5b3 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.h @@ -28,7 +28,7 @@ public: /// Run the server. /// Valid arguments: [-i ior_filename]. - int run (int argc, char ** argv); + int run (int argc, ACE_TCHAR ** argv); private: @@ -43,7 +43,7 @@ private: /// Event Channel ior is written to this file. /// Default is "gateway-ec.ior", which can be overridden with the "-i" /// argument option. - const char * ec_ior_file_; + const ACE_TCHAR * ec_ior_file_; }; #endif /* GATEWAY_EC_H */ diff --git a/TAO/orbsvcs/tests/Event/Mcast/Complex/consumer.cpp b/TAO/orbsvcs/tests/Event/Mcast/Complex/consumer.cpp index 424342dbe16..e2d4ebd7219 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Complex/consumer.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Complex/consumer.cpp @@ -122,7 +122,7 @@ check_for_nil (CORBA::Object_ptr obj, const char *message) } int -parse_args (int /* argc */, char ** /* argv */) +parse_args (int /* argc */, ACE_TCHAR ** /* argv */) { return 0; } diff --git a/TAO/orbsvcs/tests/Event/Mcast/Complex/supplier.cpp b/TAO/orbsvcs/tests/Event/Mcast/Complex/supplier.cpp index 4f1a1db6026..5cba23a3414 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Complex/supplier.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Complex/supplier.cpp @@ -44,7 +44,7 @@ check_for_nil (CORBA::Object_ptr obj, const char *message) } int -parse_args (int /*argc*/, char ** /*argv*/) +parse_args (int /*argc*/, ACE_TCHAR ** /*argv*/) { return 0; } diff --git a/TAO/orbsvcs/tests/Event/Performance/Connect.cpp b/TAO/orbsvcs/tests/Event/Performance/Connect.cpp index f7f3ccedc45..d34d8ae0dac 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Connect.cpp +++ b/TAO/orbsvcs/tests/Event/Performance/Connect.cpp @@ -42,7 +42,7 @@ EC_Connect::parse_args (int& argc, ACE_TCHAR* argv[]) while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-connection_order") == 0) { @@ -50,7 +50,7 @@ EC_Connect::parse_args (int& argc, ACE_TCHAR* argv[]) if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const ACE_TCHAR* opt = arg_shifter.get_current (); if (ACE_OS::strcasecmp (opt, "consumers") == 0) this->order_ = 0; else if (ACE_OS::strcasecmp (opt, "suppliers") == 0) @@ -324,7 +324,7 @@ ECC_Consumer::connect ( } void -ECC_Consumer::dump_results (const char* name, +ECC_Consumer::dump_results (const ACE_TCHAR* name, ACE_UINT32 gsf) { this->connect_time_.dump_results (name, gsf); @@ -362,7 +362,7 @@ ECC_Supplier::connect ( } void -ECC_Supplier::dump_results (const char* name, +ECC_Supplier::dump_results (const ACE_TCHAR* name, ACE_UINT32 gsf) { this->connect_time_.dump_results (name, gsf); diff --git a/TAO/orbsvcs/tests/Event/Performance/Connect.h b/TAO/orbsvcs/tests/Event/Performance/Connect.h index 82bcb0e646d..1e78e417819 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Connect.h +++ b/TAO/orbsvcs/tests/Event/Performance/Connect.h @@ -96,7 +96,7 @@ public: virtual void connect ( const RtecEventChannelAdmin::ConsumerQOS& qos, int shutdown_event_type); - virtual void dump_results (const char* name, + virtual void dump_results (const ACE_TCHAR* name, ACE_UINT32 global_scale_factor); private: @@ -117,7 +117,7 @@ public: virtual void connect ( const RtecEventChannelAdmin::SupplierQOS& qos, int shutdown_event_type); - virtual void dump_results (const char* name, + virtual void dump_results (const ACE_TCHAR* name, ACE_UINT32 global_scale_factor); private: diff --git a/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp b/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp index 32381be3d7e..ac1fc1155ec 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp +++ b/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp @@ -33,7 +33,7 @@ EC_Inversion::parse_args (int &argc, char *argv []) while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-same_events") == 0) { diff --git a/TAO/orbsvcs/tests/Event/lib/Consumer.cpp b/TAO/orbsvcs/tests/Event/lib/Consumer.cpp index b4c324ca6e0..8494bae5c9a 100644 --- a/TAO/orbsvcs/tests/Event/lib/Consumer.cpp +++ b/TAO/orbsvcs/tests/Event/lib/Consumer.cpp @@ -87,7 +87,7 @@ EC_Consumer::shutdown (void) } void -EC_Consumer::dump_results (const char* name, +EC_Consumer::dump_results (const ACE_TCHAR* name, ACE_UINT32 gsf) { this->throughput_.dump_results (name, gsf); diff --git a/TAO/orbsvcs/tests/Event/lib/Consumer.h b/TAO/orbsvcs/tests/Event/lib/Consumer.h index a4fbff85dea..94849459a74 100644 --- a/TAO/orbsvcs/tests/Event/lib/Consumer.h +++ b/TAO/orbsvcs/tests/Event/lib/Consumer.h @@ -71,7 +71,7 @@ public: void accumulate (ACE_Throughput_Stats& throughput) const; /// Printout the statistics - virtual void dump_results (const char* name, + virtual void dump_results (const ACE_TCHAR* name, ACE_UINT32 global_scale_factor); // = The RtecEventComm::PushConsumer methods diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.cpp b/TAO/orbsvcs/tests/Event/lib/Driver.cpp index 3cce1ae1648..ab65905cf95 100644 --- a/TAO/orbsvcs/tests/Event/lib/Driver.cpp +++ b/TAO/orbsvcs/tests/Event/lib/Driver.cpp @@ -87,7 +87,7 @@ EC_Driver::run (int argc, ACE_TCHAR* argv[]) } void -EC_Driver::run_init (int &argc, char* argv[]) +EC_Driver::run_init (int &argc, ACE_TCHAR* argv[]) { this->initialize_orb_and_poa (argc, argv); @@ -152,7 +152,7 @@ EC_Driver::run_cleanup (void) } void -EC_Driver::initialize_orb_and_poa (int &argc, char* argv[]) +EC_Driver::initialize_orb_and_poa (int &argc, ACE_TCHAR* argv[]) { this->orb_ = CORBA::ORB_init (argc, argv); @@ -209,7 +209,7 @@ EC_Driver::print_args (void) const this->supplier_type_count_, this->supplier_type_shift_, - this->pid_file_name_?this->pid_file_name_:"nil" + this->pid_file_name_?this->pid_file_name_:ACE_TEXT("nil") ) ); } @@ -642,10 +642,10 @@ EC_Driver::dump_results (void) { ACE_Throughput_Stats throughput; ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); - char buf[BUFSIZ]; + ACE_TCHAR buf[BUFSIZ]; for (int j = 0; j < this->n_consumers_; ++j) { - ACE_OS::sprintf (buf, "Consumer [%02d]", j); + ACE_OS::sprintf (buf, ACE_TEXT("Consumer [%02d]"), j); this->consumers_[j]->dump_results (buf, gsf); this->consumers_[j]->accumulate (throughput); @@ -655,7 +655,7 @@ EC_Driver::dump_results (void) ACE_Throughput_Stats suppliers; for (int i = 0; i < this->n_suppliers_; ++i) { - ACE_OS::sprintf (buf, "Supplier [%02d]", i); + ACE_OS::sprintf (buf, ACE_TEXT("Supplier [%02d]"), i); this->suppliers_[i]->dump_results (buf, gsf); this->suppliers_[i]->accumulate (suppliers); @@ -669,33 +669,33 @@ EC_Driver::dump_results (void) } int -EC_Driver::parse_args (int &argc, char *argv []) +EC_Driver::parse_args (int &argc, ACE_TCHAR *argv []) { ACE_Arg_Shifter arg_shifter (argc, argv); while (arg_shifter.is_anything_left ()) { - const char *arg = arg_shifter.get_current (); + const ACE_TCHAR *arg = arg_shifter.get_current (); - if (ACE_OS::strcmp (arg, "-verbose") == 0) + if (ACE_OS::strcmp (arg, ACE_TEXT("-verbose")) == 0) { arg_shifter.consume_arg (); this->verbose_ = 1; } - else if (ACE_OS::strcmp (arg, "-remote") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-remote")) == 0) { arg_shifter.consume_arg (); this->use_remote_ec_ = 1; if (arg_shifter.is_parameter_next ()) { - this->event_service_name_ = arg_shifter.get_current (); + this->event_service_name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); arg_shifter.consume_arg (); } } - else if (ACE_OS::strcmp (arg, "-suppliers") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-suppliers")) == 0) { arg_shifter.consume_arg (); @@ -706,7 +706,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-consumers") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-consumers")) == 0) { arg_shifter.consume_arg (); @@ -717,7 +717,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-burstcount") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-burstcount")) == 0) { arg_shifter.consume_arg (); @@ -728,7 +728,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-burstsize") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-burstsize")) == 0) { arg_shifter.consume_arg (); @@ -739,7 +739,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-payloadsize") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-payloadsize")) == 0) { arg_shifter.consume_arg (); @@ -750,7 +750,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-burstpause") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-burstpause")) == 0) { arg_shifter.consume_arg (); @@ -761,7 +761,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-consumer_tstart") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-consumer_tstart")) == 0) { arg_shifter.consume_arg (); @@ -774,7 +774,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-consumer_tcount") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-consumer_tcount")) == 0) { arg_shifter.consume_arg (); @@ -786,7 +786,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-consumer_tshift") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-consumer_tshift")) == 0) { arg_shifter.consume_arg (); @@ -798,7 +798,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-supplier_tstart") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-supplier_tstart")) == 0) { arg_shifter.consume_arg (); @@ -811,7 +811,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-supplier_tcount") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-supplier_tcount")) == 0) { arg_shifter.consume_arg (); @@ -823,7 +823,7 @@ EC_Driver::parse_args (int &argc, char *argv []) } } - else if (ACE_OS::strcmp (arg, "-supplier_tshift") == 0) + else if (ACE_OS::strcmp (arg, ACE_TEXT("-supplier_tshift")) == 0) { arg_shifter.consume_arg (); diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.h b/TAO/orbsvcs/tests/Event/lib/Driver.h index 4dadcfcdee4..58222b37193 100644 --- a/TAO/orbsvcs/tests/Event/lib/Driver.h +++ b/TAO/orbsvcs/tests/Event/lib/Driver.h @@ -281,7 +281,7 @@ protected: int supplier_type_shift_; /// The name of a file where the process stores its pid - const char* pid_file_name_; + const ACE_TCHAR* pid_file_name_; /// Verbosity flag int verbose_; diff --git a/TAO/orbsvcs/tests/Event/lib/Supplier.cpp b/TAO/orbsvcs/tests/Event/lib/Supplier.cpp index 95613a79b39..7e68e48dc01 100644 --- a/TAO/orbsvcs/tests/Event/lib/Supplier.cpp +++ b/TAO/orbsvcs/tests/Event/lib/Supplier.cpp @@ -171,7 +171,7 @@ EC_Supplier::disconnect_push_supplier (void) } void -EC_Supplier::dump_results (const char* name, +EC_Supplier::dump_results (const ACE_TCHAR* name, ACE_UINT32 gsf) { this->throughput_.dump_results (name, gsf); diff --git a/TAO/orbsvcs/tests/Event/lib/Supplier.h b/TAO/orbsvcs/tests/Event/lib/Supplier.h index 4db8b23cdf5..c9ae8ba6049 100644 --- a/TAO/orbsvcs/tests/Event/lib/Supplier.h +++ b/TAO/orbsvcs/tests/Event/lib/Supplier.h @@ -83,7 +83,7 @@ public: void shutdown (void); /// Dump the results... - virtual void dump_results (const char* name, + virtual void dump_results (const ACE_TCHAR* name, ACE_UINT32 global_scale_factor); /// Add our statistics to <stats> |