summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2009-07-18 09:22:10 +0000
committermsmit <msmit@remedy.nl>2009-07-18 09:22:10 +0000
commit76032c932ece5869f1da6eef20f0370eb3451db9 (patch)
tree24718c7ac155c1161b94e8387fa3570268d3a33a
parent34993f6bc2d5efe3e41e1f68c7f033cc12116f50 (diff)
downloadATCD-76032c932ece5869f1da6eef20f0370eb3451db9.tar.gz
Sat Jul 18 09:20:47 UTC 2009 Marcel Smit <msmit@remedy.nl>
* DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp: * DAnCE/Starter/Starter.h: * DAnCE/Starter/Starter.cpp: * tests/CIAO_ComponentServer/Activator/client.cpp: Fixed UNICODE compiler errors.
-rw-r--r--CIAO/ChangeLog12
-rw-r--r--CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp2
-rw-r--r--CIAO/DAnCE/Starter/Starter.cpp80
-rw-r--r--CIAO/DAnCE/Starter/Starter.h8
-rw-r--r--CIAO/tests/CIAO_ComponentServer/Activator/client.cpp4
5 files changed, 57 insertions, 49 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 7cd275a7ca2..a4ad2e83d8d 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,9 +1,17 @@
+Sat Jul 18 09:20:47 UTC 2009 Marcel Smit <msmit@remedy.nl>
+
+ * DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp:
+ * DAnCE/Starter/Starter.h:
+ * DAnCE/Starter/Starter.cpp:
+ * tests/CIAO_ComponentServer/Activator/client.cpp:
+ Fixed UNICODE compiler errors.
+
Sat Jul 18 05:12:00 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
* DAnCE/Logger/Logger_Service.cpp:
- stab at some unicode problems on Windows.
-
+ stab at some unicode problems on Windows.
+
Sat Jul 18 05:01:32 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
* DAnCE/ExecutionManager/ExecutionManager.mpc:
diff --git a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp
index cd76a9b2022..54c13c3373d 100644
--- a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp
+++ b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp
@@ -800,7 +800,7 @@ Plan_Launcher_Base_Impl::expand_env_vars (const ACE_TCHAR * s)
if (pos_end - pos_start > 1)
{
ACE_Env_Value<const ACE_TCHAR*> val ((ACE_TCHAR *)src.substring (pos_start + 1, pos_end - pos_start - 1).c_str(), 0);
- res += val;
+ //res += val;
pos_done = pos_end;
}
else
diff --git a/CIAO/DAnCE/Starter/Starter.cpp b/CIAO/DAnCE/Starter/Starter.cpp
index 17827f0c103..00877defda7 100644
--- a/CIAO/DAnCE/Starter/Starter.cpp
+++ b/CIAO/DAnCE/Starter/Starter.cpp
@@ -137,7 +137,7 @@ void Starter::parseArgs(int argc, ACE_TCHAR * argv[])
int j;
char c;
- ACE_TString s;
+ ACE_CString s;
while ( (c = opts ()) != -1)
{
DANCE_DEBUG((LM_TRACE, "[%M] Option : \"%s\" with argument \"%s\"\n", opts.last_option(), opts.opt_arg()));
@@ -154,16 +154,16 @@ void Starter::parseArgs(int argc, ACE_TCHAR * argv[])
this->optNSFile_ = opts.opt_arg();
break;
case 'n':
- s = opts.opt_arg();
+ s = (const char *)opts.opt_arg();
if (0 < s.length())
{
ACE_CString nodename;
Node node;
- size_t const pos = s.find(ACE_TEXT("="));
+ size_t const pos = s.find("=");
if (ACE_CString::npos != pos)
{
- nodename = s.substring(0, pos);
- node.ior_ = s.substring(pos + 1);
+ nodename = (const char *)s.substring(0, pos).c_str ();
+ node.ior_ = (const char *)s.substring(pos + 1).c_str ();
/*
node.obj = this->orb_->string_to_object(objstr.c_str());
if (CORBA::is_nil (node.obj))
@@ -177,11 +177,11 @@ void Starter::parseArgs(int argc, ACE_TCHAR * argv[])
{
nodename = s;
DANCE_DEBUG ( (LM_TRACE, "[%M] Node \"%s\" will be started.\n", nodename.c_str()));
- if (opts.optind < opts.argc_&& '-' != (s = opts.argv_[opts.optind])[0])
+ if (opts.optind < opts.argc_&& '-' != (s = (const char *)opts.argv_[opts.optind])[0])
{
++opts.optind;
node.iorfile_ = s;
- DANCE_DEBUG ( (LM_TRACE, "[%M] and its IOR will be written to file \"%s\".\n", node.iorfile_.c_str()));
+ DANCE_DEBUG ( (LM_TRACE, "[%M] and its IOR will be written to file \"%C\".\n", node.iorfile_.c_str()));
}
}
@@ -208,7 +208,7 @@ void Starter::parseArgs(int argc, ACE_TCHAR * argv[])
}
this->optEM_ = true;
DANCE_DEBUG ( (LM_TRACE, "[%M] ExecutionManager will be started.\n"));
- this->optEMFile_ = opts.opt_arg();
+ this->optEMFile_ = (const char *)opts.opt_arg();
break;
case 'l':
j = ACE_OS::atoi (opts.opt_arg());
@@ -235,17 +235,17 @@ void Starter::parseArgs(int argc, ACE_TCHAR * argv[])
break;
case 'g':
DANCE_DEBUG ( (LM_TRACE, "[%M] Object key will be generated.\n"));
- this->optGenObjKey_ = opts.opt_arg();
+ this->optGenObjKey_ = (const char *)opts.opt_arg();
if (0 == this->optGenObjKey_.length())
{
DANCE_ERROR ( (LM_ERROR, "[%M] --gen-object-key without argument. Doing nothing.\n"));
}
break;
case 0: // long options that do not have short
- s = opts.last_option();
+ s = (const char *)opts.last_option();
if (s == "process-ns-options")
{
- this->optNSOptions_ = opts.opt_arg();
+ this->optNSOptions_ = (const char *)opts.opt_arg();
if (0 == this->optNSOptions_.length())
{
DANCE_ERROR ( (LM_ERROR, "[%M] --process-ns-options without argument\n"));
@@ -260,7 +260,7 @@ void Starter::parseArgs(int argc, ACE_TCHAR * argv[])
}
break;
default:
- if (!isPossibleOption(opts.last_option()))
+ if (!isPossibleOption((const char *)opts.last_option()))
{
DANCE_ERROR((LM_ERROR, "[%M] Invalid option : %s\n", opts.last_option()));
this->usage();
@@ -300,7 +300,7 @@ void Starter::execute()
(*it).int_id_.obj = this->initNodeManager((*it).ext_id_.c_str());
if (0 != (*it).int_id_.iorfile_.length())
{
- this->write_IOR((*it).int_id_.iorfile_.c_str(), this->orb_->object_to_string((*it).int_id_.obj));
+ this->write_IOR((const ACE_TCHAR *)(*it).int_id_.iorfile_.c_str(), this->orb_->object_to_string((*it).int_id_.obj));
}
}
@@ -311,7 +311,7 @@ void Starter::execute()
em = this->initExecutionManager();
if ( !CORBA::is_nil(em) && 0 < this->optEMFile_.length())
{
- this->write_IOR(this->optEMFile_.c_str(),
+ this->write_IOR((const ACE_TCHAR *)this->optEMFile_.c_str(),
this->orb_->object_to_string(em.in()));
}
orb_run = true;
@@ -519,7 +519,7 @@ void Starter::initNaming()
ACE_CString directive =
"dynamic Naming_Loader Service_Object * TAO_CosNaming_Serv:_make_TAO_Naming_Loader() \"";
directive += this->optNSOptions_ + "\"";
- ACE_Service_Config::process_directive(directive.c_str());
+ ACE_Service_Config::process_directive((const ACE_TCHAR *)directive.c_str());
}
DANCE_DEBUG ( (LM_TRACE, "[%M] Putting ior to file if necessary...\n"));
@@ -663,7 +663,7 @@ Starter::argCopyForNaming (int & c, char **& v)
v = new char*[total_sz];
c = 0;
//take the 0-th argument anyway
- v[c++] = CORBA::string_dup (this->argv_[0]);
+ v[c++] = CORBA::string_dup ((const char *)this->argv_[0]);
for (int i = 1; i < total_sz; ++i) v[i] = 0;
@@ -684,7 +684,7 @@ Starter::argCopyForNaming (int & c, char **& v)
}
void
-Starter::argCopyForNode (const char * node, int & c, char **& v)
+Starter::argCopyForNode (const char * node, int & c, ACE_TCHAR **& v)
{
const char * validOptions[] =
{ //"--node-mgr", "-n"
@@ -696,16 +696,16 @@ Starter::argCopyForNode (const char * node, int & c, char **& v)
};
int total_sz = this->argc_ + 1;
- v = new char*[total_sz];
+ v = new ACE_TCHAR*[total_sz];
for (int i = 0; i < total_sz; ++i) v[i] = 0;
c = 0;
- v[c++] = CORBA::string_dup ("-n");
- v[c++] = CORBA::string_dup (node);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ("-n");
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup (node);
Node n;
if (0 == this->nodes_.find(node, n) && 0 < n.iorfile_.length())
{
- v[c++] = CORBA::string_dup (n.iorfile_.c_str());
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup (n.iorfile_.c_str());
}
bool take = false;
@@ -716,26 +716,26 @@ Starter::argCopyForNode (const char * node, int & c, char **& v)
take = false;
for (int j = 0; 0 != validOptions[j]; ++j)
{
- if (this->argv_[i] == ACE_OS::strstr (this->argv_[i], validOptions[j]))
+ if (this->argv_[i] == ACE_OS::strstr (this->argv_[i], (ACE_TCHAR *)validOptions[j]))
{
if (i + 1 < this->argc_
&& (0 == ACE_OS::strcmp (this->argv_[i], ACE_TEXT("--node-mgr")) || 0 == ACE_OS::strcmp (this->argv_[i], ACE_TEXT("-n"))))
{
- ACE_CString s = this->argv_[i+1];
+ ACE_CString s = (const char *)this->argv_[i+1];
if (ACE_CString::npos != s.find ('='))
{
break;
}
else if (s == node)
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
take = true;
break;
}
}
else
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
take = true;
break;
}
@@ -744,14 +744,14 @@ Starter::argCopyForNode (const char * node, int & c, char **& v)
}
else if (take)
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
}
}
v[c] = 0;
}
void
-Starter::argCopyForEM (int & c, char **& v)
+Starter::argCopyForEM (int & c, ACE_TCHAR **& v)
{
const char * validOptions[] =
{
@@ -765,7 +765,7 @@ Starter::argCopyForEM (int & c, char **& v)
};
int total_sz = this->argc_ + 2 * this->nodes_.total_size() + 1;
- v = new char*[total_sz];
+ v = new ACE_TCHAR*[total_sz];
for (int i = 0; i < total_sz; ++i) v[i] = 0;
bool take = false;
@@ -777,9 +777,9 @@ Starter::argCopyForEM (int & c, char **& v)
take = false;
for (int j = 0; 0 != validOptions[j]; ++j)
{
- if (this->argv_[i] == ACE_OS::strstr (this->argv_[i], validOptions[j]))
+ if (this->argv_[i] == ACE_OS::strstr (this->argv_[i], (const ACE_TCHAR *)validOptions[j]))
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
take = true;
break;
}
@@ -787,7 +787,7 @@ Starter::argCopyForEM (int & c, char **& v)
}
else if (take)
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
}
}
@@ -796,7 +796,7 @@ Starter::argCopyForEM (int & c, char **& v)
++it)
{
//v[c++] = CORBA::string_dup("--node-mgr");
- v[c++] = CORBA::string_dup ("-n");
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ("-n");
ACE_CString s = (*it).ext_id_;
s += "=";
if ( 0 < (*it).int_id_.ior_.length() )
@@ -812,14 +812,14 @@ Starter::argCopyForEM (int & c, char **& v)
DANCE_ERROR((LM_ERROR, "[%M] No IOR for node \"%s\"\n", (*it).ext_id_.c_str()));
continue;
}
- v[c++] = CORBA::string_dup (s.c_str());
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup (s.c_str());
}
v[c] = 0;
}
void
-Starter::argCopyForPL (int & c, char **& v)
+Starter::argCopyForPL (int & c, ACE_TCHAR **& v)
{
const char * validOptions[] =
{ "--em-ior", "-k"
@@ -833,7 +833,7 @@ Starter::argCopyForPL (int & c, char **& v)
};
int total_sz = this->argc_ + 1;
- v = new char*[total_sz];
+ v = new ACE_TCHAR*[total_sz];
for (int i = 0; i < total_sz; ++i) v[i] = 0;
bool take = false;
@@ -845,9 +845,9 @@ Starter::argCopyForPL (int & c, char **& v)
take = false;
for (int j = 0; 0 != validOptions[j]; ++j)
{
- if (this->argv_[i] == ACE_OS::strstr (this->argv_[i], validOptions[j]))
+ if (this->argv_[i] == ACE_OS::strstr (this->argv_[i], (const ACE_TCHAR *)validOptions[j]))
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
take = true;
break;
}
@@ -855,18 +855,18 @@ Starter::argCopyForPL (int & c, char **& v)
}
else if (take)
{
- v[c++] = CORBA::string_dup (this->argv_[i]);
+ v[c++] = (ACE_TCHAR *)CORBA::string_dup ((const char *)this->argv_[i]);
}
}
v[c] = 0;
}
void
-Starter::releaseArgs (int c, char ** v)
+Starter::releaseArgs (int c, ACE_TCHAR ** v)
{
for (int i = 0; i < c && 0 != v[i]; ++i)
{
- CORBA::string_free (v[i]);
+ CORBA::string_free ((char *)v[i]);
v[i] = 0;
}
delete [] v;
diff --git a/CIAO/DAnCE/Starter/Starter.h b/CIAO/DAnCE/Starter/Starter.h
index 4e737b73e4e..32bb19958c6 100644
--- a/CIAO/DAnCE/Starter/Starter.h
+++ b/CIAO/DAnCE/Starter/Starter.h
@@ -59,10 +59,10 @@ namespace DAnCE
CORBA::Object_ptr initExecutionManager();
void runPlanLauncher();
void argCopyForNaming (int & c, char **& v);
- void argCopyForNode (const char * node, int & c, char **& v);
- void argCopyForEM (int & c, char **& v);
- void argCopyForPL (int & c, char **& v);
- void releaseArgs (int c, char ** v);
+ void argCopyForNode (const char * node, int & c, ACE_TCHAR **& v);
+ void argCopyForEM (int & c, ACE_TCHAR **& v);
+ void argCopyForPL (int & c, ACE_TCHAR **& v);
+ void releaseArgs (int c, ACE_TCHAR ** v);
static bool isPossibleOption(const char* opt);
void configure_logging_backend (void);
diff --git a/CIAO/tests/CIAO_ComponentServer/Activator/client.cpp b/CIAO/tests/CIAO_ComponentServer/Activator/client.cpp
index 0fc52410ef6..35ee04a4402 100644
--- a/CIAO/tests/CIAO_ComponentServer/Activator/client.cpp
+++ b/CIAO/tests/CIAO_ComponentServer/Activator/client.cpp
@@ -7,7 +7,7 @@
#include "ciao/ComponentServer/CIAO_ComponentInstallation_Impl.h"
#include "ciao/Valuetype_Factories/ConfigValue.h"
-const ACE_TCHAR *cs_path = "ciao_componentserver";
+const char *cs_path = "ciao_componentserver";
CORBA::ULong spawn_delay = 30;
int
@@ -20,7 +20,7 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 's':
- cs_path = get_opts.opt_arg ();
+ cs_path = (char *)get_opts.opt_arg ();
break;
case 'd':