diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 22 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.cpp | 48 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.h | 4 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Bug_2612/Test.cpp | 17 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Bunch/Test.cpp | 18 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Separation/Test.cpp | 10 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp | 6 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h | 6 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc | 8 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp | 13 | ||||
-rw-r--r-- | TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp | 17 | ||||
-rw-r--r-- | TAO/utils/catior/catior.cpp | 82 |
13 files changed, 119 insertions, 134 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 8b300700b3b..6958d543313 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,25 @@ +Thu Jul 10 13:45:00 UTC 2008 Simon Massey <sma at prismtech dot com> + + * tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc: + + Both server and client are compiling the same files (I'm + not sure why or if this is correct, but it was multi-build + unsafe, which I have corrected). + + * tests/ORB_Local_Config/Two_DLL_ORB/client.cpp: + * tests/ORB_Local_Config/Two_DLL_ORB/server.cpp: + * tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h: + * tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp: + * tests/ORB_Local_Config/Bug_2612/DllOrb.h: + * tests/ORB_Local_Config/Bug_2612/DllOrb.cpp: + * tests/ORB_Local_Config/Bug_2612/Test.cpp: + * tests/ORB_Local_Config/Service_Dependency/Test.cpp: + * tests/ORB_Local_Config/Separation/Test.cpp: + * tests/ORB_Local_Config/Bunch/Test.cpp: + * utils/catior/catior.cpp: + + Added/Corrected wide-character compatablity. + Thu Jul 10 09:52:15 UTC 2008 Vladimir Zykov <vzykov@prismtech.com> * docs/compiler.html: diff --git a/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.cpp b/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.cpp index 38ff10c29a5..4cc5c75714d 100644 --- a/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.cpp +++ b/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.cpp @@ -5,7 +5,6 @@ * $Id$ */ - #include "ace/Arg_Shifter.h" #include "ace/SString.h" #include "ace/OS_NS_unistd.h" @@ -15,7 +14,6 @@ #include "DllOrb.h" - DllOrb::DllOrb (int nthreads) : m_nthreads_ (nthreads), @@ -36,27 +34,26 @@ DllOrb::~DllOrb ( ) #endif } - -int DllOrb::init (int argc, char *argv[]) +int DllOrb::init (int argc, ACE_TCHAR *argv[]) { int result = 0; int threadCnt = this->m_nthreads_; try { - ACE_Arg_Shifter as(argc, argv); + ACE_Arg_Shifter as (argc, argv); const ACE_TCHAR *currentArg = 0; - while(as.is_anything_left()) + while (as.is_anything_left ()) { - if(0 != (currentArg = as.get_the_parameter("-t"))) + if (0 != (currentArg = as.get_the_parameter (ACE_TEXT ("-t")))) { - int num = ACE_OS::atoi(currentArg); - if(num >= 1) + int num = ACE_OS::atoi (currentArg); + if (num >= 1) threadCnt = num; - as.consume_arg(); + as.consume_arg (); } else - as.ignore_arg(); + as.ignore_arg (); } if (m_failPrePostInit < 3) @@ -75,36 +72,36 @@ int DllOrb::init (int argc, char *argv[]) // module and destroyed by this object when it is dynamically // unloaded. int register_with_object_manager = 0; - TAO_Singleton_Manager * p_tsm = TAO_Singleton_Manager::instance(); - result = p_tsm->init(register_with_object_manager); + TAO_Singleton_Manager * p_tsm = TAO_Singleton_Manager::instance (); + result = p_tsm->init (register_with_object_manager); if (result == -1 && m_failPrePostInit == 0) return -1; } // Initialize the ORB - mv_orb = CORBA::ORB_init(argc, argv); - if (CORBA::is_nil(mv_orb.in())) + mv_orb = CORBA::ORB_init (argc, argv); + if (CORBA::is_nil (mv_orb.in ())) return -1; - CORBA::Object_var v_poa = mv_orb->resolve_initial_references("RootPOA"); + CORBA::Object_var v_poa = mv_orb->resolve_initial_references ("RootPOA"); - mv_rootPOA = PortableServer::POA::_narrow(v_poa.in ()); - if (CORBA::is_nil(mv_rootPOA.in())) + mv_rootPOA = PortableServer::POA::_narrow (v_poa.in ()); + if (CORBA::is_nil (mv_rootPOA.in ())) return -1; - mv_poaManager = mv_rootPOA->the_POAManager(); - if (CORBA::is_nil(mv_poaManager.in())) + mv_poaManager = mv_rootPOA->the_POAManager (); + if (CORBA::is_nil (mv_poaManager.in ())) return -1; - mv_poaManager->activate(); + mv_poaManager->activate (); } catch(CORBA::Exception& ex) { ex._tao_print_exception (ACE_TEXT ("(%P|%t) init failed:")); return -1; } - catch(...) + catch (...) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) init failed\n")), @@ -112,19 +109,18 @@ int DllOrb::init (int argc, char *argv[]) } #if defined (ACE_HAS_THREADS) - mp_barrier = new ACE_Thread_Barrier(threadCnt + 1); + mp_barrier = new ACE_Thread_Barrier (threadCnt + 1); this->activate( THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED, threadCnt ); - mp_barrier->wait(); + mp_barrier->wait (); #endif return 0; } - int DllOrb::fini (void) { int result; @@ -196,7 +192,6 @@ int DllOrb::fini (void) return 0; } - int DllOrb::svc (void) { #if defined (ACE_HAS_THREADS) @@ -230,5 +225,4 @@ int DllOrb::svc (void) return 0; } - ACE_FACTORY_DEFINE (DllOrb, DllOrb) diff --git a/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.h b/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.h index 9832228d6e4..b87a9560f78 100644 --- a/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.h +++ b/TAO/tests/ORB_Local_Config/Bug_2612/DllOrb.h @@ -32,7 +32,7 @@ class DllOrb_Export DllOrb CORBA::ORB_ptr orb (void) const; - virtual int init (int argc, char *argv[]); + virtual int init (int argc, ACE_TCHAR *argv[]); virtual int fini (void); @@ -54,8 +54,6 @@ class DllOrb_Export DllOrb PortableServer::POAManager_var mv_poaManager; }; /* end of DllOrb */ - ACE_FACTORY_DECLARE (DllOrb, DllOrb) - #endif /* DllOrb_h */ diff --git a/TAO/tests/ORB_Local_Config/Bug_2612/Test.cpp b/TAO/tests/ORB_Local_Config/Bug_2612/Test.cpp index cdedf8ff190..33d4a2af1ca 100644 --- a/TAO/tests/ORB_Local_Config/Bug_2612/Test.cpp +++ b/TAO/tests/ORB_Local_Config/Bug_2612/Test.cpp @@ -9,37 +9,38 @@ #include "ace/Service_Config.h" #include "tao/corba.h" -char const * const scpc_loadOrb = +ACE_TCHAR const * const scpc_loadOrb = // NOTE due to the way ACE_DYNAMIC_SERVICE_DIRECTIVE() macro is defined, + // each parameter CANNOT be split into multiple quoted strings "line1" "nextline" with the expectation that + // they will be join together. Hence the long parameter 4. ACE_DYNAMIC_SERVICE_DIRECTIVE ("testDllOrb", "DllOrb", "_make_DllOrb", - "DllOrb -t 1 -ORBGestalt Local -ORBDebugLevel 3 -ORBId testORB -ORBInitRef " - "NameService=file:///tmp/test-ns.ior -ORBDottedDecimalAddresses 1" +"DllOrb -t 1 -ORBGestalt Local -ORBDebugLevel 3 -ORBId testORB -ORBInitRef NameService=file:///tmp/test-ns.ior -ORBDottedDecimalAddresses 1" ); -char const * const scpc_unloadOrb = ACE_REMOVE_SERVICE_DIRECTIVE ("testDllOrb"); +ACE_TCHAR const * const scpc_unloadOrb = ACE_REMOVE_SERVICE_DIRECTIVE ("testDllOrb"); int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_DEBUG ((LM_DEBUG,"\nbefore first load process directive\n")); - if (0 > ACE_Service_Config::process_directive(scpc_loadOrb)) + if (0 > ACE_Service_Config::process_directive (scpc_loadOrb)) return -1; ACE_OS::sleep(2); ACE_DEBUG ((LM_DEBUG,"\nbefore first unload process directive\n")); - if (0 > ACE_Service_Config::process_directive(scpc_unloadOrb)) + if (0 > ACE_Service_Config::process_directive (scpc_unloadOrb)) return -1; ACE_OS::sleep(2); ACE_DEBUG ((LM_DEBUG, "\nMAIN (%P|%t) Lather, Rince, Repeat ...\n")); - if (0 > ACE_Service_Config::process_directive(scpc_loadOrb)) + if (0 > ACE_Service_Config::process_directive (scpc_loadOrb)) return -1; ACE_OS::sleep(2); - if (0 > ACE_Service_Config::process_directive(scpc_unloadOrb)) + if (0 > ACE_Service_Config::process_directive (scpc_unloadOrb)) return -1; return 0; diff --git a/TAO/tests/ORB_Local_Config/Bunch/Test.cpp b/TAO/tests/ORB_Local_Config/Bunch/Test.cpp index 9098c08edb4..6cfb53ba63f 100644 --- a/TAO/tests/ORB_Local_Config/Bunch/Test.cpp +++ b/TAO/tests/ORB_Local_Config/Bunch/Test.cpp @@ -12,7 +12,6 @@ ACE_RCSID (tests, server, "$Id$") - #include "Service_Configuration_Per_ORB.h" int @@ -38,14 +37,14 @@ testCompatibility (int , ACE_TCHAR *[]) // This uses the same default ACE_Service_Repository ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt_Test> one (new ACE_Service_Gestalt_Test()); - svcname = "CORBANAME_Parser"; + svcname = ACE_TEXT ("CORBANAME_Parser"); ACE_Service_Object* p20 = ACE_Dynamic_Service<ACE_Service_Object>::instance (one.get (), svcname); if (p20 == 0) ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s locally, in one\n"), svcname), -1); - svcname = "CORBALOC_Parser"; + svcname = ACE_TEXT ("CORBALOC_Parser"); ACE_Service_Object* p21 = ACE_Dynamic_Service<ACE_Service_Object>::instance (one.get (), svcname); if ((p21 == 0)) @@ -55,14 +54,14 @@ testCompatibility (int , ACE_TCHAR *[]) // Exiting this scope should fini all services in the glob ... } - svcname = "CORBANAME_Parser"; + svcname = ACE_TEXT ("CORBANAME_Parser"); ACE_Service_Object* p20 = ACE_Dynamic_Service<ACE_Service_Object>::instance (glob.get (), svcname); if ((p20 != 0)) ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected %s globally, too\n"), svcname), -1); - svcname = "CORBALOC_Parser"; + svcname = ACE_TEXT ("CORBALOC_Parser"); ACE_Service_Object* p21 = ACE_Dynamic_Service<ACE_Service_Object>::instance (glob.get (), svcname); if ((p21 != 0)) @@ -74,7 +73,6 @@ testCompatibility (int , ACE_TCHAR *[]) // @brief Test commandline processing - int testCommandLineDirectives (int , ACE_TCHAR *[]) { @@ -111,8 +109,6 @@ testCommandLineDirectives (int , ACE_TCHAR *[]) return 0; } - - // @brief Test the helper components used to implement the temporary // substitution of the repository currently used as "global" for the // sake of registering static services, which are dependent on a dynamic @@ -155,8 +151,6 @@ testTSSGestalt (int , ACE_TCHAR *[]) return 0; } - - // @brief the main driver int @@ -167,7 +161,3 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) && testCommandLineDirectives (argc, argv) && testTSSGestalt(argc, argv); } - - - - diff --git a/TAO/tests/ORB_Local_Config/Separation/Test.cpp b/TAO/tests/ORB_Local_Config/Separation/Test.cpp index 8055b7d2d89..ce39070e37b 100644 --- a/TAO/tests/ORB_Local_Config/Separation/Test.cpp +++ b/TAO/tests/ORB_Local_Config/Separation/Test.cpp @@ -14,7 +14,7 @@ // and inaccesible through anyone but the one they were gegistered with int -testSeparation(int , ACE_TCHAR *[]) +testSeparation (int , ACE_TCHAR *[]) { ACE_TRACE ("testSeparation"); @@ -24,7 +24,7 @@ testSeparation(int , ACE_TCHAR *[]) ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> two (new ACE_Service_Gestalt_Test (10)); two->process_directive (ace_svc_desc_TAO_CORBALOC_Parser); - const ACE_TCHAR * svcname = "IIOP_Factory"; + const ACE_TCHAR *svcname = ACE_TEXT ("IIOP_Factory"); TAO_Protocol_Factory* p10 = ACE_Dynamic_Service<TAO_Protocol_Factory>::instance (one.get (), svcname); if (p10 != 0) @@ -34,7 +34,7 @@ testSeparation(int , ACE_TCHAR *[]) if (p11 != 0) ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Not expected %s locally in two\n"), svcname), -1); - svcname = "CORBANAME_Parser"; + svcname = ACE_TEXT ("CORBANAME_Parser"); ACE_Service_Object* p20 = ACE_Dynamic_Service<ACE_Service_Object>::instance (one.get (), svcname); if (p20 == 0) @@ -44,7 +44,7 @@ testSeparation(int , ACE_TCHAR *[]) if (p31 != 0) ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Not expected %s locally, in two\n"), svcname), -1); - svcname = "CORBALOC_Parser"; + svcname = ACE_TEXT ("CORBALOC_Parser"); ACE_Service_Object* p21 = ACE_Dynamic_Service<ACE_Service_Object>::instance (one.get (), svcname); if (p21 != 0) @@ -62,5 +62,3 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { return testSeparation (argc, argv); } - - diff --git a/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp b/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp index becdb20c1ee..c74f3e83564 100644 --- a/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp +++ b/TAO/tests/ORB_Local_Config/Service_Dependency/Test.cpp @@ -319,7 +319,7 @@ testServiceDependency (int , ACE_TCHAR *[]) // Stating that a thing depends on that dynamic service. Why? // Read on ... - pdep = new ACE_Dynamic_Service_Dependency (one.get (), "TAO_Codeset"); + pdep = new ACE_Dynamic_Service_Dependency (one.get (), ACE_TEXT ("TAO_Codeset")); // This would ordinarily cause the dynamic services to get // unloaded and their DLL's unmapped ... diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp index 38f84d0b505..17532f8f92b 100644 --- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp +++ b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.cpp @@ -12,9 +12,8 @@ ACE_RCSID (tests, ORB_DLL, "$Id$") - // -Abstract_Worker::Abstract_Worker (const char* s) +Abstract_Worker::Abstract_Worker (const ACE_TCHAR *s) : ior_file_ (s) { } @@ -24,7 +23,6 @@ Abstract_Worker::~Abstract_Worker (void) { } - // Service_Config_ORB_DLL::Service_Config_ORB_DLL (void) : is_server_ (-1) @@ -137,9 +135,7 @@ Service_Config_ORB_DLL::svc (void) ACE_TEXT ("(%P|%t) Aborting.\n")), -1); } - } - // Define our service for using with the Service Configurator ACE_FACTORY_DEFINE (Service_Config_ORB_DLL, Service_Config_ORB_DLL) diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h index 7ce803ca818..6d1fc4db7df 100644 --- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h +++ b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/ORB_DLL.h @@ -30,7 +30,7 @@ class Abstract_Worker { public: - Abstract_Worker (const char* ior); + Abstract_Worker (const ACE_TCHAR *ior); virtual ~Abstract_Worker (void); virtual int test_main (int argc, ACE_TCHAR *argv[]) = 0; @@ -69,7 +69,6 @@ private: int parse_args (int argc, ACE_TCHAR *argv[]); }; - /** * @class Service_Config_ORB_DLL * @@ -102,11 +101,8 @@ private: ACE_Auto_Ptr<ACE_ARGV> argv_; }; - ACE_FACTORY_DECLARE (Service_Config_ORB_DLL, Service_Config_ORB_DLL) - - #include /**/ "ace/post.h" #endif /* SERVICE_CONFIG_ORB_DLL_H */ diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc index 30c688526af..326f3fc69c4 100644 --- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc +++ b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/Two_DLL_ORB.mpc @@ -8,8 +8,7 @@ project(*idl): taoidldefaults { custom_only = 1 } - -project(ORB DLL Server) : taolib_with_idl, portableserver, threads { +project(ORB_DLL_Server) : taolib_with_idl, portableserver, threads { after += *idl sharedname = ORB_DLL_Server dynamicflags = SERVICE_CONFIG_ORB_DLL_BUILD_DLL @@ -39,8 +38,8 @@ project(ORB DLL Server) : taolib_with_idl, portableserver, threads { } } -project(ORB DLL Client) : taolib_with_idl, portableserver { - after += *idl +project(ORB_DLL_Client) : taolib_with_idl, portableserver { + after += ORB_DLL_Server sharedname = ORB_DLL_Client dynamicflags = SERVICE_CONFIG_ORB_DLL_BUILD_DLL @@ -63,7 +62,6 @@ project(ORB DLL Client) : taolib_with_idl, portableserver { } } - project(*) : taoserver { after += lib ORB_DLL_Client ORB_DLL_Server exename = Test diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp index 50d78473955..562ecf86fde 100644 --- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp +++ b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/client.cpp @@ -10,7 +10,7 @@ ACE_RCSID(Hello, client, "$Id$") Client_Worker::Client_Worker () - : Abstract_Worker ("file://test.ior") + : Abstract_Worker (ACE_TEXT ("file://test.ior")) { // ACE_DEBUG ((LM_DEBUG, "(%P|%t) %@ Client::<ctor>\n", this)); } @@ -46,12 +46,9 @@ Client_Worker::parse_args (int argc, ACE_TCHAR *argv[]) int Client_Worker::test_main (int argc, ACE_TCHAR *argv[]) { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - ACE_Argv_Type_Converter cvt (argc, argv); - - CORBA::ORB_var orb = CORBA::ORB_init (cvt.get_argc (), cvt.get_ASCII_argv ()); - - if (parse_args (cvt.get_argc (), cvt.get_ASCII_argv ()) != 0) + if (parse_args (argc, argv) != 0) ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("(%P|%t) Could not parse the arguments\n")), 1); @@ -66,7 +63,7 @@ Client_Worker::test_main (int argc, ACE_TCHAR *argv[]) try { - co = orb->string_to_object(ior_file_.c_str ()); + co = orb->string_to_object (ACE_TEXT_ALWAYS_CHAR (ior_file_.c_str ())); if (co == 0) { @@ -95,7 +92,7 @@ Client_Worker::test_main (int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) String returned from the server <%s>\n"), - the_string.in ())); + ACE_TEXT_CHAR_TO_TCHAR (the_string.in ()))); hello->shutdown (); diff --git a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp index e44275ac8eb..11cdd71a3be 100644 --- a/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp +++ b/TAO/tests/ORB_Local_Config/Two_DLL_ORB/server.cpp @@ -16,7 +16,7 @@ ACE_RCSID (Hello, // Server_Worker::Server_Worker () - : Abstract_Worker ("test.ior") + : Abstract_Worker (ACE_TEXT ("test.ior")) { } @@ -58,12 +58,10 @@ Server_Worker::test_main (int argc, ACE_TCHAR *argv[]) // Making sure there are no stale ior files to confuse a client ACE_OS::unlink (ior_file_.c_str ()); - ACE_Argv_Type_Converter cvt (argc, argv); - CORBA::ORB_var orb = CORBA::ORB_init (cvt.get_argc (), - cvt.get_ASCII_argv ()); + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); + orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ()); @@ -76,7 +74,7 @@ Server_Worker::test_main (int argc, ACE_TCHAR *argv[]) PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); - if (parse_args (cvt.get_argc (), cvt.get_ASCII_argv ()) != 0) + if (parse_args (argc, argv) != 0) return 1; Hello *hello_impl; @@ -84,7 +82,7 @@ Server_Worker::test_main (int argc, ACE_TCHAR *argv[]) Hello (orb.in ()), 1); - PortableServer::ServantBase_var owner_transfer(hello_impl); + PortableServer::ServantBase_var owner_transfer (hello_impl); PortableServer::ObjectId_var id = root_poa->activate_object (hello_impl); @@ -106,8 +104,9 @@ Server_Worker::test_main (int argc, ACE_TCHAR *argv[]) FILE *output_file= ACE_OS::fopen (ior_file_.c_str (), "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) Cannot open output file for writing IOR: %s"), - ior_file_.c_str ()), + ACE_TEXT ("(%P|%t) Cannot open output file %s for writing IOR: %s"), + ior_file_.c_str (), + 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/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp index 55725358965..4c5e6adb765 100644 --- a/TAO/utils/catior/catior.cpp +++ b/TAO/utils/catior/catior.cpp @@ -110,7 +110,7 @@ catiiop (char* string) ACE_DEBUG ((LM_DEBUG, "Host Name:\t%s\n", - hostname.in ())); + ACE_TEXT_CHAR_TO_TCHAR (hostname.in ()))); ACE_DEBUG ((LM_DEBUG, "Port Number:\t%d\n", port_number)); @@ -121,7 +121,7 @@ catiiop (char* string) // string); ACE_DEBUG ((LM_DEBUG, "\nThe Object Key as string:\n%s\n", - string)); + ACE_TEXT_CHAR_TO_TCHAR (string))); return 1; } @@ -218,7 +218,7 @@ catior (char const * str) ACE_DEBUG ((LM_DEBUG, "The Type Id:\t\"%s\"\n", - type_hint.in ())); + ACE_TEXT_CHAR_TO_TCHAR (type_hint.in ()))); // Read the profiles, discarding all until an IIOP profile comes by. // Once we see an IIOP profile, ignore any further ones. @@ -373,7 +373,7 @@ catpoop (char* string) ACE_DEBUG ((LM_DEBUG, "Host Name:\t%s\n", - hostname)); + ACE_TEXT_CHAR_TO_TCHAR (hostname))); CORBA::string_free (hostname); // read the server name @@ -391,7 +391,7 @@ catpoop (char* string) ACE_DEBUG ((LM_DEBUG, "Server Name:\t%s\n", - server_name)); + ACE_TEXT_CHAR_TO_TCHAR (server_name))); CORBA::string_free (server_name); @@ -410,7 +410,7 @@ catpoop (char* string) ACE_DEBUG ((LM_DEBUG, "Marker:\t\t%s\n", - marker)); + ACE_TEXT_CHAR_TO_TCHAR (marker))); CORBA::string_free (marker); cp = ACE_OS::strchr (string, ':'); @@ -428,7 +428,7 @@ catpoop (char* string) ACE_DEBUG ((LM_DEBUG, "IR Host:\t\t%s\n", - IR_host)); + ACE_TEXT_CHAR_TO_TCHAR (IR_host))); CORBA::string_free (IR_host); // Read the IR_server @@ -446,29 +446,25 @@ catpoop (char* string) ACE_DEBUG ((LM_DEBUG, "IR Server:\t\t%s\n", - IR_server)); + ACE_TEXT_CHAR_TO_TCHAR (IR_server))); CORBA::string_free (IR_server); // Read the interface_marker ACE_DEBUG ((LM_DEBUG, "Interface Marker:\t%s\n", - string)); + ACE_TEXT_CHAR_TO_TCHAR (string))); return 1; } int ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) { - ACE_Argv_Type_Converter argcon (argcw, argvw); - CORBA::ORB_var orb_var = CORBA::ORB_init (argcon.get_argc (), - argcon.get_ASCII_argv (), - "TAO"); + CORBA::ORB_var orb_var = CORBA::ORB_init (argc, argv, "TAO"); CORBA::Boolean b = 0; CORBA::Boolean have_argument = 0; int opt; - ACE_Get_Opt get_opt (argcon.get_argc (), argcon.get_TCHAR_argv (), - ACE_TEXT ("f:n:x")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("f:n:x")); while ((opt = get_opt ()) != EOF) { @@ -504,7 +500,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) } CosNaming::Name *name = - naming_context->to_name (get_opt.opt_arg ()); + naming_context->to_name (ACE_TEXT_ALWAYS_CHAR (get_opt.opt_arg ())); try { @@ -512,27 +508,27 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) if (CORBA::is_nil (server_object.in ())) { ACE_ERROR_RETURN ((LM_ERROR, - "name %s is not resolved to a valid object\n"), + "name is not resolved to a valid object\n"), -1); } } catch (const CosNaming::NamingContext::NotFound& nf) { - const char *reason; + const ACE_TCHAR *reason; switch (nf.why) { case CosNaming::NamingContext::missing_node: - reason = "missing node"; + reason = ACE_TEXT ("missing node"); break; case CosNaming::NamingContext::not_context: - reason = "not context"; + reason = ACE_TEXT ("not context"); break; case CosNaming::NamingContext::not_object: - reason = "not object"; + reason = ACE_TEXT ("not object"); break; default: - reason = "not known"; + reason = ACE_TEXT ("not known"); break; } ACE_ERROR_RETURN ((LM_ERROR, @@ -575,7 +571,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) ACE_DEBUG ((LM_DEBUG, "\nhere is the IOR\n%s\n\n", - aString.rep ())); + ACE_TEXT_CHAR_TO_TCHAR (aString.rep ()))); char * str = 0; if (aString.find ("IOR:") == 0) @@ -745,7 +741,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) ACE_DEBUG ((LM_DEBUG, "\nhere is the IOR\n%s\n\n", - aString.rep ())); + ACE_TEXT_CHAR_TO_TCHAR (aString.rep ()))); char* str; if (aString.find ("IOR:") == 0) @@ -900,7 +896,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) ACE_DEBUG ((LM_DEBUG, "\nhere is the IOR\n%s\n\n", - aString.rep ())); + ACE_TEXT_CHAR_TO_TCHAR (aString.rep ()))); char* str; if (aString.find ("IOR:") == 0) @@ -1070,12 +1066,12 @@ cat_tao_tag_endpoints (TAO_InputCDR& stream) "%I Endpoint #%d:\n",iter+1)); const char *host = epseq[iter].host; ACE_DEBUG ((LM_DEBUG, - "%I Host: %s\n",host)); + "%I Host: %s\n", ACE_TEXT_CHAR_TO_TCHAR (host))); CORBA::UShort port = epseq[iter].port; ACE_DEBUG ((LM_DEBUG, - "%I Port: %d\n",port)); + "%I Port: %d\n", port)); ACE_DEBUG ((LM_DEBUG, - "%I Priority: %d\n",epseq[iter].priority)); + "%I Priority: %d\n", epseq[iter].priority)); } return 1; @@ -1096,7 +1092,7 @@ cat_tag_alternate_endpoints (TAO_InputCDR& stream) { (stream2 >> port) == 0) ACE_ERROR_RETURN ((LM_ERROR,"cannot extract endpoint info\n"),0); ACE_DEBUG ((LM_DEBUG, - "%I endpoint: %s:%d\n",host.in(),port)); + "%I endpoint: %s:%d\n", ACE_TEXT_CHAR_TO_TCHAR (host.in()), port)); return 1; } @@ -1337,12 +1333,12 @@ cat_octet_seq (const char *object_name, ACE_DEBUG ((LM_DEBUG, "%I %s len:\t%d\n", - object_name, + ACE_TEXT_CHAR_TO_TCHAR (object_name), length)); ACE_DEBUG ((LM_DEBUG, "%I %s as hex:\n", - object_name)); + ACE_TEXT_CHAR_TO_TCHAR (object_name))); CORBA::Octet anOctet; CORBA::String_var objKey = CORBA::string_alloc (length + 1); @@ -1371,7 +1367,7 @@ cat_octet_seq (const char *object_name, ACE_DEBUG ((LM_DEBUG, "\n%I The %s as string:\n%I ", - object_name)); + ACE_TEXT_CHAR_TO_TCHAR (object_name))); for (i = 0; i < length; ++i) { @@ -1424,7 +1420,7 @@ void displayHex (TAO_InputCDR & str) if (theDescr.length () == 0) ACE_DEBUG ((LM_DEBUG," Unknown CodeSet \n ")); else - ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" %s \n"), theDescr.c_str ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" %s \n"), ACE_TEXT_CHAR_TO_TCHAR (theDescr.c_str ()))); } CORBA::Boolean @@ -1441,7 +1437,7 @@ cat_codeset_info (TAO_InputCDR& cdr) ACE_DEBUG ((LM_DEBUG, "\tComponent byte order:\t%s Endian\n", - (stream.byte_order () ? "Little" : "Big"))); + (stream.byte_order () ? ACE_TEXT ("Little") : ACE_TEXT ("Big")))); // CodesetId for char // CORBA::ULong c_ncsId; @@ -1615,13 +1611,13 @@ cat_profile_helper (TAO_InputCDR& stream, "%I detected new v%d.%d %s profile that catior cannot decode\n", iiop_version_major, iiop_version_minor, - protocol)); + ACE_TEXT_CHAR_TO_TCHAR (protocol))); return 1; } ACE_DEBUG ((LM_DEBUG, "%s Version:\t%d.%d\n", - protocol, + ACE_TEXT_CHAR_TO_TCHAR (protocol), iiop_version_major, iiop_version_minor)); @@ -1640,7 +1636,7 @@ cat_profile_helper (TAO_InputCDR& stream, ACE_DEBUG ((LM_DEBUG, "%I Host Name:\t%s\n", - hostname.in ())); + ACE_TEXT_CHAR_TO_TCHAR (hostname.in ()))); ACE_DEBUG ((LM_DEBUG, "%I Port Number:\t%d\n", port_number)); @@ -1718,7 +1714,7 @@ cat_coiop_profile (TAO_InputCDR& stream) ACE_DEBUG ((LM_DEBUG, "%I UUID:\t%s\n", - uuid.in ())); + ACE_TEXT_CHAR_TO_TCHAR (uuid.in ()))); if (cat_object_key (str) == 0) return false; @@ -1798,7 +1794,7 @@ cat_uiop_profile (TAO_InputCDR& stream) ACE_DEBUG ((LM_DEBUG, "%I Rendezvous point:\t%s\n", - rendezvous.in ())); + ACE_TEXT_CHAR_TO_TCHAR (rendezvous.in ()))); if (cat_object_key (str) == 0) return 0; @@ -1879,7 +1875,7 @@ cat_sciop_profile (TAO_InputCDR& stream) ACE_DEBUG ((LM_DEBUG, "%I Host Name:\t%s\n", - hostname.in ())); + ACE_TEXT_CHAR_TO_TCHAR (hostname.in ()))); } @@ -1946,13 +1942,13 @@ cat_nsk_profile_helper (TAO_InputCDR& stream, "%I detected new v%d.%d %s profile that catior cannot decode", iiop_version_major, iiop_version_minor, - protocol)); + ACE_TEXT_CHAR_TO_TCHAR (protocol))); return 1; } ACE_DEBUG ((LM_DEBUG, "%s Version:\t%d.%d\n", - protocol, + ACE_TEXT_CHAR_TO_TCHAR (protocol), iiop_version_major, iiop_version_minor)); @@ -1968,7 +1964,7 @@ cat_nsk_profile_helper (TAO_InputCDR& stream, ACE_DEBUG ((LM_DEBUG, "%I FS Address:\t%s\n", - fsaddress)); + ACE_TEXT_CHAR_TO_TCHAR (fsaddress))); CORBA::string_free (fsaddress); if (cat_object_key (str) == 0) |