summaryrefslogtreecommitdiff
path: root/examples/APG
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2004-10-06 16:28:30 +0000
committerSteve Huston <shuston@riverace.com>2004-10-06 16:28:30 +0000
commit83c63846cd9a5b3ccbcbe7000343144513a9448b (patch)
tree47967da3e6c57e30ef70f70c5bc1b8e89c70800f /examples/APG
parent670b477869572d5f90754d148e49610240fbad1f (diff)
downloadATCD-83c63846cd9a5b3ccbcbe7000343144513a9448b.tar.gz
ChangeLogTag:Wed Oct 6 12:25:29 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'examples/APG')
-rw-r--r--examples/APG/Logging/Change_Mask.cpp4
-rw-r--r--examples/APG/Logging/Howto_Syslog.cpp4
-rw-r--r--examples/APG/Logging/Simple1.cpp4
-rw-r--r--examples/APG/Logging/Simple2.cpp4
-rw-r--r--examples/APG/Logging/Trace_Return.cpp4
-rw-r--r--examples/APG/Logging/Use_Callback.cpp2
-rw-r--r--examples/APG/Logging/Use_Callback2.cpp2
-rw-r--r--examples/APG/Logging/Use_LogManager.cpp4
-rw-r--r--examples/APG/Logging/Use_Logger.cpp2
-rw-r--r--examples/APG/Logging/Use_Logging_Server.cpp2
-rw-r--r--examples/APG/Logging/Use_Logging_Strategy.cpp2
-rw-r--r--examples/APG/Logging/Use_Multiple_Sinks.cpp2
-rw-r--r--examples/APG/Logging/Use_Ostream.cpp5
-rw-r--r--examples/APG/Logging/Use_Stderr.cpp5
-rw-r--r--examples/APG/Logging/Use_Syslog.cpp4
-rw-r--r--examples/APG/Logging/Wrap_Macros.cpp4
-rw-r--r--examples/APG/Logging/Wrap_Macros_Alt.cpp2
-rw-r--r--examples/APG/Processes/Spawn.cpp27
-rw-r--r--examples/APG/Shared_Memory/Hash_Map.cpp14
-rw-r--r--examples/APG/Shared_Memory/Pool_Growth.cpp6
-rw-r--r--examples/APG/Streams/Answerer.cpp26
-rw-r--r--examples/APG/Streams/CommandStream.cpp8
-rw-r--r--examples/APG/Streams/CommandTask.cpp4
-rw-r--r--examples/APG/Streams/RecordingDevice_Text.cpp2
-rw-r--r--examples/APG/ThreadPools/Futures.cpp2
25 files changed, 76 insertions, 69 deletions
diff --git a/examples/APG/Logging/Change_Mask.cpp b/examples/APG/Logging/Change_Mask.cpp
index 4cd0deac7e5..a34a00e63b1 100644
--- a/examples/APG/Logging/Change_Mask.cpp
+++ b/examples/APG/Logging/Change_Mask.cpp
@@ -6,7 +6,7 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
// Listing 1 code/ch03
ACE_LOG_MSG->priority_mask (0, ACE_Log_Msg::PROCESS);
@@ -23,7 +23,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Howto_Syslog.cpp b/examples/APG/Logging/Howto_Syslog.cpp
index 0bafab546b7..283099a3da1 100644
--- a/examples/APG/Logging/Howto_Syslog.cpp
+++ b/examples/APG/Logging/Howto_Syslog.cpp
@@ -11,7 +11,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
(argv[0], ACE_Log_Msg::SYSLOG, ACE_TEXT ("syslogTest"));
// Listing 1
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
foo ();
@@ -22,7 +22,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Simple1.cpp b/examples/APG/Logging/Simple1.cpp
index 93c8b681c23..cf7a12e410b 100644
--- a/examples/APG/Logging/Simple1.cpp
+++ b/examples/APG/Logging/Simple1.cpp
@@ -6,7 +6,7 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- ACE_TRACE(ACE_TEXT ("main"));
+ ACE_TRACE("main");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHi Mom\n")));
foo();
@@ -17,7 +17,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Simple2.cpp b/examples/APG/Logging/Simple2.cpp
index dfec1c68dd2..26315b9d689 100644
--- a/examples/APG/Logging/Simple2.cpp
+++ b/examples/APG/Logging/Simple2.cpp
@@ -6,7 +6,7 @@ void foo(void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_LOG_MSG->priority_mask (LM_DEBUG | LM_NOTICE,
ACE_Log_Msg::PROCESS);
@@ -19,7 +19,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo(void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Trace_Return.cpp b/examples/APG/Logging/Trace_Return.cpp
index d466abc43c1..2aed470522b 100644
--- a/examples/APG/Logging/Trace_Return.cpp
+++ b/examples/APG/Logging/Trace_Return.cpp
@@ -10,7 +10,7 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- TRACE (ACE_TEXT ("main"));
+ TRACE ("main");
MY_DEBUG (ACE_TEXT ("Hi Mom\n"));
foo ();
@@ -21,7 +21,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo (void)
{
- TRACE (ACE_TEXT ("foo"));
+ TRACE ("foo");
MY_DEBUG (ACE_TEXT ("Howdy Pardner\n"));
TRACE_RETURN_VOID ();
}
diff --git a/examples/APG/Logging/Use_Callback.cpp b/examples/APG/Logging/Use_Callback.cpp
index 2deff99f4ea..2f08a2127ed 100644
--- a/examples/APG/Logging/Use_Callback.cpp
+++ b/examples/APG/Logging/Use_Callback.cpp
@@ -11,7 +11,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR);
ACE_LOG_MSG->msg_callback (callback);
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IGoodnight\n")));
diff --git a/examples/APG/Logging/Use_Callback2.cpp b/examples/APG/Logging/Use_Callback2.cpp
index a3f005e5949..bcfe8b8e5d7 100644
--- a/examples/APG/Logging/Use_Callback2.cpp
+++ b/examples/APG/Logging/Use_Callback2.cpp
@@ -11,7 +11,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR);
ACE_LOG_MSG->msg_callback (callback);
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IGoodnight\n")));
diff --git a/examples/APG/Logging/Use_LogManager.cpp b/examples/APG/Logging/Use_LogManager.cpp
index ad3280b8d4f..ddcbb758f87 100644
--- a/examples/APG/Logging/Use_LogManager.cpp
+++ b/examples/APG/Logging/Use_LogManager.cpp
@@ -8,7 +8,7 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
LOG_MANAGER->redirectToStderr ();
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
LOG_MANAGER->redirectToSyslog ();
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHi Mom\n")));
foo ();
@@ -19,7 +19,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
}
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
LOG_MANAGER->redirectToFile ("output.test");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Use_Logger.cpp b/examples/APG/Logging/Use_Logger.cpp
index 9dd00caee42..5fb672c1ab4 100644
--- a/examples/APG/Logging/Use_Logger.cpp
+++ b/examples/APG/Logging/Use_Logger.cpp
@@ -8,7 +8,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
ACE_Log_Msg::LOGGER,
ACE_DEFAULT_LOGGER_KEY);
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IGoodnight\n")));
diff --git a/examples/APG/Logging/Use_Logging_Server.cpp b/examples/APG/Logging/Use_Logging_Server.cpp
index 1d304f2577b..eaad6bf7a6b 100644
--- a/examples/APG/Logging/Use_Logging_Server.cpp
+++ b/examples/APG/Logging/Use_Logging_Server.cpp
@@ -11,7 +11,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR);
ACE_LOG_MSG->msg_callback (callback);
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IGoodnight\n")));
diff --git a/examples/APG/Logging/Use_Logging_Strategy.cpp b/examples/APG/Logging/Use_Logging_Strategy.cpp
index 0bf1e67afd5..559d85d65ae 100644
--- a/examples/APG/Logging/Use_Logging_Strategy.cpp
+++ b/examples/APG/Logging/Use_Logging_Strategy.cpp
@@ -24,7 +24,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("Service Config open")),
1);
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("%t%IHowdy Pardner\n")));
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%t%IGoodnight\n")));
diff --git a/examples/APG/Logging/Use_Multiple_Sinks.cpp b/examples/APG/Logging/Use_Multiple_Sinks.cpp
index 468fc09d838..7decd59217a 100644
--- a/examples/APG/Logging/Use_Multiple_Sinks.cpp
+++ b/examples/APG/Logging/Use_Multiple_Sinks.cpp
@@ -10,7 +10,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
// Output to default destination (stderr)
ACE_LOG_MSG->open (argv[0]);
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_OSTREAM_TYPE *output =
(ACE_OSTREAM_TYPE *) new std::ofstream ("ostream.output.test");
diff --git a/examples/APG/Logging/Use_Ostream.cpp b/examples/APG/Logging/Use_Ostream.cpp
index f5665fbfd2e..54ab19170db 100644
--- a/examples/APG/Logging/Use_Ostream.cpp
+++ b/examples/APG/Logging/Use_Ostream.cpp
@@ -9,11 +9,10 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
-
/* Alternatively, you can use the set_flags() method to do the same
thing after the singleton has been created:
*/
@@ -33,7 +32,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Use_Stderr.cpp b/examples/APG/Logging/Use_Stderr.cpp
index 3b087a09af4..e0418c4d362 100644
--- a/examples/APG/Logging/Use_Stderr.cpp
+++ b/examples/APG/Logging/Use_Stderr.cpp
@@ -17,7 +17,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
thing after the singleton has been created:
*/
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
// Listing 2 code/ch03
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
@@ -32,8 +32,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
-
}
diff --git a/examples/APG/Logging/Use_Syslog.cpp b/examples/APG/Logging/Use_Syslog.cpp
index ef0cc8857f2..dce4a1fe6b0 100644
--- a/examples/APG/Logging/Use_Syslog.cpp
+++ b/examples/APG/Logging/Use_Syslog.cpp
@@ -8,7 +8,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
{
// This will be directed to stderr (the default ACE_Log_Msg
// behavior).
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));
@@ -26,7 +26,7 @@ int ACE_TMAIN (int, ACE_TCHAR *argv[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
}
diff --git a/examples/APG/Logging/Wrap_Macros.cpp b/examples/APG/Logging/Wrap_Macros.cpp
index 73c908272d2..1de24754bcd 100644
--- a/examples/APG/Logging/Wrap_Macros.cpp
+++ b/examples/APG/Logging/Wrap_Macros.cpp
@@ -10,7 +10,7 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
MY_DEBUG (ACE_TEXT ("Hi Mom\n"));
foo ();
MY_DEBUG (ACE_TEXT ("Goodnight\n"));
@@ -19,7 +19,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
void foo (void)
{
- ACE_TRACE (ACE_TEXT ("foo"));
+ ACE_TRACE ("foo");
MY_DEBUG (ACE_TEXT ("Howdy Pardner\n"));
}
// Listing 1
diff --git a/examples/APG/Logging/Wrap_Macros_Alt.cpp b/examples/APG/Logging/Wrap_Macros_Alt.cpp
index 1926f001d36..306eefcd83a 100644
--- a/examples/APG/Logging/Wrap_Macros_Alt.cpp
+++ b/examples/APG/Logging/Wrap_Macros_Alt.cpp
@@ -6,7 +6,7 @@ void foo (void);
int ACE_TMAIN (int, ACE_TCHAR *[])
{
- ACE_TRACE (ACE_TEXT ("main"));
+ ACE_TRACE ("main");
// Listing 1 code/ch03
ACE_DEBUG ((MY_DEBUG ACE_TEXT ("Hi Mom\n")));
diff --git a/examples/APG/Processes/Spawn.cpp b/examples/APG/Processes/Spawn.cpp
index b7b51bde7d2..d3395748eba 100644
--- a/examples/APG/Processes/Spawn.cpp
+++ b/examples/APG/Processes/Spawn.cpp
@@ -16,13 +16,13 @@ class Manager : public ACE_Process
public:
Manager (const ACE_TCHAR* program_name)
{
- ACE_TRACE (ACE_TEXT ("Manager::Manager"));
+ ACE_TRACE ("Manager::Manager");
ACE_OS::strcpy (programName_, program_name);
}
int doWork (void)
{
- ACE_TRACE (ACE_TEXT ("Manager::doWork"));
+ ACE_TRACE ("Manager::doWork");
// Spawn the new process; prepare() hook is called first.
ACE_Process_Options options;
@@ -46,7 +46,7 @@ private:
// Listing 3 code/ch10
int dumpRun (void)
{
- ACE_TRACE (ACE_TEXT ("Manager::dumpRun"));
+ ACE_TRACE ("Manager::dumpRun");
if (ACE_OS::lseek (this->outputfd_, 0, SEEK_SET) == -1)
ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
@@ -73,7 +73,7 @@ private:
// prepare() is inherited from ACE_Process.
int prepare (ACE_Process_Options &options)
{
- ACE_TRACE (ACE_TEXT ("Manager::prepare"));
+ ACE_TRACE ("Manager::prepare");
options.command_line ("%s 1", this->programName_);
if (this->setStdHandles (options) == -1 ||
@@ -88,7 +88,7 @@ private:
int setStdHandles (ACE_Process_Options &options)
{
- ACE_TRACE(ACE_TEXT ("Manager::setStdHandles"));
+ ACE_TRACE ("Manager::setStdHandles");
ACE_OS::unlink ("output.dat");
this->outputfd_ =
@@ -99,8 +99,9 @@ private:
int setEnvVariable (ACE_Process_Options &options)
{
- ACE_TRACE (ACE_TEXT ("Manager::setEnvVariables"));
- return options.setenv (ACE_TEXT("PRIVATE_VAR=/that/seems/to/be/it"));
+ ACE_TRACE ("Manager::setEnvVariables");
+ return options.setenv
+ (ACE_TEXT ("PRIVATE_VAR=/that/seems/to/be/it"));
}
// Listing 2
@@ -108,7 +109,7 @@ private:
// Listing 10 code/ch10
int setUserID (ACE_Process_Options &options)
{
- ACE_TRACE (ACE_TEXT ("Manager::setUserID"));
+ ACE_TRACE ("Manager::setUserID");
passwd* pw = ACE_OS::getpwnam ("nobody");
if (pw == 0)
return -1;
@@ -129,12 +130,12 @@ class Slave
public:
Slave ()
{
- ACE_TRACE (ACE_TEXT ("Slave::Slave"));
+ ACE_TRACE ("Slave::Slave");
}
int doWork (void)
{
- ACE_TRACE (ACE_TEXT ("Slave::doWork"));
+ ACE_TRACE ("Slave::doWork");
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("(%P) started at %T, parent is %d\n"),
@@ -146,7 +147,7 @@ public:
ACE_TCHAR str[128];
ACE_OS::sprintf (str, ACE_TEXT ("(%d) Enter your command\n"),
- static_cast<int> (ACE_OS::getpid ()));
+ static_cast<int>(ACE_OS::getpid ()));
ACE_OS::write (ACE_STDOUT, str, ACE_OS::strlen (str));
this->readLine (str);
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P) Executed: %C\n"),
@@ -157,7 +158,7 @@ public:
void showWho (void)
{
- ACE_TRACE (ACE_TEXT ("Slave::showWho"));
+ ACE_TRACE ("Slave::showWho");
#if !defined (ACE_WIN32)
passwd *pw = ::getpwuid (::geteuid ());
ACE_DEBUG ((LM_INFO,
@@ -168,7 +169,7 @@ public:
ACE_TCHAR* readLine (ACE_TCHAR* str)
{
- ACE_TRACE (ACE_TEXT ("Slave::readLine"));
+ ACE_TRACE ("Slave::readLine");
int i = 0;
while (true)
diff --git a/examples/APG/Shared_Memory/Hash_Map.cpp b/examples/APG/Shared_Memory/Hash_Map.cpp
index 1a7d85cd9e1..f4a36e8a89c 100644
--- a/examples/APG/Shared_Memory/Hash_Map.cpp
+++ b/examples/APG/Shared_Memory/Hash_Map.cpp
@@ -47,7 +47,7 @@ MAP* smap (ALLOCATOR *shmem_allocator)
// Listing 6 code/ch17
int processRecords (MAP *map, ALLOCATOR *shmem_allocator)
{
- ACE_TRACE (ACE_TEXT ("::processRecords"));
+ ACE_TRACE ("processRecords");
size_t mapLength = map->current_size ();
ACE_DEBUG ((LM_DEBUG,
@@ -106,7 +106,7 @@ int processRecords (MAP *map, ALLOCATOR *shmem_allocator)
// Listing 4 code/ch17
int addRecords(MAP *map, ALLOCATOR *shmem_allocator)
{
- ACE_TRACE (ACE_TEXT ("::addRecords"));
+ ACE_TRACE ("addRecords");
char buf[32];
int mapLength = ACE_static_cast (int, map->current_size ());
@@ -135,7 +135,7 @@ int addRecords(MAP *map, ALLOCATOR *shmem_allocator)
// Listing 5 code/ch17
int handle_child (void)
{
- ACE_TRACE (ACE_TEXT ("::handle_child"));
+ ACE_TRACE ("handle_child");
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, coordMutex, -1);
@@ -169,7 +169,7 @@ int handle_child (void)
// Listing 3 code/ch17
int handle_parent (ACE_TCHAR *cmdLine)
{
- ACE_TRACE (ACE_TEXT ("::handle_parent"));
+ ACE_TRACE ("handle_parent");
ALLOCATOR * shmem_allocator = 0;
ACE_MMAP_Memory_Pool_Options options
@@ -185,7 +185,11 @@ int handle_parent (ACE_TCHAR *cmdLine)
ACE_Process processa, processb;
ACE_Process_Options poptions;
- poptions.command_line("%s a", cmdLine);
+ const ACE_TCHAR *args[3];
+ args[0] = cmdLine;
+ args[1] = ACE_TEXT ("a");
+ args[2] = 0;
+ poptions.command_line (args);
{
ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon,
coordMutex, -1);
diff --git a/examples/APG/Shared_Memory/Pool_Growth.cpp b/examples/APG/Shared_Memory/Pool_Growth.cpp
index e63cc51f668..7f5ffa7491b 100644
--- a/examples/APG/Shared_Memory/Pool_Growth.cpp
+++ b/examples/APG/Shared_Memory/Pool_Growth.cpp
@@ -201,7 +201,11 @@ int handle_parent (ACE_TCHAR *cmdLine)
ACE_Process processa, processb;
ACE_Process_Options poptions;
- poptions.command_line ("%s a", cmdLine);
+ const ACE_TCHAR *args[3];
+ args[0] = cmdLine;
+ args[1] = ACE_TEXT ("a");
+ args[2] = 0;
+ poptions.command_line (args);
processa.spawn (poptions);
processb.spawn (poptions);
diff --git a/examples/APG/Streams/Answerer.cpp b/examples/APG/Streams/Answerer.cpp
index b56445f3030..507b6172108 100644
--- a/examples/APG/Streams/Answerer.cpp
+++ b/examples/APG/Streams/Answerer.cpp
@@ -113,7 +113,7 @@ protected:
ACE_FILE_Addr get_incoming_message_queue (void)
{
// Exclude 24
- return ACE_FILE_Addr ("/tmp/incoming_message");
+ return ACE_FILE_Addr (ACE_TEXT ("/tmp/incoming_message"));
// Exclude 24
}
};
@@ -157,7 +157,7 @@ protected:
ACE_FILE_Addr get_message_destination (Message *)
{
// Exclude 26
- return ACE_FILE_Addr ("/tmp/encoded_message");
+ return ACE_FILE_Addr (ACE_TEXT ("/tmp/encoded_message"));
// Exclude 26
}
};
@@ -171,8 +171,8 @@ protected:
{
ACE_TRACE (ACE_TEXT ("SaveMetaData::process()"));
- ACE_CString path (message->addr ().get_path_name ());
- path += ".xml";
+ ACE_TString path (message->addr ().get_path_name ());
+ path += ACE_TEXT (".xml");
ACE_FILE_Connector connector;
ACE_FILE_IO file;
@@ -239,7 +239,7 @@ public:
{
if (tail == 0)
ACE_NEW_RETURN (tail,
- Module ("End Module", new EndTask ()),
+ Module (ACE_TEXT ("End Module"), new EndTask ()),
-1);
this->inherited::open (arg, head, tail);
// Listing 1000
@@ -247,50 +247,50 @@ public:
// Listing 1001 code/ch18
Module *answerIncomingCallModule;
ACE_NEW_RETURN (answerIncomingCallModule,
- Module ("Answer Incoming Call",
+ Module (ACE_TEXT ("Answer Incoming Call"),
new AnswerIncomingCall ()),
-1);
// Listing 11 code/ch18
Module *getCallerIdModule;
ACE_NEW_RETURN (getCallerIdModule,
- Module ("Get Caller ID", new GetCallerId ()),
+ Module (ACE_TEXT ("Get Caller ID"), new GetCallerId ()),
-1);
// Listing 11
Module *playOGMModule;
ACE_NEW_RETURN (playOGMModule,
- Module ("Play Outgoing Message",
+ Module (ACE_TEXT ("Play Outgoing Message"),
new PlayOutgoingMessage ()),
-1);
Module *recordModule;
ACE_NEW_RETURN (recordModule,
- Module ("Record Incoming Message",
+ Module (ACE_TEXT ("Record Incoming Message"),
new RecordIncomingMessage ()),
-1);
Module *releaseModule;
ACE_NEW_RETURN (releaseModule,
- Module ("Release Device",
+ Module (ACE_TEXT ("Release Device"),
new ReleaseDevice ()),
-1);
Module *conversionModule;
ACE_NEW_RETURN (conversionModule,
- Module ("Encode Message",
+ Module (ACE_TEXT ("Encode Message"),
new EncodeMessage ()),
-1);
Module *saveMetaDataModule;
ACE_NEW_RETURN (saveMetaDataModule,
- Module ("Save Meta-Data",
+ Module (ACE_TEXT ("Save Meta-Data"),
new SaveMetaData ()),
-1);
Module *notificationModule;
ACE_NEW_RETURN (notificationModule,
- Module ("Notify Someone",
+ Module (ACE_TEXT ("Notify Someone"),
new NotifySomeone ()),
-1);
// Listing 1001
diff --git a/examples/APG/Streams/CommandStream.cpp b/examples/APG/Streams/CommandStream.cpp
index d2b4bfdabb8..def3f123d77 100644
--- a/examples/APG/Streams/CommandStream.cpp
+++ b/examples/APG/Streams/CommandStream.cpp
@@ -49,25 +49,25 @@ int CommandStream::open (void *arg,
if (this->push (answerCallModule) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Failed to push %p\n"),
- ACE_TEXT_CHAR_TO_TCHAR (answerCallModule->name())),
+ answerCallModule->name()),
-1);
if (this->push (retrieveCallerIdModule) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Failed to push %p\n"),
- ACE_TEXT_CHAR_TO_TCHAR (retrieveCallerIdModule->name())),
+ retrieveCallerIdModule->name()),
-1);
if (this->push (playMessageModule) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Failed to push %p\n"),
- ACE_TEXT_CHAR_TO_TCHAR (playMessageModule->name())),
+ playMessageModule->name()),
-1);
if (this->push (recordMessageModule) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Failed to push %p\n"),
- ACE_TEXT_CHAR_TO_TCHAR (recordMessageModule->name())),
+ recordMessageModule->name()),
-1);
// Listing 03
return 0;
diff --git a/examples/APG/Streams/CommandTask.cpp b/examples/APG/Streams/CommandTask.cpp
index ec3f61dcc46..7ad63166ffd 100644
--- a/examples/APG/Streams/CommandTask.cpp
+++ b/examples/APG/Streams/CommandTask.cpp
@@ -95,7 +95,7 @@ int CommandTask::svc (void)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("CommandTask::svc() - ")
ACE_TEXT ("%s got work request %d\n"),
- ACE_TEXT_CHAR_TO_TCHAR (this->module ()->name ()),
+ this->module ()->name (),
command->command_));
if (command->command_ != this->command_)
@@ -110,7 +110,7 @@ int CommandTask::svc (void)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("CommandTask::svc() - ")
ACE_TEXT ("%s work request %d result is %d\n"),
- ACE_TEXT_CHAR_TO_TCHAR (this->module ()->name ()),
+ this->module ()->name (),
command->command_,
result));
diff --git a/examples/APG/Streams/RecordingDevice_Text.cpp b/examples/APG/Streams/RecordingDevice_Text.cpp
index a44b805ddf7..01720bb2470 100644
--- a/examples/APG/Streams/RecordingDevice_Text.cpp
+++ b/examples/APG/Streams/RecordingDevice_Text.cpp
@@ -97,7 +97,7 @@ MessageType *TextListenerAcceptor::record_message (ACE_FILE_Addr &addr)
TextListener::TextListener (TextListenerAcceptor *acceptor)
: acceptor_(acceptor)
{
- ACE_TRACE (ACE_TEXT ("TextListener ctor"));
+ ACE_TRACE ("TextListener ctor");
ACE_NEW (this->command_stream_, CommandStream (&(this->peer_)));
this->command_stream_->open (0);
diff --git a/examples/APG/ThreadPools/Futures.cpp b/examples/APG/ThreadPools/Futures.cpp
index 95f76a524cf..7a3dcc37be5 100644
--- a/examples/APG/ThreadPools/Futures.cpp
+++ b/examples/APG/ThreadPools/Futures.cpp
@@ -42,7 +42,7 @@ public:
ACE_OS::sleep (1);
char buf[1024];
- ACE_OS::strcpy (buf, ACE_TEXT ("Completed assigned task\n"));
+ ACE_OS::strcpy (buf, "Completed assigned task\n");
ACE_CString *msg;
ACE_NEW_RETURN
(msg, ACE_CString (buf, ACE_OS::strlen (buf) + 1), -1);