summaryrefslogtreecommitdiff
path: root/TAO/tests/CodeSets
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-06-25 13:07:37 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-06-25 13:07:37 +0000
commit2f8115aa37732b1eaf423aabf0869e9e493e1fb1 (patch)
tree98107b53553b1b0bf529a5dd2953369dcb3ab5ea /TAO/tests/CodeSets
parent0e338770ebc52b2289473284e9a0b7bed1f50ae3 (diff)
downloadATCD-2f8115aa37732b1eaf423aabf0869e9e493e1fb1.tar.gz
ChangeLogTag: Wed Jun 25 13:05:00 UTC 2008 Simon Massey <sma at prismtech dot com>
Diffstat (limited to 'TAO/tests/CodeSets')
-rw-r--r--TAO/tests/CodeSets/simple/client.cpp10
-rw-r--r--TAO/tests/CodeSets/simple/server.cpp14
2 files changed, 11 insertions, 13 deletions
diff --git a/TAO/tests/CodeSets/simple/client.cpp b/TAO/tests/CodeSets/simple/client.cpp
index 7549ac25f6e..f7f60ce631e 100644
--- a/TAO/tests/CodeSets/simple/client.cpp
+++ b/TAO/tests/CodeSets/simple/client.cpp
@@ -36,7 +36,7 @@ make_wstring (const char *str)
size_t len = ACE_OS::strlen (str) + 1;
wchar_t *wstr = new wchar_t[len];
ACE_DEBUG ((LM_DEBUG,
- "make_wstring: str = %s\n",str));
+ "make_wstring: str = %s\n", ACE_TEXT_CHAR_TO_TCHAR (str)));
for (size_t i = 0; i < len; i++)
{
char *t = const_cast<char *> (str);
@@ -50,7 +50,7 @@ make_wstring (const char *str)
// ------------------------------------------------------------
// Client
// ------------------------------------------------------------
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
char buf[1000];
int error_count = 0;
@@ -67,7 +67,7 @@ int main (int argc, char *argv[])
}
else
{
- ACE_OS::strcpy (buf, argv[1]);
+ ACE_OS::strcpy (buf, ACE_TEXT_ALWAYS_CHAR (argv[1]));
}
// The first arg should be the IOR
@@ -94,7 +94,7 @@ int main (int argc, char *argv[])
outarg >>= any_reply;
ACE_DEBUG ((LM_DEBUG,
- "Client sent %s, got %s\n", bare_string, reply.in () ));
+ "Client sent %s, got %s\n", ACE_TEXT_CHAR_TO_TCHAR (bare_string), ACE_TEXT_CHAR_TO_TCHAR (reply.in ()) ));
if (ACE_OS::strcmp (bare_string, reply.in ()) != 0)
{
@@ -102,7 +102,7 @@ int main (int argc, char *argv[])
}
ACE_DEBUG ((LM_DEBUG,
- "Client sent %s, got %s\n", any_string, any_reply ));
+ "Client sent %s, got %s\n", ACE_TEXT_CHAR_TO_TCHAR (any_string), ACE_TEXT_CHAR_TO_TCHAR (any_reply) ));
if (ACE_OS::strcmp (any_string, any_reply) != 0)
{
diff --git a/TAO/tests/CodeSets/simple/server.cpp b/TAO/tests/CodeSets/simple/server.cpp
index 49fa19926bb..28985164cc5 100644
--- a/TAO/tests/CodeSets/simple/server.cpp
+++ b/TAO/tests/CodeSets/simple/server.cpp
@@ -41,11 +41,11 @@ public:
CORBA::Any_out outany)
{
ACE_DEBUG ((LM_DEBUG,
- "Server: bare string: %s\n", name));
+ "Server: bare string: %s\n", ACE_TEXT_CHAR_TO_TCHAR (name)));
const char *any_str;
inany >>= any_str;
ACE_DEBUG ((LM_DEBUG,
- "Server: inserted string: %s\n\n", any_str));
+ "Server: inserted string: %s\n\n", ACE_TEXT_CHAR_TO_TCHAR (any_str)));
CORBA::Any *out_ptr = 0;
ACE_NEW_RETURN (out_ptr,
@@ -78,14 +78,13 @@ private:
// ------------------------------------------------------------
// Main routine
// ------------------------------------------------------------
-int main(int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
{
// Init the orb
- CORBA::ORB_var orb= CORBA::ORB_init (argc,
- argv);
+ CORBA::ORB_var orb= CORBA::ORB_init (argc, argv);
// Initialize POA
CORBA::Object_var poa_object=
@@ -127,9 +126,8 @@ int main(int argc, char *argv[])
FILE *output_file= ACE_OS::fopen ("server.ior", "w");
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- "server.ior"),
- 1);
+ "Cannot open output file for writing IOR: server.ior"),
+ 1);
ACE_OS::fprintf (output_file, "%s", ior.in ());
ACE_OS::fclose (output_file);