summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2006-05-05 17:17:39 +0000
committerSteve Huston <shuston@riverace.com>2006-05-05 17:17:39 +0000
commitbd80a26f76457940a4fce314803dc87d8f135a31 (patch)
tree24005e01560de31047abebcca77ca3cb758e7329
parentaa82d8a4d52a8086557b52a827f142778a6d2be0 (diff)
downloadATCD-bd80a26f76457940a4fce314803dc87d8f135a31.tar.gz
ChangeLogTag:Fri May 5 17:01:32 UTC 2006 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog7
-rw-r--r--examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp31
-rw-r--r--examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp41
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp4
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h6
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i25
6 files changed, 63 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index 0749c976507..9b39020efd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri May 5 17:01:32 UTC 2006 Steve Huston <shuston@riverace.com>
+
+ * examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp:
+ * examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp:
+ * examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.{cpp i}:
+ Wide-char corrections.
+
Fri May 5 13:11:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/FIFO.cpp:
diff --git a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp
index 77406f9bada..91d81338ea1 100644
--- a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp
@@ -13,30 +13,30 @@ ACE_RCSID(client, local_spipe_client_test, "$Id$")
#if defined (ACE_HAS_STREAM_PIPES)
-static char *program_name;
+static ACE_TCHAR *program_name;
// debug state on or off
static int debug = 0;
-static const char *rendezvous_spipe = "/tmp/foo_spipe";
+static const ACE_TCHAR *rendezvous_spipe = ACE_TEXT ("/tmp/foo_spipe");
// Name of file to send.
-static const char *file_name = "./local_data";
+static const ACE_TCHAR *file_name = ACE_TEXT ("./local_data");
static void
print_usage_and_die (void)
{
ACE_ERROR ((LM_ERROR,
- "usage: %s [-d] [-r rendezvous_spipe]\n",
+ ACE_TEXT ("usage: %s [-d] [-r rendezvous_spipe]\n"),
program_name));
ACE_OS::exit (1);
}
static void
-parse_arguments (int argc, char *argv[])
+parse_arguments (int argc, ACE_TCHAR *argv[])
{
program_name = argv[0];
- ACE_Get_Opt get_opt (argc, argv, "dr:");
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("dr:"));
for (int c; (c = get_opt ()) != -1; )
switch (c)
@@ -53,7 +53,7 @@ parse_arguments (int argc, char *argv[])
}
if (debug)
ACE_DEBUG ((LM_DEBUG,
- "rendezvous_spipe = %s\n",
+ ACE_TEXT ("rendezvous_spipe = %s\n"),
rendezvous_spipe));
}
@@ -68,9 +68,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (con.connect (spipe,
ACE_SPIPE_Addr (rendezvous_spipe)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open %s for requesting a new communication channel"
- " in local_spipe_client_test.\n",
- rendezvous_spipe),
+ ACE_TEXT ("Cannot open %s for requesting a new ")
+ ACE_TEXT ("communication channel in %p\n"),
+ rendezvous_spipe,
+ ACE_TEXT ("local_spipe_client_test")),
-1);
ACE_Mem_Map mmap (file_name);
@@ -78,8 +79,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (mmap (cp) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "mmap"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("mmap")),
-1);
// Next, send the file's contents.
@@ -88,8 +89,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (spipe.send ((ACE_Str_Buf *) 0, &msg) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "send"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("send")),
-1);
return 0;
}
@@ -99,7 +100,7 @@ int
ACE_TMAIN (int, ACE_TCHAR *[])
{
ACE_ERROR_RETURN ((LM_ERROR,
- "This feature is not supported\n"),
+ ACE_TEXT ("This feature is not supported\n")),
-1);
}
#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp
index 5b7784d4e44..113c809069d 100644
--- a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp
+++ b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp
@@ -16,30 +16,30 @@ ACE_RCSID(client, remote_thr_stream_client_test, "$Id$")
#if defined (ACE_HAS_TLI)
// Name of the program.
-static const char *program_name;
+static const ACE_TCHAR *program_name;
// Port number to use.
static u_short port_number = ACE_DEFAULT_THR_PORT;
// Name of remote host.
-static const char *host_name = ACE_DEFAULT_SERVER_HOST;
+static const ACE_TCHAR *host_name = ACE_DEFAULT_SERVER_HOST;
// Name of file to send.
-static const char *file_name = "./remote_data";
+static const ACE_TCHAR *file_name = ACE_TEXT ("./remote_data");
static void print_usage_and_die (void)
{
ACE_ERROR ((LM_ERROR,
- "usage: %s [-p portnum] [-h host_name] [-f file]\n",
+ ACE_TEXT ("usage: %s [-p portnum] [-h host_name] [-f file]\n"),
program_name));
ACE_OS::exit (1);
}
void
-parse_args (int argc, char *argv[])
+parse_args (int argc, ACE_TCHAR *argv[])
{
program_name = argv[0];
- ACE_Get_Opt get_opt (argc, argv, "f:h:p:");
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("f:h:p:"));
for (int c; (c = get_opt ()) != -1; )
switch (c)
@@ -72,43 +72,42 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_INET_Addr (port_number,
host_name)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "open"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")),
-1);
ACE_Mem_Map mmap (file_name, PROT_READ);
if (mmap (cp) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
-
- "mmap"), -1);
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("mmap")), -1);
// Next, send the file's contents.
if (sc.send_n (cp, mmap.size ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
-
- "send_n"), -1);
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("send_n")),
+ -1);
if (sc.sndrel () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "close_writer"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("close_writer")),
-1);
for (int n; (n = sc.recv (buf, sizeof buf)) > 0; )
if (ACE_OS::write (ACE_STDOUT, buf, n) != n)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "write"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("write")),
-1);
if (sc.close () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "close"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("close")),
-1);
return 0;
}
@@ -117,7 +116,7 @@ int
ACE_TMAIN (int, ACE_TCHAR *[])
{
ACE_ERROR_RETURN ((LM_ERROR,
- "you must have TLI to run this test\n"),
+ ACE_TEXT ("you must have TLI to run this test\n")),
1);
}
#endif /* ACE_HAS_TLI */
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp
index 35830522cdd..9bbb4e7ead7 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp
@@ -10,9 +10,9 @@ ACE_RCSID(server, Handle_L_SPIPE, "$Id$")
#if defined (ACE_HAS_STREAM_PIPES)
-const char *Handle_L_SPIPE::DEFAULT_RENDEZVOUS = "/tmp/foo_spipe";
+const ACE_TCHAR *Handle_L_SPIPE::DEFAULT_RENDEZVOUS = ACE_TEXT ("/tmp/foo_spipe");
Handle_L_SPIPE local_spipe;
-ACE_Service_Object_Type lsp (&local_spipe, "Local_SPIPE");
+ACE_Service_Object_Type lsp (&local_spipe, ACE_TEXT ("Local_SPIPE"));
#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h
index 729acd0592e..02a4aba2044 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h
@@ -24,8 +24,8 @@ class ACE_Svc_Export Handle_L_SPIPE : public ACE_Service_Object, public ACE_SPIP
{
public:
Handle_L_SPIPE (void);
- virtual int init (int argc, char *argv[]);
- virtual int info (char **, size_t) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int info (ACE_TCHAR **, size_t) const;
virtual int fini (void);
private:
@@ -34,7 +34,7 @@ private:
virtual int handle_input (int fd);
virtual int handle_close (int fd, ACE_Reactor_Mask);
- static const char *DEFAULT_RENDEZVOUS;
+ static const ACE_TCHAR *DEFAULT_RENDEZVOUS;
};
extern ACE_Service_Object_Type lsp;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i
index 1dcb739b0ab..910938d8648 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i
@@ -29,15 +29,16 @@ Handle_L_SPIPE::open (const ACE_SPIPE_Addr &rendezvous_spipe)
}
ACE_INLINE int
-Handle_L_SPIPE::info (char **strp, size_t length) const
+Handle_L_SPIPE::info (ACE_TCHAR **strp, size_t length) const
{
- char buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
ACE_SPIPE_Addr sa;
if (ACE_SPIPE_Acceptor::get_local_addr (sa) == -1)
return -1;
- ACE_OS::sprintf (buf, "%s %s", sa.get_path_name (), "# tests local STREAM pipe\n");
+ ACE_OS::strcpy (buf, sa.get_path_name ());
+ ACE_OS::strcat (buf, ACE_TEXT (" # tests local STREAM pipe\n"));
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -47,11 +48,11 @@ Handle_L_SPIPE::info (char **strp, size_t length) const
}
ACE_INLINE int
-Handle_L_SPIPE::init (int argc, char *argv[])
+Handle_L_SPIPE::init (int argc, ACE_TCHAR *argv[])
{
ACE_SPIPE_Addr susp;
- const char *rendezvous = Handle_L_SPIPE::DEFAULT_RENDEZVOUS;
- ACE_Get_Opt get_opt (argc, argv, "r:", 0);
+ const ACE_TCHAR *rendezvous = Handle_L_SPIPE::DEFAULT_RENDEZVOUS;
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("r:"), 0);
for (int c; (c = get_opt ()) != -1; )
switch (c)
@@ -66,10 +67,13 @@ Handle_L_SPIPE::init (int argc, char *argv[])
ACE_OS::unlink (rendezvous);
susp.set (rendezvous);
if (this->open (susp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open")), -1);
else if (ACE_Reactor::instance ()->register_handler
(this, ACE_Event_Handler::ACCEPT_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("registering service with ACE_Reactor")),
+ -1);
return 0;
}
@@ -103,8 +107,9 @@ Handle_L_SPIPE::handle_input (int)
new_spipe.get_remote_addr (sa);
- ACE_DEBUG ((LM_INFO, "accepted request from %s (gid = %d, uid = %d)\n",
- sa.get_path_name (), sa.group_id (), sa.user_id ()));
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT ("accepted request from %s (gid = %d, uid = %d)\n"),
+ sa.get_path_name (), sa.group_id (), sa.user_id ()));
}
while (new_spipe.recv ((ACE_Str_Buf *) 0, &msg, &flags) >= 0)