diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
commit | a7c03cabf931b077d70c6f80ec02c7728a429f49 (patch) | |
tree | 61d38d262d43ac77fc2ad94c9e7e850cd5607622 /tests | |
parent | 2aa7b10780ad7c670f588dce4ec341351a0646aa (diff) | |
download | ATCD-a7c03cabf931b077d70c6f80ec02c7728a429f49.tar.gz |
ChangeLogTag:Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'tests')
91 files changed, 2051 insertions, 2057 deletions
diff --git a/tests/ACE_Init_Test.dsp b/tests/ACE_Init_Test.dsp index 0605eb36ec3..7cfc470404c 100644 --- a/tests/ACE_Init_Test.dsp +++ b/tests/ACE_Init_Test.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 aced.lib /nologo /subsystem:windows /pdb:"./ACE_Init_Test.pdb" /debug /machine:I386 /out:"./ACE_Init_Test.exe" /pdbtype:sept /libpath:"..\ace"
-# SUBTRACT LINK32 /pdb:none
+# SUBTRACT LINK32 /pdb:none /nodefaultlib
# Begin Target
# Name "ACE_Init_Test - Win32 Debug"
diff --git a/tests/ARGV_Test.cpp b/tests/ARGV_Test.cpp index c0f77b9968a..621d6fd586d 100644 --- a/tests/ARGV_Test.cpp +++ b/tests/ARGV_Test.cpp @@ -22,7 +22,7 @@ ACE_RCSID(tests, ARGV_Test, "$Id$") int main (int, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("ARGV_Test")); + ACE_START_TEST (ACE_TEXT ("ARGV_Test")); // From command line. ACE_ARGV cl (argv); @@ -38,13 +38,13 @@ main (int, char *argv[]) my.argv ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("argc = %d\n"), - ASYS_TEXT (a.argc ()))); + ACE_TEXT ("argc = %d\n"), + ACE_TEXT (a.argc ()))); // Print the contents of the combined <ACE_ARGV>. for (size_t i = 0; i < a.argc (); i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d) %s\n"), + ACE_TEXT ("(%d) %s\n"), i, a.argv ()[i])); diff --git a/tests/Atomic_Op_Test.cpp b/tests/Atomic_Op_Test.cpp index cedbd26de63..c2d7712ca7f 100644 --- a/tests/Atomic_Op_Test.cpp +++ b/tests/Atomic_Op_Test.cpp @@ -27,9 +27,9 @@ ACE_RCSID(tests, Atomic_Op_Test, "$Id$") #if defined (ACE_HAS_THREADS) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Atomic_Op_Test")); + ACE_START_TEST (ACE_TEXT ("Atomic_Op_Test")); ACE_Atomic_Op <ACE_Thread_Mutex, long> foo (5); @@ -62,12 +62,12 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, long>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Atomic_Op_Test")); + ACE_START_TEST (ACE_TEXT ("Atomic_Op_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Auto_IncDec_Test.cpp b/tests/Auto_IncDec_Test.cpp index 255b3d5f1f2..169ec22b58e 100644 --- a/tests/Auto_IncDec_Test.cpp +++ b/tests/Auto_IncDec_Test.cpp @@ -36,7 +36,7 @@ static void * worker (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) worker starting\n"))); + ACE_TEXT (" (%t) worker starting\n"))); { // First section. ACE_Auto_IncDec<INTERLOCKED_INT> threads_in_section_auto_inc_dec @@ -60,7 +60,7 @@ worker (void *) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) worker exiting\n"))); + ACE_TEXT (" (%t) worker exiting\n"))); return 0; } @@ -83,13 +83,13 @@ template class ACE_Auto_IncDec<int>; // Spawn off threads. int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Auto_IncDec_Test")); + ACE_START_TEST (ACE_TEXT ("Auto_IncDec_Test")); #if defined (ACE_HAS_THREADS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) main thread starting\n"))); + ACE_TEXT (" (%t) main thread starting\n"))); current_threads_in_first_section = 0; current_threads_in_second_section = 0; @@ -100,8 +100,8 @@ main (int, ASYS_TCHAR *[]) 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), -1); // Make sure at least one thread is started... ACE_Thread::yield (); @@ -110,7 +110,7 @@ main (int, ASYS_TCHAR *[]) { // wait according to the number of threads... ACE_DEBUG ((LM_DEBUG, - " %d in first section, %d in second section\n", + ACE_TEXT (" %d in first section, %d in second section\n"), current_threads_in_first_section.value (), current_threads_in_second_section.value ())); @@ -124,7 +124,7 @@ main (int, ASYS_TCHAR *[]) && current_threads_in_second_section.value () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main thread\n"))); + ACE_TEXT (" (%t) exiting main thread\n"))); #else int counter = 0; { diff --git a/tests/Barrier_Test.cpp b/tests/Barrier_Test.cpp index a29a6b7ef21..0d070d085fe 100644 --- a/tests/Barrier_Test.cpp +++ b/tests/Barrier_Test.cpp @@ -51,7 +51,7 @@ tester (Tester_Args *args) iterations <= args->n_iterations_; iterations++) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in iteration %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in iteration %d\n"), iterations)); // Block until all other threads have waited, then continue. @@ -64,9 +64,9 @@ tester (Tester_Args *args) #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Barrier_Test")); + ACE_START_TEST (ACE_TEXT ("Barrier_Test")); #if defined (ACE_HAS_THREADS) int n_threads = ACE_MAX_THREADS; @@ -80,7 +80,7 @@ main (int, ASYS_TCHAR *[]) iteration_count < ACE_MAX_ITERATIONS; iteration_count++) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("starting iteration %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("starting iteration %d\n"), iteration_count)); if (ACE_Thread_Manager::instance ()->spawn_n @@ -89,16 +89,16 @@ main (int, ASYS_TCHAR *[]) (void *) &args, THR_NEW_LWP | THR_JOINABLE) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("test done\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("test done\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Basic_Types_Test.cpp b/tests/Basic_Types_Test.cpp index f4be82c3a0a..82213cf85e2 100644 --- a/tests/Basic_Types_Test.cpp +++ b/tests/Basic_Types_Test.cpp @@ -29,7 +29,7 @@ # undef ACE_ERROR # define ACE_ERROR(x) ACE_OS::fprintf x # define LM_ERROR stderr -# define ACE_START_TEST(x) ACE_OS::printf (x ASYS_TEXT ("\n")) +# define ACE_START_TEST(x) ACE_OS::printf (x ACE_TEXT ("\n")) # define ACE_END_TEST #else /* ! ACE_HAS_MINIMAL_ACE_OS */ # include "test_config.h" @@ -41,16 +41,16 @@ typedef void* (*a_function_pointer) (void*); static u_int -check (const ASYS_TCHAR *message, u_int i, u_int j) +check (const ACE_TCHAR *message, u_int i, u_int j) { if (i == j) { - ACE_DEBUG ((LM_DEBUG, message, j, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, message, j, ACE_TEXT ("\n"))); return 0; } else { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("assertion failed \"%s\": %u != %u\n"), + ACE_ERROR ((LM_ERROR, ACE_TEXT ("assertion failed \"%s\": %u != %u\n"), message, i, j)); return 1; } @@ -58,33 +58,32 @@ check (const ASYS_TCHAR *message, u_int i, u_int j) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Basic_Types_Test")); + ACE_START_TEST (ACE_TEXT ("Basic_Types_Test")); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("This is ACE Version %u.%u.%u\n\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("This is ACE Version %u.%u.%u\n\n"), ACE_MAJOR_VERSION, ACE_MINOR_VERSION, ACE_BETA_VERSION)); u_int errors = 0; - errors += check (ASYS_TEXT ("ACE_SIZEOF_CHAR: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_CHAR: %u%s"), sizeof (char), ACE_SIZEOF_CHAR); -#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) - errors += check (ASYS_TEXT ("ACE_SIZEOF_WCHAR: %u%s"), - sizeof (char), ACE_SIZEOF_WCHAR); -#else - errors += check (ASYS_TEXT ("ACE_SIZEOF_WCHAR: %u%s"), +#if defined (ACE_HAS_WCHAR) + // This is pointless - since ACE_SIZEOF_WCHAR is defined to sizeof (wchar_t) + // but oh well... + errors += check (ACE_TEXT ("ACE_SIZEOF_WCHAR: %u%s"), sizeof (wchar_t), ACE_SIZEOF_WCHAR); -#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */ - errors += check (ASYS_TEXT ("ACE_SIZEOF_SHORT: %u%s"), +#endif /* ACE_HAS_WCHAR */ + errors += check (ACE_TEXT ("ACE_SIZEOF_SHORT: %u%s"), sizeof (short), ACE_SIZEOF_SHORT); - errors += check (ASYS_TEXT ("ACE_SIZEOF_INT: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_INT: %u%s"), sizeof (int), ACE_SIZEOF_INT); - errors += check (ASYS_TEXT ("ACE_SIZEOF_LONG: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_LONG: %u%s"), sizeof (long), ACE_SIZEOF_LONG); - errors += check (ASYS_TEXT ("ACE_SIZEOF_LONG_LONG: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_LONG_LONG: %u%s"), #if defined (ACE_WIN32) sizeof (unsigned __int64), #elif defined (ACE_LACKS_LONGLONG_T) @@ -93,77 +92,77 @@ main (int, ASYS_TCHAR *[]) sizeof (long long), #endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ ACE_SIZEOF_LONG_LONG); - errors += check (ASYS_TEXT ("sizeof 64-bit literal: %u%s"), + errors += check (ACE_TEXT ("sizeof 64-bit literal: %u%s"), sizeof ACE_UINT64_LITERAL (1), 8); - errors += check (ASYS_TEXT ("ACE_SIZEOF_VOID_P: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_VOID_P: %u%s"), sizeof (void *), ACE_SIZEOF_VOID_P); - errors += check (ASYS_TEXT ("ACE_SIZEOF_FLOAT: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_FLOAT: %u%s"), sizeof (float), ACE_SIZEOF_FLOAT); - errors += check (ASYS_TEXT ("ACE_SIZEOF_DOUBLE: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_DOUBLE: %u%s"), sizeof (double), ACE_SIZEOF_DOUBLE); - errors += check (ASYS_TEXT ("ACE_SIZEOF_LONG_DOUBLE: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_LONG_DOUBLE: %u%s"), sizeof (long double), ACE_SIZEOF_LONG_DOUBLE); // Crays don't have 16-bit quantities, so don't even test for 16-bit values #if !defined(_UNICOS) - errors += check (ASYS_TEXT ("sizeof (ACE_INT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT16) is %u%s"), sizeof (ACE_INT16), 2); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT16) is %u%s"), sizeof (ACE_INT16), 2); #else /* ! _UNICOS */ - errors += check (ASYS_TEXT ("sizeof (ACE_INT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT16) is %u%s"), sizeof (ACE_INT16), 8); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT16) is %u%s"), sizeof (ACE_INT16), 8); #endif /* ! _UNICOS */ // MPP Crays do have 32-bit quantities (short), though vector Crays don't #if !defined(_UNICOS) || defined(_CRAYMPP) - errors += check (ASYS_TEXT ("sizeof (ACE_INT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT32) is %u%s"), sizeof (ACE_INT32), 4); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT32) is %u%s"), sizeof (ACE_INT32), 4); #else /* ! _UNICOS */ - errors += check (ASYS_TEXT ("sizeof (ACE_INT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT32) is %u%s"), sizeof (ACE_INT32), 8); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT32) is %u%s"), sizeof (ACE_INT32), 8); #endif /* ! _UNICOS */ - errors += check (ASYS_TEXT ("sizeof (ACE_UINT64) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT64) is %u%s"), sizeof (ACE_UINT64), 8); // ACE assumes sizeof (long) == sizeof (void*) if (sizeof (long) == sizeof (void *)) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sizeof (long) == sizeof (void*)\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sizeof (long) == sizeof (void*)\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) != sizeof (void*)\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("sizeof (long) != sizeof (void*)\n"))); // ACE assumes sizeof (long) >= sizeof (a_function_pointer) if (sizeof (long) >= sizeof (a_function_pointer)) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sizeof (long) >= sizeof (a_function_pointer)\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sizeof (long) >= sizeof (a_function_pointer)\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) < sizeof (a_function_pointer)\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("sizeof (long) < sizeof (a_function_pointer)\n"))); #if defined (ACE_LITTLE_ENDIAN) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("little endian\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("little endian\n"))); #elif defined (ACE_BIG_ENDIAN) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("big endian\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("big endian\n"))); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("assertion failed: no ACE_*_ENDIAN definition!\n"))); + ACE_TEXT ("assertion failed: no ACE_*_ENDIAN definition!\n"))); #endif /* ACE_LITTLE_ENDIAN */ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("OS page size: %u\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OS page size: %u\n"), ACE_OS::getpagesize ())); #if defined (_SC_PAGESIZE) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sysconf page size: %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sysconf page size: %d\n"), (int) ACE_OS::sysconf (_SC_PAGESIZE))); #endif /* _SC_PAGESIZE */ #if defined (_SC_CLK_TCK) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("clock ticks/sec = %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("clock ticks/sec = %d\n"), (int) ACE_OS::sysconf (_SC_CLK_TCK))); #endif /* _SC_CLK_TCK */ diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp index 7540988d69b..dd0b6eb740d 100644 --- a/tests/Buffer_Stream_Test.cpp +++ b/tests/Buffer_Stream_Test.cpp @@ -83,7 +83,7 @@ int Common_Task::open (void *) { if (this->activate (THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn")), -1); return 0; } @@ -91,7 +91,7 @@ int Common_Task::close (u_long exit_status) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) thread is exiting with status %d in module %s\n"), + ACE_TEXT ("(%t) thread is exiting with status %d in module %s\n"), exit_status, this->name ())); @@ -129,13 +129,13 @@ Supplier::svc (void) mb->wr_ptr (2); if (this->put_next (mb) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("put_next"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("put_next"))); } ACE_NEW_RETURN(mb, ACE_Message_Block, -1); if (this->put_next (mb) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("put_next"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), ACE_TEXT ("put_next"))); return 0; } @@ -198,9 +198,9 @@ Consumer::svc (void) // Main driver function. int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Buffer_Stream_Test")); + ACE_START_TEST (ACE_TEXT ("Buffer_Stream_Test")); #if defined (ACE_HAS_THREADS) // Control hierachically-related active objects. @@ -209,23 +209,23 @@ main (int, ASYS_TCHAR *[]) MT_Module *sm; // Allocate the Consumer and Supplier modules. - ACE_NEW_RETURN (cm, MT_Module (ASYS_TEXT ("Consumer"), new Consumer), -1); - ACE_NEW_RETURN (sm, MT_Module (ASYS_TEXT ("Supplier"), new Supplier), -1); + ACE_NEW_RETURN (cm, MT_Module (ACE_TEXT ("Consumer"), new Consumer), -1); + ACE_NEW_RETURN (sm, MT_Module (ACE_TEXT ("Supplier"), new Supplier), -1); // Create Supplier and Consumer Modules and push them onto the // Stream. All processing is performed in the Stream. if (stream.push (cm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("push")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("push")), 1); else if (stream.push (sm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("push")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("push")), 1); // Barrier synchronization: wait for the threads to exit, then exit // ourselves. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/CDR_File_Test.cpp b/tests/CDR_File_Test.cpp index 9a254cefc4e..34fba990146 100644 --- a/tests/CDR_File_Test.cpp +++ b/tests/CDR_File_Test.cpp @@ -122,7 +122,7 @@ CDR_Test::operator == (const CDR_Test &rhs) static int run_test (int write_file, ACE_FILE_IO &file, - LPCTSTR filename, + const ACE_TCHAR *filename, CDR_Test &cdr_test) { if (write_file) @@ -143,7 +143,7 @@ run_test (int write_file, output_cdr.begin (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Writing file %s in %s endian format...\n"), + ACE_TEXT ("Writing file %s in %s endian format...\n"), filename, ACE_CDR_BYTE_ORDER ? "little" : "big")); @@ -151,7 +151,7 @@ run_test (int write_file, output_mb->length ()); if (n != (ssize_t) output_mb->length()) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("send failed on %p\n"), + ACE_TEXT ("send failed on %p\n"), filename), -1); } @@ -160,7 +160,7 @@ run_test (int write_file, ACE_FILE_Info info; if (file.get_info (info) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("get_info failed on %p\n"), + ACE_TEXT ("get_info failed on %p\n"), filename), -1); @@ -176,7 +176,7 @@ run_test (int write_file, if (file.seek (0, SEEK_SET) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), + ACE_TEXT ("%p\n"), filename), -1); // Read the file into the buffer. @@ -184,8 +184,8 @@ run_test (int write_file, info.size_); if (size != info.size_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Read %d bytes, rather than expected ") - ASYS_TEXT ("%d bytes\n"), + ACE_TEXT ("Read %d bytes, rather than expected ") + ACE_TEXT ("%d bytes\n"), size, info.size_), -1); @@ -203,7 +203,7 @@ run_test (int write_file, input_cdr.reset_byte_order (ACE_CDR_BYTE_ORDER); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Reading file %s in %s endian format...\n"), + ACE_TEXT ("Reading file %s in %s endian format...\n"), filename, ACE_CDR_BYTE_ORDER ? "little" : "big")); @@ -223,9 +223,9 @@ run_test (int write_file, // Main function int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("CDR_File_Test")); + ACE_START_TEST (ACE_TEXT ("CDR_File_Test")); // Create a temporary filename. ACE_FILE_Addr filename (ACE_sap_any_cast (ACE_FILE_Addr &)); @@ -242,14 +242,14 @@ main (int, ASYS_TCHAR *[]) O_RDWR | O_CREAT, ACE_DEFAULT_FILE_PERMS) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), filename.get_path_name ()), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (file.unlink () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), filename.get_path_name ()), 1); CDR_Test cdr_test ('a', @@ -290,12 +290,12 @@ main (int, ASYS_TCHAR *[]) #else /* ! ACE_LACKS_IOSTREAM_TOTALLY */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("CDR_File_Test")); + ACE_START_TEST (ACE_TEXT ("CDR_File_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("iostreams not supported on this platform\n"))); + ACE_TEXT ("iostreams not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/CDR_Test.cpp b/tests/CDR_Test.cpp index d2624bd307a..1aabb2c5225 100644 --- a/tests/CDR_Test.cpp +++ b/tests/CDR_Test.cpp @@ -110,8 +110,8 @@ short_stream (void) if (in_mb->length () != len) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("buffer length not preserved")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("buffer length not preserved")), 1); u_long in_chunk, out_chunk; @@ -122,8 +122,8 @@ short_stream (void) out_chunk = u_long (* (out_mb->rd_ptr () + i)); if (in_chunk != out_chunk ) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("buffer contents not preserved")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("buffer contents not preserved")), 1); } @@ -144,7 +144,7 @@ short_stream (void) ACE_CDR::Double d_array1[3]; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Checking operators and arrays\n\n"))); + ACE_TEXT ("Checking operators and arrays\n\n"))); ACE_InputCDR::to_char tc (ch1); is >> tc; @@ -162,78 +162,78 @@ short_stream (void) if (ch1 != ch) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("char transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("char transfer error")), 1); if (str1 != str) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("string transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("string transfer error")), 1); if (s1 != s) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("short transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("short transfer error")), 1); if (us1 != us) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ushort transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("ushort transfer error")), 1); if (l1 != l) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("long transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("long transfer error")), 1); if (ul1 != ul) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ulong transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("ulong transfer error")), 1); if (f1 != f) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("float transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("float transfer error")), 1); if (d1 != d) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("double transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("double transfer error")), 1); for (i = 0 ; i < 3; i++) if (s_array1[i] != s_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("short array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("short array transfer error")), 1); for (i = 0 ; i < 3; i++) if (l_array1[i] != l_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("long array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("long array transfer error")), 1); for (i = 0 ; i < 3; i++) if (f_array1[i] != f_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("float array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("float array transfer error")), 1); for (i = 0 ; i < 3; i++) if (d_array1[i] != d_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("double array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("double array transfer error")), 1); return 0; @@ -246,33 +246,33 @@ CDR_Test_Types::test_put (ACE_OutputCDR &cdr) { if (cdr.write_octet (this->o) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_octet[%d] failed\n"), + ACE_TEXT ("write_octet[%d] failed\n"), i), 1); if (cdr.write_short (this->s) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_short[%d] failed\n"), + ACE_TEXT ("write_short[%d] failed\n"), i), 1); if (cdr.write_octet (this->o) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_octet-2[%d] failed\n"), + ACE_TEXT ("write_octet-2[%d] failed\n"), i), 1); if (cdr.write_long (this->l) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_long[%d] failed\n"), + ACE_TEXT ("write_long[%d] failed\n"), i), 1); if (cdr.write_long (this->l) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_long-2[%d] failed\n"), + ACE_TEXT ("write_long-2[%d] failed\n"), i), 1); if (cdr.write_string (this->str) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_string[%d] failed\n"), + ACE_TEXT ("write_string[%d] failed\n"), i), 1); @@ -292,64 +292,64 @@ CDR_Test_Types::test_get (ACE_InputCDR &cdr) const { if (cdr.read_octet (xo) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_octet[%d] failed\n"), + ACE_TEXT ("read_octet[%d] failed\n"), i), 1); if (xo != this->o) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("octet[%d] differs\n"), + ACE_TEXT ("octet[%d] differs\n"), i), 1); if (cdr.read_short (xs) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_short[%d] failed\n"), + ACE_TEXT ("read_short[%d] failed\n"), i), 1); if (xs != this->s) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("short[%d] differs\n"), + ACE_TEXT ("short[%d] differs\n"), i), 1); if (cdr.read_octet (xo) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_octet-2[%d] failed\n"), + ACE_TEXT ("read_octet-2[%d] failed\n"), i), 1); if (xo != this->o) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("octet-2[%d] differs\n"), + ACE_TEXT ("octet-2[%d] differs\n"), i), 1); if (cdr.read_long (xl) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_long[%d] failed\n"), + ACE_TEXT ("read_long[%d] failed\n"), i), 1); if (xl != this->l) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("long[%d] differs\n"), + ACE_TEXT ("long[%d] differs\n"), i), 1); if (cdr.read_long (xl) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_long-2[%d] failed\n"), + ACE_TEXT ("read_long-2[%d] failed\n"), i), 1); if (xl != this->l) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("long-2[%d] differs\n"), + ACE_TEXT ("long-2[%d] differs\n"), i), 1); ACE_CDR::Char *xstr; if (cdr.read_string (xstr) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_string2[%d] failed\n"), + ACE_TEXT ("read_string2[%d] failed\n"), i), 1); ACE_Auto_Basic_Array_Ptr<ACE_CDR::Char> auto_xstr (xstr); if (ACE_OS::strcmp (auto_xstr.get (), this->str) != 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("string[%d] differs\n"), + ACE_TEXT ("string[%d] differs\n"), i), 1); } @@ -357,17 +357,17 @@ CDR_Test_Types::test_get (ACE_InputCDR &cdr) const } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("CDR_Test")); + ACE_START_TEST (ACE_TEXT ("CDR_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This is ACE Version %u.%u.%u\n\n"), + ACE_TEXT ("This is ACE Version %u.%u.%u\n\n"), ACE::major_version (), ACE::minor_version(), ACE::beta_version())); - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("dn:l:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("dn:l:")); int opt; int debug = 0; @@ -387,25 +387,25 @@ main (int argc, ASYS_TCHAR *argv[]) case '?': default: ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Usage: %s ") - ASYS_TEXT ("-d debug") - ASYS_TEXT ("-n <num> ") - ASYS_TEXT ("-l <loops> ") - ASYS_TEXT ("\n"), + ACE_TEXT ("Usage: %s ") + ACE_TEXT ("-d debug") + ACE_TEXT ("-n <num> ") + ACE_TEXT ("-l <loops> ") + ACE_TEXT ("\n"), argv[0])); return -1; } } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Testing ACE CDR functions - short stream\n\n"))); + ACE_TEXT ("Testing ACE CDR functions - short stream\n\n"))); if (short_stream () != 0 ) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Short stream - no errors\n\n") - ASYS_TEXT ("Testing basic types - long stream\n\n"))); + ACE_TEXT ("Short stream - no errors\n\n") + ACE_TEXT ("Testing basic types - long stream\n\n"))); for (int i = 0; i < nloops; ++i) { @@ -419,12 +419,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Output CDR: \n"))); + ACE_TEXT ("Output CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Input CDR: \n"))); + ACE_TEXT ("Input CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); @@ -435,8 +435,8 @@ main (int argc, ASYS_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Long stream - no errors\n\n") - ASYS_TEXT ("Testing basic types - long stream[2]\n\n"))); + ACE_TEXT ("Long stream - no errors\n\n") + ACE_TEXT ("Testing basic types - long stream[2]\n\n"))); for (int j = 0; j < nloops; ++j) { @@ -450,12 +450,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Output CDR: \n"))); + ACE_TEXT ("Output CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Input CDR: \n"))); + ACE_TEXT ("Input CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); @@ -466,7 +466,7 @@ main (int argc, ASYS_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Long stream[2] - no errors\n\n"))); + ACE_TEXT ("Long stream[2] - no errors\n\n"))); ACE_END_TEST; return 0; diff --git a/tests/Cache_Map_Manager_Test.cpp b/tests/Cache_Map_Manager_Test.cpp index 24fb6bcf298..26c708291e5 100644 --- a/tests/Cache_Map_Manager_Test.cpp +++ b/tests/Cache_Map_Manager_Test.cpp @@ -142,7 +142,7 @@ run_iterator_cache (MAP_CACHE &cache) { // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); @@ -150,7 +150,7 @@ run_iterator_cache (MAP_CACHE &cache) ++counter; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_UNUSED_ARG (iterations); ACE_ASSERT (counter == iterations); @@ -169,7 +169,7 @@ run_iterator_hash_cache (HASH_MAP_CACHE &cache) { // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); @@ -177,7 +177,7 @@ run_iterator_hash_cache (HASH_MAP_CACHE &cache) ++counter; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_UNUSED_ARG (iterations); ACE_ASSERT (counter == iterations); @@ -198,14 +198,14 @@ run_reverse_iterator_cache (MAP_CACHE &cache) // Debugging info. if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); --counter; } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_ASSERT (counter == 0); } @@ -225,14 +225,14 @@ run_reverse_iterator_hash_cache (HASH_MAP_CACHE &cache) // Debugging info. if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); --counter; } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_ASSERT (counter == 0); } @@ -249,13 +249,13 @@ find_test_cache (MAP_CACHE &cache) ACE_ASSERT (j == lookup_array[i]); if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d "), j)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d "), j)); ACE_UNUSED_ARG (result); } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } static void @@ -270,13 +270,13 @@ find_test_hash_cache (HASH_MAP_CACHE &cache) ACE_ASSERT (j == lookup_array[i]); if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d "), j)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d "), j)); ACE_UNUSED_ARG (result); } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } static void @@ -352,14 +352,14 @@ functionality_test_cache (MAP_CACHING_STRATEGY &caching_strategy) ACE_UNUSED_ARG (result); if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("keys[%d]=%d value=[%d]=%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("keys[%d]=%d value=[%d]=%d\n"), i, i, j, j)); ++counter; ACE_ASSERT (cache.current_size () == counter); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache before purging: %d\n"), + ACE_TEXT ("Number of entries in cache before purging: %d\n"), cache.current_size ())); run_iterator_cache (cache); @@ -373,7 +373,7 @@ functionality_test_cache (MAP_CACHING_STRATEGY &caching_strategy) run_reverse_iterator_cache (cache); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache after purging: %d\n"), + ACE_TEXT ("Number of entries in cache after purging: %d\n"), cache.current_size ())); } @@ -395,14 +395,14 @@ functionality_test_hash_cache (HASH_MAP_CACHING_STRATEGY &caching_strategy) if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("keys[%d]=%d value=[%d]=%d\n"), + ACE_TEXT ("keys[%d]=%d value=[%d]=%d\n"), i, i, j, j)); ++counter; ACE_ASSERT (cache.current_size () == counter); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache before purging: %d\n"), + ACE_TEXT ("Number of entries in cache before purging: %d\n"), cache.current_size ())); run_iterator_hash_cache (cache); @@ -416,7 +416,7 @@ functionality_test_hash_cache (HASH_MAP_CACHING_STRATEGY &caching_strategy) run_reverse_iterator_hash_cache (cache); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache after purging: %d\n"), + ACE_TEXT ("Number of entries in cache after purging: %d\n"), cache.current_size ())); } @@ -429,7 +429,7 @@ test_caching_strategy_type (void) switch (caching_strategy_type) { case ACE_NULL: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nNull_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nNull_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_NULL_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -437,7 +437,7 @@ test_caching_strategy_type (void) break; case ACE_LRU: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nLRU_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLRU_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_LRU_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -445,7 +445,7 @@ test_caching_strategy_type (void) break; case ACE_LFU: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nLFU_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLFU_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_LFU_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -453,7 +453,7 @@ test_caching_strategy_type (void) break; case ACE_FIFO: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nFIFO_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nFIFO_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_FIFO_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -464,10 +464,10 @@ test_caching_strategy_type (void) break; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("map cache\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("map cache\n"))); functionality_test_cache (*map_caching_strategy); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhash map cache\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhash map cache\n"))); functionality_test_hash_cache (*hash_map_caching_strategy); delete map_caching_strategy; @@ -475,9 +475,9 @@ test_caching_strategy_type (void) } static int -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("c:i:r:f:p:d")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("c:i:r:f:p:d")); int cc; while ((cc = get_opt ()) != -1) @@ -485,13 +485,13 @@ parse_args (int argc, ASYS_TCHAR *argv[]) switch (cc) { case 'c': - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("null")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("null")) == 0) caching_strategy_type = ACE_NULL; - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("lru")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lru")) == 0) caching_strategy_type = ACE_LRU; - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("lfu")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lfu")) == 0) caching_strategy_type = ACE_LFU; - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("fifo")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("fifo")) == 0) caching_strategy_type = ACE_FIFO; break; case 'i': @@ -513,13 +513,13 @@ parse_args (int argc, ASYS_TCHAR *argv[]) case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") - ASYS_TEXT ("[-r (randomize lookups)] ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-d (debug, i.e., addition printouts)] ") - ASYS_TEXT ("[-p (purge percent)] ") - ASYS_TEXT ("[-f (number of lookups)] \n"), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") + ACE_TEXT ("[-r (randomize lookups)] ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-d (debug, i.e., addition printouts)] ") + ACE_TEXT ("[-p (purge percent)] ") + ACE_TEXT ("[-f (number of lookups)] \n"), argv[0])); return -1; } @@ -528,7 +528,7 @@ parse_args (int argc, ASYS_TCHAR *argv[]) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -536,7 +536,7 @@ main (int argc, ASYS_TCHAR *argv[]) return result; // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Cache_Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Cache_Map_Manager_Test")); // Remove the extra debugging attributes from Log_Msg output. ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); @@ -550,7 +550,7 @@ main (int argc, ASYS_TCHAR *argv[]) -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nLookup sequence: "))); + ACE_TEXT ("\nLookup sequence: "))); // Initialize the lookup array. for (size_t k = 0; @@ -563,12 +563,12 @@ main (int argc, ASYS_TCHAR *argv[]) lookup_array[k] = k % iterations; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), lookup_array[k])); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\n"))); + ACE_TEXT ("\n\n"))); // Do we need to test all the strategies. if (caching_strategy_type == ACE_ALL) diff --git a/tests/Cached_Accept_Conn_Test.cpp b/tests/Cached_Accept_Conn_Test.cpp index 7683f3d53bb..eddee72acb6 100644 --- a/tests/Cached_Accept_Conn_Test.cpp +++ b/tests/Cached_Accept_Conn_Test.cpp @@ -110,7 +110,7 @@ Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler (SVC_HANDL { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Accept succeeded with handle %d\n"), + ACE_TEXT ("Accept succeeded with handle %d\n"), svc_handler->get_handle ())); return result; } @@ -134,7 +134,7 @@ Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::out_of_sockets_handler (void) // Close connections which are cached by explicitly purging the // connection cache maintained by the connector. ACE_DEBUG ((LM_DEBUG, - "Purging connections from Connection Cache...\n")); + ACE_TEXT ("Purging connections from Connection Cache...\n"))); return this->caching_connect_strategy_.purge_connections (); } @@ -348,7 +348,7 @@ Client_Svc_Handler::open (void *) { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("opening Client_Svc_Handler %d with handle %d\n"), + ACE_TEXT ("opening Client_Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return 0; @@ -358,7 +358,7 @@ int Client_Svc_Handler::close (u_long flags) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Closing Client_Svc_Handler %d with handle %d\n"), + ACE_TEXT ("Closing Client_Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::close (flags); @@ -375,7 +375,7 @@ Server_Svc_Handler::open (void *) { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("opening Server_Svc_Handler %d with handle %d\n"), + ACE_TEXT ("opening Server_Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); @@ -422,13 +422,13 @@ cached_connect (STRATEGY_CONNECTOR &con, remote_addr); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("connection failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("connection failed")), -1); else if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Connection successful to server at port %d!\n"), + ACE_TEXT ("Connection successful to server at port %d!\n"), remote_addr.get_port_number ())); // Reset Svc_Handler state. @@ -485,7 +485,7 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) for (int i = 1; i <= iterations; ++i) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iteration %d\n"), + ACE_TEXT ("iteration %d\n"), i)); // Connect strategy is required by the <out_of_sockets_handler>. @@ -505,16 +505,16 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) &listen_multiple_times_accept_strategy) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("open"))); ACE_ASSERT (0); } if (listen_multiple_times_acceptor.acceptor ().get_local_addr (server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr"))); ACE_ASSERT (0); } @@ -522,7 +522,7 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("starting server at port %d\n"), + ACE_TEXT ("starting server at port %d\n"), server_addr.get_port_number ())); // Run the cached blocking test. @@ -555,25 +555,25 @@ test_caching_strategy_type (void) switch (caching_strategy_type) { case ACE_NULL: - ACE_DEBUG ((LM_DEBUG, "\nNull_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nNull_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, NULL_CACHING_STRATEGY_ADAPTER); break; case ACE_LRU: - ACE_DEBUG ((LM_DEBUG, "\nLRU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLRU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LRU_CACHING_STRATEGY_ADAPTER); break; case ACE_LFU: - ACE_DEBUG ((LM_DEBUG, "\nLFU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLFU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LFU_CACHING_STRATEGY_ADAPTER); break; case ACE_FIFO: - ACE_DEBUG ((LM_DEBUG, "\nFIFO_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nFIFO_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, FIFO_CACHING_STRATEGY_ADAPTER); break; @@ -590,9 +590,9 @@ test_caching_strategy_type (void) #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "l:i:p:c:a:d"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("l:i:p:c:a:d")); int cc; @@ -603,43 +603,43 @@ parse_args (int argc, char *argv[]) debug = 1; break; case 'l': - listen_once = atoi (get_opt.optarg); + listen_once = ACE_OS::atoi (get_opt.optarg); break; case 'i': - iterations = atoi (get_opt.optarg); + iterations = ACE_OS::atoi (get_opt.optarg); user_has_specified_iterations = 1; break; case 'p': - purge_percentage = atoi (get_opt.optarg); + purge_percentage = ACE_OS::atoi (get_opt.optarg); break; case 'c': // Note that if null caching strategy is used then this test // will fail if the number of servers exceed number of open // files allowed for the process. - if (ACE_OS::strcmp (get_opt.optarg, "null") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("null")) == 0) caching_strategy_type = ACE_NULL; - if (ACE_OS::strcmp (get_opt.optarg, "lru") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lru")) == 0) caching_strategy_type = ACE_LRU; - if (ACE_OS::strcmp (get_opt.optarg, "lfu") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lfu")) == 0) caching_strategy_type = ACE_LFU; - if (ACE_OS::strcmp (get_opt.optarg, "fifo") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("fifo")) == 0) caching_strategy_type = ACE_FIFO; break; case 'a': - keep_handles_available = atoi (get_opt.optarg); + keep_handles_available = ACE_OS::atoi (get_opt.optarg); break; case '?': case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-t (timeout)] ") - ASYS_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-l (listen once)] ") - ASYS_TEXT ("[-d (addition debugging output)] ") - ASYS_TEXT ("[-p (purge percent)] ") - ASYS_TEXT ("[-a (keep handles available)] "), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-t (timeout)] ") + ACE_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-l (listen once)] ") + ACE_TEXT ("[-d (addition debugging output)] ") + ACE_TEXT ("[-p (purge percent)] ") + ACE_TEXT ("[-a (keep handles available)] "), argv[0])); return -1; } @@ -649,7 +649,7 @@ parse_args (int argc, char *argv[]) int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -665,7 +665,7 @@ main (int argc, #endif /* ACE_WIN32 */ // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Cached_Accept_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Accept_Conn_Test")); // Remove the extra debugging attributes from Log_Msg output. ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); @@ -713,14 +713,14 @@ main (int argc, int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Cached_Accept_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Accept_Conn_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("C Set++ won't build this test correctly\n"))); + ACE_TEXT ("C Set++ won't build this test correctly\n"))); #endif /* !__xlC__ || __xlC > 0x0301 */ diff --git a/tests/Cached_Conn_Test.cpp b/tests/Cached_Conn_Test.cpp index c1ccafa58f3..a4e682dd4a8 100644 --- a/tests/Cached_Conn_Test.cpp +++ b/tests/Cached_Conn_Test.cpp @@ -312,7 +312,7 @@ Svc_Handler::open (void *) { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("opening Svc_Handler %d with handle %d\n"), + ACE_TEXT ("opening Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); @@ -323,7 +323,7 @@ int Svc_Handler::close (u_long flags) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Closing Svc_Handler %d with handle %d\n"), + ACE_TEXT ("Closing Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::close (flags); @@ -363,7 +363,7 @@ out_of_sockets_handler (void) { // Close connections which are cached by explicitly purging the // connection cache maintained by the connector. - ACE_DEBUG ((LM_DEBUG, "Purging connections from Connection Cache...\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Purging connections from Connection Cache...\n"))); int retval = connect_strategy->purge_connections (); ACE_ASSERT (retval != -1); @@ -371,8 +371,8 @@ out_of_sockets_handler (void) else { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("out_of_sockets_handler failed!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("out_of_sockets_handler failed!"))); // This shouldn't happen! ACE_ASSERT (0); } @@ -393,8 +393,8 @@ cached_connect (STRATEGY_CONNECTOR &con, remote_addr); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("connection failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("connection failed")), -1); // Reset Svc_Handler state. @@ -418,7 +418,7 @@ server (ACCEPTOR *acceptor) if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("client %s connected from %d\n"), + ACE_TEXT ("client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); @@ -459,7 +459,7 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) for (int i = 1; i <= iterations; ++i) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iteration %d\n"), + ACE_TEXT ("iteration %d\n"), i)); // If <listen_once> is false, one Acceptor is used for every @@ -483,14 +483,14 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) if (acceptor.acceptor ().get_local_addr (server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr"))); ACE_ASSERT (0); } if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("starting server at port %d\n"), + ACE_TEXT ("starting server at port %d\n"), server_addr.get_port_number ())); } @@ -526,25 +526,25 @@ test_caching_strategy_type (void) switch (caching_strategy_type) { case ACE_NULL: - ACE_DEBUG ((LM_DEBUG, "\nNull_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nNull_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, NULL_CACHING_STRATEGY_ADAPTER); break; case ACE_LRU: - ACE_DEBUG ((LM_DEBUG, "\nLRU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLRU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LRU_CACHING_STRATEGY_ADAPTER); break; case ACE_LFU: - ACE_DEBUG ((LM_DEBUG, "\nLFU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLFU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LFU_CACHING_STRATEGY_ADAPTER); break; case ACE_FIFO: - ACE_DEBUG ((LM_DEBUG, "\nFIFO_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nFIFO_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, FIFO_CACHING_STRATEGY_ADAPTER); break; @@ -561,9 +561,9 @@ test_caching_strategy_type (void) #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "l:i:p:c:a:d"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("l:i:p:c:a:d")); int cc; @@ -574,42 +574,42 @@ parse_args (int argc, char *argv[]) debug = 1; break; case 'l': - listen_once = atoi (get_opt.optarg); + listen_once = ACE_OS::atoi (get_opt.optarg); break; case 'i': - iterations = atoi (get_opt.optarg); + iterations = ACE_OS::atoi (get_opt.optarg); user_has_specified_iterations = 1; break; case 'p': - purge_percentage = atoi (get_opt.optarg); + purge_percentage = ACE_OS::atoi (get_opt.optarg); break; case 'c': // Note that if null caching strategy is used then this test // will fail if the number of servers exceed number of open // files allowed for the process. - if (ACE_OS::strcmp (get_opt.optarg, "null") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("null")) == 0) caching_strategy_type = ACE_NULL; - if (ACE_OS::strcmp (get_opt.optarg, "lru") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lru")) == 0) caching_strategy_type = ACE_LRU; - if (ACE_OS::strcmp (get_opt.optarg, "lfu") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lfu")) == 0) caching_strategy_type = ACE_LFU; - if (ACE_OS::strcmp (get_opt.optarg, "fifo") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("fifo")) == 0) caching_strategy_type = ACE_FIFO; break; case 'a': - keep_handles_available = atoi (get_opt.optarg); + keep_handles_available = ACE_OS::atoi (get_opt.optarg); break; case '?': case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-l (listen once)] ") - ASYS_TEXT ("[-d (addition debugging output)] ") - ASYS_TEXT ("[-p (purge percent)] ") - ASYS_TEXT ("[-a (keep handles available)] "), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-l (listen once)] ") + ACE_TEXT ("[-d (addition debugging output)] ") + ACE_TEXT ("[-p (purge percent)] ") + ACE_TEXT ("[-a (keep handles available)] "), argv[0])); return -1; } @@ -619,7 +619,7 @@ parse_args (int argc, char *argv[]) int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -635,7 +635,7 @@ main (int argc, #endif /* ACE_WIN32 */ // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Cached_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Conn_Test")); // Remove the extra debugging attributes from Log_Msg output. ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); @@ -683,14 +683,14 @@ main (int argc, int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Cached_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Conn_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("C Set++ won't build this test correctly\n"))); + ACE_TEXT ("C Set++ won't build this test correctly\n"))); #endif /* !__xlC__ || __xlC > 0x0301 */ diff --git a/tests/Capabilities_Test.cpp b/tests/Capabilities_Test.cpp index 984f1c7be48..f123a2ba2bb 100644 --- a/tests/Capabilities_Test.cpp +++ b/tests/Capabilities_Test.cpp @@ -22,45 +22,44 @@ ACE_RCSID(tests, Capabilities_Test, "$Id$") -static const char config[] = "Capabilities_Test.cfg"; +static const ACE_TCHAR config[] = ACE_TEXT ("Capabilities_Test.cfg"); static int load_config (void) { ACE_Capabilities caps; - if (caps.getent (config, - "Config") == -1) + if (caps.getent (config, ACE_TEXT ("Config")) == -1) ACE_ERROR_RETURN ((LM_ERROR, - "Can't read %s", + ACE_TEXT ("Can't read %s"), config), 1); int b = 0; - caps.getval ("bool", b); + caps.getval (ACE_TEXT ("bool"), b); ACE_DEBUG ((LM_DEBUG, - "bool = %d\n", + ACE_TEXT ("bool = %d\n"), b)); int n = 0; - caps.getval ("integer", n); + caps.getval (ACE_TEXT ("integer"), n); ACE_DEBUG ((LM_DEBUG, - "integer = %d\n", + ACE_TEXT ("integer = %d\n"), n)); - ACE_CString s; - caps.getval ("string", s); + ACE_TString s; + caps.getval (ACE_TEXT ("string"), s); ACE_DEBUG ((LM_DEBUG, - "string = %s\n", + ACE_TEXT ("string = %s\n"), s.c_str ())); return 0; } int -main (int, char *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Capabilities_Test")); + ACE_START_TEST (ACE_TEXT ("Capabilities_Test")); // -------------------------------------------------------- @@ -79,7 +78,7 @@ main (int, char *[]) ACE_HANDLE fd = ACE_OS::open (config, O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::open"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_OS::open")), -1); if (ACE_OS::write (fd, file_contents, sizeof(file_contents)) != @@ -87,13 +86,13 @@ main (int, char *[]) { ACE_OS::unlink (config); ACE_OS::close (fd); - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::write"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_OS::write")), -1); } if (ACE_OS::close (fd) != 0) { ACE_OS::unlink (config); - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::close"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_OS::close")), -1); } // -------------------------------------------------------- diff --git a/tests/Collection_Test.cpp b/tests/Collection_Test.cpp index 3d25d4fd6d8..b225a928dae 100644 --- a/tests/Collection_Test.cpp +++ b/tests/Collection_Test.cpp @@ -25,9 +25,9 @@ ACE_RCSID(tests, Collection_Test, "$Id$") typedef int DATA; -int main (int, ASYS_TCHAR *[]) +int main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Collection_Test")); + ACE_START_TEST (ACE_TEXT ("Collection_Test")); typedef ACE_Unbounded_Set<DATA> UNBOUNDED_SET; typedef ACE_Unbounded_Set_Iterator<DATA> UNBOUNDED_SET_ITERATOR; @@ -43,7 +43,7 @@ int main (int, ASYS_TCHAR *[]) iterator != unbounded_set.end (); ++iterator) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), (*iterator))); } } @@ -54,7 +54,7 @@ int main (int, ASYS_TCHAR *[]) { DATA *data = 0; iterator.next (data); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), (*data))); iterator.advance (); } @@ -94,7 +94,7 @@ int main (int, ASYS_TCHAR *[]) i != array1.size (); ++i) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), array1[i])); ACE_ASSERT (array1[i] == 4); } @@ -106,7 +106,7 @@ int main (int, ASYS_TCHAR *[]) { DATA *data = 0; iterator.next (data); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), (*data))); ACE_ASSERT (*data == 4); iterator.advance (); diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp index dfc6a05f473..36298bd161d 100644 --- a/tests/Conn_Test.cpp +++ b/tests/Conn_Test.cpp @@ -219,14 +219,14 @@ int Svc_Handler::open (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) opening Svc_Handler %d with handle %d\n"), + ACE_TEXT ("(%P|%t) opening Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); // Enable non-blocking I/O. if (this->peer ().enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("enable")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("enable")), -1); return 0; } @@ -235,7 +235,7 @@ int Svc_Handler::recycle (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) recycling Svc_Handler %d with handle %d\n"), + ACE_TEXT ("(%P|%t) recycling Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return 0; @@ -249,8 +249,8 @@ Svc_Handler::send_data (void) for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (this->peer ().send_n (c, 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); } void @@ -273,8 +273,8 @@ Svc_Handler::recv_data (void) handle_set, 0, 0, 0) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("select"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("select"))); else { char c; @@ -295,26 +295,26 @@ Svc_Handler::recv_data (void) if (r_bytes == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); + ACE_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); // Close endpoint handle (but don't close <this> yet // since we're going to recycle it for the next // iteration). if (new_stream.close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); break; } else if (r_bytes == -1) { if (errno == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no input available, going back to reading\n"))); + ACE_TEXT ("(%P|%t) no input available, going back to reading\n"))); else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv_n"))); } } } @@ -326,8 +326,8 @@ Svc_Handler::close (u_long side) // Only run this protocol if we're the write-side (i.e., "1"). if (side == 1 && this->peer ().close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close_writer"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close_writer"))); // Trigger the shutdown. return this->handle_close (); } @@ -336,7 +336,7 @@ int Svc_Handler::idle (u_long flags) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) idling Svc_Handler %d with handle %d\n"), + ACE_TEXT ("(%P|%t) idling Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::idle (flags); @@ -360,8 +360,8 @@ timed_blocking_connect (CONNECTOR &con, server_addr, options) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); else { // Send the data to the server. @@ -370,8 +370,8 @@ timed_blocking_connect (CONNECTOR &con, // Close the connection completely. if (svc_handler->close (1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); } } @@ -387,8 +387,8 @@ blocking_connect (CONNECTOR &con, if (con.connect (svc_handler, server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); else { // Send the data to the server. @@ -397,8 +397,8 @@ blocking_connect (CONNECTOR &con, // Close the connection completely. if (svc_handler->close (1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); } } @@ -422,8 +422,8 @@ cached_connect (STRAT_CONNECTOR &con, server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); return; } @@ -467,7 +467,7 @@ client_connections (void *arg) // Run the timed-blocking test. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** starting timed-blocking connect\n"))); + ACE_TEXT ("(%P|%t) **** starting timed-blocking connect\n"))); timed_blocking_connect (*info->connector_, *info->server_addr_); @@ -478,7 +478,7 @@ client_connections (void *arg) // Run the blocking test. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** starting blocking connect\n"))); + ACE_TEXT ("(%P|%t) **** starting blocking connect\n"))); blocking_connect (*info->connector_, *info->server_addr_); @@ -489,7 +489,7 @@ client_connections (void *arg) // Run the cached blocking test. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** starting cached blocking connect\n"))); + ACE_TEXT ("(%P|%t) **** starting cached blocking connect\n"))); cached_connect (*info->strat_connector_, *info->server_addr_); return 0; @@ -534,8 +534,8 @@ client (void *arg) (void *) &info, THR_NEW_LWP) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("client thread spawn failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("client thread spawn failed"))); // Wait for the threads to exit. client_manager.wait (); @@ -553,7 +553,7 @@ server (void *arg) { #if defined (VXWORKS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) server stack size is %u\n"), + ACE_TEXT ("(%P|%t) server stack size is %u\n"), ACE_OS::thr_min_stack ())); #endif /* VXWORKS */ @@ -593,17 +593,17 @@ server (void *arg) if (errno == ETIMEDOUT) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("accept timed out\n"))); + ACE_TEXT ("accept timed out\n"))); return 0; } else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("accept failed, shutting down")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("accept failed, shutting down")), 0); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); @@ -639,13 +639,13 @@ spawn_processes (ACCEPTOR *acceptor, // on the same port number for clients to connect. for (i = 0; i < n_servers; i++) { - pid_t pid = ACE_OS::fork (ASYS_TEXT ("child")); + pid_t pid = ACE_OS::fork (ACE_TEXT ("child")); switch (pid) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("fork failed"))); ACE_OS::exit (-1); /* NOTREACHED */ case 0: // In the child. @@ -670,7 +670,7 @@ spawn_processes (ACCEPTOR *acceptor, // Shutdown the servers. if (ACE_OS::kill (children[i], SIGTERM) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p for %d\n"), + ACE_TEXT ("(%P|%t) %p for %d\n"), children[i])); pid_t child; @@ -680,7 +680,7 @@ spawn_processes (ACCEPTOR *acceptor, child = ACE_OS::wait (); if (child != -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reaping %d\n"), + ACE_TEXT ("(%P|%t) reaping %d\n"), child)); } while (child != -1); @@ -720,9 +720,9 @@ spawn_threads (ACCEPTOR *acceptor, for (i = 0; i < n_servers; ++i) { - ACE_NEW_RETURN (server_name[i], ASYS_TCHAR[32], -1); + ACE_NEW_RETURN (server_name[i], ACE_TCHAR[32], -1); ACE_OS::sprintf (server_name[i], - ASYS_TEXT ("server%u"), + ACE_TEXT ("server%u"), i); stack_size[i] = 40000; ACE_NEW_RETURN (stack[i], char[stack_size[i]], -1); @@ -731,7 +731,7 @@ spawn_threads (ACCEPTOR *acceptor, ACE_OS::memset (stack[i], 0xEE, stack_size[i]); } - ASYS_TCHAR *client_name = ASYS_TEXT ("Conn client"); + ACE_TCHAR *client_name = ACE_TEXT ("Conn client"); #endif /* VXWORKS */ if (ACE_Thread_Manager::instance ()->spawn_n @@ -755,8 +755,8 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* VXWORKS */ ) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("server thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("server thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn ((ACE_THR_FUNC) client, @@ -767,8 +767,8 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* VXWORKS */ ) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("client thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("client thread create failed"))); // Wait for the threads to exit. // But, wait for a limited time because sometimes the test hangs on Irix. @@ -778,10 +778,10 @@ spawn_threads (ACCEPTOR *acceptor, { if (errno == ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + ACE_TEXT ("maximum wait time of %d msec exceeded\n"), max_wait.msec ())); else - ACE_OS::perror (ASYS_TEXT ("wait")); + ACE_OS::perror (ACE_TEXT ("wait")); status = -1; } @@ -802,12 +802,12 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* ! ACE_LACKS_FORK && ACE_HAS_THREADS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Conn_Test")); int status = 0; - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("c:i:s:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("c:i:s:")); for (int c; (c = getopt ()) != -1; ) switch (c) { @@ -831,28 +831,28 @@ main (int argc, ASYS_TCHAR *argv[]) || acceptor.acceptor ().get_local_addr (server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open"))); ACE_ASSERT (0); } else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) if (spawn_processes (&acceptor, &server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%r) %p\n"), - ASYS_TEXT ("spawn_processes")), + ACE_TEXT ("(%P|%r) %p\n"), + ACE_TEXT ("spawn_processes")), 1); #elif defined (ACE_HAS_THREADS) status = spawn_threads (&acceptor, &server_addr); #else /* ACE_LACKS_FORK && ! ACE_HAS_THREADS */ ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_LACKS_FORK && ! ACE_HAS_THREADS */ } diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp index defcdd203f7..6f1e90ebb79 100644 --- a/tests/DLL_Test.cpp +++ b/tests/DLL_Test.cpp @@ -35,20 +35,20 @@ ACE_RCSID(tests, DLL_Test, "$Id$") // symbols dynamically at runtime. #if defined (ACE_WIN32) -# define OBJ_SUFFIX ".exe" -# define OBJ_PREFIX "" +# define OBJ_SUFFIX ACE_TEXT (".exe") +# define OBJ_PREFIX ACE_TEXT ("") #else # define OBJ_SUFFIX ACE_DLL_SUFFIX # define OBJ_PREFIX "./" ACE_DLL_PREFIX #endif /*ACE_WIN32*/ -char const * -cdecl_decoration (char const *func_name) +ACE_TCHAR const * +cdecl_decoration (ACE_TCHAR const *func_name) { #if defined (__BORLANDC__) - static char decorated_func_name[10*1024]; + static ACE_TCHAR decorated_func_name[10*1024]; ACE_OS::sprintf (decorated_func_name, - "_%s", + ACE_TEXT ("_%s"), func_name); return decorated_func_name; #else @@ -75,25 +75,25 @@ get_hello (void) typedef Hello *(*TC) (void); int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("DLL_Test")); + ACE_START_TEST (ACE_TEXT ("DLL_Test")); // Protection against this test being run on platforms not supporting Dlls. #if defined (ACE_WIN32) || defined (ACE_HAS_SVR4_DYNAMIC_LINKING) || \ defined (__hpux) ACE_DLL dll; - int retval = dll.open (ASYS_TEXT (OBJ_PREFIX) - ASYS_TEXT ("DLL_Test") - ASYS_TEXT (OBJ_SUFFIX)); + int retval = dll.open (OBJ_PREFIX + ACE_TEXT ("DLL_Test") + OBJ_SUFFIX); if (retval != 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - dll.error ()), + ACE_TEXT ("%p\n"), + dll.error ()), -1); // Just because the ANSI C++ spec says you can no longer cast a @@ -101,7 +101,7 @@ main (int argc, ASYS_TCHAR *argv[]) // TC f = (TC) dll.symbol ("get_hello"); void *foo; - char const *cdecl_str = cdecl_decoration ("get_hello"); + ACE_TCHAR const *cdecl_str = cdecl_decoration (ACE_TEXT ("get_hello")); foo = dll.symbol (cdecl_str); // Cast the void* to long first. @@ -109,7 +109,7 @@ main (int argc, ASYS_TCHAR *argv[]) TC f = ACE_reinterpret_cast (Hello * (*)(void), tmp); if (f == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), + ACE_TEXT ("%p\n"), dll.error ()), -1); @@ -121,7 +121,7 @@ main (int argc, ASYS_TCHAR *argv[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("Dynamically Linkable Libraries not supported on this platform\n"))); + ACE_TEXT ("Dynamically Linkable Libraries not supported on this platform\n"))); #endif /* ACE_WIN32 || ACE_HAS_SVR4_DYNAMIC_LINKING || __hpux */ ACE_END_TEST; diff --git a/tests/DLL_Test.h b/tests/DLL_Test.h index c644cb04216..d19a488f8d9 100644 --- a/tests/DLL_Test.h +++ b/tests/DLL_Test.h @@ -41,13 +41,13 @@ public: void say_hello (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Hello\n"))); + ACE_TEXT ("Hello\n"))); } void say_next (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("How are you?\n"))); + ACE_TEXT ("How are you?\n"))); } }; diff --git a/tests/DLList_Test.cpp b/tests/DLList_Test.cpp index fd9e6e9c9fb..ea382e30bfd 100644 --- a/tests/DLList_Test.cpp +++ b/tests/DLList_Test.cpp @@ -21,7 +21,7 @@ #include "ace/SString.h" #include "ace/Malloc.h" -typedef ASYS_TCHAR *ACE_STRING; +typedef ACE_TCHAR *ACE_STRING; typedef ACE_DLList<ACE_STRING> STRLIST; typedef ACE_DLList_Iterator<ACE_STRING> STRLIST_ITERATOR; @@ -44,12 +44,12 @@ static ACE_STRING string_table[] = // Note: all these casts are to appease SC 5.0 which is not pleased // with using string literals (i.e. const char *'s) as char // *'s. It's ugly, but necessary. - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("hello")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("guten Tag")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("goodbye")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("auf wiedersehen")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("funny")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("lustig")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("hello")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("guten Tag")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("goodbye")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("auf wiedersehen")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("funny")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("lustig")), 0 }; @@ -63,9 +63,9 @@ run_iterate (STRLIST &list) (entry = iter.next ()) != 0; iter.advance (), i++) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("iterating (%d): [%s]\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("iterating (%d): [%s]\n"), i, - (ASYS_TCHAR *) *entry)); + (ACE_TCHAR *) *entry)); } } @@ -83,14 +83,14 @@ run_test (void) if (ACE_EVEN (i) && list.insert_tail ((ACE_STRING *) &string_table[i]) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("insert"), + ACE_TEXT ("%p failed for %s \n"), + ACE_TEXT ("insert"), string_table[i]), -1); else if (list.insert_head ((ACE_STRING *) &string_table[i]) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("insert"), + ACE_TEXT ("%p failed for %s \n"), + ACE_TEXT ("insert"), string_table[i]), -1); run_iterate (list); @@ -113,9 +113,9 @@ run_test (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("DLList_Test")); + ACE_START_TEST (ACE_TEXT ("DLList_Test")); run_test (); diff --git a/tests/Dynamic_Priority_Test.cpp b/tests/Dynamic_Priority_Test.cpp index 2b63ab276b8..5f6ea6e0961 100644 --- a/tests/Dynamic_Priority_Test.cpp +++ b/tests/Dynamic_Priority_Test.cpp @@ -362,7 +362,7 @@ performance_consumer (void * args) timer.stop (); ACE_Time_Value tv; timer.elapsed_time (tv); - ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%6u, %6u, %f"), + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%6u, %6u, %f"), local_count, tv.msec (), (ACE_timer_t) tv.msec () / local_count)); @@ -423,7 +423,7 @@ performance_producer (void *args) timer.stop (); ACE_Time_Value tv; timer.elapsed_time (tv); - ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%6u, %6u, %f, "), + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%6u, %6u, %f, "), local_count, tv.msec (), (ACE_timer_t) tv.msec () / local_count)); @@ -473,35 +473,35 @@ run_performance_test (u_int min_load, { case BEST: ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n\nenqueued, best static time, best static avg, ") - ASYS_TEXT ("dequeued, best static time, best static avg, ") - ASYS_TEXT ("enqueued, best deadline time, best deadline avg, ") - ASYS_TEXT ("dequeued, best deadline time, best deadline avg, ") - ASYS_TEXT ("enqueued, best laxity time, best laxity avg, ") - ASYS_TEXT ("dequeued, best laxity time, best laxity avg\n"))); + ACE_TEXT ("\n\nenqueued, best static time, best static avg, ") + ACE_TEXT ("dequeued, best static time, best static avg, ") + ACE_TEXT ("enqueued, best deadline time, best deadline avg, ") + ACE_TEXT ("dequeued, best deadline time, best deadline avg, ") + ACE_TEXT ("enqueued, best laxity time, best laxity avg, ") + ACE_TEXT ("dequeued, best laxity time, best laxity avg\n"))); break; case WORST: ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n\nenqueued, worst static time, worst static avg, ") - ASYS_TEXT ("dequeued, worst static time, worst static avg, ") - ASYS_TEXT ("enqueued, worst deadline time, worst deadline avg, ") - ASYS_TEXT ("dequeued, worst deadline time, worst deadline avg, ") - ASYS_TEXT ("enqueued, worst laxity time, worst laxity avg, ") - ASYS_TEXT ("dequeued, worst laxity time, worst laxity avg\n"))); + ACE_TEXT ("\n\nenqueued, worst static time, worst static avg, ") + ACE_TEXT ("dequeued, worst static time, worst static avg, ") + ACE_TEXT ("enqueued, worst deadline time, worst deadline avg, ") + ACE_TEXT ("dequeued, worst deadline time, worst deadline avg, ") + ACE_TEXT ("enqueued, worst laxity time, worst laxity avg, ") + ACE_TEXT ("dequeued, worst laxity time, worst laxity avg\n"))); break; case RANDOM: ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n\nenqueued, random static time, random static avg, ") - ASYS_TEXT ("dequeued, random static time, random static avg, ") - ASYS_TEXT ("enqueued, random deadline time, random deadline avg, ") - ASYS_TEXT ("dequeued, random deadline time, random deadline avg, ") - ASYS_TEXT ("enqueued, random laxity time, random laxity avg, ") - ASYS_TEXT ("dequeued, random laxity time, random laxity avg\n"))); + ACE_TEXT ("\n\nenqueued, random static time, random static avg, ") + ACE_TEXT ("dequeued, random static time, random static avg, ") + ACE_TEXT ("enqueued, random deadline time, random deadline avg, ") + ACE_TEXT ("dequeued, random deadline time, random deadline avg, ") + ACE_TEXT ("enqueued, random laxity time, random laxity avg, ") + ACE_TEXT ("dequeued, random laxity time, random laxity avg\n"))); break; default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unknown test type %d"), + ACE_TEXT ("unknown test type %d"), test_type), -1); } @@ -610,7 +610,7 @@ run_performance_test (u_int min_load, // This should only happen for a *very* large messages // relative to the system's representation size. ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Insufficient range of random numbers")), + ACE_TEXT ("Insufficient range of random numbers")), -1); shuffle_index = random_int % load; @@ -629,7 +629,7 @@ run_performance_test (u_int min_load, break; default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unknown test type %d"), + ACE_TEXT ("unknown test type %d"), test_type), -1); } @@ -649,7 +649,7 @@ run_performance_test (u_int min_load, // Add a comma delimiter for most recent outputs. ACE_DEBUG ((LM_INFO, - ASYS_TEXT (", "))); + ACE_TEXT (", "))); // Run the performance test producer and consumer on the // deadline queue. @@ -660,7 +660,7 @@ run_performance_test (u_int min_load, // Add a comma delimiter for most recent outputs. ACE_DEBUG ((LM_INFO, - ASYS_TEXT (", "))); + ACE_TEXT (", "))); // Run the performance test producer and consumer on the laxity // queue. @@ -671,7 +671,7 @@ run_performance_test (u_int min_load, // Move to the next line of output. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); delete [] time_offsets; @@ -693,9 +693,9 @@ run_performance_test (u_int min_load, #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Dynamic_Priority_Test")); + ACE_START_TEST (ACE_TEXT ("Dynamic_Priority_Test")); #if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. @@ -707,15 +707,15 @@ main (int, ASYS_TCHAR *[]) { if (ACE_OS::last_error () == EPERM) ACE_DEBUG ((LM_MAX, - ASYS_TEXT ("user is not superuser, ") - ASYS_TEXT ("so remain in time-sharing class\n"))); + ACE_TEXT ("user is not superuser, ") + ACE_TEXT ("so remain in time-sharing class\n"))); else if (ACE_OS::last_error () == ENOTSUP) ACE_DEBUG ((LM_MAX, - ASYS_TEXT ("process scope scheduling is not available, ") - ASYS_TEXT ("so remain in time-sharing class\n"))); + ACE_TEXT ("process scope scheduling is not available, ") + ACE_TEXT ("so remain in time-sharing class\n"))); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%n: ACE_OS::sched_params failed\n%a")), + ACE_TEXT ("%n: ACE_OS::sched_params failed\n%a")), -1); } @@ -783,7 +783,7 @@ main (int, ASYS_TCHAR *[]) RANDOM); #else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE is not compiled with ACE_HAS_TIMED_MESSAGE_BLOCKS enabled\n"))); + ACE_TEXT ("ACE is not compiled with ACE_HAS_TIMED_MESSAGE_BLOCKS enabled\n"))); #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */ ACE_END_TEST; diff --git a/tests/Enum_Interfaces_Test.cpp b/tests/Enum_Interfaces_Test.cpp index 071c06c6843..c08692010a4 100644 --- a/tests/Enum_Interfaces_Test.cpp +++ b/tests/Enum_Interfaces_Test.cpp @@ -34,15 +34,15 @@ ACE_RCSID(tests, Enum_Interfaces_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Enum_Interfaces_Test")); + ACE_START_TEST (ACE_TEXT ("Enum_Interfaces_Test")); struct utsname uname; ACE_OS::uname(&uname); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Machine: %s running on %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Machine: %s running on %s\n"), uname.nodename, uname.machine )); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Platform: %s, %s, %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Platform: %s, %s, %s\n"), uname.sysname, uname.release, uname.version )); ACE_INET_Addr *the_addr_array; @@ -52,17 +52,17 @@ main (int, ASYS_TCHAR *[]) if (rc != 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE::get_ip_interfaces failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE::get_ip_interfaces failed"))); else if (how_many == 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("No interfaces presently configured in the kernel\n"))); + ACE_TEXT ("No interfaces presently configured in the kernel\n"))); else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("there are %d interfaces\n"), how_many)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("there are %d interfaces\n"), how_many)); for (size_t i = 0; i < how_many; i++) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\t%s\n"), the_addr_array[i].get_host_addr ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\t%s\n"), the_addr_array[i].get_host_addr ())); delete [] the_addr_array; } diff --git a/tests/Env_Value_Test.cpp b/tests/Env_Value_Test.cpp index da467ad1ba8..82e08b524fe 100644 --- a/tests/Env_Value_Test.cpp +++ b/tests/Env_Value_Test.cpp @@ -26,7 +26,7 @@ do { \ ACE_Env_Value<type> val (varname, (defval)); \ if (val != (expval)) { \ ACE_ERROR ((LM_ERROR, \ - ASYS_TEXT ("val %d does not match expected value of %d\n"), \ + ACE_TEXT ("val %d does not match expected value of %d\n"), \ (int) (type) val, (int) (expval))); \ } \ ACE_ASSERT (val == (expval)); \ @@ -36,13 +36,15 @@ int #if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) || defined (ACE_LACKS_FORK) // ACE_HAS_NONSTATIC_OBJECT_MANAGER only allows main to have two // arguments. And on platforms that lack fork (), we can't use spawn. -main (int argc, ASYS_TCHAR* []) + +main (int argc, ACE_TCHAR* []) { ACE_UNUSED_ARG (argc); - ACE_OS::putenv (ASYS_TEXT ("TEST_VALUE_POSITIVE=10.2")); - ACE_OS::putenv (ASYS_TEXT ("TEST_VALUE_NEGATIVE=-10.2")); + + ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_POSITIVE=10.2")); + ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_NEGATIVE=-10.2")); #else /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER && ! ACE_LACKS_FORK */ -main (int argc, LPTSTR [], LPTSTR envp[]) +main (int argc, ACE_TCHAR * [], ACE_TCHAR *envp[]) { if (argc == 1) { @@ -74,28 +76,29 @@ main (int argc, LPTSTR [], LPTSTR envp[]) #endif /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER && ! ACE_LACKS_FORK */ { // In this case we're the child - ACE_START_TEST (ASYS_TEXT ("Env_Value_Test")); - TEST_THIS (int, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 4, 10); + ACE_START_TEST (ACE_TEXT ("Env_Value_Test")); + + TEST_THIS (int, ACE_TEXT ("TEST_VALUE_POSITIVE"), 4, 10); #if !defined (ACE_LACKS_FLOATING_POINT) - TEST_THIS (double, ASYS_TEXT ("TEST_VALUE_POSITIVE"), -1.0, 10.2); + TEST_THIS (double, ACE_TEXT ("TEST_VALUE_POSITIVE"), -1.0, 10.2); #endif /* ! ACE_LACKS_FLOATING_POINT */ - TEST_THIS (long, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (unsigned long, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (short, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (unsigned short, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (long, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (unsigned long, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (short, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (unsigned short, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (int, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 4, -10); + TEST_THIS (int, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 4, -10); #if !defined (ACE_LACKS_FLOATING_POINT) - TEST_THIS (double, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), -1.0, -10.2); + TEST_THIS (double, ACE_TEXT ("TEST_VALUE_NEGATIVE"), -1.0, -10.2); #endif /* ! ACE_LACKS_FLOATING_POINT */ - TEST_THIS (long, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10L); - TEST_THIS (unsigned long, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned long) -10); - TEST_THIS (short, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10); - TEST_THIS (unsigned short, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned short) -10); + TEST_THIS (long, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10L); + TEST_THIS (unsigned long, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned long) -10); + TEST_THIS (short, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10); + TEST_THIS (unsigned short, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned short) -10); - const ASYS_TCHAR *defstr = ASYS_TEXT ("Sarah Cleeland is Two!"); - ACE_Env_Value<const ASYS_TCHAR *> sval (ASYS_TEXT ("This_Shouldnt_Be_Set_Hopefully"), + const ACE_TCHAR *defstr = ACE_TEXT ("Sarah Cleeland is Two!"); + ACE_Env_Value<const ACE_TCHAR *> sval (ACE_TEXT ("This_Shouldnt_Be_Set_Hopefully"), defstr); ACE_ASSERT (ACE_OS::strcmp (sval, defstr) == 0); ACE_END_TEST; diff --git a/tests/FlReactor_Test.cpp b/tests/FlReactor_Test.cpp index 9e2ff5f21ca..83804f6b8a5 100644 --- a/tests/FlReactor_Test.cpp +++ b/tests/FlReactor_Test.cpp @@ -31,7 +31,7 @@ ACE_RCSID(tests, FlReactor_Test, "$Id$") int main (int, char*[]) { - ACE_START_TEST (ASYS_TEXT ("FlReactor_Test")); + ACE_START_TEST (ACE_TEXT ("FlReactor_Test")); ACE_ERROR ((LM_INFO, "FL not supported on this platform\n")); @@ -231,7 +231,7 @@ Acceptor::make_svc_handler (Connection_Handler *&sh) int main (int argc, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("FlReactor_Test")); + ACE_START_TEST (ACE_TEXT ("FlReactor_Test")); Fl_Window window (300, 370); diff --git a/tests/Future_Set_Test.cpp b/tests/Future_Set_Test.cpp index 179e6febfa6..6491063e982 100644 --- a/tests/Future_Set_Test.cpp +++ b/tests/Future_Set_Test.cpp @@ -57,7 +57,7 @@ class Prime_Scheduler : public ACE_Task_Base friend class Method_Request_end; public: // = Initialization and termination methods. - Prime_Scheduler (const ASYS_TCHAR *, + Prime_Scheduler (const ACE_TCHAR *, Prime_Scheduler * = 0); // Constructor. @@ -72,7 +72,7 @@ public: // = These methods are part of the Active Object Proxy interface. ACE_Future<u_long> work (u_long param, int count = 1); - ACE_Future<const ASYS_TCHAR*> name (void); + ACE_Future<const ACE_TCHAR*> name (void); void end (void); protected: @@ -82,11 +82,11 @@ protected: // = These are the Servant methods that do the actual work. u_long work_i (u_long, int); - const ASYS_TCHAR *name_i (void); + const ACE_TCHAR *name_i (void); private: // = These are the <Prime_Scheduler> implementation details. - ASYS_TCHAR *name_; + ACE_TCHAR *name_; ACE_Activation_Queue activation_queue_; Prime_Scheduler *scheduler_; }; @@ -129,13 +129,13 @@ Method_Request_work::Method_Request_work (Prime_Scheduler *new_Prime_Scheduler, future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work created\n"))); + ACE_TEXT ("(%t) Method_Request_work created\n"))); } Method_Request_work::~Method_Request_work (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_work will be deleted.\n"))); } int @@ -154,7 +154,7 @@ class Method_Request_name : public ACE_Method_Request // Reification of the <name> method. public: Method_Request_name (Prime_Scheduler *, - ACE_Future<const ASYS_TCHAR*> &); + ACE_Future<const ACE_TCHAR*> &); virtual ~Method_Request_name (void); virtual int call (void); @@ -162,22 +162,22 @@ public: private: Prime_Scheduler *scheduler_; - ACE_Future<const ASYS_TCHAR*> future_result_; + ACE_Future<const ACE_TCHAR*> future_result_; }; Method_Request_name::Method_Request_name (Prime_Scheduler *new_scheduler, - ACE_Future<const ASYS_TCHAR*> &new_result) + ACE_Future<const ACE_TCHAR*> &new_result) : scheduler_ (new_scheduler), future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name created\n"))); + ACE_TEXT ("(%t) Method_Request_name created\n"))); } Method_Request_name::~Method_Request_name (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_name will be deleted.\n"))); } int @@ -219,16 +219,16 @@ Method_Request_end::call (void) } // Constructor -Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, +Prime_Scheduler::Prime_Scheduler (const ACE_TCHAR *newname, Prime_Scheduler *new_scheduler) : scheduler_ (new_scheduler) { ACE_NEW (this->name_, - ASYS_TCHAR[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((ASYS_TCHAR *) this->name_, + ACE_TCHAR[ACE_OS::strlen (newname) + 1]); + ACE_OS::strcpy ((ACE_TCHAR *) this->name_, newname); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s created\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s created\n"), this->name_)); } @@ -237,7 +237,7 @@ Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, Prime_Scheduler::~Prime_Scheduler (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), this->name_)); delete [] this->name_; } @@ -249,7 +249,7 @@ Prime_Scheduler::open (void *) { task_count++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s open\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s open\n"), this->name_)); // Become an Active Object. return this->activate (THR_BOUND | THR_DETACHED); @@ -261,7 +261,7 @@ int Prime_Scheduler::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s close\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s close\n"), this->name_)); task_count--; return 0; @@ -279,7 +279,7 @@ Prime_Scheduler::svc (void) auto_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) calling method request\n"))); + ACE_TEXT ("(%t) calling method request\n"))); // Call it. if (mo->call () == -1) break; @@ -308,13 +308,13 @@ Prime_Scheduler::work_i (u_long param, return ACE::is_prime (param, 2, param / 2); } -const ASYS_TCHAR * +const ACE_TCHAR * Prime_Scheduler::name_i (void) { return this->name_; } -ACE_Future<const ASYS_TCHAR *> +ACE_Future<const ACE_TCHAR *> Prime_Scheduler::name (void) { if (this->scheduler_) @@ -322,7 +322,7 @@ Prime_Scheduler::name (void) return this->scheduler_->name (); else { - ACE_Future<const ASYS_TCHAR*> new_future; + ACE_Future<const ACE_TCHAR*> new_future; // @@ What happens if new fails here? this->activation_queue_.enqueue @@ -359,29 +359,29 @@ static int n_loops = 100; typedef ACE_Future_Rep<u_long> *u_long_key; typedef ACE_Future_Holder<u_long> *u_long_value; -typedef ACE_Future_Rep<const ASYS_TCHAR *> *char_star_key; -typedef ACE_Future_Holder<const ASYS_TCHAR *> *char_star_value; +typedef ACE_Future_Rep<const ACE_TCHAR *> *char_star_key; +typedef ACE_Future_Holder<const ACE_TCHAR *> *char_star_value; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Future_Holder<const ASYS_TCHAR *>; +template class ACE_Future_Holder<const ACE_TCHAR *>; template class ACE_Future_Holder<u_long>; -template class ACE_Future_Observer<const ASYS_TCHAR *>; +template class ACE_Future_Observer<const ACE_TCHAR *>; template class ACE_Future_Observer<u_long>; -template class ACE_Future<const ASYS_TCHAR *>; +template class ACE_Future<const ACE_TCHAR *>; template class ACE_Future<u_long>; -template class ACE_Future_Rep<const ASYS_TCHAR *>; +template class ACE_Future_Rep<const ACE_TCHAR *>; template class ACE_Future_Rep<u_long>; -template class ACE_Future_Set<const ASYS_TCHAR *>; +template class ACE_Future_Set<const ACE_TCHAR *>; template class ACE_Future_Set<u_long>; template class auto_ptr<ACE_Method_Request>; template class ACE_Auto_Basic_Ptr<ACE_Method_Request>; -template class ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Node<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; template class ACE_Pointer_Hash<u_long_key>; template class ACE_Equal_To<u_long_key>; @@ -401,23 +401,23 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<char_star_key, char_star_value, #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> -#pragma instantiate ACE_Future_Holder<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Holder<const ACE_TCHAR *> #pragma instantiate ACE_Future_Holder<u_long> -#pragma instantiate ACE_Future_Observer<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Observer<const ACE_TCHAR *> #pragma instantiate ACE_Future_Observer<u_long> -#pragma instantiate ACE_Future<const ASYS_TCHAR *> +#pragma instantiate ACE_Future<const ACE_TCHAR *> #pragma instantiate ACE_Future<u_long> -#pragma instantiate ACE_Future_Rep<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Rep<const ACE_TCHAR *> #pragma instantiate ACE_Future_Rep<u_long> -#pragma instantiate ACE_Future_Set<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Set<const ACE_TCHAR *> #pragma instantiate ACE_Future_Set<u_long> #pragma instantiate auto_ptr<ACE_Method_Request> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Request> -#pragma instantiate ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Node<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *> #pragma instantiate ACE_Pointer_Hash<u_long_key> #pragma instantiate ACE_Equal_To<u_long_key> @@ -439,9 +439,9 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<char_star_key, char_star_value, #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Future_Set_Test")); + ACE_START_TEST (ACE_TEXT ("Future_Set_Test")); #if defined (ACE_HAS_THREADS) // @@ Should make these be <auto_ptr>s... @@ -449,21 +449,21 @@ main (int, ASYS_TCHAR *[]) // Create active objects.. ACE_NEW_RETURN (andres, - Prime_Scheduler (ASYS_TEXT ("andres")), + Prime_Scheduler (ACE_TEXT ("andres")), -1); ACE_ASSERT (andres->open () != -1); ACE_NEW_RETURN (peter, - Prime_Scheduler (ASYS_TEXT ("peter")), + Prime_Scheduler (ACE_TEXT ("peter")), -1); ACE_ASSERT (peter->open () != -1); ACE_NEW_RETURN (helmut, - Prime_Scheduler (ASYS_TEXT ("helmut")), + Prime_Scheduler (ACE_TEXT ("helmut")), -1); ACE_ASSERT (helmut->open () != -1); // Matias passes all asynchronous method calls on to Andres... ACE_NEW_RETURN (matias, - Prime_Scheduler (ASYS_TEXT ("matias"), + Prime_Scheduler (ACE_TEXT ("matias"), andres), -1); ACE_ASSERT (matias->open () != -1); @@ -472,16 +472,16 @@ main (int, ASYS_TCHAR *[]) ACE_Future<u_long> fresultb; ACE_Future<u_long> fresultc; ACE_Future<u_long> fresultd; - ACE_Future<const ASYS_TCHAR *> fname; + ACE_Future<const ACE_TCHAR *> fname; ACE_Future_Set<u_long> fseta; ACE_Future_Set<u_long> fsetb; ACE_Future_Set<u_long> fsetc; ACE_Future_Set<u_long> fsetd; - ACE_Future_Set<const ASYS_TCHAR *> fsetname; + ACE_Future_Set<const ACE_TCHAR *> fsetname; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) initializing future sets with non-blocking call\n"))); + ACE_TEXT ("(%t) initializing future sets with non-blocking call\n"))); for (int i = 0; i < n_loops; i++) { @@ -505,26 +505,26 @@ main (int, ASYS_TCHAR *[]) if (!fseta.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set a is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set a is not empty.....\n"))); if (!fsetb.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set b is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set b is not empty.....\n"))); if (!fsetc.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set c is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set c is not empty.....\n"))); if (!fsetd.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set d is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set d is not empty.....\n"))); if (!fsetname.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set name is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set name is not empty.....\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) non-blocking calls done... now blocking...\n"))); + ACE_TEXT ("(%t) non-blocking calls done... now blocking...\n"))); // Save the result of fresulta. @@ -539,7 +539,7 @@ main (int, ASYS_TCHAR *[]) fresulta.get (resulta); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) a %u\n"), + ACE_TEXT ("(%t) result(%u) a %u\n"), count, (u_int) resulta)); } @@ -550,7 +550,7 @@ main (int, ASYS_TCHAR *[]) fresultb.get (resultb); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) b %u\n"), + ACE_TEXT ("(%t) result(%u) b %u\n"), count, (u_int) resultb)); } @@ -561,7 +561,7 @@ main (int, ASYS_TCHAR *[]) fresultc.get (resultc); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) c %u\n"), + ACE_TEXT ("(%t) result(%u) c %u\n"), count, (u_int) resultc)); } @@ -572,45 +572,45 @@ main (int, ASYS_TCHAR *[]) fresultd.get (resultd); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) d %u\n"), + ACE_TEXT ("(%t) result(%u) d %u\n"), count, (u_int) resultd)); } - const ASYS_TCHAR *name; + const ACE_TCHAR *name; count = 0; while (fsetname.next_readable (fname)) { fname.get (name); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) name %s\n"), + ACE_TEXT ("(%t) result(%u) name %s\n"), count, name)); } if (fseta.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set a is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set a is empty.....\n"))); if (fsetb.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set b is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set b is empty.....\n"))); if (fsetc.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set c is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set c is empty.....\n"))); if (fsetd.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set d is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set d is empty.....\n"))); if (fsetname.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set name is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set name is empty.....\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d\n"), + ACE_TEXT ("(%t) task_count %d\n"), task_count.value () )); // Close things down. @@ -622,7 +622,7 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (2); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d\n"), + ACE_TEXT ("(%t) task_count %d\n"), task_count.value () )); ACE_OS::sleep (5); @@ -634,7 +634,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp index 2c02aa1c8a2..2391ad99f07 100644 --- a/tests/Future_Test.cpp +++ b/tests/Future_Test.cpp @@ -65,7 +65,7 @@ class Prime_Scheduler : public ACE_Task_Base friend class Method_Request_end; public: // = Initialization and termination methods. - Prime_Scheduler (const ASYS_TCHAR *, + Prime_Scheduler (const ACE_TCHAR *, Prime_Scheduler * = 0); // Constructor. @@ -80,7 +80,7 @@ public: // = These methods are part of the Active Object Proxy interface. ACE_Future<u_long> work (u_long param, int count = 1); - ACE_Future<const ASYS_TCHAR*> name (void); + ACE_Future<const ACE_TCHAR*> name (void); void end (void); protected: @@ -90,11 +90,11 @@ protected: // = These are the Servant methods that do the actual work. u_long work_i (u_long, int); - const ASYS_TCHAR *name_i (void); + const ACE_TCHAR *name_i (void); private: // = These are the <Prime_Scheduler> implementation details. - ASYS_TCHAR *name_; + ACE_TCHAR *name_; ACE_Activation_Queue activation_queue_; Prime_Scheduler *scheduler_; }; @@ -137,13 +137,13 @@ Method_Request_work::Method_Request_work (Prime_Scheduler *new_Prime_Scheduler, future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work created\n"))); + ACE_TEXT ("(%t) Method_Request_work created\n"))); } Method_Request_work::~Method_Request_work (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_work will be deleted.\n"))); } int @@ -162,7 +162,7 @@ class Method_Request_name : public ACE_Method_Request // Reification of the <name> method. public: Method_Request_name (Prime_Scheduler *, - ACE_Future<const ASYS_TCHAR*> &); + ACE_Future<const ACE_TCHAR*> &); virtual ~Method_Request_name (void); virtual int call (void); @@ -170,22 +170,22 @@ public: private: Prime_Scheduler *scheduler_; - ACE_Future<const ASYS_TCHAR*> future_result_; + ACE_Future<const ACE_TCHAR*> future_result_; }; Method_Request_name::Method_Request_name (Prime_Scheduler *new_scheduler, - ACE_Future<const ASYS_TCHAR*> &new_result) + ACE_Future<const ACE_TCHAR*> &new_result) : scheduler_ (new_scheduler), future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name created\n"))); + ACE_TEXT ("(%t) Method_Request_name created\n"))); } Method_Request_name::~Method_Request_name (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_name will be deleted.\n"))); } int @@ -227,16 +227,16 @@ Method_Request_end::call (void) } // Constructor -Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, +Prime_Scheduler::Prime_Scheduler (const ACE_TCHAR *newname, Prime_Scheduler *new_scheduler) : scheduler_ (new_scheduler) { ACE_NEW (this->name_, - ASYS_TCHAR[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((ASYS_TCHAR *) this->name_, + ACE_TCHAR[ACE_OS::strlen (newname) + 1]); + ACE_OS::strcpy ((ACE_TCHAR *) this->name_, newname); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s created\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s created\n"), this->name_)); } @@ -245,7 +245,7 @@ Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, Prime_Scheduler::~Prime_Scheduler (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), this->name_)); delete [] this->name_; } @@ -257,7 +257,7 @@ Prime_Scheduler::open (void *) { task_count++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s open\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s open\n"), this->name_)); // Become an Active Object. return this->activate (THR_BOUND | THR_DETACHED); @@ -269,7 +269,7 @@ int Prime_Scheduler::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s close\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s close\n"), this->name_)); task_count--; return 0; @@ -287,7 +287,7 @@ Prime_Scheduler::svc (void) auto_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) calling method request\n"))); + ACE_TEXT ("(%t) calling method request\n"))); // Call it. if (mo->call () == -1) break; @@ -316,13 +316,13 @@ Prime_Scheduler::work_i (u_long param, return ACE::is_prime (param, 2, param / 2); } -const ASYS_TCHAR * +const ACE_TCHAR * Prime_Scheduler::name_i (void) { return this->name_; } -ACE_Future<const ASYS_TCHAR *> +ACE_Future<const ACE_TCHAR *> Prime_Scheduler::name (void) { if (this->scheduler_) @@ -330,7 +330,7 @@ Prime_Scheduler::name (void) return this->scheduler_->name (); else { - ACE_Future<const ASYS_TCHAR*> new_future; + ACE_Future<const ACE_TCHAR*> new_future; // @@ What happens if new fails here? this->activation_queue_.enqueue @@ -366,40 +366,40 @@ static int n_loops = 100; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Future<const ASYS_TCHAR *>; +template class ACE_Future<const ACE_TCHAR *>; template class ACE_Future<int>; template class ACE_Future<u_long>; -template class ACE_Future_Rep<const ASYS_TCHAR *>; +template class ACE_Future_Rep<const ACE_TCHAR *>; template class ACE_Future_Rep<int>; template class ACE_Future_Rep<u_long>; template class auto_ptr<ACE_Method_Request>; template class ACE_Auto_Basic_Ptr<ACE_Method_Request>; -template class ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Node<ACE_Future_Observer<int> *>; template class ACE_Node<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set<ACE_Future_Observer<int> *>; template class ACE_Unbounded_Set<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<int> *>; template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> -#pragma instantiate ACE_Future<const ASYS_TCHAR *> +#pragma instantiate ACE_Future<const ACE_TCHAR *> #pragma instantiate ACE_Future<int> #pragma instantiate ACE_Future<u_long> -#pragma instantiate ACE_Future_Rep<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Rep<const ACE_TCHAR *> #pragma instantiate ACE_Future_Rep<int> #pragma instantiate ACE_Future_Rep<u_long> #pragma instantiate auto_ptr<ACE_Method_Request> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Request> -#pragma instantiate ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Node<ACE_Future_Observer<int> *> #pragma instantiate ACE_Node<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<int> *> #pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<int> *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ @@ -407,9 +407,9 @@ template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Future_Test")); + ACE_START_TEST (ACE_TEXT ("Future_Test")); #if defined (ACE_HAS_THREADS) // @@ Should make these be <auto_ptr>s... @@ -417,21 +417,21 @@ main (int, ASYS_TCHAR *[]) // Create active objects.. ACE_NEW_RETURN (andres, - Prime_Scheduler (ASYS_TEXT ("andres")), + Prime_Scheduler (ACE_TEXT ("andres")), -1); ACE_ASSERT (andres->open () != -1); ACE_NEW_RETURN (peter, - Prime_Scheduler (ASYS_TEXT ("peter")), + Prime_Scheduler (ACE_TEXT ("peter")), -1); ACE_ASSERT (peter->open () != -1); ACE_NEW_RETURN (helmut, - Prime_Scheduler (ASYS_TEXT ("helmut")), + Prime_Scheduler (ACE_TEXT ("helmut")), -1); ACE_ASSERT (helmut->open () != -1); // Matias passes all asynchronous method calls on to Andres... ACE_NEW_RETURN (matias, - Prime_Scheduler (ASYS_TEXT ("matias"), + Prime_Scheduler (ACE_TEXT ("matias"), andres), -1); ACE_ASSERT (matias->open () != -1); @@ -444,10 +444,10 @@ main (int, ASYS_TCHAR *[]) ACE_Future<u_long> fresultc; ACE_Future<u_long> fresultd; ACE_Future<u_long> fresulte; - ACE_Future<const ASYS_TCHAR *> fname; + ACE_Future<const ACE_TCHAR *> fname; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) going to do a non-blocking call\n"))); + ACE_TEXT ("(%t) going to do a non-blocking call\n"))); // Spawn off the methods, which run in a separate thread as // active object invocations. @@ -460,10 +460,10 @@ main (int, ASYS_TCHAR *[]) // See if the result is available... if (fresulta.ready ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. work is ready.....\n"))); + ACE_TEXT ("(%t) wow.. work is ready.....\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) non-blocking call done... now blocking...\n"))); + ACE_TEXT ("(%t) non-blocking call done... now blocking...\n"))); // Save the result of fresulta. @@ -488,28 +488,28 @@ main (int, ASYS_TCHAR *[]) fresulte.get (resulte); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result a %u\n") - ASYS_TEXT ("(%t) result b %u\n") - ASYS_TEXT ("(%t) result c %u\n") - ASYS_TEXT ("(%t) result d %u\n") - ASYS_TEXT ("(%t) result e %u\n"), + ACE_TEXT ("(%t) result a %u\n") + ACE_TEXT ("(%t) result b %u\n") + ACE_TEXT ("(%t) result c %u\n") + ACE_TEXT ("(%t) result d %u\n") + ACE_TEXT ("(%t) result e %u\n"), (u_int) resulta, (u_int) resultb, (u_int) resultc, (u_int) resulte, (u_int) resultd)); - const ASYS_TCHAR *name; + const ACE_TCHAR *name; fname.get (name); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) name %s\n"), + ACE_TEXT ("(%t) name %s\n"), name)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d future_count %d ") - ASYS_TEXT ("capsule_count %d method_request_count %d\n"), + ACE_TEXT ("(%t) task_count %d future_count %d ") + ACE_TEXT ("capsule_count %d method_request_count %d\n"), task_count.value (), future_count.value (), capsule_count.value (), @@ -525,8 +525,8 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (2); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d future_count %d ") - ASYS_TEXT ("capsule_count %d method_request_count %d\n"), + ACE_TEXT ("(%t) task_count %d future_count %d ") + ACE_TEXT ("capsule_count %d method_request_count %d\n"), task_count.value (), future_count.value (), capsule_count.value (), @@ -546,17 +546,17 @@ main (int, ASYS_TCHAR *[]) if (f1.get (value, &timeout) == 0 && value == 100) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Ace_Future<T>::Set followed by Ace_Future<T>::Get works.\n"))); + ACE_TEXT ("Ace_Future<T>::Set followed by Ace_Future<T>::Get works.\n"))); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_Future<T>::Set followed by Ace_Future<T>::Get does ") - ASYS_TEXT ("not work, broken Ace_Future<> implementation.\n"))); + ACE_TEXT ("ACE_Future<T>::Set followed by Ace_Future<T>::Get does ") + ACE_TEXT ("not work, broken Ace_Future<> implementation.\n"))); } { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Checking if Ace_Future<T>::operator= is implemented ") - ASYS_TEXT ("incorrectly this might crash the program.\n"))); + ACE_TEXT ("Checking if Ace_Future<T>::operator= is implemented ") + ACE_TEXT ("incorrectly this might crash the program.\n"))); ACE_Future<int> f1; { // To ensure that a rep object is created. @@ -565,7 +565,7 @@ main (int, ASYS_TCHAR *[]) // Now it is one ACE_Future<int> referencing the rep instance ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("0.\n"))); + ACE_TEXT ("0.\n"))); //Check that self assignment works. f1 = f1; @@ -584,7 +584,7 @@ main (int, ASYS_TCHAR *[]) f1.get (value, &timeout); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("1.\n"))); + ACE_TEXT ("1.\n"))); { // Might delete the same data a couple of times. ACE_Future<int> f2 (f1); @@ -593,7 +593,7 @@ main (int, ASYS_TCHAR *[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("2.\n"))); + ACE_TEXT ("2.\n"))); { ACE_Future<int> f2 (f1); f1.set (100); @@ -601,21 +601,21 @@ main (int, ASYS_TCHAR *[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("3.\n"))); + ACE_TEXT ("3.\n"))); { ACE_Future<int> f2 (f1); f1.set (100); f1.get (value, &timeout); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("4.\n"))); + ACE_TEXT ("4.\n"))); { ACE_Future<int> f2 (f1); f1.set (100); f1.get (value, &timeout); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("5.\n"))); + ACE_TEXT ("5.\n"))); { ACE_Future<int> f2 (90); f2.get (value, &timeout); @@ -623,7 +623,7 @@ main (int, ASYS_TCHAR *[]) } } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("No it did not crash the program.\n"))); + ACE_TEXT ("No it did not crash the program.\n"))); ACE_OS::sleep (5); @@ -634,7 +634,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Handle_Set_Test.cpp b/tests/Handle_Set_Test.cpp index 8964aed6d94..aed0a00546c 100644 --- a/tests/Handle_Set_Test.cpp +++ b/tests/Handle_Set_Test.cpp @@ -107,13 +107,13 @@ test_boundaries (void) ACE_ASSERT (0 == SET_IS_EMPTY_SO_SHOULD_NOT_SEE_THIS); #else /* ! defined (ACE_PSOS_DIAB) */ ACE_ASSERT (0 == - ASYS_TEXT ("this shouldn't get called since ") - ASYS_TEXT ("the set is empty!\n")); + ACE_TEXT ("this shouldn't get called since ") + ACE_TEXT ("the set is empty!\n")); #endif /* defined (ACE_PSOS_DIAB) */ } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_DEFAULT_SELECT_REACTOR_SIZE %d\n"), + ACE_TEXT ("ACE_DEFAULT_SELECT_REACTOR_SIZE %d\n"), ACE_DEFAULT_SELECT_REACTOR_SIZE)); // Insert the vector of <ACE_HANDLE>s into the set. @@ -136,7 +136,7 @@ test_boundaries (void) ) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("obtained handle %d\n"), + ACE_TEXT ("obtained handle %d\n"), handle)); int done = set.remove (handle); ACE_ASSERT (done == 0); @@ -180,32 +180,32 @@ test_performance (size_t max_handles, #if defined (ACE_LACKS_FLOATING_POINT) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %u usecs\n"), + ACE_TEXT ("real time = %u usecs\n"), et.real_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per each of the %d calls = %u usecs\n"), + ACE_TEXT ("time per each of the %d calls = %u usecs\n"), count, et.real_time / count)); #else /* ! ACE_LACKS_FLOATING_POINT */ ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, ") - ASYS_TEXT ("system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, ") + ACE_TEXT ("system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per each of the %d calls = %f usecs\n"), + ACE_TEXT ("time per each of the %d calls = %f usecs\n"), count, et.real_time / double (count) * 1000000)); #endif /* ! ACE_LACKS_FLOATING_POINT */ } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Handle_Set_Test")); + ACE_START_TEST (ACE_TEXT ("Handle_Set_Test")); int count = argc > 1 ? ACE_OS::atoi (argv[1]) diff --git a/tests/Hash_Map_Bucket_Iterator_Test.cpp b/tests/Hash_Map_Bucket_Iterator_Test.cpp index 75f044d0d34..2f2e13b96e1 100644 --- a/tests/Hash_Map_Bucket_Iterator_Test.cpp +++ b/tests/Hash_Map_Bucket_Iterator_Test.cpp @@ -28,9 +28,9 @@ static ACE_UINT32 iterations = ACE_MAX_ITERATIONS * 10; static ACE_UINT32 table_size = ACE_MAX_ITERATIONS; int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "t:i:"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("t:i:")); int cc; @@ -38,18 +38,18 @@ parse_args (int argc, char *argv[]) switch (cc) { case 't': - table_size = atoi (get_opt.optarg); + table_size = ACE_OS::atoi (get_opt.optarg); break; case 'i': - iterations = atoi (get_opt.optarg); + iterations = ACE_OS::atoi (get_opt.optarg); break; case '?': case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-t (table size)] "), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-t (table size)] "), argv[0])); return -1; } @@ -70,7 +70,7 @@ typedef ACE_Hash_Map_Bucket_Iterator<ACE_UINT32, ACE_SYNCH_NULL_MUTEX> HASH_MAP_BUCKET_ITERATOR; int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -78,7 +78,7 @@ main (int argc, ASYS_TCHAR *argv[]) return result; // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Hash_Map_Bucket_Iterator_Test")); + ACE_START_TEST (ACE_TEXT ("Hash_Map_Bucket_Iterator_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); ACE_UINT32 i = 0; diff --git a/tests/Hash_Map_Manager_Test.cpp b/tests/Hash_Map_Manager_Test.cpp index 32150c2735c..a346686f92a 100644 --- a/tests/Hash_Map_Manager_Test.cpp +++ b/tests/Hash_Map_Manager_Test.cpp @@ -30,8 +30,8 @@ ACE_RCSID(tests, Hash_Map_Manager_Test, "$Id$") static const size_t STRING_TABLE_ENTRIES = 3; static const size_t MAX_HASH = 6; -typedef ACE_Hash_Map_Entry<LPCTSTR, - LPCTSTR> HASH_STRING_ENTRY; +typedef ACE_Hash_Map_Entry<const ACE_TCHAR *, + const ACE_TCHAR *> HASH_STRING_ENTRY; // @@ The following requires too much internal implementation // information about the <ACE_Hash_Map_Manager>. We need to figure @@ -40,45 +40,45 @@ static const size_t STRING_TABLE_SIZE = sizeof (HASH_STRING_ENTRY) * (STRING_TABLE_ENTRIES + MAX_HASH); #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Entry<LPCTSTR, LPCTSTR>; -template class ACE_Hash_Map_Manager_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Entry<const ACE_TCHAR *, const ACE_TCHAR *>; +template class ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; template class ACE_Static_Allocator<STRING_TABLE_SIZE>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Entry<LPCTSTR, LPCTSTR> -#pragma instantiate ACE_Hash_Map_Manager_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Entry<const ACE_TCHAR *, const ACE_TCHAR *> +#pragma instantiate ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> #pragma instantiate ACE_Static_Allocator<STRING_TABLE_SIZE> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static ACE_Static_Allocator<STRING_TABLE_SIZE> alloc; -typedef ACE_Hash_Map_Manager_Ex<LPCTSTR, - LPCTSTR, - ACE_Hash<LPCTSTR>, - ACE_Equal_To<LPCTSTR>, +typedef ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, + const ACE_TCHAR *, + ACE_Hash<const ACE_TCHAR *>, + ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> HASH_STRING_MAP; -typedef ACE_Hash_Map_Iterator_Ex<LPCTSTR, - LPCTSTR, - ACE_Hash<LPCTSTR>, - ACE_Equal_To<LPCTSTR>, +typedef ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, + const ACE_TCHAR *, + ACE_Hash<const ACE_TCHAR *>, + ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> HASH_STRING_ITER; -typedef ACE_Hash_Map_Reverse_Iterator_Ex<LPCTSTR, - LPCTSTR, - ACE_Hash<LPCTSTR>, - ACE_Equal_To<LPCTSTR>, +typedef ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, + const ACE_TCHAR *, + ACE_Hash<const ACE_TCHAR *>, + ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> HASH_STRING_REVERSE_ITER; struct String_Table { - LPCTSTR key_; - LPCTSTR value_; + const ACE_TCHAR *key_; + const ACE_TCHAR *value_; }; static String_Table string_table[] = @@ -116,37 +116,37 @@ run_test (void) if (hash.bind (string_table[i].key_, string_table[i].value_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("bind"), - ASYS_MULTIBYTE_STRING (string_table[i].key_)), -1); + ACE_TEXT ("%p failed for %s \n"), + ACE_TEXT ("bind"), + string_table[i].key_), -1); - LPCTSTR entry; + const ACE_TCHAR *entry; // Check the <find> operation. for (i = 0; string_table[i].key_ != 0; i++) if (hash.find (string_table[i].key_, entry) == 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("`%s' found `%s'\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_), + ACE_TEXT ("`%s' found `%s'\n"), + string_table[i].key_, entry)); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("`%s' not found\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_)), + ACE_TEXT ("`%s' not found\n"), + string_table[i].key_), -1); // Check the <trybind> operation. { - LPCTSTR pc = string_table[1].value_; + const ACE_TCHAR *pc = string_table[1].value_; if (hash.trybind (string_table[0].key_, pc) != 1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("::trybind missed existing entry.")), + ACE_TEXT ("::trybind missed existing entry.")), -1); else if (pc != string_table[0].value_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("::trybind doesn't return existing value.")), + ACE_TEXT ("::trybind doesn't return existing value.")), -1); } @@ -160,10 +160,10 @@ run_test (void) hash_iter.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iterating (%d): [%s, %s]\n"), + ACE_TEXT ("iterating (%d): [%s, %s]\n"), i, - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->ext_id_), - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->int_id_))); + entry->ext_id_, + entry->int_id_)); i++; } } @@ -175,13 +175,13 @@ run_test (void) if (hash.find (string_table[i].key_, entry) == 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("`%s' found `%s'\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_), - ASYS_MULTIBYTE_STRING (entry))); + ACE_TEXT ("`%s' found `%s'\n"), + string_table[i].key_, + entry)); else if (i != 2) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("`%s' not found\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_)), + ACE_TEXT ("`%s' not found\n"), + string_table[i].key_), -1); // Let's test the iterator backwards. @@ -194,10 +194,10 @@ run_test (void) hash_iter.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iterating (%d): [%s, %s]\n"), + ACE_TEXT ("iterating (%d): [%s, %s]\n"), i, - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->ext_id_), - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->int_id_))); + entry->ext_id_, + entry->int_id_)); i++; } } @@ -207,9 +207,9 @@ run_test (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Hash_Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Hash_Map_Manager_Test")); run_test (); diff --git a/tests/High_Res_Timer_Test.cpp b/tests/High_Res_Timer_Test.cpp index 1dd6f9bd555..feff6ad16dd 100644 --- a/tests/High_Res_Timer_Test.cpp +++ b/tests/High_Res_Timer_Test.cpp @@ -39,8 +39,8 @@ check (const u_int interval, const u_int measured) return 0; else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("The measured time of %u differs from ") - ASYS_TEXT ("the interval of %u by %u percent.\n"), + ACE_TEXT ("The measured time of %u differs from ") + ACE_TEXT ("the interval of %u by %u percent.\n"), measured, interval, percentage_difference), @@ -67,20 +67,20 @@ u_int intervals [] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000}; /* usec */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("High_Res_Timer_Test")); + ACE_START_TEST (ACE_TEXT ("High_Res_Timer_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("The ACE_High_Res_Timer scale factor is %u ") - ASYS_TEXT ("1/microsecond\n"), + ACE_TEXT ("The ACE_High_Res_Timer scale factor is %u ") + ACE_TEXT ("1/microsecond\n"), ACE_High_Res_Timer::global_scale_factor ())); u_int errors = 0; u_int iterations = 1; - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("i:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("i:")); for (int c; (c = getopt ()) != -1; ) switch (c) { @@ -100,11 +100,11 @@ main (int argc, ASYS_TCHAR *argv[]) const ACE_Time_Value interval (0, intervals[i]); const ACE_Time_Value measured = time_interval (interval); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("interval: %u usec, measured: %u usec%s\n"), + ACE_TEXT ("interval: %u usec, measured: %u usec%s\n"), interval.sec () * 1000000 + interval.usec (), measured.sec () * 1000000 + measured.usec (), intervals[i] <= TIMER_RESOLUTION ? - ASYS_TEXT (" (interval and measured may differ)") : ASYS_TEXT (""))); + ACE_TEXT (" (interval and measured may differ)") : ACE_TEXT (""))); if (intervals[i] > TIMER_RESOLUTION) { diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp index c2e33e47972..1f08bf42c42 100644 --- a/tests/IOStream_Test.cpp +++ b/tests/IOStream_Test.cpp @@ -179,14 +179,14 @@ client (void *arg = 0) if (connector.connect (server, addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("Failed to connect to server thread")), + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("Failed to connect to server thread")), 0); // Send a string to the server which it can interpret as a qchar[] const char *str = "\"This is a test string.\""; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%P|%t) Client Sending: (%s)\n"), - ASYS_WIDE_STRING (str))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%P|%t) Client Sending: (%s)\n"), + ACE_TEXT_CHAR_TO_TCHAR (str))); server << str << endl; // Allow the server to get the string and echo it to the user. (The @@ -199,8 +199,8 @@ client (void *arg = 0) str = "\"THIS IS A TEST STRING.\""; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Client Sending: (%s)\n"), - ASYS_WIDE_STRING (str))); + ACE_TEXT (" (%P|%t) Client Sending: (%s)\n"), + str)); server << str << endl; // Again, give the server time to display the happenings to the @@ -212,7 +212,7 @@ client (void *arg = 0) // the server. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Client Receiving\n"))); + ACE_TEXT (" (%P|%t) Client Receiving\n"))); ACE_Time_Value timeout (2); ACE_Time_Value *timeoutp = &timeout; @@ -230,13 +230,13 @@ client (void *arg = 0) if (eof) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Unrecoverable stream error/eof\n"))); + ACE_TEXT (" (%P|%t) Unrecoverable stream error/eof\n"))); break; } else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Recoverable stream error/timed out)\n"))); + ACE_TEXT (" (%P|%t) Recoverable stream error/timed out)\n"))); server.clear (0); } } @@ -247,7 +247,7 @@ client (void *arg = 0) server >> d; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Client Received: int %d float %f long %d float %f double %f\n"), + ACE_TEXT (" (%P|%t) Client Received: int %d float %f long %d float %f double %f\n"), i, f1, (int) l, @@ -294,8 +294,8 @@ server (void *arg = 0) if (acceptor->get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr")), 0); #if defined (ACE_HAS_THREADS) @@ -303,14 +303,14 @@ server (void *arg = 0) (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("spawing client thread")), + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("spawing client thread")), 0); #endif /* ACE_HAS_THREADS */ if (acceptor->accept (client_handler) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) Failed to accept new client_handler")), + ACE_TEXT (" (%P|%t) Failed to accept new client_handler")), 0); // Read a qbuf[] from the client. Notice that all of the client's @@ -320,8 +320,8 @@ server (void *arg = 0) client_handler >> qbuf; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Received: (\"%s\")\n"), - ASYS_WIDE_STRING ((char *) qbuf))); + ACE_TEXT (" (%P|%t) Server Received: (\"%s\")\n"), + ACE_TEXT_CHAR_TO_TCHAR ((char *) qbuf))); // Give the client time to announce the next test to the user. ACE_OS::sleep (2); @@ -353,7 +353,7 @@ server (void *arg = 0) char buf[BUFSIZ]; ACE_OS::memset (buf, 0, sizeof buf); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Received: ("))); + ACE_TEXT (" (%P|%t) Server Received: ("))); while (ACE_OS::strlen (buf) == 0 || buf[ACE_OS::strlen (buf) - 1] != '"') @@ -361,12 +361,12 @@ server (void *arg = 0) if (! (client_handler >> buf)) break; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s "), - ASYS_WIDE_STRING (buf))); + ACE_TEXT ("%s "), + ACE_TEXT_CHAR_TO_TCHAR (buf))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (")\n"))); + ACE_TEXT (")\n"))); #endif /* ACE_HAS_STRING_CLASS */ // Send some non-textual data to the client. We use a single @@ -376,11 +376,11 @@ server (void *arg = 0) // command or the implicit <<endl. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server sleeping\n"))); + ACE_TEXT (" (%P|%t) Server sleeping\n"))); ACE_OS::sleep (5); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Sending: 1 .12342134 666555444 23.45 -46.5e9 \n"))); + ACE_TEXT (" (%P|%t) Server Sending: 1 .12342134 666555444 23.45 -46.5e9 \n"))); client_handler << 1 << " "; client_handler << .12342134 << " "; client_handler << 666555444 << " "; @@ -399,7 +399,7 @@ server (void *arg = 0) client_handler >> i >> f1 >> l >> f2 >> d; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Received: int %d float %g long %d float %g double %g\n"), + ACE_TEXT (" (%P|%t) Server Received: int %d float %g long %d float %g double %g\n"), i, f1, (int) l, @@ -424,16 +424,16 @@ spawn (void) if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) %p\n"), - ASYS_TEXT ("open")), + ACE_TEXT (" (%P|%t) %p\n"), + ACE_TEXT ("open")), -1); #if defined (ACE_HAS_THREADS) else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), &acceptor, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawning server thread")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawning server thread")), -1); // Wait for the client and server thread to exit. @@ -445,8 +445,8 @@ spawn (void) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("%p\n%a"), + ACE_TEXT ("fork failed"))); ACE_OS::_exit (-1); case 0: // In child { @@ -455,8 +455,8 @@ spawn (void) if (acceptor.get_local_addr (server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr"))); else client ((void *) &server_addr); ACE_END_LOG; @@ -471,7 +471,7 @@ spawn (void) } #else ACE_ERROR_RETURN ((LM_INFO, - ASYS_TEXT ("threads *and* processes not supported on this platform\n")), + ACE_TEXT ("threads *and* processes not supported on this platform\n")), -1); #endif /* ACE_HAS_THREADS */ @@ -482,16 +482,16 @@ spawn (void) #endif /* !ACE_LACKS_ACE_IOSTREAM */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("IOStream_Test")); + ACE_START_TEST (ACE_TEXT ("IOStream_Test")); #if !defined (ACE_LACKS_ACE_IOSTREAM) - ACE_INIT_LOG (ASYS_TEXT ("IOStream_Test-children")); + ACE_INIT_LOG (ACE_TEXT ("IOStream_Test-children")); spawn (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("ACE_IOSTREAM not supported on this platform\n"))); + ACE_TEXT ("ACE_IOSTREAM not supported on this platform\n"))); #endif /* !ACE_LACKS_ACE_IOSTREAM */ ACE_END_TEST; return 0; diff --git a/tests/Lazy_Map_Manager_Test.cpp b/tests/Lazy_Map_Manager_Test.cpp index 0ce276c47c4..7cb31c3db1d 100644 --- a/tests/Lazy_Map_Manager_Test.cpp +++ b/tests/Lazy_Map_Manager_Test.cpp @@ -42,11 +42,11 @@ display_map (MAP &map) { MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } { @@ -57,16 +57,16 @@ display_map (MAP &map) { MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } // Test for map manager. @@ -186,12 +186,12 @@ display_map (ACTIVE_MAP &map) { ACTIVE_MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } { @@ -202,16 +202,16 @@ display_map (ACTIVE_MAP &map) { ACTIVE_MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } // Test for active map manager. @@ -317,17 +317,17 @@ active_map_test (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Lazy_Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Lazy_Map_Manager_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nMap Manager...\n\n"))); + ACE_TEXT ("\nMap Manager...\n\n"))); map_test (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nActive Map Manager...\n\n"))); + ACE_TEXT ("\nActive Map Manager...\n\n"))); active_map_test (); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); diff --git a/tests/Log_Msg_Test.cpp b/tests/Log_Msg_Test.cpp index 82cae74bda8..d98e1b1d06f 100644 --- a/tests/Log_Msg_Test.cpp +++ b/tests/Log_Msg_Test.cpp @@ -31,7 +31,7 @@ static void cleanup (void) { ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("cleanup hook (%P)!\n"))); + ACE_TEXT ("cleanup hook (%P)!\n"))); } static void @@ -87,7 +87,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Logger::log->%s\n"), + ACE_TEXT ("Logger::log->%s\n"), log_record.msg_data ())); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -107,7 +107,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Logger::log->%s\n"), + ACE_TEXT ("Logger::log->%s\n"), verbose_msg)); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -129,20 +129,20 @@ test_callbacks (void) { // This message should show up in stderr. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) first message\n"))); + ACE_TEXT ("(%t) first message\n"))); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) second message\n"))); + ACE_TEXT ("(%t) second message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::MSG_CALLBACK); // This message should not show up anywhere since no callback object // has been specified. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) third message\n"))); + ACE_TEXT ("(%t) third message\n"))); // Create a callback object and make it "verbose". Logger logger; @@ -153,28 +153,28 @@ test_callbacks (void) // This message should show up via the Logger callback. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) forth message\n"))); + ACE_TEXT ("(%t) forth message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); // This message should show up via the Logger callback (somewhat // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) fifth message\n"))); + ACE_TEXT ("(%t) fifth message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE); // This message should show up via the Logger callback (really // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) sixth message\n"))); + ACE_TEXT ("(%t) sixth message\n"))); logger.verbose (0); // This message should show up via the Logger callback (not // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) seventh message\n"))); + ACE_TEXT ("(%t) seventh message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -182,7 +182,7 @@ test_callbacks (void) // The one from the Logger callback will not be verbose, but the one // from stderr should be verbose. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) eighth message\n"))); + ACE_TEXT ("(%t) eighth message\n"))); ACE_LOG_MSG->msg_callback (0); } @@ -203,7 +203,7 @@ test_log_msg_features (const char *program) if (ACE_LOG_MSG->op_status () == -1 && ACE_LOG_MSG->errnum () == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("op_status and errnum work!\n"))); + ACE_TEXT ("op_status and errnum work!\n"))); else ACE_ERROR ((LM_ERROR, "op_status and errnum failed!\n")); @@ -221,7 +221,7 @@ test_log_msg_features (const char *program) // Exercise many different combinations of OSTREAM. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter++, 8, "", @@ -232,7 +232,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -243,7 +243,7 @@ test_log_msg_features (const char *program) // The next two messages shouldn't print. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -251,7 +251,7 @@ test_log_msg_features (const char *program) 10000 * counter++)); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -260,7 +260,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -281,9 +281,9 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->priority_mask (priority_mask); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should not print!\n"))); + ACE_TEXT ("This LM_INFO message should not print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); ACE_SET_BITS (priority_mask, LM_INFO); @@ -291,18 +291,18 @@ test_log_msg_features (const char *program) ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should print!\n"))); + ACE_TEXT ("This LM_INFO message should print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); ACE_CLR_BITS (priority_mask, LM_INFO); ACE_LOG_MSG->priority_mask (priority_mask, ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should not print!\n"))); + ACE_TEXT ("This LM_INFO message should not print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); } static int @@ -310,13 +310,13 @@ test_ostream (void) { // This message should show up in the log file. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT( "first message\n"))); + ACE_TEXT( "first message\n"))); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("second message\n"))); + ACE_TEXT ("second message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -334,7 +334,7 @@ test_ostream (void) // This message should show up in the ostream. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("fourth message\n"))); + ACE_TEXT ("fourth message\n"))); ACE_FILE_Connector connector; ACE_FILE_IO file; @@ -343,20 +343,20 @@ test_ostream (void) if (connector.connect (file, ACE_FILE_Addr (filename)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), filename), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (ACE_OS::unlink (filename) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), filename), 1); ACE_FILE_Info info; if (file.get_info (info) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("get_info failed on %p\n"), + ACE_TEXT ("get_info failed on %p\n"), filename), -1); @@ -373,7 +373,7 @@ test_ostream (void) info.size_); if (size != info.size_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Read %d bytes, rather than expected %d bytes\n"), + ACE_TEXT ("Read %d bytes, rather than expected %d bytes\n"), size, info.size_), -1); @@ -384,7 +384,7 @@ test_ostream (void) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s"), + ACE_TEXT ("%s"), buffer)); #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ @@ -392,7 +392,7 @@ test_ostream (void) // This message should show up in stderr and the ostream (without // ACE_LACKS_IOSTREAM_TOTALLY). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("fifth message\n"))); + ACE_TEXT ("fifth message\n"))); return 0; } @@ -402,23 +402,23 @@ test_ostream (void) int main (int, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Log_Msg_Test")); + ACE_START_TEST (ACE_TEXT ("Log_Msg_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running ostream test\n"))); + ACE_TEXT ("**** running ostream test\n"))); // Test the <ACE_Log_Msg> abstraction wrt writing to stderr and to a // file. test_ostream (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running callback test\n"))); + ACE_TEXT ("**** running callback test\n"))); // Test the <ACE_Log_Msg> callback mechanism. test_callbacks (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running features test\n"))); + ACE_TEXT ("**** running features test\n"))); // Test various features of the <ACE_Log_Msg>. test_log_msg_features (argv[0]); diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp index 5e74fd73c22..6c124d1275d 100644 --- a/tests/MM_Shared_Memory_Test.cpp +++ b/tests/MM_Shared_Memory_Test.cpp @@ -29,7 +29,7 @@ ACE_RCSID(tests, MM_Shared_Memory_Test, "$Id$") const int SHMSZ = 27; -static TCHAR *shm_key; +static ACE_TCHAR *shm_key; #if defined (ACE_LACKS_FORK) typedef ACE_Thread_Semaphore SYNCHRONIZER; @@ -112,7 +112,7 @@ parent (void * = 0) // Perform a "busy wait" until the child sets the character to '*'. while (*shm != '*') ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) spinning in parent!\n"))); + ACE_TEXT ("(%P) spinning in parent!\n"))); result = shm_parent.remove (); ACE_ASSERT (result != -1); @@ -132,12 +132,12 @@ spawn (void) -1); #if !defined (ACE_LACKS_FORK) - switch (ACE_OS::fork (ASYS_TEXT ("child"))) + switch (ACE_OS::fork (ACE_TEXT ("child"))) { case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("fork failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("fork failed")), 1); /* NOTREACHED */ case 0: @@ -159,39 +159,39 @@ spawn (void) (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("thread create failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("thread create failed")), 1); else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (parent), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("thread create failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("thread create failed")), 1); ACE_Thread_Manager::instance ()->wait (); delete synchronizer; #else ACE_UNUSED_ARG (synchronizer); ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("only one thread may be run in a process on this platform\n")), + ACE_TEXT ("only one thread may be run in a process on this platform\n")), 1); #endif /* ACE_HAS_THREADS */ return 0; } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("MM_Shared_Memory_Test")); + ACE_START_TEST (ACE_TEXT ("MM_Shared_Memory_Test")); - TCHAR temp_file[MAXPATHLEN + 1]; + ACE_TCHAR temp_file[MAXPATHLEN + 1]; // Get the temporary directory, // The - 24 is for the filename, mm_shared_mem_testXXXXXX if (ACE::get_temp_dir (temp_file, MAXPATHLEN - 24) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Temporary path too long\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Temporary path too long\n")), -1); // Add the filename to the end ACE_OS::strcat (temp_file, ACE_TEXT ("mm_shared_mem_testXXXXXX")); @@ -203,7 +203,7 @@ main (int, ASYS_TCHAR *[]) || (ACE_OS::unlink (shm_key) == -1 && errno == EPERM)) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("(%P|%t) %p\n"), shm_key), 1); spawn (); diff --git a/tests/MT_Reactor_Timer_Test.cpp b/tests/MT_Reactor_Timer_Test.cpp index 98dcbbd6c94..566ae8c9bad 100644 --- a/tests/MT_Reactor_Timer_Test.cpp +++ b/tests/MT_Reactor_Timer_Test.cpp @@ -128,7 +128,7 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv, ACE_GUARD_RETURN (ACE_Thread_Mutex, id_lock, this->lock_, 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): Timer #%d (id #%d) expired\n"), + ACE_TEXT ("%T (%t): Timer #%d (id #%d) expired\n"), time_tag, this->timer_id_[time_tag])); @@ -154,27 +154,27 @@ Dispatch_Count_Handler::Dispatch_Count_Handler (void) // Initialize the pipe. if (this->pipe_.open () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_Pipe::open"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Pipe::open"))); // Register the "read" end of the pipe. else if (r->register_handler (this->pipe_.read_handle (), this, ACE_Event_Handler::READ_MASK) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("register_handler"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("register_handler"))); // Put something in our pipe and smoke it... ;-) else if (ACE::send (this->pipe_.write_handle (), "z", 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("send"))); // Call notify to prime the pump for this, as well. else if (r->notify (this) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("notify"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("notify"))); } int @@ -184,7 +184,7 @@ Dispatch_Count_Handler::handle_close (ACE_HANDLE h, ACE_Reactor *r = ACE_Reactor::instance (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): handle_close\n"))); + ACE_TEXT ("%T (%t): handle_close\n"))); ACE_ASSERT (h == this->pipe_.read_handle () && m == ACE_Event_Handler::READ_MASK); @@ -193,8 +193,8 @@ Dispatch_Count_Handler::handle_close (ACE_HANDLE h, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("remove_handler")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("remove_handler")), -1); return 0; } @@ -209,13 +209,13 @@ Dispatch_Count_Handler::handle_input (ACE_HANDLE h) if (ACE::recv (h, &c, 1) != 1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("recv")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("recv")), -1); ACE_ASSERT (c == 'z'); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): handle_input\n"))); + ACE_TEXT ("%T (%t): handle_input\n"))); // Trigger the <handle_close> hook. return -1; } @@ -229,7 +229,7 @@ Dispatch_Count_Handler::handle_exception (ACE_HANDLE h) this->notify_seen_ = 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): handle_exception\n"))); + ACE_TEXT ("%T (%t): handle_exception\n"))); return 0; } @@ -246,7 +246,7 @@ Dispatch_Count_Handler::handle_timeout (const ACE_Time_Value &tv, // This case just tests to make sure the Reactor is counting timer // expiration correctly. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): expiration %d\n"), + ACE_TEXT ("%T (%t): expiration %d\n"), value)); return 0; } @@ -263,9 +263,9 @@ Dispatch_Count_Handler::verify_results (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("MT_Reactor_Timer_Test")); + ACE_START_TEST (ACE_TEXT ("MT_Reactor_Timer_Test")); int status = 0; int test_result = 0; @@ -280,8 +280,8 @@ main (int, ASYS_TCHAR *[]) (const void *) i, ACE_Time_Value (0)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("schedule_timer")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("schedule_timer")), 1); ACE_Time_Value no_waiting (0); @@ -307,7 +307,7 @@ main (int, ASYS_TCHAR *[]) if (events < ACE_MAX_TIMERS + 2) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("expected %d events, got %d instead\n"), + ACE_TEXT ("expected %d events, got %d instead\n"), ACE_MAX_TIMERS + 2, events)); ACE_ASSERT (events >= ACE_MAX_TIMERS + 2); @@ -317,7 +317,7 @@ main (int, ASYS_TCHAR *[]) if (status != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Dispatch counting test failed.\n"))); + ACE_TEXT ("Dispatch counting test failed.\n"))); test_result = 1; } @@ -339,7 +339,7 @@ main (int, ASYS_TCHAR *[]) if (status == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p, errno is %d\n"), + ACE_TEXT ("%p, errno is %d\n"), "wait ()", errno)); ACE_ASSERT (status != -1); @@ -351,7 +351,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/MT_SOCK_Test.cpp b/tests/MT_SOCK_Test.cpp index a6dbb1bd34e..492b81aa713 100644 --- a/tests/MT_SOCK_Test.cpp +++ b/tests/MT_SOCK_Test.cpp @@ -50,7 +50,7 @@ client (void *arg) #endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */ ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting timed connect\n"))); + ACE_TEXT ("(%P|%t) starting timed connect\n"))); // Initiate timed connection with server. // Attempt a timed connect to the server. @@ -58,57 +58,57 @@ client (void *arg) server_addr, timeout) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed")), 0); if (cli_stream.get_local_addr (client_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("get_local_addr")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("get_local_addr")), 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) connected client at %d\n"), + ACE_TEXT ("(%P|%t) connected client at %d\n"), client_addr.get_port_number ())); if (cli_stream.disable (ACE_NONBLOCK) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("disable"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("disable"))); // Send data to server (correctly handles "incomplete writes"). for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (cli_stream.send_n (c, 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) closing writer\n"))); + ACE_TEXT ("(%P|%t) closing writer\n"))); // Explicitly close the writer-side of the connection. if (cli_stream.close_writer () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close_writer"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close_writer"))); char buf[1]; // Wait for handshake with server. if (cli_stream.recv_n (buf, 1) != 1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv_n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) received handshake from server\n"))); + ACE_TEXT ("(%P|%t) received handshake from server\n"))); // Close the connection completely. if (cli_stream.close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); return 0; } @@ -120,8 +120,8 @@ server (void *arg) if (peer_acceptor->enable (ACE_NONBLOCK) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("enable"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("enable"))); // Keep these objects out here to prevent excessive constructor // calls... @@ -147,13 +147,13 @@ server (void *arg) if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("select")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("select")), 0); else if (result == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) select timed out, shutting down\n"))); + ACE_TEXT ("(%P|%t) select timed out, shutting down\n"))); return 0; } @@ -166,15 +166,15 @@ server (void *arg) char *t = ACE_ALPHABET; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); // Enable non-blocking I/O. if (new_stream.enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("enable")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("enable")), 0); handle_set.reset (); handle_set.set_bit (new_stream.get_handle ()); @@ -184,13 +184,13 @@ server (void *arg) for (ssize_t r_bytes; ;) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waiting in select\n"))); + ACE_TEXT ("(%P|%t) waiting in select\n"))); if (ACE_OS::select (int (new_stream.get_handle ()) + 1, handle_set, 0, 0, 0) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("select")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("select")), 0); while ((r_bytes = new_stream.recv (buf, 1)) > 0) { @@ -202,29 +202,29 @@ server (void *arg) { // Handshake back with client. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); + ACE_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); if (new_stream.send_n ("", 1) != 1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); // Close endpoint. if (new_stream.close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); break; } else if (r_bytes == -1) { if (errno == EWOULDBLOCK || errno == EAGAIN) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no input available, going back to reading\n"))); + ACE_TEXT ("(%P|%t) no input available, going back to reading\n"))); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv_n")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv_n")), 0); } } @@ -233,11 +233,11 @@ server (void *arg) { if (errno == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no connections available, going back to accepting\n"))); + ACE_TEXT ("(%P|%t) no connections available, going back to accepting\n"))); else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("accept"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("accept"))); } } ACE_NOTREACHED (return 0); @@ -256,18 +256,18 @@ spawn (void) if (peer_acceptor.open (ACE_Addr::sap_any) == -1 || peer_acceptor.get_local_addr (server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open"))); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) for (size_t i = 0; i < ACE_MAX_CLIENTS; i++) { - switch (ACE_OS::fork (ASYS_TEXT ("child"))) + switch (ACE_OS::fork (ACE_TEXT ("child"))) { case -1: ACE_ERROR ((LM_ERROR, @@ -300,8 +300,8 @@ spawn (void) (void *) &peer_acceptor, THR_BOUND | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("spawn failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("spawn failed"))); if (ACE_Thread_Manager::instance ()->spawn_n (ACE_MAX_CLIENTS, @@ -309,14 +309,14 @@ spawn (void) (void *) &server_addr, THR_BOUND | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("spawn failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("spawn failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* !ACE_LACKS_FORK */ peer_acceptor.close (); @@ -324,9 +324,9 @@ spawn (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("MT_SOCK_Test")); + ACE_START_TEST (ACE_TEXT ("MT_SOCK_Test")); spawn (); diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp index fe6afc4e335..7e40bfcd22a 100644 --- a/tests/Malloc_Test.cpp +++ b/tests/Malloc_Test.cpp @@ -199,15 +199,15 @@ print (const char *process_name, for (Test_Data *t = data; t != 0; t = t->next_) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("<<<< (%P) %s\ni1_ = %d, i2_ = %d, i3_ = %d, d1_ = %f\n"), + ACE_TEXT ("<<<< (%P) %s\ni1_ = %d, i2_ = %d, i3_ = %d, d1_ = %f\n"), process_name, t->i1_, t->i2_, t->i3_, t->d1_)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("*t->bpl_ = %d, t->long_test_->array_[0] = ") - ASYS_TEXT ("%d\n>>>>\n"), + ACE_TEXT ("*t->bpl_ = %d, t->long_test_->array_[0] = ") + ACE_TEXT ("%d\n>>>>\n"), *t->long_test_->bpl_, t->long_test_->array_[0])); } @@ -261,7 +261,7 @@ child (void) ) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) sleeping for 10 milliseconds!\n"))); + ACE_TEXT ("(%P) sleeping for 10 milliseconds!\n"))); ACE_OS::sleep (timeout); } @@ -272,12 +272,12 @@ child (void) } int -main (int argc, ASYS_TCHAR *[]) +main (int argc, ACE_TCHAR *[]) { if (argc == 1) { - ACE_START_TEST (ASYS_TEXT ("Malloc_Test")); - ACE_INIT_LOG (ASYS_TEXT ("Malloc_Test-child")); + ACE_START_TEST (ACE_TEXT ("Malloc_Test")); + ACE_INIT_LOG (ACE_TEXT ("Malloc_Test-child")); init_test (PARENT_BASE_ADDR); @@ -299,8 +299,8 @@ main (int argc, ASYS_TCHAR *[]) ACE_ASSERT (data != 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) PARENT allocator at = %x, ") - ASYS_TEXT ("data allocated at %x\n"), + ACE_TEXT ("(%P) PARENT allocator at = %x, ") + ACE_TEXT ("data allocated at %x\n"), myalloc, data)); myalloc->dump (); @@ -323,7 +323,7 @@ main (int argc, ASYS_TCHAR *[]) else { // In this case we're the child process. - ACE_APPEND_LOG (ASYS_TEXT ("Malloc_Test-child")); + ACE_APPEND_LOG (ACE_TEXT ("Malloc_Test-child")); void *data = 0; MALLOC *myalloc = myallocator (CHILD_BASE_ADDR); @@ -331,8 +331,8 @@ main (int argc, ASYS_TCHAR *[]) ACE_ASSERT (result != -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) CHILD allocator at = %x, ") - ASYS_TEXT ("data allocated at %x\n"), + ACE_TEXT ("(%P) CHILD allocator at = %x, ") + ACE_TEXT ("data allocated at %x\n"), myalloc, data)); myalloc->dump (); @@ -372,12 +372,12 @@ template class ACE_Based_Pointer<Long_Test>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Malloc_Test")); + ACE_START_TEST (ACE_TEXT ("Malloc_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("process creation is not supported on this ") - ASYS_TEXT ("platform\n"))); + ACE_TEXT ("process creation is not supported on this ") + ACE_TEXT ("platform\n"))); ACE_END_TEST; return 0; } diff --git a/tests/Map_Manager_Test.cpp b/tests/Map_Manager_Test.cpp index c4814771c55..24dbefff2ea 100644 --- a/tests/Map_Manager_Test.cpp +++ b/tests/Map_Manager_Test.cpp @@ -105,7 +105,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -113,7 +113,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -128,7 +128,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -136,7 +136,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -151,7 +151,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -159,7 +159,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -174,7 +174,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -182,7 +182,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -232,7 +232,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -240,7 +240,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -255,7 +255,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -263,7 +263,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -278,7 +278,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -286,7 +286,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -301,7 +301,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -309,7 +309,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -365,7 +365,7 @@ test_active_map_manager (size_t table_size, { ACTIVE_MAP_MANAGER::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d-%d|%d)"), + ACE_TEXT ("(%d|%d-%d|%d)"), i, entry.ext_id_.slot_index (), entry.ext_id_.slot_generation (), @@ -374,7 +374,7 @@ test_active_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -390,7 +390,7 @@ test_active_map_manager (size_t table_size, ACTIVE_MAP_MANAGER::ENTRY &entry = *iter; ACE_UNUSED_ARG (entry); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d-%d|%d)"), + ACE_TEXT ("(%d|%d-%d|%d)"), k, entry.ext_id_.slot_index (), entry.ext_id_.slot_generation (), @@ -399,7 +399,7 @@ test_active_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } } @@ -447,7 +447,7 @@ test_hash_map_manager (size_t table_size, { HASH_ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry.ext_id_, entry.int_id_)); @@ -455,7 +455,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -469,7 +469,7 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); @@ -477,7 +477,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -492,7 +492,7 @@ test_hash_map_manager (size_t table_size, { HASH_ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry.ext_id_, entry.int_id_)); @@ -500,7 +500,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -513,14 +513,14 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -534,7 +534,7 @@ test_hash_map_manager (size_t table_size, { HASH_MAP_MANAGER::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry.ext_id_, entry.int_id_)); @@ -542,7 +542,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -555,7 +555,7 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); @@ -563,7 +563,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -579,7 +579,7 @@ test_hash_map_manager (size_t table_size, HASH_MAP_MANAGER::ENTRY &entry = *iter; ACE_UNUSED_ARG (entry); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry.ext_id_, entry.int_id_)); @@ -587,7 +587,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -599,7 +599,7 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); @@ -607,7 +607,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } } @@ -652,7 +652,7 @@ test_map_manager (size_t table_size, { ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry.ext_id_, entry.int_id_)); @@ -660,7 +660,7 @@ test_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -672,7 +672,7 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); @@ -680,7 +680,7 @@ test_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -695,13 +695,13 @@ test_map_manager (size_t table_size, { entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%u "), + ACE_TEXT ("%u "), entry.int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -714,7 +714,7 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); @@ -722,7 +722,7 @@ test_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -736,13 +736,13 @@ test_map_manager (size_t table_size, { entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%u "), + ACE_TEXT ("%u "), entry.int_id_)); ++i; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -755,14 +755,14 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); ++i; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -778,13 +778,13 @@ test_map_manager (size_t table_size, { entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%u "), + ACE_TEXT ("%u "), entry.int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -796,14 +796,14 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } } @@ -828,7 +828,7 @@ run_test (void (*ptf) (size_t, size_t, int), size_t table_size, size_t iterations, int test_iterators, - const ASYS_TCHAR *test_name) + const ACE_TCHAR *test_name) { ACE_Profile_Timer timer; timer.start (); @@ -841,39 +841,39 @@ run_test (void (*ptf) (size_t, size_t, int), timer.elapsed_time (et); - ASYS_TCHAR *test_iterators_string = 0; + ACE_TCHAR *test_iterators_string = 0; if (test_iterators) test_iterators_string = - ACE_const_cast (ASYS_TCHAR*, - ASYS_TEXT ( "includes executing iterators")); + ACE_const_cast (ACE_TCHAR*, + ACE_TEXT ( "includes executing iterators")); else test_iterators_string = - ACE_const_cast (ASYS_TCHAR*, - ASYS_TEXT ("doesn't include executing iterators")); + ACE_const_cast (ACE_TCHAR*, + ACE_TEXT ("doesn't include executing iterators")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to test a map of size %d for %d iterations using %s (%s)\n"), + ACE_TEXT ("time to test a map of size %d for %d iterations using %s (%s)\n"), table_size, iterations, test_name, test_iterators_string)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.real_time / ACE_timer_t (iterations)) * 1000000)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Map_Manager_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); size_t table_size = ACE_MAX_ITERATIONS / 2; @@ -894,35 +894,35 @@ main (int argc, ASYS_TCHAR *argv[]) table_size, iterations, test_iterators, - ASYS_TEXT ("Map_Manager")); + ACE_TEXT ("Map_Manager")); // Test the <ACE_Hash_Map_Manager>. run_test (&test_hash_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Hash_Map_Manager")); + ACE_TEXT ("Hash_Map_Manager")); // Test the <ACE_Hash_Map_Manager>. run_test (&test_active_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Active_Map_Manager")); + ACE_TEXT ("Active_Map_Manager")); // Test the <ACE_Cache_Map_Manager>. run_test (&test_cache_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Cache_Map_Manager")); + ACE_TEXT ("Cache_Map_Manager")); // Test the <ACE_Hash_Cache_Map_Manager>. run_test (&test_hash_cache_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Hash_Cache_Map_Manager")); + ACE_TEXT ("Hash_Cache_Map_Manager")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); ACE_END_TEST; return 0; diff --git a/tests/Map_Test.cpp b/tests/Map_Test.cpp index ac8c5115bab..a946fbe6425 100644 --- a/tests/Map_Test.cpp +++ b/tests/Map_Test.cpp @@ -103,14 +103,14 @@ functionality_test (MAP &map, // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), counter, original_value, entry.second ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (counter == iterations); } @@ -142,14 +142,14 @@ functionality_test (MAP &map, // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), counter, original_value, entry.second ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (counter == 0); } @@ -225,7 +225,7 @@ performance_test (void (*ptf) (MAP &, size_t, KEY *), size_t iterations, KEY *keys, size_t table_size, - const ASYS_TCHAR *test_name) + const ACE_TCHAR *test_name) { ACE_Profile_Timer timer; timer.start (); @@ -239,26 +239,26 @@ performance_test (void (*ptf) (MAP &, size_t, KEY *), timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to run %s of size %d for %d iterations\n"), + ACE_TEXT ("time to run %s of size %d for %d iterations\n"), test_name, table_size, iterations)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.real_time / ACE_timer_t (iterations)) * 1000000)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Map_Test")); + ACE_START_TEST (ACE_TEXT ("Map_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); size_t table_size = ACE_MAX_ITERATIONS / 2; @@ -281,16 +281,16 @@ main (int argc, ASYS_TCHAR *argv[]) if (functionality_tests) { // Functionality test of the maps. - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nMap Manager functionality test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMap Manager functionality test\n"))); functionality_test (map1, iterations); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nHash Map Manager functionality test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nHash Map Manager functionality test\n"))); functionality_test (map2, iterations); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nActive Map Manager functionality test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nActive Map Manager functionality test\n"))); functionality_test (map3, iterations); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } // Performance test of the maps. @@ -302,21 +302,21 @@ main (int argc, ASYS_TCHAR *argv[]) iterations, keys, table_size, - ASYS_TEXT ("Map Manager (insert test)")); + ACE_TEXT ("Map Manager (insert test)")); performance_test (&find_test, map1, iterations, keys, table_size, - ASYS_TEXT ("Map Manager (find test)")); + ACE_TEXT ("Map Manager (find test)")); performance_test (&unbind_test, map1, iterations, keys, table_size, - ASYS_TEXT ("Map Manager (unbind test)")); + ACE_TEXT ("Map Manager (unbind test)")); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); // Hash Map Manager performance_test (&insert_test, @@ -324,21 +324,21 @@ main (int argc, ASYS_TCHAR *argv[]) iterations, keys, table_size, - ASYS_TEXT ("Hash Map Manager (insert test)")); + ACE_TEXT ("Hash Map Manager (insert test)")); performance_test (&find_test, map2, iterations, keys, table_size, - ASYS_TEXT ("Hash Map Manager (find test)")); + ACE_TEXT ("Hash Map Manager (find test)")); performance_test (&unbind_test, map2, iterations, keys, table_size, - ASYS_TEXT ("Hash Map Manager (unbind test)")); + ACE_TEXT ("Hash Map Manager (unbind test)")); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); // Active Map Manager performance_test (&insert_test, @@ -346,19 +346,19 @@ main (int argc, ASYS_TCHAR *argv[]) iterations, keys, table_size, - ASYS_TEXT ("Active Map Manager (insert test)")); + ACE_TEXT ("Active Map Manager (insert test)")); performance_test (&find_test, map3, iterations, keys, table_size, - ASYS_TEXT ("Active Map Manager (find test)")); + ACE_TEXT ("Active Map Manager (find test)")); performance_test (&unbind_test, map3, iterations, keys, table_size, - ASYS_TEXT ("Active Map Manager (unbind test)")); + ACE_TEXT ("Active Map Manager (unbind test)")); delete[] keys; diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp index b5a79bcd31e..8c43bd4e3b7 100644 --- a/tests/Mem_Map_Test.cpp +++ b/tests/Mem_Map_Test.cpp @@ -46,7 +46,7 @@ reverse_file (ACE_HANDLE file_handle, if (array[i] == '\n') { ACE_OS::write (file_handle, array + i + 1, count); - ACE_OS::write (file_handle, ASYS_TEXT ("\n"), 1); + ACE_OS::write (file_handle, ACE_TEXT ("\n"), 1); count = 0; } else @@ -56,7 +56,7 @@ reverse_file (ACE_HANDLE file_handle, } static int -create_test_file (TCHAR *filename, int line_length, int num_lines) +create_test_file (ACE_TCHAR *filename, int line_length, int num_lines) { char *mybuf = 0; @@ -71,7 +71,7 @@ create_test_file (TCHAR *filename, int line_length, int num_lines) if (file_handle == ACE_INVALID_HANDLE) { delete [] mybuf; - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Open failed\n")), -1); } for (int j = 0; j < num_lines; j++) @@ -89,14 +89,14 @@ create_test_file (TCHAR *filename, int line_length, int num_lines) if (ACE_OS::write (file_handle, mybuf, line_length) != line_length) { delete [] mybuf; - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("write to file failed: %p (%d)\n"), + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("write to file failed: %p (%d)\n"), errno, errno), -1); } - if (ACE_OS::write (file_handle, ASYS_TEXT ("\n"), 1) != 1) + if (ACE_OS::write (file_handle, ACE_TEXT ("\n"), 1) != 1) { delete [] mybuf; - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("write to file failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("write to file failed\n")), -1); } } @@ -107,20 +107,20 @@ create_test_file (TCHAR *filename, int line_length, int num_lines) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Mem_Map_Test")); + ACE_START_TEST (ACE_TEXT ("Mem_Map_Test")); // = Initialize the temporary variable names - TCHAR test_file[MAXPATHLEN + 1]; - TCHAR temp_file1[MAXPATHLEN + 1]; - TCHAR temp_file2[MAXPATHLEN + 1]; + ACE_TCHAR test_file[MAXPATHLEN + 1]; + ACE_TCHAR temp_file1[MAXPATHLEN + 1]; + ACE_TCHAR temp_file2[MAXPATHLEN + 1]; // Get the temporary directory // - 18 is for the filenames, ace_mem_map_temp_1 is the longest if (ACE::get_temp_dir (test_file, MAXPATHLEN - 18) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Temporary path too long\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Temporary path too long\n")), -1); // Copy the temp directory to the other variables ACE_OS::strcpy (temp_file1, test_file); @@ -134,13 +134,13 @@ main (int, ASYS_TCHAR *[]) // First create a test file to work on if (create_test_file (test_file, LINE_LENGTH, NUM_LINES) != 0) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Create test file failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Create test file failed\n")), -1); ACE_Mem_Map mmap; // First memory map the test file if (mmap.map (test_file) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%n: %p\n%a"), ACE_TEXT ("mmap")), -1); // Now create a temporary file for intermediate processing ACE_HANDLE temp_file_handle = ACE_OS::open (temp_file1, @@ -148,7 +148,7 @@ main (int, ASYS_TCHAR *[]) 0666); if (temp_file_handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Open failed\n")), -1); // Reverse the original file and write the output to the temporary // file. @@ -162,12 +162,12 @@ main (int, ASYS_TCHAR *[]) // Now memory map the temporary file if (temp_mmap.map (temp_file1) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%n: %p\n%a"), ACE_TEXT ("mmap")), -1); if ((temp_file_handle = ACE_OS::open (temp_file2, O_RDWR | O_TRUNC | O_CREAT, 0666)) == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Open failed\n")), -1); // Now reverse the temporary file and write everything to the second // temporary file. @@ -181,7 +181,7 @@ main (int, ASYS_TCHAR *[]) ACE_Mem_Map temp_mmap2; if (temp_mmap2.map (temp_file2) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%n: %p\n%a"), ACE_TEXT ("mmap")), -1); // Now do a memcmp -- the orig file and the second temporary file // should be identical. diff --git a/tests/Message_Block_Test.cpp b/tests/Message_Block_Test.cpp index 4092df0c4cb..eb0e93d1f1a 100644 --- a/tests/Message_Block_Test.cpp +++ b/tests/Message_Block_Test.cpp @@ -65,7 +65,7 @@ private: int Worker_Task::close (u_long) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) close of worker\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) close of worker\n"))); return 0; } @@ -87,7 +87,7 @@ Worker_Task::svc (void) // process-wide <ACE_Thread_Manager> when the thread begins. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting svc() method\n"))); + ACE_TEXT ("(%t) starting svc() method\n"))); // Keep looping, reading a message out of the queue, until we get a // message with a length == 0, which signals us to quit. @@ -112,13 +112,13 @@ Worker_Task::svc (void) // message here. else if (length > 0) { - int current_count = ACE_OS::atoi (mb->rd_ptr ()); + int current_count = ACE_OS::atoi (ACE_TEXT_CHAR_TO_TCHAR (mb->rd_ptr ())); int i; ACE_ASSERT (count == current_count); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) enqueueing %d duplicates\n"), + ACE_TEXT ("(%t) enqueueing %d duplicates\n"), current_count)); ACE_Message_Block *dup; @@ -143,21 +143,21 @@ Worker_Task::svc (void) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) dequeueing %d duplicates\n"), + ACE_TEXT ("(%t) dequeueing %d duplicates\n"), current_count)); // Dequeue the same <current_count> duplicates. for (i = current_count; i > 0; i--) { ACE_ASSERT (this->msg_queue ()->dequeue_head (dup) != -1); - ACE_ASSERT (count == ACE_OS::atoi (dup->rd_ptr ())); + ACE_ASSERT (count == ACE_OS::atoi (ACE_TEXT_CHAR_TO_TCHAR (dup->rd_ptr ()))); ACE_ASSERT (ACE_OS::strcmp (mb->rd_ptr (), dup->rd_ptr ()) == 0); ACE_ASSERT (dup->msg_priority () == 1); dup->release (); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, length = %d, prio = %d, text = \"%*s\"\n"), + ACE_TEXT ("(%t) in iteration %d, length = %d, prio = %d, text = \"%*s\"\n"), count, length, mb->msg_priority (), @@ -171,7 +171,7 @@ Worker_Task::svc (void) if (length == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, got NULL message, exiting\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, got NULL message, exiting\n"), count, this->msg_queue ()->message_count ())); break; } @@ -187,8 +187,8 @@ Worker_Task::Worker_Task (void) // Make us an Active Object. if (this->activate (THR_NEW_LWP) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("activate failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("activate failed"))); } static int @@ -200,10 +200,10 @@ produce (Worker_Task &worker_task, // Send <n_iteration> messages through the pipeline. for (size_t count = 0; count < n_iterations; count++) { - ASYS_TCHAR buf[BUFSIZ]; - ACE_OS::sprintf (buf, ASYS_TEXT ("%d\n"), count); + ACE_TCHAR buf[BUFSIZ]; + ACE_OS::sprintf (buf, ACE_TEXT ("%d\n"), count); - int n = (ACE_OS::strlen (buf) + 1) * sizeof (ASYS_TCHAR); + int n = (ACE_OS::strlen (buf) + 1) * sizeof (ACE_TCHAR); // Allocate a new message. ACE_NEW_RETURN (mb, @@ -224,13 +224,13 @@ produce (Worker_Task &worker_task, // Don't block indefinitely if we flow control... (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } // Send a shutdown message to the waiting threads and exit. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) sending shutdown message\n"))); + ACE_TEXT ("\n(%t) sending shutdown message\n"))); ACE_NEW_RETURN (mb, ACE_Message_Block (0, @@ -243,15 +243,15 @@ produce (Worker_Task &worker_task, if (worker_task.put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) end producer\n"))); + ACE_TEXT ("\n(%t) end producer\n"))); return 0; } -typedef ASYS_TCHAR MEMORY_CHUNK[ACE_MALLOC_ALIGN * ACE_ALLOC_SIZE]; +typedef ACE_TCHAR MEMORY_CHUNK[ACE_MALLOC_ALIGN * ACE_ALLOC_SIZE]; ACE_Cached_Allocator<MEMORY_CHUNK, ACE_SYNCH_MUTEX> @@ -259,12 +259,12 @@ ACE_Cached_Allocator<MEMORY_CHUNK, struct { ACE_Allocator *strategy_; - const ASYS_TCHAR *name_; + const ACE_TCHAR *name_; ACE_Profile_Timer::ACE_Elapsed_Time et_; } alloc_struct[ACE_ALLOC_STRATEGY_NO] = { - { NULL, ASYS_TEXT ("Default"), {0,0,0} }, - { &mem_allocator, ASYS_TEXT ("Cached Memory"), {0,0,0} } + { NULL, ACE_TEXT ("Default"), {0,0,0} }, + { &mem_allocator, ACE_TEXT ("Cached Memory"), {0,0,0} } }; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ @@ -288,13 +288,13 @@ template class ACE_Lock_Adapter<ACE_SYNCH_MUTEX>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Message_Block_Test")); + ACE_START_TEST (ACE_TEXT ("Message_Block_Test")); #if defined (ACE_HAS_THREADS) int n_threads = ACE_MAX_THREADS; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) threads = %d\n"), n_threads)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) threads = %d\n"), n_threads)); ACE_Profile_Timer ptime; @@ -303,7 +303,7 @@ main (int, ASYS_TCHAR *[]) for (i = 0; i < ACE_ALLOC_STRATEGY_NO; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Start Message_Block_Test using %s allocation strategy\n"), + ACE_TEXT ("(%t) Start Message_Block_Test using %s allocation strategy\n"), alloc_struct[i].name_)); // Create the worker tasks. @@ -320,27 +320,27 @@ main (int, ASYS_TCHAR *[]) // Wait for all the threads to reach their exit point. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n"))); + ACE_TEXT ("(%t) waiting for worker tasks to finish...\n"))); ACE_Thread_Manager::instance ()->wait (); ptime.stop (); ptime.elapsed_time (alloc_struct[i].et_); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) destroying worker tasks\n"))); + ACE_TEXT ("(%t) destroying worker tasks\n"))); } for (i = 0; i < ACE_ALLOC_STRATEGY_NO; i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Elapsed time using %s allocation strategy: %f sec\n"), + ACE_TEXT ("Elapsed time using %s allocation strategy: %f sec\n"), alloc_struct[i].name_, alloc_struct[i].et_.real_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Exiting...\n"))); + ACE_TEXT ("(%t) Exiting...\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp index ac28b577e04..736ef4a65cf 100644 --- a/tests/Message_Queue_Notifications_Test.cpp +++ b/tests/Message_Queue_Notifications_Test.cpp @@ -111,7 +111,7 @@ int Message_Handler::handle_input (ACE_HANDLE) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Message_Handler::handle_input\n"))); + ACE_TEXT ("Message_Handler::handle_input\n"))); // Next time handle_output will be called. this->notification_strategy_.mask (ACE_Event_Handler::WRITE_MASK); @@ -123,7 +123,7 @@ int Message_Handler::handle_output (ACE_HANDLE fd) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Message_Handler::handle_output\n"))); + ACE_TEXT ("Message_Handler::handle_output\n"))); ACE_UNUSED_ARG (fd); // Next time handle_exception will be called. @@ -136,7 +136,7 @@ int Message_Handler::handle_exception (ACE_HANDLE fd) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Message_Handler::handle_exception\n"))); + ACE_TEXT ("Message_Handler::handle_exception\n"))); ACE_UNUSED_ARG (fd); // Next time handle_input will be called. @@ -153,13 +153,13 @@ Message_Handler::process_message (void) if (this->getq (mb, (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), -1); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("message received = %s\n"), + ACE_TEXT ("message received = %s\n"), mb->rd_ptr ())); mb->release (); } @@ -175,10 +175,10 @@ Message_Handler::make_message (void) { ACE_Message_Block *mb; ACE_NEW (mb, - ACE_Message_Block ((char *) ASYS_TEXT ("hello"))); + ACE_Message_Block ((char *) ACE_TEXT ("hello"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("sending message\n"))); + ACE_TEXT ("sending message\n"))); this->putq (mb); } } @@ -213,7 +213,7 @@ Watermark_Test::producer (void) i--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Producer: High water mark hit ---- \n"))); + ACE_TEXT ("(%P|%t) Producer: High water mark hit ---- \n"))); ACE_MT (this->mq_full_.wait ()); @@ -259,14 +259,14 @@ Watermark_Test::get_message (void) if (this->getq (mb) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), -1); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Consumer: message size = %3d, ") - ASYS_TEXT ("message count = %3d\n"), + ACE_TEXT ("(%P|%t) Consumer: message size = %3d, ") + ACE_TEXT ("message count = %3d\n"), this->msg_queue ()-> message_bytes (), this->msg_queue ()-> message_count ())); mb->release (); @@ -292,8 +292,8 @@ void Watermark_Test::print_producer_debug_message (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Producer: message size = %3d, ") - ASYS_TEXT ("message count = %3d\n"), + ACE_TEXT ("(%P|%t) Producer: message size = %3d, ") + ACE_TEXT ("message count = %3d\n"), this->msg_queue ()-> message_bytes (), this->msg_queue ()-> message_count ())); } @@ -319,12 +319,12 @@ Watermark_Test::svc (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Message_Queue_Notifications_Test")); + ACE_START_TEST (ACE_TEXT ("Message_Queue_Notifications_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Starting message queue reactive notification test...\n"))); + ACE_TEXT ("Starting message queue reactive notification test...\n"))); ACE_Reactor reactor; Message_Handler mh (reactor); @@ -334,11 +334,11 @@ main (int, ASYS_TCHAR *[]) #if defined (ACE_HAS_THREADS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Starting message queue watermark test...\n"))); + ACE_TEXT ("Starting message queue watermark test...\n"))); Watermark_Test watermark_test; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("High water mark is %d\n") - ASYS_TEXT ("Low water mark is %d\n"), + ACE_TEXT ("High water mark is %d\n") + ACE_TEXT ("Low water mark is %d\n"), default_high_water_mark, default_low_water_mark)); @@ -348,7 +348,7 @@ main (int, ASYS_TCHAR *[]) ACE_Thread_Manager::instance ()->wait (); #else ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("Message queue watermark test not performed because threads are not supported\n"))); + ACE_TEXT ("Message queue watermark test not performed because threads are not supported\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp index ec93d1e38d1..5fdcd6798bd 100644 --- a/tests/Message_Queue_Test.cpp +++ b/tests/Message_Queue_Test.cpp @@ -30,7 +30,7 @@ ACE_RCSID(tests, Message_Queue_Test, "$Id$") -const ASYS_TCHAR usage[] = ASYS_TEXT ("usage: Message_Queue_Test <number of messages>\n"); +const ACE_TCHAR usage[] = ACE_TEXT ("usage: Message_Queue_Test <number of messages>\n"); typedef ACE_Message_Queue<ACE_NULL_SYNCH> QUEUE; typedef ACE_Message_Queue_Iterator<ACE_NULL_SYNCH> ITERATOR; @@ -77,7 +77,7 @@ static int iterator_test (void) { const int ITERATIONS = 5; - ASYS_TCHAR buffer[ITERATIONS][BUFSIZ]; + ACE_TCHAR buffer[ITERATIONS][BUFSIZ]; // Use queue size from of 32 Kb, instead of the default of 16 Kb // (defined by ACE_Message_Queue_Base::DEFAULT_HWM), so that the // test runs on machines with 8Kb pagesizes. @@ -93,7 +93,7 @@ iterator_test (void) for (i = 0; i < ITERATIONS; i++) { ACE_OS::sprintf (buffer[i], - ASYS_TEXT ("%d"), + ACE_TEXT ("%d"), i + 1); ACE_Message_Block *entry; @@ -104,18 +104,18 @@ iterator_test (void) if (queue.is_full ()) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("QUEUE:: the message queue is full on iteration %u!\n"), + ACE_TEXT ("QUEUE:: the message queue is full on iteration %u!\n"), i + 1), -1); if (queue.enqueue (entry) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("QUEUE::enqueue\n")), + ACE_TEXT ("QUEUE::enqueue\n")), -1); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nForward Iterations\n"))); + ACE_TEXT ("\nForward Iterations\n"))); { ITERATOR iterator (queue); @@ -123,12 +123,12 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nReverse Iterations\n"))); + ACE_TEXT ("\nReverse Iterations\n"))); { REVERSE_ITERATOR iterator (queue); @@ -136,12 +136,12 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nForward Iterations\n"))); + ACE_TEXT ("\nForward Iterations\n"))); { QUEUE::ITERATOR iterator (queue); @@ -149,12 +149,12 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nReverse Iterations\n"))); + ACE_TEXT ("\nReverse Iterations\n"))); { QUEUE::REVERSE_ITERATOR iterator (queue); @@ -162,7 +162,7 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } @@ -177,8 +177,8 @@ single_thread_performance_test (int queue_type = 0) { const char test_message[] = "ACE_Message_Queue Test Message"; - const ASYS_TCHAR *message = - ASYS_TEXT ("ACE_Message_Queue<ACE_NULL_SYNCH>, single thread"); + const ACE_TCHAR *message = + ACE_TEXT ("ACE_Message_Queue<ACE_NULL_SYNCH>, single thread"); int i; // Create a message queue. @@ -203,7 +203,7 @@ single_thread_performance_test (int queue_type = 0) ACE_NEW_RETURN (msgq, ACE_Message_Queue_NT, -1); - message = ASYS_TEXT ("ACE_Message_Queue_NT, single thread test"); + message = ACE_TEXT ("ACE_Message_Queue_NT, single thread test"); } #endif /* VXWORKS */ @@ -251,14 +251,14 @@ single_thread_performance_test (int queue_type = 0) { if (msgq->enqueue_tail (send_block[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("enqueue")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("enqueue")), -1); if (msgq->dequeue_head (receive_block_p[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), -1); } @@ -267,7 +267,7 @@ single_thread_performance_test (int queue_type = 0) ACE_Time_Value tv; timer->elapsed_time (tv); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), + ACE_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), message, max_messages, tv.msec (), @@ -322,8 +322,8 @@ receiver (void *arg) for (i = 0; i < max_messages; ++i) if (queue_wrapper->q_->dequeue_head (receive_block_p[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), 0); timer->stop (); @@ -349,8 +349,8 @@ sender (void *arg) if (queue_wrapper->q_-> enqueue_tail (queue_wrapper->send_block_[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("enqueue")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("enqueue")), 0); return 0; } @@ -360,8 +360,8 @@ int performance_test (int queue_type = 0) { Queue_Wrapper queue_wrapper; - const ASYS_TCHAR *message = - ASYS_TEXT ("ACE_Message_Queue<ACE_SYNCH>"); + const ACE_TCHAR *message = + ACE_TEXT ("ACE_Message_Queue<ACE_SYNCH>"); int i; // Create the messages. Allocate off the heap in case messages is @@ -400,7 +400,7 @@ performance_test (int queue_type = 0) ACE_NEW_RETURN (queue_wrapper.q_, ACE_Message_Queue_NT, -1); - message = ASYS_TEXT ("ACE_Message_Queue_NT"); + message = ACE_TEXT ("ACE_Message_Queue_NT"); } #endif /* VXWORKS */ @@ -408,22 +408,22 @@ performance_test (int queue_type = 0) &queue_wrapper, THR_BOUND) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawning sender thread")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawning sender thread")), -1); if (ACE_Thread_Manager::instance ()->spawn ((ACE_THR_FUNC) receiver, &queue_wrapper, THR_BOUND) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawning receiver thread")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawning receiver thread")), -1); ACE_Thread_Manager::instance ()->wait (); ACE_Time_Value tv; timer->elapsed_time (tv); - ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), message, max_messages, tv.msec (), @@ -442,16 +442,16 @@ performance_test (int queue_type = 0) #endif /* ACE_HAS_THREADS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Message_Queue_Test")); + ACE_START_TEST (ACE_TEXT ("Message_Queue_Test")); int status = 0; if (argc == 2) - if (! ACE_OS::strcmp (argv[1], ASYS_TEXT ("-?"))) + if (! ACE_OS::strcmp (argv[1], ACE_TEXT ("-?"))) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%s/n"), + ACE_TEXT ("%s/n"), usage)); else max_messages = ACE_OS::atoi (argv[1]); @@ -459,23 +459,23 @@ main (int argc, ASYS_TCHAR *argv[]) // Be sure that the a timed out get sets the error code properly. ACE_Message_Queue<ACE_SYNCH> q1; if (!q1.is_empty ()) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("New queue is not empty!\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("New queue is not empty!\n"))); status = 1; } else { ACE_Message_Block *b; ACE_Time_Value tv (ACE_OS::gettimeofday()); // Now if (q1.dequeue_head (b, &tv) != -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Dequeued from empty queue!\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Dequeued from empty queue!\n"))); status = 1; } else if (errno != EWOULDBLOCK) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), - ASYS_TEXT ("Dequeue timeout should be EWOULDBLOCK, got"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), + ACE_TEXT ("Dequeue timeout should be EWOULDBLOCK, got"))); status = 1; } else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Timed dequeue test: OK\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Timed dequeue test: OK\n"))); status = 0; // All is well } } @@ -513,8 +513,8 @@ main (int argc, ASYS_TCHAR *argv[]) if (status != 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("test failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("test failed"))); delete timer; timer = 0; diff --git a/tests/Naming_Test.cpp b/tests/Naming_Test.cpp index 60be9098721..8b0a9a752ba 100644 --- a/tests/Naming_Test.cpp +++ b/tests/Naming_Test.cpp @@ -25,6 +25,8 @@ ACE_RCSID(tests, Naming_Test, "$Id$") +#if defined (ACE_HAS_WCHAR) + static char name[BUFSIZ]; static char value[BUFSIZ]; static char type[BUFSIZ]; @@ -37,11 +39,11 @@ print_time (ACE_Profile_Timer &timer, timer.stop (); timer.elapsed_time (et); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n ***** %s ***** \n"), test)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n ***** %s ***** \n"), test)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("time per call = %f usecs\n\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("time per call = %f usecs\n\n"), (et.real_time / double (ACE_NS_MAX_ENTRIES)) * 1000000)); } @@ -154,10 +156,10 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) { if (type_out) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Name: %s\tValue: %s\tType: %s\n"), + ACE_TEXT ("Name: %s\tValue: %s\tType: %s\n"), name, l_value, type_out)); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Name: %s\tValue: %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name: %s\tValue: %s\n"), name, l_value)); } @@ -172,12 +174,14 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) } } +#endif /* ACE_HAS_WCHAR */ + int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - TCHAR temp_file [BUFSIZ]; - ACE_START_TEST (ASYS_TEXT ("Naming_Test")); - + ACE_START_TEST (ACE_TEXT ("Naming_Test")); +#if defined (ACE_HAS_WCHAR) + ACE_TCHAR temp_file [BUFSIZ]; ACE_Naming_Context *ns_context; ACE_NEW_RETURN (ns_context, ACE_Naming_Context, -1); @@ -206,9 +210,9 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_ASSERT (ns_context->open (ACE_Naming_Context::PROC_LOCAL, 1) != -1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("time to test %d iterations using %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("time to test %d iterations using %s\n"), ACE_NS_MAX_ENTRIES, name_options->use_registry () ? - ASYS_TEXT ("Registry") : ASYS_TEXT ("ACE"))); + ACE_TEXT ("Registry") : ACE_TEXT ("ACE"))); ACE_Profile_Timer timer; @@ -253,6 +257,9 @@ main (int argc, ASYS_TCHAR *argv[]) // since we don't care if the file doesn't exist. ACE_OS::unlink (temp_file); +#else /* ACE_HAS_TCHAR */ + ACE_ERROR ((LM_INFO, ACE_TEXT ("Naming_Test requires wchar_t support to run.\n"))); +#endif /* ACE_HAS_TCHAR */ ACE_END_TEST; return 0; } diff --git a/tests/New_Fail_Test.cpp b/tests/New_Fail_Test.cpp index 8138b0bac13..283be9f9817 100644 --- a/tests/New_Fail_Test.cpp +++ b/tests/New_Fail_Test.cpp @@ -61,9 +61,9 @@ try_ace_new_return (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("New_Fail_Test")); + ACE_START_TEST (ACE_TEXT ("New_Fail_Test")); int status = 0; // Some platforms are known to throw an exception on a failed 'new', @@ -74,8 +74,8 @@ main (int, ASYS_TCHAR *[]) // complete. #if (defined (__SUNPRO_CC) || defined (__GNUG__)) && \ !defined (ACE_HAS_EXCEPTIONS) - ACE_DEBUG ((LM_NOTICE, ASYS_TEXT ("Out-of-memory will throw an unhandled exception\n"))); - ACE_DEBUG ((LM_NOTICE, ASYS_TEXT ("Rebuild with exceptions=1 to prevent this, but it may impair performance.\n"))); + ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("Out-of-memory will throw an unhandled exception\n"))); + ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("Rebuild with exceptions=1 to prevent this, but it may impair performance.\n"))); // Use the static function addresses, to prevent warnings about the // functions not being used. @@ -102,7 +102,7 @@ main (int, ASYS_TCHAR *[]) if (i == MAX_ALLOCS_IN_TEST) { ACE_ERROR((LM_WARNING, - ASYS_TEXT ("Test didn't exhaust all available memory\n"))); + ACE_TEXT ("Test didn't exhaust all available memory\n"))); // Back up to valid pointer for deleting. --i; } @@ -111,7 +111,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (blocks[i] == 0); ACE_ASSERT (errno == ENOMEM); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_NEW failed properly at block %d\n"), + ACE_TEXT ("ACE_NEW failed properly at block %d\n"), i)); } @@ -130,7 +130,7 @@ main (int, ASYS_TCHAR *[]) if (i == MAX_ALLOCS_IN_TEST) { ACE_ERROR ((LM_WARNING, - ASYS_TEXT ("Test didn't exhaust all available memory\n"))); + ACE_TEXT ("Test didn't exhaust all available memory\n"))); // Back up to valid pointer. --i; } @@ -139,7 +139,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (blocks[i] == 0); ACE_ASSERT (errno == ENOMEM); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_NEW_RETURN failed properly at block %d\n"), + ACE_TEXT ("ACE_NEW_RETURN failed properly at block %d\n"), i)); } while (i >= 0) @@ -151,10 +151,10 @@ main (int, ASYS_TCHAR *[]) catch (...) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Caught exception during test; ") - ASYS_TEXT ("ACE_bad_alloc not defined correctly, or\n"))); + ACE_TEXT ("Caught exception during test; ") + ACE_TEXT ("ACE_bad_alloc not defined correctly, or\n"))); ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("ACE_NEW_THROWS_EXCEPTIONS is not #defined (and should be).\n"))); + ACE_TEXT ("ACE_NEW_THROWS_EXCEPTIONS is not #defined (and should be).\n"))); // Mark test failure status = 1; } diff --git a/tests/Notify_Performance_Test.cpp b/tests/Notify_Performance_Test.cpp index cb5462e8638..e7b69065eec 100644 --- a/tests/Notify_Performance_Test.cpp +++ b/tests/Notify_Performance_Test.cpp @@ -113,47 +113,47 @@ create_reactor (void) static void print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et) { - const ASYS_TCHAR *reactor_type = 0; + const ACE_TCHAR *reactor_type = 0; if (opt_wfmo_reactor) - reactor_type = ASYS_TEXT ("WFMO_Reactor"); + reactor_type = ACE_TEXT ("WFMO_Reactor"); else if (opt_select_reactor) - reactor_type = ASYS_TEXT ("Select_Reactor"); + reactor_type = ACE_TEXT ("Select_Reactor"); else - reactor_type = ASYS_TEXT ("Platform's default Reactor"); + reactor_type = ACE_TEXT ("Platform's default Reactor"); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nNotify_Performance Test statistics:\n\n"))); + ACE_TEXT ("\nNotify_Performance Test statistics:\n\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tReactor Type: %s\n"), + ACE_TEXT ("\tReactor Type: %s\n"), reactor_type)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tWorker threads (calling notify()): %d\n"), + ACE_TEXT ("\tWorker threads (calling notify()): %d\n"), opt_nthreads)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tIteration per thread: %d\n"), + ACE_TEXT ("\tIteration per thread: %d\n"), opt_nloops)); if (opt_pass_notify_data) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tData was passed in the notify() call\n"))); + ACE_TEXT ("\tData was passed in the notify() call\n"))); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tNo data was passed in the notify() call\n"))); + ACE_TEXT ("\tNo data was passed in the notify() call\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\tTiming results notify() call:\n"))); + ACE_TEXT ("\n\tTiming results notify() call:\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), + ACE_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), et.real_time, et.user_time, et.system_time)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Notify_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Notify_Performance_Test")); - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("swdc:l:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("swdc:l:")); for (int c; (c = getopt ()) != -1; ) switch (c) @@ -199,7 +199,7 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_THR_FUNC (client), (void *) &handler, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("thread create failed"))); // Timer business ACE_Profile_Timer timer; @@ -217,7 +217,7 @@ main (int argc, ASYS_TCHAR *argv[]) print_results (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waiting for the worker threads...\n"))); + ACE_TEXT ("(%P|%t) waiting for the worker threads...\n"))); // Wait for all worker to get done. ACE_Thread_Manager::instance ()->wait (); @@ -242,12 +242,12 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, long>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Notify_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Notify_Performance_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Object_Manager_Test.cpp b/tests/Object_Manager_Test.cpp index c10f556ee3d..1eb83b7f1b1 100644 --- a/tests/Object_Manager_Test.cpp +++ b/tests/Object_Manager_Test.cpp @@ -42,17 +42,17 @@ hook2 (void * /* object */, void *param) // invocation in main () will prevent this from being output to the // log stream. ACE_DEBUG ((LM_DEBUG, - "hook2: %d\n", + ACE_TEXT ("hook2: %d\n"), *paramp)); delete paramp; } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { ACE::init (); - ACE_START_TEST (ASYS_TEXT ("Object_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Object_Manager_Test")); u_int errors = 0; @@ -67,7 +67,7 @@ main (int, ASYS_TCHAR *[]) ACE_Object_Manager::instance ()->shutting_down (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("starting_up: %d, shutting_down: %d\n"), + ACE_TEXT ("starting_up: %d, shutting_down: %d\n"), starting_up, shutting_down)); @@ -75,17 +75,17 @@ main (int, ASYS_TCHAR *[]) { ++errors; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("starting_up and shutting_down are supposed to ") - ASYS_TEXT (" be 0!!!!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("starting_up and shutting_down are supposed to ") + ACE_TEXT (" be 0!!!!"))); } if (ACE_OS::atexit (hook1) != 0) { ++errors; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_OS::atexit () returned non-zero!!!!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_OS::atexit () returned non-zero!!!!"))); } for (u_int i = 0; i < 10; ++i) @@ -105,9 +105,9 @@ main (int, ASYS_TCHAR *[]) { ++errors; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_Object_Manager::at_exit () ") - ASYS_TEXT ("returned non-zero!!!!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Object_Manager::at_exit () ") + ACE_TEXT ("returned non-zero!!!!"))); } } diff --git a/tests/OrdMultiSet_Test.cpp b/tests/OrdMultiSet_Test.cpp index a93c4e3e121..b34a785e0cf 100644 --- a/tests/OrdMultiSet_Test.cpp +++ b/tests/OrdMultiSet_Test.cpp @@ -28,12 +28,12 @@ ACE_RCSID(tests, OrdMultiSet_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { int ret = 0; int *ptr = 0; - ACE_START_TEST (ASYS_TEXT ("OrdMultiSet_Test")); + ACE_START_TEST (ACE_TEXT ("OrdMultiSet_Test")); // make an empty set of int and an iterator ACE_Ordered_MultiSet<int> set; diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp index f99c547bc93..da43003fc01 100644 --- a/tests/Pipe_Test.cpp +++ b/tests/Pipe_Test.cpp @@ -78,14 +78,14 @@ open (ACE_Pipe &pipe, #endif /* ! ACE_LACKS_FORK */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { #if defined (ACE_LACKS_FORK) ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Pipe_Test")); - ACE_ERROR ((LM_INFO, ASYS_TEXT ("fork is not supported on this platform\n"))); + ACE_START_TEST (ACE_TEXT ("Pipe_Test")); + ACE_ERROR ((LM_INFO, ACE_TEXT ("fork is not supported on this platform\n"))); ACE_END_TEST; #else /* ! ACE_LACKS_FORK */ parse_args (argc, argv); diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp index 14ef4dee0ac..7f4b6089dbe 100644 --- a/tests/Priority_Buffer_Test.cpp +++ b/tests/Priority_Buffer_Test.cpp @@ -124,8 +124,8 @@ producer (void *args) // Enqueue in priority order. if (msg_queue->enqueue_prio (mb) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("put_next")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("put_next")), 0); } @@ -136,8 +136,8 @@ producer (void *args) if (msg_queue->enqueue_tail (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("put_next"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("put_next"))); count++; @@ -154,9 +154,9 @@ producer (void *args) // size of each line. int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Priority_Buffer_Test")); + ACE_START_TEST (ACE_TEXT ("Priority_Buffer_Test")); #if defined (ACE_HAS_THREADS) // Message queue. @@ -167,15 +167,15 @@ main (int, ASYS_TCHAR *[]) (void *) &msg_queue, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn")), 1); // Wait for producer and consumer threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Priority_Reactor_Test.cpp b/tests/Priority_Reactor_Test.cpp index 5ad543dcebc..68fd91ddaa7 100644 --- a/tests/Priority_Reactor_Test.cpp +++ b/tests/Priority_Reactor_Test.cpp @@ -87,14 +87,14 @@ Read_Handler::open (void *) { if (this->peer ().enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Read_Handler::open, ") - ASYS_TEXT ("cannot set non blocking mode")), + ACE_TEXT ("(%P|%t) Read_Handler::open, ") + ACE_TEXT ("cannot set non blocking mode")), -1); if (reactor ()->register_handler (this, READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Read_Handler::open, ") - ASYS_TEXT ("cannot register handler")), + ACE_TEXT ("(%P|%t) Read_Handler::open, ") + ACE_TEXT ("cannot register handler")), -1); // A number larger than the actual number of priorities, so some @@ -105,8 +105,8 @@ Read_Handler::open (void *) started_++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) created svc_handler for handle %d ") - ASYS_TEXT ("with priority %d\n"), + ACE_TEXT ("(%P|%t) created svc_handler for handle %d ") + ACE_TEXT ("with priority %d\n"), get_handle (), priority ())); return 0; @@ -129,19 +129,19 @@ Read_Handler::handle_input (ACE_HANDLE h) return 0; if (result != 0) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("Read_Handler::handle_input"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Read_Handler::handle_input"))); waiting_--; if (waiting_ == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Last svc_handler closed, shutting down\n"))); + ACE_TEXT ("Last svc_handler closed, shutting down\n"))); ACE_Reactor::instance()->end_event_loop(); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Read_Handler::handle_input closing down\n"))); + ACE_TEXT ("(%P|%t) Read_Handler::handle_input closing down\n"))); return -1; } @@ -169,8 +169,8 @@ Write_Handler::svc (void) if (this->peer ().send_n (ACE_ALPHABET, sizeof (ACE_ALPHABET) - 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); ACE_OS::sleep (pause); } @@ -184,7 +184,7 @@ client (void *arg) ACE_INET_Addr *connection_addr = ACE_reinterpret_cast (ACE_INET_Addr *, arg); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) running client\n"))); + ACE_TEXT ("(%P|%t) running client\n"))); CONNECTOR connector; Write_Handler *writer = 0; @@ -209,7 +209,7 @@ client (void *arg) options.timeout (tmp); writer = 0; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) still trying to connect\n"))); + ACE_TEXT ("(%P|%t) still trying to connect\n"))); } else { @@ -220,23 +220,23 @@ client (void *arg) writer->destroy (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) finishing client\n"))); + ACE_TEXT ("(%P|%t) finishing client\n"))); return 0; } } ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) failed to connect after %d retries\n"), + ACE_TEXT ("(%P|%t) failed to connect after %d retries\n"), max_retries)); return 0; } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Priority_Reactor_Test")); + ACE_START_TEST (ACE_TEXT ("Priority_Reactor_Test")); - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("dc:l:m:t:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dc:l:m:t:")); for (int c; (c = getopt ()) != -1; ) switch (c) @@ -259,12 +259,12 @@ main (int argc, ASYS_TCHAR *argv[]) case '?': default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Usage: Priority_Reactor_Test ") - ASYS_TEXT (" [-d] (disable priority reactor)\n") - ASYS_TEXT (" [-c nchildren] (number of threads/processes)\n") - ASYS_TEXT (" [-l loops] (number of loops per child)\n") - ASYS_TEXT (" [-m maxretries] (attempts to connect)\n") - ASYS_TEXT (" [-t max_time] (limits test duration)\n")), + ACE_TEXT ("Usage: Priority_Reactor_Test ") + ACE_TEXT (" [-d] (disable priority reactor)\n") + ACE_TEXT (" [-c nchildren] (number of threads/processes)\n") + ACE_TEXT (" [-l loops] (number of loops per child)\n") + ACE_TEXT (" [-m maxretries] (attempts to connect)\n") + ACE_TEXT (" [-t max_time] (limits test duration)\n")), -1); ACE_NOTREACHED (break); } @@ -300,12 +300,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); ACE_INET_Addr connection_addr (server_addr.get_port_number (), @@ -321,8 +321,8 @@ main (int argc, ASYS_TCHAR *argv[]) (void *) &connection_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); } #elif !defined (ACE_LACKS_FORK) for (i = 0; i < opt_nchildren; ++i) @@ -331,7 +331,7 @@ main (int argc, ASYS_TCHAR *argv[]) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("fork failed"))); exit (-1); /* NOTREACHED */ case 0: @@ -346,7 +346,7 @@ main (int argc, ASYS_TCHAR *argv[]) } #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ ACE_Time_Value tv (opt_max_duration); @@ -358,12 +358,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (Read_Handler::get_countdown () != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) running out of time, ") - ASYS_TEXT ("probably due to failed connections.\n"))); + ACE_TEXT ("(%P|%t) running out of time, ") + ACE_TEXT ("probably due to failed connections.\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waiting for the children...\n"))); + ACE_TEXT ("(%P|%t) waiting for the children...\n"))); #if defined (ACE_HAS_THREADS) ACE_Thread_Manager::instance ()->wait (); @@ -372,7 +372,7 @@ main (int argc, ASYS_TCHAR *argv[]) { pid_t pid = ACE_OS::wait(); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) child %d terminated\n"), + ACE_TEXT ("(%P|%t) child %d terminated\n"), pid)); } #else diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index e74dbb85a81..253d0773651 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -24,7 +24,7 @@ ACE_RCSID(tests, Priority_Task_Test, "$Id$") -static const ASYS_TCHAR *usage = ASYS_TEXT ("usage: %s [-d]\n"); +static const ACE_TCHAR *usage = ACE_TEXT ("usage: %s [-d]\n"); #if defined (ACE_HAS_THREADS) @@ -91,15 +91,15 @@ Priority_Task::open (void *arg) ACE_SCOPE_THREAD); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task activation at priority %d with ") - ASYS_TEXT ("flags 0x%X failed; retry at priority %d with ") - ASYS_TEXT ("flags 0x%X (errno is %d%p)\n"), + ACE_TEXT ("(%t) task activation at priority %d with ") + ACE_TEXT ("flags 0x%X failed; retry at priority %d with ") + ACE_TEXT ("flags 0x%X (errno is %d%p)\n"), this->priority_, flags, fallback_priority, THR_NEW_LWP, errno, - ASYS_TEXT (""))); + ACE_TEXT (""))); flags = THR_NEW_LWP; this->priority_ = fallback_priority; @@ -111,12 +111,12 @@ Priority_Task::open (void *arg) { if (ACE_OS::last_error () == EPERM) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Insufficient privilege to run this test.\n")), + ACE_TEXT ("Insufficient privilege to run this test.\n")), -1); else ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%t) task activation at priority %d failed, ") - ASYS_TEXT ("exiting!\n%a"), + ACE_TEXT ("(%t) task activation at priority %d failed, ") + ACE_TEXT ("exiting!\n%a"), this->priority_, -1)); } @@ -133,18 +133,18 @@ Priority_Task::svc (void) if (ACE_Thread::getprio (thr_handle, prio) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("getprio failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("getprio failed")), -1); if (prio == this->priority_) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) actual prio of %d equals desired priority\n"), + ACE_TEXT ("(%t) actual prio of %d equals desired priority\n"), prio)); else { ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%t) actual prio = %d, desired priority_ = %d!\n"), + ACE_TEXT ("(%t) actual prio = %d, desired priority_ = %d!\n"), prio, this->priority_)); ++error_; @@ -156,9 +156,9 @@ Priority_Task::svc (void) #endif /* ACE_HAS_THREADS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Priority_Task_Test")); + ACE_START_TEST (ACE_TEXT ("Priority_Task_Test")); if (argc <= 1) // Disable LM_DEBUG messages. @@ -167,7 +167,7 @@ main (int argc, ASYS_TCHAR *argv[]) else if (argc == 2) { if (ACE_OS::strcmp (argv[1], - ASYS_TEXT ("-d")) != 0) + ACE_TEXT ("-d")) != 0) ACE_ERROR_RETURN ((LM_ERROR, usage, argv [0]), @@ -211,7 +211,7 @@ main (int argc, ASYS_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) %d tasks spawned, wait for them to exit . . .\n"), + ACE_TEXT ("(%t) %d tasks spawned, wait for them to exit . . .\n"), ACE_MAX_ITERATIONS)); // Wait for all tasks to exit. @@ -226,7 +226,7 @@ main (int argc, ASYS_TCHAR *argv[]) #else ACE_ERROR ((LM_DEBUG, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ // Re-enable LM_DEBUG messages. diff --git a/tests/Process_Manager_Test.cpp b/tests/Process_Manager_Test.cpp index cb2ad773ddb..48c61341511 100644 --- a/tests/Process_Manager_Test.cpp +++ b/tests/Process_Manager_Test.cpp @@ -52,7 +52,7 @@ public: { if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Exit_Handler(%s) got %d: %d\n"), + ACE_TEXT ("(%P|%t) Exit_Handler(%s) got %d: %d\n"), msg_, int (proc->getpid ()), int (proc->exit_code ()) )); @@ -63,23 +63,23 @@ private: }; static void -usage (const char *argv0) +usage (const ACE_TCHAR *argv0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s [-d] [sleep-seconds]\n"), + ACE_TEXT ("usage: %s [-d] [sleep-seconds]\n"), argv0)); ACE_OS::exit (0); } static pid_t -spawn_child (const char *argv0, +spawn_child (const ACE_TCHAR *argv0, ACE_Process_Manager &mgr, int sleep_time = 0) { ACE_Process_Options opts; opts.command_line (ACE_TEXT("%s %s %d"), - ACE_WIDE_STRING(argv0), + argv0, debug_test ? ACE_TEXT ("-d") : ACE_TEXT (""), sleep_time); @@ -87,15 +87,15 @@ spawn_child (const char *argv0, if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawned child: %d\n"), + ACE_TEXT ("(%P|%t) spawned child: %d\n"), int (result))); return result; } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt args (argc, argv, "d"); + ACE_Get_Opt args (argc, argv, ACE_TEXT ("d")); for (int arg = args (); arg != EOF; arg = args ()) switch (arg) @@ -110,11 +110,11 @@ main (int argc, ASYS_TCHAR *argv[]) if (args.optind == argc - 1) { // child process: sleep & exit - int secs = atoi (argv[args.optind]); + int secs = ACE_OS::atoi (argv[args.optind]); ACE_OS::sleep (secs ? secs : 1); if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) about to exit with code %d\n"), + ACE_TEXT ("(%P|%t) about to exit with code %d\n"), secs)); return secs; } @@ -122,7 +122,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (args.optind != argc) // incorrect usage usage (argv[0]); - ACE_START_TEST (ASYS_TEXT ("Process_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Manager_Test")); // Try the explicit <ACE_Process_Manager::wait> functions @@ -146,7 +146,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for child %d: %d\n"), + ACE_TEXT ("(%P|%t) waited for child %d: %d\n"), child1, exitcode)); @@ -166,7 +166,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for child %d: %d\n"), + ACE_TEXT ("(%P|%t) waited for child %d: %d\n"), child3, exitcode)); @@ -176,7 +176,7 @@ main (int argc, ASYS_TCHAR *argv[]) &exitcode); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) expected to reap %d, got %d\n"), + ACE_TEXT ("(%P|%t) expected to reap %d, got %d\n"), child2, result3)); ACE_ASSERT (result3 == child2); @@ -184,7 +184,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for any child: %d\n"), + ACE_TEXT ("(%P|%t) waited for any child: %d\n"), exitcode)); // -------------------------------------------------- @@ -203,7 +203,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for any child: %d\n"), + ACE_TEXT ("(%P|%t) waited for any child: %d\n"), exitcode)); // This one should timeout: @@ -218,7 +218,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for any child: %d\n"), + ACE_TEXT ("(%P|%t) waited for any child: %d\n"), exitcode)); // Now wait indefinitely to clean up... @@ -230,7 +230,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for child 5 again: %d\n"), + ACE_TEXT ("(%P|%t) waited for child 5 again: %d\n"), exitcode)); // -------------------------------------------------- @@ -254,7 +254,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) done!\n") )); + ACE_TEXT ("(%P|%t) done!\n") )); ACE_END_TEST; return result; @@ -262,11 +262,11 @@ main (int argc, ASYS_TCHAR *argv[]) #else /* (!ACE_LACKS_FORK || ACE_WIN32) && ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Process_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Manager_Test")); ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("The ACE Process Manager is not supported on this platform\n"))); + ACE_TEXT ("The ACE Process Manager is not supported on this platform\n"))); ACE_END_TEST; return 0; } diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp index b0f4f861f5a..c3c680afb02 100644 --- a/tests/Process_Mutex_Test.cpp +++ b/tests/Process_Mutex_Test.cpp @@ -38,8 +38,8 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-d (don't release mutex)] ") - ASYS_TEXT ("[-c (child process)] [-n mutex name]\n"))); + ACE_TEXT ("usage: %n [-d (don't release mutex)] ") + ACE_TEXT ("[-c (child process)] [-n mutex name]\n"))); ACE_OS::exit (1); } @@ -72,7 +72,7 @@ parse_args (int argc, char *argv[]) static void acquire_release (void) { - ACE_Process_Mutex mutex (ACE_WIDE_STRING (mutex_name)); + ACE_Process_Mutex mutex (ACE_TEXT_CHAR_TO_TCHAR (mutex_name)); // Make sure the constructor succeeded ACE_ASSERT (ACE_LOG_MSG->op_status () == 0); @@ -81,10 +81,10 @@ acquire_release (void) ACE_ASSERT (mutex.acquire () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) Mutex acquired %s\n"), + ACE_TEXT ("(%P) Mutex acquired %s\n"), mutex_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) Working....\n"))); + ACE_TEXT ("(%P) Working....\n"))); // Do some "work", i.e., just sleep for a couple of seconds. ACE_OS::sleep (2); @@ -93,7 +93,7 @@ acquire_release (void) if (release_mutex == 1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) Releasing the mutex %s\n"), + ACE_TEXT ("(%P) Releasing the mutex %s\n"), mutex_name)); ACE_ASSERT (mutex.release () == 0); } @@ -101,15 +101,15 @@ acquire_release (void) #endif /* ! ACE_LACKS_FORK */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { #if defined (ACE_LACKS_FORK) ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Process_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Mutex_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("fork is not supported on this platform\n"))); + ACE_TEXT ("fork is not supported on this platform\n"))); ACE_END_TEST; #else /* ! ACE_LACKS_FORK */ @@ -124,7 +124,7 @@ main (int argc, ASYS_TCHAR *argv[]) } else { - ACE_START_TEST (ASYS_TEXT ("Process_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Mutex_Test")); ACE_INIT_LOG ("Process_Mutex_Test-children"); ACE_Process_Options options; @@ -133,13 +133,13 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c -n %s -d"), - ACE_WIDE_STRING (mutex_name)); + ACE_TEXT_CHAR_TO_TCHAR (mutex_name)); else options.command_line (ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c -n %s"), - ACE_WIDE_STRING (mutex_name)); + ACE_TEXT_CHAR_TO_TCHAR (mutex_name)); // Spawn <n_processes> child processes that will contend for the // lock. @@ -154,7 +154,7 @@ main (int argc, ASYS_TCHAR *argv[]) int result = children[i].spawn (options); ACE_ASSERT (result != -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Parent spawned child process with pid = %d.\n"), + ACE_TEXT ("Parent spawned child process with pid = %d.\n"), children[i].getpid ())); // Give the newly spawned child process a chance to start... @@ -166,7 +166,7 @@ main (int argc, ASYS_TCHAR *argv[]) // Wait for the child processes we created to exit. ACE_ASSERT (children[i].wait () != -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Parent %d finished\n"), + ACE_TEXT ("Parent %d finished\n"), children[i].getpid ())); } diff --git a/tests/Process_Strategy_Test.cpp b/tests/Process_Strategy_Test.cpp index 359179b032a..35150a68301 100644 --- a/tests/Process_Strategy_Test.cpp +++ b/tests/Process_Strategy_Test.cpp @@ -163,7 +163,7 @@ Options::concurrency_strategy (void) return this->concurrency_strategy_; } -const ASYS_TCHAR * +const ACE_TCHAR * Options::filename (void) { return this->filename_; @@ -189,37 +189,39 @@ Options::~Options (void) } int -Options::parse_args (int argc, ASYS_TCHAR *argv[]) +Options::parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("p:c:f:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("p:c:f:")); // - 26 is for the "process_strategy_test_temp" that is appended if (ACE::get_temp_dir (this->filename_, MAXPATHLEN - 26) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Temporary path too long\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Temporary path too long\n")), + -1); - ACE_OS::strcat (this->filename_, "process_strategy_test_temp"); + ACE_OS::strcat (this->filename_, ACE_TEXT ("process_strategy_test_temp")); for (int c; (c = get_opt ()) != -1; ) switch (c) { case 'c': if (ACE_OS::strcmp (get_opt.optarg, - ASYS_TEXT ("REACTIVE")) == 0) + ACE_TEXT ("REACTIVE")) == 0) OPTIONS::instance ()->concurrency_type (Options::REACTIVE); #if !defined (ACE_LACKS_FORK) else if (ACE_OS::strcmp (get_opt.optarg, - ASYS_TEXT ("PROCESS")) == 0) + ACE_TEXT ("PROCESS")) == 0) OPTIONS::instance ()->concurrency_type (Options::PROCESS); #endif /* !ACE_LACKS_FORK */ #if defined (ACE_HAS_THREADS) else if (ACE_OS::strcmp (get_opt.optarg, - ASYS_TEXT ("THREAD")) == 0) + ACE_TEXT ("THREAD")) == 0) OPTIONS::instance ()->concurrency_type (Options::THREAD); #endif /* ACE_HAS_THREADS */ else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("WARNING: concurrency strategy \"%s\" ") - ASYS_TEXT ("is not supported\n"), + ACE_TEXT ("WARNING: concurrency strategy \"%s\" ") + ACE_TEXT ("is not supported\n"), get_opt.optarg)); break; case 'f': @@ -227,23 +229,23 @@ Options::parse_args (int argc, ASYS_TCHAR *argv[]) break; default: ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-f (filename)] ") - ASYS_TEXT ("[-c (concurrency strategy)]\n%a"), 1)); + ACE_TEXT ("usage: %n [-f (filename)] ") + ACE_TEXT ("[-c (concurrency strategy)]\n%a"), 1)); /* NOTREACHED */ } // Initialize the file lock. Note that this object lives beyond the // lifetime of the Acceptor. - if (this->file_lock_.open (ASYS_ONLY_WIDE_STRING (this->filename_), + if (this->file_lock_.open (this->filename_, O_RDWR | O_CREAT, ACE_DEFAULT_FILE_PERMS) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) opening %s on handle %d.\n"), + ACE_TEXT ("(%P|%t) opening %s on handle %d.\n"), this->filename_, this->file_lock_.get_handle ())); @@ -254,8 +256,8 @@ Options::parse_args (int argc, ASYS_TCHAR *argv[]) (const void *) &count, sizeof count) != sizeof count) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("write"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("write"))); // Initialize the Concurrency strategy. switch (this->concurrency_type_) @@ -317,7 +319,7 @@ Options::concurrency_type (Options::Concurrency_Type cs) Counting_Service::Counting_Service (ACE_Thread_Manager *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) creating the Counting_Service\n"))); + ACE_TEXT ("(%P|%t) creating the Counting_Service\n"))); } // Read the current value from the shared file and return it to the @@ -329,7 +331,7 @@ Counting_Service::read (void) ACE_READ_GUARD_RETURN (ACE_File_Lock, ace_mon, OPTIONS::instance ()->file_lock (), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reading on handle %d.\n"), + ACE_TEXT ("(%P|%t) reading on handle %d.\n"), OPTIONS::instance ()->file_lock ().get_handle ())); int count; @@ -338,8 +340,8 @@ Counting_Service::read (void) sizeof count, 0) != sizeof count) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("read")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("read")), -1); char buf[BUFSIZ]; @@ -347,13 +349,13 @@ Counting_Service::read (void) "count = %d\n", count); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) count = %d\n"), + ACE_TEXT ("(%P|%t) count = %d\n"), count)); if (this->peer ().send_n (buf, n) != n) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n")), -1); return 0; } @@ -367,7 +369,7 @@ Counting_Service::inc (void) OPTIONS::instance ()->file_lock (), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) incrementing on handle %d.\n"), + ACE_TEXT ("(%P|%t) incrementing on handle %d.\n"), OPTIONS::instance ()->file_lock ().get_handle ())); int count; @@ -376,12 +378,12 @@ Counting_Service::inc (void) sizeof count, 0) != sizeof count) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("read")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("read")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) incrementing count from %d to %d\n"), + ACE_TEXT ("(%P|%t) incrementing count from %d to %d\n"), count, count + 1)); count++; @@ -391,8 +393,8 @@ Counting_Service::inc (void) sizeof count, 0) != sizeof count) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("write")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("write")), -1); return 0; } @@ -406,7 +408,7 @@ Counting_Service::handle_input (ACE_HANDLE) char buf[BUFSIZ]; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reading from peer on %d\n"), + ACE_TEXT ("(%P|%t) reading from peer on %d\n"), this->peer ().get_handle ())); size_t len; // Read the PDU length first. @@ -422,7 +424,7 @@ Counting_Service::handle_input (ACE_HANDLE) else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) %d bytes of input on %d is %*s\n"), + ACE_TEXT ("(%P|%t) %d bytes of input on %d is %*s\n"), bytes, this->peer ().get_handle (), bytes, @@ -437,7 +439,7 @@ Counting_Service::handle_input (ACE_HANDLE) return this->inc (); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no match...\n"))); + ACE_TEXT ("(%P|%t) no match...\n"))); return 0; } } @@ -446,7 +448,7 @@ int Counting_Service::svc (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) handling thread\n"))); + ACE_TEXT ("(%P|%t) handling thread\n"))); while (this->handle_input () >= 0) continue; @@ -472,7 +474,7 @@ int Counting_Service::open (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) opening service\n"))); + ACE_TEXT ("(%P|%t) opening service\n"))); if (OPTIONS::instance ()->concurrency_type () == Options::PROCESS) { @@ -485,7 +487,7 @@ Counting_Service::open (void *) continue; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) About to exit from the child\n"))); + ACE_TEXT ("(%P|%t) About to exit from the child\n"))); // Exit the child. ACE_OS::exit (0); @@ -518,13 +520,13 @@ client (void *arg) for (i = 0; i < ACE_MAX_ITERATIONS; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client iteration %d\n"), + ACE_TEXT ("(%P|%t) client iteration %d\n"), i)); if (connector.connect (stream, server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 0); command = "inc"; command_len = ACE_OS::strlen (command); @@ -533,8 +535,8 @@ client (void *arg) &command_len, sizeof command_len, command, command_len) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("send")), 0); command = "read"; command_len = ACE_OS::strlen (command); @@ -543,23 +545,23 @@ client (void *arg) &command_len, sizeof command_len, command, command_len) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("send")), 0); else if (stream.recv (buf, sizeof buf) <= 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv")), 0); // ACE_DEBUG ((LM_DEBUG, - // ASYS_TEXT ("(%P|%t) client iteration %d, buf = %s\n"), + // ACE_TEXT ("(%P|%t) client iteration %d, buf = %s\n"), // i, buf)); if (stream.close () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("close")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("close")), 0); } @@ -569,20 +571,20 @@ client (void *arg) if (connector.connect (stream, server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 0); else if (stream.send (4, &command_len, sizeof command_len, command, command_len) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("send")), 0); else if ((bytes_read = stream.recv (buf, sizeof buf)) <= 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("recv")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("recv")), 0); else { @@ -590,10 +592,11 @@ client (void *arg) // the call to ACE_OS::strrchr (). buf [bytes_read] = '\0'; - size_t count = ACE_OS::atoi (ACE_OS::strrchr (buf, ' ')); + size_t count = ACE_OS::atoi (ACE_OS::strrchr (ACE_TEXT_CHAR_TO_TCHAR (buf), + ACE_TEXT (' '))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) count = %d\n"), + ACE_TEXT ("(%P|%t) count = %d\n"), count)); // Make sure that the count is correct. ACE_ASSERT (count == ACE_MAX_ITERATIONS); @@ -601,8 +604,8 @@ client (void *arg) if (stream.close () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("close")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("close")), 0); // Remove the filename. @@ -627,14 +630,14 @@ server (void *) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Process_Strategy_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Strategy_Test")); if (OPTIONS::instance ()->parse_args (argc, argv) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("parse_args")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("parse_args")), -1); ACCEPTOR acceptor; @@ -650,13 +653,13 @@ main (int argc, ASYS_TCHAR *argv[]) OPTIONS::instance ()->concurrency_strategy ()) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), -1); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) @@ -668,8 +671,8 @@ main (int argc, ASYS_TCHAR *argv[]) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("fork failed"))); exit (-1); /* NOTREACHED */ case 0: @@ -687,23 +690,23 @@ main (int argc, ASYS_TCHAR *argv[]) (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run ") - ASYS_TEXT ("in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run ") + ACE_TEXT ("in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ } diff --git a/tests/Process_Strategy_Test.h b/tests/Process_Strategy_Test.h index 0cf701ee058..1af7987e64c 100644 --- a/tests/Process_Strategy_Test.h +++ b/tests/Process_Strategy_Test.h @@ -101,7 +101,7 @@ public: ~Options (void); // Destructor. - int parse_args (int argc, ASYS_TCHAR *argv[]); + int parse_args (int argc, ACE_TCHAR *argv[]); // Read command-line arguments and initialize options. enum Concurrency_Type @@ -118,7 +118,7 @@ public: ACE_File_Lock &file_lock (void); // Returns the file lock. - const ASYS_TCHAR *filename (void); + const ACE_TCHAR *filename (void); // Returns the filename that we're using as the lock. ACE_Concurrency_Strategy <Counting_Service> *concurrency_strategy (void); @@ -135,7 +135,7 @@ private: // Activation strategy that either forks a new process or spawns a // new thread for each client connection. - ASYS_TCHAR filename_[MAXPATHLEN + 1]; + ACE_TCHAR filename_[MAXPATHLEN + 1]; // Name of the counting file. }; diff --git a/tests/RB_Tree_Test.cpp b/tests/RB_Tree_Test.cpp index c8158eaf9d0..06d810ad26e 100644 --- a/tests/RB_Tree_Test.cpp +++ b/tests/RB_Tree_Test.cpp @@ -63,9 +63,9 @@ static int str_int_index [] = {4, 6, 2, 7, 5, 3, 1, 0}; // RL BFS static int str_str_index [] = {4, 2, 1, 0, 3, 6, 5, 7}; // LR preorder int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("RB_Tree_Test")); + ACE_START_TEST (ACE_TEXT ("RB_Tree_Test")); // Construct and run four distinctly parameterized tests. Note that // specialization of the ACE_Less_Than template for character diff --git a/tests/Reactor_Exceptions_Test.cpp b/tests/Reactor_Exceptions_Test.cpp index 0fe412cf772..355b4c73d36 100644 --- a/tests/Reactor_Exceptions_Test.cpp +++ b/tests/Reactor_Exceptions_Test.cpp @@ -32,7 +32,7 @@ static void throw_exception (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) throw exception\n"))); + ACE_TEXT ("(%P|%t) throw exception\n"))); // Cause a Win32 structured exception. *(char *) 0 = 0; @@ -45,7 +45,7 @@ static void throw_exception (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) throw exception\n"))); + ACE_TEXT ("(%P|%t) throw exception\n"))); throw Except (); } #endif /* ACE_WIN32 */ @@ -73,11 +73,11 @@ My_Handler::get_handle (void) const int My_Handler::handle_input (ACE_HANDLE) { - ASYS_TCHAR buf[BUFSIZ]; + ACE_TCHAR buf[BUFSIZ]; ACE_INET_Addr from_addr; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Activity occurred on handle %d!\n"), + ACE_TEXT ("Activity occurred on handle %d!\n"), ACE_SOCK_Dgram::get_handle ())); ssize_t n = ACE_SOCK_Dgram::recv (buf, @@ -85,11 +85,11 @@ My_Handler::handle_input (ACE_HANDLE) from_addr); if (n == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("handle_input"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("handle_input"))); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("got buf = %s\n"), + ACE_TEXT ("got buf = %s\n"), buf)); throw_exception (); @@ -129,7 +129,7 @@ public: catch (...) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) catch exception\n"))); + ACE_TEXT (" (%t) catch exception\n"))); ret = -1; // do your thing, etc. } @@ -151,7 +151,7 @@ worker (void) for (;;) if (ACE_Reactor::instance ()->handle_events () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%t) exception return\n")), + ACE_TEXT (" (%t) exception return\n")), 0); ACE_NOTREACHED (return 0); @@ -159,13 +159,13 @@ worker (void) #endif /* ACE_HAS_EXCEPTIONS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Exceptions_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Exceptions_Test")); #if defined (ACE_HAS_EXCEPTIONS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Starting tracing\n"))); + ACE_TEXT ("Starting tracing\n"))); u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; @@ -186,8 +186,8 @@ main (int argc, ASYS_TCHAR *argv[]) (&handler, ACE_Event_Handler::READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("register_handler")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("register_handler")), -1); #if defined (ACE_HAS_THREADS) @@ -195,14 +195,14 @@ main (int argc, ASYS_TCHAR *argv[]) #else // Need to figure out how to implement this test. ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_SOCK_Dgram dgram (ACE_sap_any_cast (ACE_INET_Addr &)); for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++) - dgram.send (ASYS_TEXT ("Hello"), - sizeof (ASYS_TEXT ("Hello")), + dgram.send (ACE_TEXT ("Hello"), + sizeof (ACE_TEXT ("Hello")), remote_addr); // Barrier to wait for the other thread to return. thr_mgr->wait (); @@ -211,12 +211,12 @@ main (int argc, ASYS_TCHAR *argv[]) dgram.close (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main\n"))); + ACE_TEXT (" (%t) exiting main\n"))); #else ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("C++ exception support not enabled on this platform\n"))); + ACE_TEXT ("C++ exception support not enabled on this platform\n"))); #endif /* ACE_HAS_EXCEPTIONS */ ACE_END_TEST; diff --git a/tests/Reactor_Notify_Test.cpp b/tests/Reactor_Notify_Test.cpp index 29d08bbb5ce..e136903c577 100644 --- a/tests/Reactor_Notify_Test.cpp +++ b/tests/Reactor_Notify_Test.cpp @@ -134,7 +134,7 @@ int Supplier_Task::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Supplier_Task::close\n"))); + ACE_TEXT ("(%t) Supplier_Task::close\n"))); int result; @@ -150,7 +150,7 @@ Supplier_Task::close (u_long) // Wait to be told to shutdown by the main thread. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting to be shutdown by main thread\n"))); + ACE_TEXT ("(%t) waiting to be shutdown by main thread\n"))); result = this->waiter_.acquire (); ACE_ASSERT (result != -1); } @@ -160,7 +160,7 @@ Supplier_Task::close (u_long) Supplier_Task::~Supplier_Task (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) ~Supplier_Task\n"))); + ACE_TEXT ("(%t) ~Supplier_Task\n"))); this->pipe_.close (); } @@ -177,7 +177,7 @@ Supplier_Task::perform_notifications (int notifications) for (size_t i = 0; i < iterations; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) notifying reactor on iteration %d\n"), + ACE_TEXT ("(%t) notifying reactor on iteration %d\n"), i)); int result; @@ -188,8 +188,8 @@ Supplier_Task::perform_notifications (int notifications) { if (errno == ETIME) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("notify"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("notify"))); else ACE_ASSERT (result != -1); } @@ -211,7 +211,7 @@ int Supplier_Task::svc (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) **** starting unlimited notifications test\n"))); + ACE_TEXT ("(%t) **** starting unlimited notifications test\n"))); // Allow an unlimited number of iterations per // <ACE_Reactor::notify>. @@ -220,13 +220,13 @@ Supplier_Task::svc (void) if (this->long_timeout_ == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) **** starting limited notifications test\n"))); + ACE_TEXT ("(%t) **** starting limited notifications test\n"))); // Only allow 1 iteration per <ACE_Reactor::notify> this->perform_notifications (1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) **** exiting thread test\n"))); + ACE_TEXT ("(%t) **** exiting thread test\n"))); } return 0; } @@ -236,7 +236,7 @@ Supplier_Task::handle_exception (ACE_HANDLE handle) { ACE_ASSERT (handle == ACE_INVALID_HANDLE); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_exception\n"))); + ACE_TEXT ("(%t) handle_exception\n"))); this->waiter_.release (); return 0; @@ -247,7 +247,7 @@ Supplier_Task::handle_output (ACE_HANDLE handle) { ACE_ASSERT (handle == this->pipe_.write_handle ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_output\n"))); + ACE_TEXT ("(%t) handle_output\n"))); // This function is called by the main thread, believe it or not :-) // That's because the pipe's write handle is always active. Thus, @@ -313,8 +313,8 @@ run_test (int disable_notify_pipe, ACE_Time_Value timeout (tv); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting handle_events() on iteration %d") - ASYS_TEXT (" with time-out = %d seconds\n"), + ACE_TEXT ("(%t) starting handle_events() on iteration %d") + ACE_TEXT (" with time-out = %d seconds\n"), iteration, timeout.sec ())); @@ -324,14 +324,14 @@ run_test (int disable_notify_pipe, case -1: if (! disable_notify_pipe) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("reactor"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("reactor"))); shutdown = 1; break; /* NOTREACHED */ case 0: ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_events timed out\n"))); + ACE_TEXT ("(%t) handle_events timed out\n"))); shutdown = 1; break; /* NOTREACHED */ @@ -344,7 +344,7 @@ run_test (int disable_notify_pipe, if (tv.sec () == LONG_TIMEOUT) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) releasing supplier task thread\n"))); + ACE_TEXT ("(%t) releasing supplier task thread\n"))); task.release (); } return 0; @@ -353,35 +353,35 @@ run_test (int disable_notify_pipe, #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Notify_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Notify_Test")); #if defined (ACE_HAS_THREADS) ACE_Time_Value timeout (SHORT_TIMEOUT); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running tests with notify pipe enabled") - ASYS_TEXT (" and time-out = %d seconds\n"), + ACE_TEXT ("(%t) running tests with notify pipe enabled") + ACE_TEXT (" and time-out = %d seconds\n"), timeout.sec ())); run_test (0, timeout); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running tests with notify pipe disabled") - ASYS_TEXT (" and time-out = %d seconds\n"), + ACE_TEXT ("(%t) running tests with notify pipe disabled") + ACE_TEXT (" and time-out = %d seconds\n"), timeout.sec ())); run_test (1, timeout); timeout.set (LONG_TIMEOUT, 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running tests with reactor notification pipe enabled\n") - ASYS_TEXT (" and time-out = %d seconds\n"), + ACE_TEXT ("(%t) running tests with reactor notification pipe enabled\n") + ACE_TEXT (" and time-out = %d seconds\n"), timeout.sec ())); run_test (0, timeout); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Reactor_Performance_Test.cpp b/tests/Reactor_Performance_Test.cpp index 54d8b68da78..b655fd1385b 100644 --- a/tests/Reactor_Performance_Test.cpp +++ b/tests/Reactor_Performance_Test.cpp @@ -64,16 +64,16 @@ Read_Handler::open (void *) { if (this->peer ().enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) Read_Handler::open, cannot set non blocking mode\n")), + ACE_TEXT ("(%t) Read_Handler::open, cannot set non blocking mode\n")), -1); if (reactor ()->register_handler (this, READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) Read_Handler::open, cannot register handler\n")), + ACE_TEXT ("(%t) Read_Handler::open, cannot register handler\n")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) created svc_handler for handle %d\n"), + ACE_TEXT ("(%t) created svc_handler for handle %d\n"), get_handle ())); return 0; } @@ -95,7 +95,7 @@ Read_Handler::handle_input (ACE_HANDLE handle) { buf[result] = 0; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Read_Handler::handle_input: %s\n"), + ACE_TEXT ("(%t) Read_Handler::handle_input: %s\n"), buf)); } } @@ -105,8 +105,8 @@ Read_Handler::handle_input (ACE_HANDLE handle) return 0; else { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("handle_input: %p (errno: %d)\n"), - ASYS_TEXT ("recv"), errno)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("handle_input: %p (errno: %d)\n"), + ACE_TEXT ("recv"), errno)); // This will cause handle_close to get called. return -1; @@ -139,7 +139,7 @@ Read_Handler::handle_close (ACE_HANDLE handle, ACE_Reactor::instance ()->end_event_loop (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Read_Handler::handle_close closing down\n"))); + ACE_TEXT ("(%t) Read_Handler::handle_close closing down\n"))); // Shutdown this->destroy (); @@ -160,8 +160,8 @@ Write_Handler::send_data (void) if (this->peer ().send_n (ACE_ALPHABET, send_size) != send_size) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("send_n")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("send_n")), -1); return 0; } @@ -175,7 +175,7 @@ void * client (void *arg) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running client\n"))); + ACE_TEXT ("(%t) running client\n"))); ACE_INET_Addr *connection_addr = ACE_reinterpret_cast (ACE_INET_Addr *, arg); @@ -190,11 +190,11 @@ client (void *arg) 0); ACE_Auto_Basic_Array_Ptr <Write_Handler *> writers (temp_writers); - ASYS_TCHAR *temp_failed; + ACE_TCHAR *temp_failed; ACE_NEW_RETURN (temp_failed, - ASYS_TCHAR[opt_nconnections], + ACE_TCHAR[opt_nconnections], 0); - ACE_Auto_Basic_Array_Ptr <ASYS_TCHAR> failed_svc_handlers (temp_failed); + ACE_Auto_Basic_Array_Ptr <ACE_TCHAR> failed_svc_handlers (temp_failed); // Automagic memory cleanup. ACE_INET_Addr *temp_addresses; @@ -223,7 +223,7 @@ client (void *arg) { ACE_INET_Addr failed_addr = addresses.get()[i]; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) connection failed to %s, %d\n"), + ACE_TEXT ("(%t) connection failed to %s, %d\n"), failed_addr.get_host_name (), failed_addr.get_port_number ())); } @@ -237,15 +237,15 @@ client (void *arg) for (i = 0; i < opt_nconnections; i++) if (writers[i]->send_data () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("writer::send_data")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("writer::send_data")), 0); // Cleanup for (i = 0; i < opt_nconnections; i++) writers[i]->destroy (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) finishing client\n"))); + ACE_TEXT ("(%t) finishing client\n"))); return 0; } @@ -278,42 +278,42 @@ create_reactor (void) void print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et) { - const ASYS_TCHAR *reactor_type = 0; + const ACE_TCHAR *reactor_type = 0; if (opt_wfmo_reactor) - reactor_type = ASYS_TEXT ("WFMO_Reactor"); + reactor_type = ACE_TEXT ("WFMO_Reactor"); else if (opt_select_reactor) - reactor_type = ASYS_TEXT ("Select_Reactor"); + reactor_type = ACE_TEXT ("Select_Reactor"); else - reactor_type = ASYS_TEXT ("Platform's default Reactor"); + reactor_type = ACE_TEXT ("Platform's default Reactor"); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\tReactor_Performance Test statistics:\n\n"))); + ACE_TEXT ("\n\tReactor_Performance Test statistics:\n\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tReactor Type: %s\n"), + ACE_TEXT ("\tReactor Type: %s\n"), reactor_type)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tConnections: %d\n"), + ACE_TEXT ("\tConnections: %d\n"), opt_nconnections)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tIteration per connection: %d\n"), + ACE_TEXT ("\tIteration per connection: %d\n"), opt_nloops)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\tTiming results:\n"))); + ACE_TEXT ("\n\tTiming results:\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), + ACE_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), et.real_time, et.user_time, et.system_time)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Performance_Test")); - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("dswc:l:"), 1); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dswc:l:"), 1); for (int c; (c = getopt ()) != -1; ) switch (c) { @@ -359,12 +359,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("open")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting server at port %d\n"), + ACE_TEXT ("(%t) starting server at port %d\n"), server_addr.get_port_number ())); ACE_INET_Addr connection_addr (server_addr.get_port_number (), @@ -375,8 +375,8 @@ main (int argc, ASYS_TCHAR *argv[]) (void *) &connection_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("thread create failed"))); ACE_Time_Value run_limit (opt_nloops / 10); @@ -392,7 +392,7 @@ main (int argc, ASYS_TCHAR *argv[]) print_results (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for the client thread...\n"))); + ACE_TEXT ("(%t) waiting for the client thread...\n"))); ACE_Thread_Manager::instance ()->wait (); @@ -438,12 +438,12 @@ template class ACE_Auto_Array_Ptr <ACE_INET_Addr>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Performance_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Reactor_Timer_Test.cpp b/tests/Reactor_Timer_Test.cpp index d1fe88674f5..a69875c523d 100644 --- a/tests/Reactor_Timer_Test.cpp +++ b/tests/Reactor_Timer_Test.cpp @@ -66,7 +66,7 @@ Time_Handler::handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("[%x] handle = %d, close_mask = %d, timer id = %d\n"), + ACE_TEXT ("[%x] handle = %d, close_mask = %d, timer id = %d\n"), this, handle, close_mask, @@ -83,7 +83,7 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv, ACE_ASSERT (current_count == count); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("[%x] Timer id %d with count #%d|%d timed out at %d!\n"), + ACE_TEXT ("[%x] Timer id %d with count #%d|%d timed out at %d!\n"), this, this->timer_id (), count, @@ -122,7 +122,9 @@ Time_Handler::timer_id (long t) static void test_registering_all_handlers (void) { - ACE_Trace t ("test_registering_all_handler", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_registering_all_handler"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; @@ -143,7 +145,9 @@ test_registering_all_handlers (void) static void test_registering_one_handler (void) { - ACE_Trace t ("test_registering_one_handler", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_registering_one_handler"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; @@ -166,7 +170,9 @@ test_registering_one_handler (void) static void test_canceling_odd_timers (void) { - ACE_Trace t ("test_canceling_odd_timers", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_canceling_odd_timers"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; @@ -199,7 +205,9 @@ test_canceling_odd_timers (void) static void test_resetting_timer_intervals (void) { - ACE_Trace t ("test_resetting_timer_intervals", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_resetting_timer_intervals"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt; int t_id; @@ -223,9 +231,9 @@ test_resetting_timer_intervals (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Timer_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Timer_Test")); // Register all different handlers, i.e., one per timer. test_registering_all_handlers (); diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index 4c3ea3a6e1e..b71fc2fc0f3 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -72,7 +72,7 @@ Test_Task::Test_Task (void) Test_Task::task_count_++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) TT+ Test_Task::task_count_ = %d\n"), + ACE_TEXT ("(%t) TT+ Test_Task::task_count_ = %d\n"), Test_Task::task_count_)); } @@ -81,7 +81,7 @@ Test_Task::~Test_Task (void) ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, recursive_lock); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) TT- Test_Task::task_count_ = %d\n"), + ACE_TEXT ("(%t) TT- Test_Task::task_count_ = %d\n"), Test_Task::task_count_)); ACE_ASSERT (Test_Task::task_count_ == 0); @@ -103,7 +103,7 @@ Test_Task::close (u_long) Test_Task::task_count_--; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) close Test_Task::task_count_ = %d\n"), + ACE_TEXT ("(%t) close Test_Task::task_count_ = %d\n"), Test_Task::task_count_)); ACE_ASSERT (Test_Task::task_count_ >= 0); @@ -115,7 +115,7 @@ int Test_Task::svc (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) svc\n"))); + ACE_TEXT ("(%t) svc\n"))); for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++) { @@ -130,12 +130,12 @@ Test_Task::svc (void) { if (errno == ETIME) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("notify() timed out"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("notify() timed out"))); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("notify")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("notify")), -1); } } @@ -158,7 +158,7 @@ Test_Task::handle_input (ACE_HANDLE) { done_count--; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_input, handled_ = %d, done_count = %d\n"), + ACE_TEXT ("(%t) handle_input, handled_ = %d, done_count = %d\n"), this->handled_, done_count.value ())); } @@ -184,13 +184,13 @@ worker (void *args) { case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("reactor")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("reactor")), 0); /* NOTREACHED */ case 0: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) Reactor shutdown\n")), + ACE_TEXT ("(%t) Reactor shutdown\n")), 0); /* NOTREACHED */ } @@ -207,9 +207,9 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactors_Test")); + ACE_START_TEST (ACE_TEXT ("Reactors_Test")); #if defined (ACE_HAS_THREADS) ACE_ASSERT (ACE_LOG_MSG->op_status () != -1); @@ -237,30 +237,30 @@ main (int, ASYS_TCHAR *[]) (void *) ACE_Reactor::instance (), THR_BOUND | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn")), -1); else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (worker), (void *) &reactor, THR_BOUND | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn")), -1); if (ACE_Thread_Manager::instance ()->wait () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("wait")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("wait")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) all threads are finished \n"))); + ACE_TEXT ("(%t) all threads are finished \n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp index 018b1eddd13..ec796df9ce9 100644 --- a/tests/Reader_Writer_Test.cpp +++ b/tests/Reader_Writer_Test.cpp @@ -65,14 +65,14 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n"))); + ACE_TEXT ("usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n"))); ACE_OS::exit (1); } static void -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("r:w:n:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("r:w:n:")); int c; @@ -100,7 +100,7 @@ parse_args (int argc, ASYS_TCHAR *argv[]) static void * reader (void *) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) reader starting\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) reader starting\n"))); // We use a random pause, around 2msec with 1msec jittering. int usecs = 1000 + ACE_OS::rand() % 2000; @@ -111,10 +111,10 @@ reader (void *) ACE_OS::sleep (pause); ACE_Read_Guard<ACE_RW_Thread_Mutex> g (rw_mutex); // int n = ++current_readers; - // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) I'm reader number %d\n"), n)); + // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) I'm reader number %d\n"), n)); if (current_writers > 0) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writers found!!!\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) writers found!!!\n"))); ACE_thread_t data = shared_data; @@ -124,7 +124,7 @@ reader (void *) if (!ACE_OS::thr_equal (shared_data, data)) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) somebody changed %d to %d\n"), + ACE_TEXT (" (%t) somebody changed %d to %d\n"), data, shared_data)); } @@ -136,7 +136,7 @@ reader (void *) current_writers++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) upgraded to write lock!\n"))); + ACE_TEXT ("(%t) upgraded to write lock!\n"))); ACE_thread_t self = ACE_Thread::self (); @@ -147,7 +147,7 @@ reader (void *) { if (ACE_OS::thr_equal (shared_data, data) == 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) upgraded writer error: somebody changed %d to %d\n"), + ACE_TEXT ("(%t) upgraded writer error: somebody changed %d to %d\n"), data, shared_data)); } @@ -161,19 +161,19 @@ reader (void *) // we were still a reader ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) could not upgrade to write lock!\n"))); + ACE_TEXT ("(%t) could not upgrade to write lock!\n"))); } else // result == -1 { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) failure in upgrading to write lock!\n"), + ACE_TEXT ("(%t) failure in upgrading to write lock!\n"), 1)); } - //ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) done with reading guarded data\n"))); + //ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) done with reading guarded data\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) reader finished %d iterations at %T\n"), + ACE_TEXT ("(%t) reader finished %d iterations at %T\n"), iterations)); } return 0; @@ -185,7 +185,7 @@ reader (void *) static void * writer (void *) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writer starting\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) writer starting\n"))); // We use a random pause, around 2msec with 1msec jittering. int usecs = 1000 + ACE_OS::rand() % 2000; @@ -201,11 +201,11 @@ writer (void *) if (current_writers > 1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) other writers found!!!\n"))); + ACE_TEXT (" (%t) other writers found!!!\n"))); if (current_readers > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) readers found!!!\n"))); + ACE_TEXT (" (%t) readers found!!!\n"))); ACE_thread_t self = ACE_Thread::self (); @@ -217,13 +217,13 @@ writer (void *) if (!ACE_OS::thr_equal (shared_data, self)) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) somebody wrote on my data %d\n"), + ACE_TEXT (" (%t) somebody wrote on my data %d\n"), shared_data)); } current_writers--; - ACE_DEBUG((LM_DEBUG, ASYS_TEXT (" (%t) write %d done at %T\n"), iterations)); + ACE_DEBUG((LM_DEBUG, ACE_TEXT (" (%t) write %d done at %T\n"), iterations)); } return 0; } @@ -245,9 +245,9 @@ template class ACE_Guard<ACE_RW_Mutex>; // Spawn off threads. -int main (int argc, ASYS_TCHAR *argv[]) +int main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Reader_Writer_Test")); + ACE_START_TEST (ACE_TEXT ("Reader_Writer_Test")); #if defined (ACE_HAS_THREADS) parse_args (argc, argv); @@ -256,32 +256,32 @@ int main (int argc, ASYS_TCHAR *argv[]) current_writers = 0; // Possibly already done ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) main thread starting\n"))); + ACE_TEXT (" (%t) main thread starting\n"))); if (ACE_Thread_Manager::instance ()->spawn_n (n_readers, ACE_THR_FUNC (reader), 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), 1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); else if (ACE_Thread_Manager::instance ()->spawn_n (n_writers, ACE_THR_FUNC (writer), 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), 1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main thread\n"))); + ACE_TEXT (" (%t) exiting main thread\n"))); #else ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Recursive_Mutex_Test.cpp b/tests/Recursive_Mutex_Test.cpp index 8bfc818a0e6..8cd882d53d5 100644 --- a/tests/Recursive_Mutex_Test.cpp +++ b/tests/Recursive_Mutex_Test.cpp @@ -47,7 +47,7 @@ recursive_worker (size_t nesting_level, { ACE_ASSERT (rm->acquire () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = acquired, nesting = %d, thread id = %u\n"), + ACE_TEXT ("(%P|%t) = acquired, nesting = %d, thread id = %u\n"), rm->get_nesting_level (), rm->get_thread_id ())); @@ -56,7 +56,7 @@ recursive_worker (size_t nesting_level, ACE_ASSERT (rm->release () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = released, nesting = %d, thread id = %u\n"), + ACE_TEXT ("(%P|%t) = released, nesting = %d, thread id = %u\n"), rm->get_nesting_level (), rm->get_thread_id ())); } @@ -75,9 +75,9 @@ worker (void *arg) #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Recursive_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Recursive_Mutex_Test")); #if defined (ACE_HAS_THREADS) ACE_Recursive_Thread_Mutex rm; @@ -88,7 +88,7 @@ main (int, ASYS_TCHAR *[]) ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("ACE doesn't support recursive process mutexes on this platform\n"))); + ACE_TEXT ("ACE doesn't support recursive process mutexes on this platform\n"))); #endif /* ACE_WIN32 */ ACE_END_TEST; return 0; diff --git a/tests/Reverse_Lock_Test.cpp b/tests/Reverse_Lock_Test.cpp index 6fba4738452..2c88f545d1b 100644 --- a/tests/Reverse_Lock_Test.cpp +++ b/tests/Reverse_Lock_Test.cpp @@ -25,9 +25,9 @@ ACE_RCSID(tests, Reverse_Lock_Test, "$Id$") typedef ACE_Reverse_Lock<ACE_SYNCH_MUTEX> REVERSE_MUTEX; int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reverse_Lock_Test")); + ACE_START_TEST (ACE_TEXT ("Reverse_Lock_Test")); ACE_SYNCH_MUTEX mutex; REVERSE_MUTEX reverse_mutex (mutex); diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp index 0b891511990..0a27717cf0f 100644 --- a/tests/SOCK_Connector_Test.cpp +++ b/tests/SOCK_Connector_Test.cpp @@ -30,14 +30,14 @@ ACE_RCSID(tests, SOCK_Connector_Test, "$Id$") // Attempt a blocking connection to it; if it succeeds, // then the host exists, is reachable, and is up. static u_int -host_is_up (ASYS_TCHAR hostname[]) +host_is_up (ACE_TCHAR hostname[]) { ACE_SOCK_Connector con; ACE_SOCK_Stream sock; // The ACE_INET_Addr construction causes gethostbyname_r // to be called, so we need to copy the hostname. - ASYS_TCHAR test_host[MAXHOSTNAMELEN]; + ACE_TCHAR test_host[MAXHOSTNAMELEN]; ACE_OS::strcpy (test_host, hostname); ACE_INET_Addr another_host ((u_short) 7, test_host); @@ -56,9 +56,9 @@ host_is_up (ASYS_TCHAR hostname[]) // one will do. static void -find_another_host (ASYS_TCHAR other_host[]) +find_another_host (ACE_TCHAR other_host[]) { - static ASYS_TCHAR cached_other_host[MAXHOSTNAMELEN] = {'\0'}; + static ACE_TCHAR cached_other_host[MAXHOSTNAMELEN] = {'\0'}; if (cached_other_host[0] == '\0') { @@ -122,7 +122,7 @@ find_another_host (ASYS_TCHAR other_host[]) static int fail_no_listener_nonblocking (void) { - ASYS_TCHAR test_host[MAXHOSTNAMELEN]; + ACE_TCHAR test_host[MAXHOSTNAMELEN]; int status; ACE_INET_Addr nobody_home; ACE_SOCK_Connector con; @@ -130,11 +130,11 @@ fail_no_listener_nonblocking (void) ACE_Time_Value nonblock (0, 0); find_another_host (test_host); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Testing to host \"%s\"\n"), test_host)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing to host \"%s\"\n"), test_host)); if (nobody_home.set ((u_short) 42000, test_host) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Host lookup for %s %p\n"), - test_host, ASYS_TEXT ("failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Host lookup for %s %p\n"), + test_host, ACE_TEXT ("failed"))); return -1; } @@ -155,22 +155,22 @@ fail_no_listener_nonblocking (void) if (status != -1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Connect which should fail didn't\n"))); + ACE_TEXT ("Connect which should fail didn't\n"))); status = -1; } else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%p\n"), - ASYS_TEXT ("Proper fail"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%p\n"), + ACE_TEXT ("Proper fail"))); status = 0; } } else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Test not executed fully; ") - ASYS_TEXT ("expected EWOULDBLOCK, %p (%d)\n"), - ASYS_TEXT ("not"), errno)); + ACE_TEXT ("Test not executed fully; ") + ACE_TEXT ("expected EWOULDBLOCK, %p (%d)\n"), + ACE_TEXT ("not"), errno)); status = -1; } @@ -190,7 +190,7 @@ fail_no_listener_nonblocking (void) static int succeed_nonblocking (void) { - ASYS_TCHAR test_host[MAXHOSTNAMELEN]; + ACE_TCHAR test_host[MAXHOSTNAMELEN]; int status; ACE_INET_Addr echo_server; ACE_SOCK_Connector con; @@ -198,11 +198,11 @@ succeed_nonblocking (void) ACE_Time_Value nonblock (0, 0); find_another_host (test_host); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Testing to host \"%s\"\n"), test_host)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing to host \"%s\"\n"), test_host)); if (echo_server.set ((u_short) 7, test_host) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Host lookup for %s %p\n"), - test_host, ASYS_TEXT ("failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Host lookup for %s %p\n"), + test_host, ACE_TEXT ("failed"))); return -1; } status = con.connect (sock, echo_server, &nonblock); @@ -211,7 +211,7 @@ succeed_nonblocking (void) if (status == 0 || (status == -1 && errno != EWOULDBLOCK)) { ACE_DEBUG((LM_DEBUG, - ASYS_TEXT ("Immediate success/fail; test not completed\n"))); + ACE_TEXT ("Immediate success/fail; test not completed\n"))); status = 0; } else @@ -226,12 +226,12 @@ succeed_nonblocking (void) if (errno == ECONNREFUSED || errno == ENOTCONN) status = 0; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("%p\n"), - ASYS_TEXT("connect:complete"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT("%p\n"), + ACE_TEXT("connect:complete"))); } else ACE_DEBUG((LM_DEBUG, - ASYS_TEXT("Connect which should succeed, did\n"))); + ACE_TEXT("Connect which should succeed, did\n"))); } // Just in case. @@ -242,9 +242,9 @@ succeed_nonblocking (void) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SOCK_Connector_Test")); + ACE_START_TEST (ACE_TEXT ("SOCK_Connector_Test")); int status = 0; diff --git a/tests/SOCK_Send_Recv_Test.cpp b/tests/SOCK_Send_Recv_Test.cpp index 1d289038f19..18b5e87e6b0 100644 --- a/tests/SOCK_Send_Recv_Test.cpp +++ b/tests/SOCK_Send_Recv_Test.cpp @@ -49,7 +49,7 @@ client (void *arg) ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Connecting to port %d\n"), + ACE_TEXT ("(%P|%t) Connecting to port %d\n"), server_addr.get_port_number())); // Initiate connection with server; don't wait forever @@ -58,14 +58,14 @@ client (void *arg) &timeout) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); Test_Result = 1; return 0; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) connected to %s\n"), + ACE_TEXT ("(%P|%t) connected to %s\n"), server_addr.get_host_name ())); //******************* TEST 1 ****************************** @@ -104,8 +104,8 @@ client (void *arg) if (len == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("Test 1, sendv failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Test 1, sendv failed"))); Test_Result = 1; } else @@ -127,7 +127,8 @@ client (void *arg) if (len != 255) { ACE_ERROR ((LM_ERROR, - "(%P|%t) %p; len is %d, but should be 255!\n", len)); + ACE_TEXT ("(%P|%t) %p; len is %d, but should be 255!\n"), + len)); } ACE_ASSERT (len == 255); @@ -135,7 +136,7 @@ client (void *arg) if (buffer2[i] != buffer[i]) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Test 2, rcvd byte %d is %d, not %d\n"), + ACE_TEXT ("(%P|%t) Test 2, rcvd byte %d is %d, not %d\n"), i, buffer2[i], buffer[i])); Test_Result = 1; } @@ -160,14 +161,14 @@ server (void *arg) &timeout) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("accept"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("accept"))); Test_Result = 1; return 0; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); @@ -197,8 +198,8 @@ server (void *arg) if (len == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("Test 1, recvv failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Test 1, recvv failed"))); Test_Result = 1; } @@ -207,7 +208,7 @@ server (void *arg) if (buffer[i] != i) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Test 1, rcvd byte %d is %d, not %d\n"), + ACE_TEXT ("(%P|%t) Test 1, rcvd byte %d is %d, not %d\n"), i, buffer[i], i)); @@ -245,12 +246,12 @@ spawn (void) if (peer_acceptor.open (ACE_Addr::sap_any) == -1 || peer_acceptor.get_local_addr (server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open"))); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) @@ -258,8 +259,8 @@ spawn (void) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("fork failed"))); /* NOTREACHED */ case 0: client (&server_addr); @@ -276,22 +277,22 @@ spawn (void) ACE_reinterpret_cast (void *, &peer_acceptor), THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), ACE_reinterpret_cast (void *, &server_addr), THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ @@ -300,9 +301,9 @@ spawn (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SOCK_Send_Recv_Test")); + ACE_START_TEST (ACE_TEXT ("SOCK_Send_Recv_Test")); spawn (); diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp index 61629d61a34..20dd1b82bc7 100644 --- a/tests/SOCK_Test.cpp +++ b/tests/SOCK_Test.cpp @@ -38,7 +38,7 @@ client (void *arg) ACE_SOCK_Stream cli_stream; ACE_SOCK_Connector con; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting non-blocking connect\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting non-blocking connect\n"))); // Initiate timed, non-blocking connection with server. // Attempt a non-blocking connect to the server. @@ -46,43 +46,43 @@ client (void *arg) (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) { if (errno != EWOULDBLOCK) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("connection failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("connection failed"))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting timed connect\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting timed connect\n"))); // Check if non-blocking connection is in progress, // and wait up to ACE_DEFAULT_TIMEOUT seconds for it to complete. ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT); if (con.complete (cli_stream, &server_addr, &tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("connection failed")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("connection failed")), 0); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) connected to %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) connected to %s\n"), server_addr.get_host_name ())); } if (cli_stream.disable (ACE_NONBLOCK) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("disable"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("disable"))); // Send data to server (correctly handles "incomplete writes"). for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (cli_stream.send_n (c, 1) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("send_n"))); // Explicitly close the writer-side of the connection. if (cli_stream.close_writer () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close_writer"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("close_writer"))); char buf[1]; // Wait for handshake with server. if (cli_stream.recv_n (buf, 1) != 1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("recv_n"))); // Close the connection completely. if (cli_stream.close () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("close"))); return 0; } @@ -93,7 +93,7 @@ server (void *arg) ACE_SOCK_Acceptor *peer_acceptor = (ACE_SOCK_Acceptor *) arg; if (peer_acceptor->enable (ACE_NONBLOCK) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("enable"))); // Keep these objects out here to prevent excessive constructor // calls... @@ -115,10 +115,10 @@ server (void *arg) ACE_ASSERT (tv == def_timeout); if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("select")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("select")), 0); else if (result == 0) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) select timed out, shutting down\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) select timed out, shutting down\n"))); return 0; } @@ -127,12 +127,12 @@ server (void *arg) while ((result = peer_acceptor->accept (new_stream, &cli_addr)) != -1) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); // Enable non-blocking I/O. if (new_stream.enable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("enable")), 0); handle_set.reset (); handle_set.set_bit (new_stream.get_handle ()); @@ -144,7 +144,7 @@ server (void *arg) if (ACE_OS::select (int (new_stream.get_handle ()) + 1, handle_set, 0, 0, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("select")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("select")), 0); while ((r_bytes = new_stream.recv (buf, 1)) > 0) { @@ -155,23 +155,23 @@ server (void *arg) if (r_bytes == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); + ACE_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); // Handshake back with client. if (new_stream.send_n ("", 1) != 1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("send_n"))); // Close endpoint. if (new_stream.close () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("close"))); return 0; } else if (r_bytes == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) no input available, going back to reading\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) no input available, going back to reading\n"))); else - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("recv_n")), 0); } } } @@ -179,9 +179,9 @@ server (void *arg) if (result == -1) { if (errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) no connections available, shutting down\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) no connections available, shutting down\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("accept"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("accept"))); } return 0; @@ -199,17 +199,17 @@ spawn (void) // Bind listener to any port and then find out what the port was. if (peer_acceptor.open (ACE_Addr::sap_any) == -1 || peer_acceptor.get_local_addr (server_addr) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("open"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("open"))); else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) switch (ACE_OS::fork ("child")) { case -1: - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("fork failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("fork failed"))); /* NOTREACHED */ case 0: client (&server_addr); @@ -222,16 +222,16 @@ spawn (void) #elif defined (ACE_HAS_THREADS) if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) &peer_acceptor, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ peer_acceptor.close (); @@ -239,9 +239,9 @@ spawn (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SOCK_Test")); + ACE_START_TEST (ACE_TEXT ("SOCK_Test")); spawn (); diff --git a/tests/SPIPE_Test.cpp b/tests/SPIPE_Test.cpp index 9e0f08f67cc..d13e9fcdec8 100644 --- a/tests/SPIPE_Test.cpp +++ b/tests/SPIPE_Test.cpp @@ -33,26 +33,26 @@ ACE_RCSID(tests, SPIPE_Test, "$Id$") #if defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) // pipe name to use -static const char *PIPE_NAME = "ace_pipe_name"; +static const ACE_TCHAR *PIPE_NAME = ACE_TEXT ("ace_pipe_name"); static void * client (void *) { - const char *rendezvous = PIPE_NAME; + const ACE_TCHAR *rendezvous = PIPE_NAME; ACE_SPIPE_Stream cli_stream; ACE_SPIPE_Connector con; ACE_OS::sleep (10); - if (con.connect (cli_stream, ACE_SPIPE_Addr (ACE_WIDE_STRING (rendezvous))) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), rendezvous)); + if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1) + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), rendezvous)); for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (cli_stream.send (c, 1) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("send_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("send_n"))); if (cli_stream.close () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("close"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("close"))); #if !defined (ACE_WIN32) ACE_OS::exit (0); @@ -68,27 +68,27 @@ server (void *) char buf[BUFSIZ]; char *t = ACE_ALPHABET; - const char *rendezvous = PIPE_NAME; + const ACE_TCHAR *rendezvous = PIPE_NAME; // Initialize named pipe listener. - if (acceptor.open (ACE_SPIPE_Addr (ACE_WIDE_STRING (rendezvous))) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("open"))); + if (acceptor.open (ACE_SPIPE_Addr (rendezvous)) == -1) + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open"))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiting for connection\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting for connection\n"))); // Accept a client connection if (acceptor.accept (new_stream, 0) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("accept"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("accept"))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Accepted connection\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Accepted connection\n"))); while (new_stream.recv (buf, 1) > 0) { ACE_ASSERT (*t == buf[0]); t++; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("End of connection. Closing handle\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End of connection. Closing handle\n"))); new_stream.close (); acceptor.close (); return 0; @@ -96,16 +96,16 @@ server (void *) #endif /* ACE_HAS_STREAM_PIPES || ACE_WIN32 */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SPIPE_Test")); + ACE_START_TEST (ACE_TEXT ("SPIPE_Test")); #if defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) #if !defined (ACE_LACKS_FORK) switch (ACE_OS::fork ()) { case -1: - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("fork failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n%a"), ACE_TEXT ("fork failed"))); exit (-1); case 0: client (0); @@ -116,18 +116,18 @@ main (int, ASYS_TCHAR *[]) if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n%a"), ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n%a"), ACE_TEXT ("thread create failed"))); ACE_Thread_Manager::instance ()->wait (); #endif /* !ACE_LACKS_EXEC */ #else ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("SPIPE is not supported on this platform\n"))); + ACE_TEXT ("SPIPE is not supported on this platform\n"))); #endif /* ACE_HAS_STREAM_PIPES || ACE_WIN32 */ ACE_END_TEST; return 0; diff --git a/tests/SString_Test.cpp b/tests/SString_Test.cpp index ff406b7b3e4..aec8364fa7e 100644 --- a/tests/SString_Test.cpp +++ b/tests/SString_Test.cpp @@ -24,9 +24,9 @@ ACE_RCSID(tests, SString_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SString_Test")); + ACE_START_TEST (ACE_TEXT ("SString_Test")); { ACE_CString s0 ("hello"); @@ -122,6 +122,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (s1.rfind ('l', 3) == 2); } +#if defined (ACE_HAS_WCHAR) { ACE_WString s0 ("hello"); ACE_WString s1 ("hello"); @@ -168,6 +169,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (s1.rfind ('l') == 3); ACE_ASSERT (s1.rfind ('l', 3) == 2); } +#endif /* ACE_HAS_WCHAR */ ACE_END_TEST; return 0; diff --git a/tests/SV_Shared_Memory_Test.cpp b/tests/SV_Shared_Memory_Test.cpp index 91f6d41eab0..be9447150df 100644 --- a/tests/SV_Shared_Memory_Test.cpp +++ b/tests/SV_Shared_Memory_Test.cpp @@ -110,11 +110,11 @@ child (char *shm) while ((result = mutex.tryacquire ()) == -1) if (errno == EAGAIN) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) spinning in child!\n"))); + ACE_TEXT ("(%P) spinning in child!\n"))); else { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P) child mutex.tryacquire"))); + ACE_TEXT ("(%P) child mutex.tryacquire"))); ACE_ASSERT (result != -1); } @@ -142,9 +142,9 @@ template class ACE_Read_Guard<ACE_SV_Semaphore_Simple>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_HAS_SYSV_IPC */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SV_Shared_Memory_Test")); + ACE_START_TEST (ACE_TEXT ("SV_Shared_Memory_Test")); #if defined (ACE_HAS_SYSV_IPC) && !defined (ACE_LACKS_FORK) && \ !defined(ACE_LACKS_SYSV_SHMEM) @@ -175,7 +175,7 @@ main (int, ASYS_TCHAR *[]) { case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P) fork failed\n")), + ACE_TEXT ("(%P) fork failed\n")), -1); /* NOTREACHED */ case 0: @@ -189,8 +189,8 @@ main (int, ASYS_TCHAR *[]) } #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("SYSV IPC, SYSV SHMEM, or fork ") - ASYS_TEXT ("are not supported on this platform\n"))); + ACE_TEXT ("SYSV IPC, SYSV SHMEM, or fork ") + ACE_TEXT ("are not supported on this platform\n"))); #endif /* ACE_HAS_SYSV_IPC */ ACE_END_TEST; return 0; diff --git a/tests/Semaphore_Test.cpp b/tests/Semaphore_Test.cpp index 5fcc651ece8..49cd5b7b382 100644 --- a/tests/Semaphore_Test.cpp +++ b/tests/Semaphore_Test.cpp @@ -85,9 +85,9 @@ test_timeout (void) if (msecs_diff > ACE_ALLOWED_SLACK) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Timed wait fails length test\n"))); + ACE_TEXT ("Timed wait fails length test\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Value: %d ms, actual %d ms\n"), + ACE_TEXT ("Value: %d ms, actual %d ms\n"), msecs_expected, msecs_waited)); status = -1; @@ -103,14 +103,14 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-s n_release_count] [-w n_workers] [-n iteration_count]\n"))); + ACE_TEXT ("usage: %n [-s n_release_count] [-w n_workers] [-n iteration_count]\n"))); ACE_OS::exit (1); } static void -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("s:w:n:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("s:w:n:")); int c; @@ -156,9 +156,9 @@ worker (void *) if (diff.msec () > ACE_ALLOWED_SLACK) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Acquire fails time reset test\n"))); + ACE_TEXT ("Acquire fails time reset test\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Diff btw now and returned time: %d ms\n"), + ACE_TEXT ("Diff btw now and returned time: %d ms\n"), diff.msec ())); test_result = 1; } @@ -184,9 +184,9 @@ worker (void *) // Test semaphore functionality. -int main (int argc, ASYS_TCHAR *argv[]) +int main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Semaphore_Test")); + ACE_START_TEST (ACE_TEXT ("Semaphore_Test")); #if defined (ACE_HAS_THREADS) parse_args (argc, argv); @@ -208,8 +208,8 @@ int main (int argc, ASYS_TCHAR *argv[]) 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); @@ -218,16 +218,16 @@ int main (int argc, ASYS_TCHAR *argv[]) size_t percent = (timeouts * 100) / (n_workers * n_iterations); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Worker threads timed out %d percent of the time\n"), + ACE_TEXT ("Worker threads timed out %d percent of the time\n"), percent)); # endif /* ACE_HAS_STHREADS && ACE_HAS_POSIX_SEM */ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Semaphore Test successful\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Semaphore Test successful\n"))); #else ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("Threads not supported on this platform\n"))); + ACE_TEXT ("Threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return test_result; diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp index 80f86622ead..dfb72483a29 100644 --- a/tests/Service_Config_Test.cpp +++ b/tests/Service_Config_Test.cpp @@ -86,7 +86,7 @@ Test_Singleton::Test_Singleton (u_short variety) if (variety_ != current_++) { ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("ERROR: instance %u created out of order!\n"), + ACE_TEXT ("ERROR: instance %u created out of order!\n"), variety_)); ++error; } @@ -97,21 +97,21 @@ Test_Singleton::Test_Singleton (u_short variety) Test_Singleton::~Test_Singleton (void) { - /* ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Test_Singleton %u dtor\n"), variety_)); */ + /* ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test_Singleton %u dtor\n"), variety_)); */ if (variety_ != --current_) { ACE_OS::fprintf (stderr, - ASYS_TEXT ("ERROR: instance %u destroyed out of order!\n"), + ACE_TEXT ("ERROR: instance %u destroyed out of order!\n"), variety_); - /* ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("ERROR: instance %u destroyed out of order!\n"), + /* ACE_DEBUG ((LM_ERROR, ACE_TEXT ("ERROR: instance %u destroyed out of order!\n"), variety_)); */ ++error; } } static void -run_test (int argc, ASYS_TCHAR *argv[]) +run_test (int argc, ACE_TCHAR *argv[]) { // We need this scope to make sure that the destructor for the // <ACE_Service_Config> gets called. @@ -125,9 +125,9 @@ run_test (int argc, ASYS_TCHAR *argv[]) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Service_Config_Test")); + ACE_START_TEST (ACE_TEXT ("Service_Config_Test")); for (u_int i = 0; i < VARIETIES; ++i) { @@ -135,7 +135,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (s == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("instance () allocate failed!\n")), + ACE_TEXT ("instance () allocate failed!\n")), 1); } diff --git a/tests/Signal_Test.cpp b/tests/Signal_Test.cpp index d524ec4e2a9..05ebbc9e204 100644 --- a/tests/Signal_Test.cpp +++ b/tests/Signal_Test.cpp @@ -51,7 +51,7 @@ static int handle_signal (int signum) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) received signal %S\n"), + ACE_TEXT ("(%P|%t) received signal %S\n"), signum)); switch (signum) @@ -68,7 +68,7 @@ handle_signal (int signum) case SIGTERM: // Shut down our thread using <ACE_Thread_Manager::exit>. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) shutting down due to %S\n"), + ACE_TEXT ("(%P|%t) shutting down due to %S\n"), signum)); // Signal to the worker thread to shut down. @@ -83,7 +83,7 @@ handle_signal (int signum) // Shutdown the child. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) killing child pid %d \n"), + ACE_TEXT ("(%P|%t) killing child pid %d \n"), child_pid)); int result = ACE_OS::kill (child_pid, SIGTERM); @@ -94,13 +94,13 @@ handle_signal (int signum) /* NOTREACHED */ case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("(%P|%t) %p\n"), "sigwait"), -1); /* NOTREACHED */ default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) signal %S unexpected\n"), + ACE_TEXT ("(%P|%t) signal %S unexpected\n"), signum), -1); /* NOTREACHED */ @@ -130,11 +130,11 @@ synchronous_signal_handler (void *) if (handle_signal (ACE_OS::sigwait (sigset)) == -1) break; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) handled signal\n"))); + ACE_TEXT ("(%P|%t) handled signal\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) synchronous signal handler done\n"))); + ACE_TEXT ("(%P|%t) synchronous signal handler done\n"))); return 0; } @@ -181,7 +181,7 @@ worker_child (void *arg) if (shut_down > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) we've been shutdown!\n"))); + ACE_TEXT ("(%P|%t) we've been shutdown!\n"))); break; } @@ -189,7 +189,7 @@ worker_child (void *arg) if ((i % 100) == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) sleeping for 2 seconds\n"))); + ACE_TEXT ("(%P|%t) sleeping for 2 seconds\n"))); ACE_OS::sleep (2); } @@ -197,15 +197,15 @@ worker_child (void *arg) if ((i % 1000) == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) sending SIGHUP to parent process %d\n"), + ACE_TEXT ("(%P|%t) sending SIGHUP to parent process %d\n"), parent_pid)); int result = ACE_OS::kill (parent_pid, SIGHUP); if (result == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("kill"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("kill"))); ACE_ASSERT (result != -1); } } @@ -214,7 +214,7 @@ worker_child (void *arg) if (handle_signals_synchronously) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) sending SIGINT to ourselves\n"))); + ACE_TEXT ("(%P|%t) sending SIGINT to ourselves\n"))); // We need to do this to dislodge the signal handling thread if // it hasn't shut down on its own accord yet. int result = ACE_OS::kill (ACE_OS::getpid (), @@ -222,7 +222,7 @@ worker_child (void *arg) ACE_ASSERT (result != -1); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) finished running child\n"))); + ACE_TEXT ("(%P|%t) finished running child\n"))); return 0; } @@ -235,8 +235,8 @@ worker_parent (void *arg) ACE_reinterpret_cast (long, arg); ACE_Process_Options options; - ASYS_TCHAR *l_argv[3]; - ASYS_TCHAR pid_str[100]; + ACE_TCHAR *l_argv[3]; + ACE_TCHAR pid_str[100]; // Store the parent's process id so we can pass it to the child // portably. Also, pass the test number, as well. ACE_OS::sprintf (pid_str, @@ -246,12 +246,12 @@ worker_parent (void *arg) // We're going to create a new process that runs this program again, // so we need to indicate that it's the child. - LPCTSTR t = ASYS_TEXT (".") - ACE_DIRECTORY_SEPARATOR_STR - ASYS_TEXT ("Signal_Test") - ACE_PLATFORM_EXE_SUFFIX - ASYS_TEXT (" -c"); - l_argv[0] = ACE_const_cast (ASYS_TCHAR *, + const ACE_TCHAR *t = ACE_TEXT (".") + ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("Signal_Test") + ACE_PLATFORM_EXE_SUFFIX + ACE_TEXT (" -c"); + l_argv[0] = ACE_const_cast (ACE_TCHAR *, t); l_argv[1] = pid_str; l_argv[2] = 0; @@ -264,7 +264,7 @@ worker_parent (void *arg) child_pid = pm.spawn (options); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawning child process %d\n"), + ACE_TEXT ("(%P|%t) spawning child process %d\n"), child_pid)); ACE_ASSERT (child_pid != -1); @@ -277,7 +277,7 @@ worker_parent (void *arg) // Wait for the child process to exit. pm.wait (&status); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reaped child with status %d\n"), + ACE_TEXT ("(%P|%t) reaped child with status %d\n"), status)); } else @@ -286,14 +286,14 @@ worker_parent (void *arg) // Wait for a signal to arrive. if (ACE_OS::sigsuspend (0) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("sigsuspend"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("sigsuspend"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) got signal!\n"))); + ACE_TEXT ("(%P|%t) got signal!\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) parent worker done\n"))); + ACE_TEXT ("(%P|%t) parent worker done\n"))); return 0; } @@ -315,7 +315,7 @@ run_test (ACE_THR_FUNC worker, ACE_Sig_Guard guard; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawning worker thread\n"))); + ACE_TEXT ("(%P|%t) spawning worker thread\n"))); result = ACE_Thread_Manager::instance ()->spawn (worker, ACE_reinterpret_cast (void *, @@ -326,7 +326,7 @@ run_test (ACE_THR_FUNC worker, if (handle_signals_in_separate_thread) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawning signal handler thread\n"))); + ACE_TEXT ("(%P|%t) spawning signal handler thread\n"))); result = ACE_Thread_Manager::instance ()->spawn (synchronous_signal_handler, @@ -391,26 +391,26 @@ parse_args (int argc, char *argv[]) default: ACE_DEBUG ((LM_DEBUG, "(%P|%t) usage:\n" - ASYS_TEXT ("-i <iterations>\n") - ASYS_TEXT ("-c\n") - ASYS_TEXT ("-p <parent_pid>\n") - ASYS_TEXT ("-t <test_number>\n"))); + ACE_TEXT ("-i <iterations>\n") + ACE_TEXT ("-c\n") + ACE_TEXT ("-p <parent_pid>\n") + ACE_TEXT ("-t <test_number>\n"))); break; } } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { if (argc > 1) { - ACE_APPEND_LOG (ASYS_TEXT ("Signal_Test-child")); + ACE_APPEND_LOG (ACE_TEXT ("Signal_Test-child")); parse_args (argc, argv); if (test_number == 1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 1: handle signals synchronously in separate thread\n"))); + ACE_TEXT ("(%P|%t) **** test 1: handle signals synchronously in separate thread\n"))); // First, handle signals synchronously in separate thread. run_test (worker_child, 1, 1); @@ -418,7 +418,7 @@ main (int argc, ASYS_TCHAR *argv[]) else if (test_number == 2) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); // Next, handle signals synchronously in this thread. run_test (worker_child, 0, 1); @@ -426,7 +426,7 @@ main (int argc, ASYS_TCHAR *argv[]) else if (test_number == 3) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); // Finally, handle signals asynchronously in this thread. run_test (worker_child, 0, 0); @@ -436,8 +436,8 @@ main (int argc, ASYS_TCHAR *argv[]) } else { - ACE_START_TEST (ASYS_TEXT ("Signal_Test")); - ACE_INIT_LOG (ASYS_TEXT ("Signal_Test-child")); + ACE_START_TEST (ACE_TEXT ("Signal_Test")); + ACE_INIT_LOG (ACE_TEXT ("Signal_Test-child")); // We need to get the process id here to work around "features" // of Linux threads... @@ -446,7 +446,7 @@ main (int argc, ASYS_TCHAR *argv[]) #if !defined (linux) // Linux threads don't support this use-case very well. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 1: handle signals synchronously in a separate thread\n"))); + ACE_TEXT ("(%P|%t) **** test 1: handle signals synchronously in a separate thread\n"))); test_number++; // Run the parent logic for the signal test, first by handling @@ -458,14 +458,14 @@ main (int argc, ASYS_TCHAR *argv[]) #endif /* linux */ ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); test_number++; // And next by handling synchronously signals in this thread. run_test (worker_parent, 0L, 1L); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); test_number++; // And finally by handling asynchronously signals in this thread. @@ -478,11 +478,11 @@ main (int argc, ASYS_TCHAR *argv[]) #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Signal_Test")); + ACE_START_TEST (ACE_TEXT ("Signal_Test")); ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("The ACE_Process capability is not supported on this platform\n"))); + ACE_TEXT ("The ACE_Process capability is not supported on this platform\n"))); ACE_END_TEST; return 0; } diff --git a/tests/Sigset_Ops_Test.cpp b/tests/Sigset_Ops_Test.cpp index 884e3486e44..c64d1f06f2a 100644 --- a/tests/Sigset_Ops_Test.cpp +++ b/tests/Sigset_Ops_Test.cpp @@ -29,31 +29,31 @@ siglistset(sigset_t x, int *sigset) int empty = 1 ; int retv = 0 ; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Signal(s) in the set = %08x:\n "), x)) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Signal(s) in the set = %08x:\n "), x)) ; for (int i = 1; i < ACE_NSIG; i++) { if ((retv = ACE_OS::sigismember (&x, i)) > 0) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" %d"), i)) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" %d"), i)) ; empty = 0 ; } ACE_ASSERT ((sigset [i] ? retv > 0 : retv <= 0)) ; } if (empty) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Empty!!\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Empty!!\n\n"))) ; } else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n\n"))) ; } } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Sigset_Ops_Test")); + ACE_START_TEST (ACE_TEXT ("Sigset_Ops_Test")); #if defined (ACE_LACKS_SIGSET) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%n uses ACE implementation of sigset*() functions.\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%n uses ACE implementation of sigset*() functions.\n\n"))) ; #else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%n uses platform's native sigset*() functions.\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%n uses platform's native sigset*() functions.\n\n"))) ; #endif sigset_t x ; // examined sigset @@ -107,11 +107,11 @@ main (int, ASYS_TCHAR *[]) // Now testing out of bound signal if (ACE_OS::sigismember (&x, ACE_NSIG) >= 0) { - ACE_ERROR((LM_ERROR, ASYS_TEXT ("Platform doesn't check for valid signal number.\n"))); + ACE_ERROR((LM_ERROR, ACE_TEXT ("Platform doesn't check for valid signal number.\n"))); status = 1; } else if (ACE_OS::last_error() != EINVAL) { - ACE_ERROR((LM_ERROR, ASYS_TEXT ("%p.\n"), ASYS_TEXT ("Expected status EINVAL; got"))); + ACE_ERROR((LM_ERROR, ACE_TEXT ("%p.\n"), ACE_TEXT ("Expected status EINVAL; got"))); status = 1; } @@ -120,7 +120,7 @@ main (int, ASYS_TCHAR *[]) // Currently, I can only think of passing a NULL ptr // If you know other situations that fall into this // catagory, please let me know. Thanks. - ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n"))) ; + ACE_DEBUG ((LM_ERROR, ACE_TEXT ("Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n"))) ; ACE_ASSERT (ACE_OS::sigfillset (NULL) < 0 && ACE_OS::last_error() == EFAULT) ; */ diff --git a/tests/Simple_Message_Block_Test.cpp b/tests/Simple_Message_Block_Test.cpp index 0a02186862e..1e17b86c3b1 100644 --- a/tests/Simple_Message_Block_Test.cpp +++ b/tests/Simple_Message_Block_Test.cpp @@ -26,9 +26,9 @@ ACE_RCSID(tests, Simple_Message_Block_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Simple_Message_Block_Test")); + ACE_START_TEST (ACE_TEXT ("Simple_Message_Block_Test")); { // Checks normal stack deletes. diff --git a/tests/Svc_Handler_Test.cpp b/tests/Svc_Handler_Test.cpp index 31c1f4a1eda..343be6d7a83 100644 --- a/tests/Svc_Handler_Test.cpp +++ b/tests/Svc_Handler_Test.cpp @@ -58,24 +58,24 @@ run_test (SVC_HANDLER &svc_handler, // Note that this is a buffered call! if (svc_handler.put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("put"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("final flush\n"))); + ACE_TEXT ("final flush\n"))); // Make sure to flush everything out before we exit. if (svc_handler.flush () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("flush"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("flush"))); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Svc_Handler_Test")); + ACE_START_TEST (ACE_TEXT ("Svc_Handler_Test")); { size_t max_buffer_size = BUFSIZ; size_t iterations = 10; @@ -94,14 +94,14 @@ main (int argc, ASYS_TCHAR *argv[]) if (connector.connect (file_io, file) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), file.get_path_name ()), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (file_io.unlink () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), file.get_path_name ()), 1); diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 81e783b828d..c9a35869d11 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -77,7 +77,7 @@ cleanup (void *ptr) // core dump on LynxOS 2.5.0. ACE_UNUSED_ARG (ptr); #else /* ! ACE_HAS_PTHREADS_DRAFT4 */ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in cleanup, ptr = %x\n"), ptr)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in cleanup, ptr = %x\n"), ptr)); #endif /* ! ACE_HAS_PTHREADS_DRAFT4 */ operator delete (ptr); @@ -92,7 +92,7 @@ worker (void *c) // size as a long on all current ACE platforms. int count = (int) (long) c; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) worker, iterations = %d\n"), count)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) worker, iterations = %d\n"), count)); ACE_thread_key_t key = ACE_OS::NULL_key; int *ip = 0; @@ -102,43 +102,43 @@ worker (void *c) if (ACE_Thread::keycreate (&key, cleanup) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no keys available)\n"), - ASYS_TEXT ("ACE_Thread::keycreate"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p (no keys available)\n"), + ACE_TEXT ("ACE_Thread::keycreate"))); return (void *) -1; } ACE_NEW_RETURN (ip, int, 0); if (ACE_Thread::setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); for (int i = 0; i < count; i++) { if (ACE_Thread::keycreate (&key, cleanup) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no more keys)\n"), - ASYS_TEXT ("ACE_Thread::keycreate"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p (no more keys)\n"), + ACE_TEXT ("ACE_Thread::keycreate"))); break; } ACE_NEW_RETURN (ip, int, 0); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in worker at location 1, ") - ASYS_TEXT ("key = %d, ip = %x\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in worker at location 1, ") + ACE_TEXT ("key = %d, ip = %x\n"), key, ip)); if (ACE_Thread::setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); if (ACE_Thread::getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::getspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::getspecific"))); if (ACE_Thread::setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); #if ! defined (ACE_HAS_PTHREADS_DRAFT4) // See comment in cleanup () above. @@ -146,8 +146,8 @@ worker (void *c) #endif /* ! ACE_HAS_PTHREADS_DRAFT4 */ if (ACE_Thread::keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::keyfree"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::keyfree"))); // Cause an error. ACE_OS::read (ACE_INVALID_HANDLE, 0, 0); @@ -180,8 +180,8 @@ worker (void *c) ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, output_lock, 0)); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("use of ACE_TSS_Type_Adapter failed, value ") - ASYS_TEXT ("is %u, it should be 37!\n"), + ACE_TEXT ("use of ACE_TSS_Type_Adapter failed, value ") + ACE_TEXT ("is %u, it should be 37!\n"), (*u)->operator u_int ())); ++errors; } @@ -192,28 +192,28 @@ worker (void *c) if (ACE_Thread::keycreate (&key, cleanup) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no more keys)\n"), - ASYS_TEXT ("ACE_Thread::keycreate"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p (no more keys)\n"), + ACE_TEXT ("ACE_Thread::keycreate"))); break; } ACE_NEW_RETURN (ip, int, 0); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in worker at location 2, ") - ASYS_TEXT ("key = %d, ip = %x\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in worker at location 2, ") + ACE_TEXT ("key = %d, ip = %x\n"), key, ip)); if (ACE_Thread::setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); if (ACE_Thread::getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::getspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::getspecific"))); if (ACE_Thread::setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); #if !defined (ACE_HAS_PTHREADS_DRAFT4) // See comment in cleanup () above. @@ -221,8 +221,8 @@ worker (void *c) #endif /* ! ACE_HAS_PTHREADS_DRAFT4 */ if (ACE_Thread::keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::keyfree"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::keyfree"))); #endif /* ! __Lynx__ || ACE_HAS_TSS_EMULATION */ } @@ -243,9 +243,9 @@ template class ACE_TSS<ACE_TSS_Type_Adapter<u_int> >; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("TSS_Test")); + ACE_START_TEST (ACE_TEXT ("TSS_Test")); #if defined (ACE_HAS_THREADS) Errno::allocate_lock (); @@ -269,7 +269,7 @@ main (int, ASYS_TCHAR *[]) (void *) ITERATIONS, THR_BOUND) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn_n")), 1); + ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); @@ -279,7 +279,7 @@ main (int, ASYS_TCHAR *[]) Errno::deallocate_lock (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads are not supported on this platform\n"))); + ACE_TEXT ("threads are not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/Task_Test.cpp b/tests/Task_Test.cpp index 23e746b2bc9..af6ab9abdf4 100644 --- a/tests/Task_Test.cpp +++ b/tests/Task_Test.cpp @@ -63,7 +63,7 @@ Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, { // Create worker threads. if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("activate failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("activate failed"))); } void * @@ -71,7 +71,7 @@ My_Thread_Hook::start (ACE_THR_FUNC func, void *arg) { ACE_DEBUG ((LM_DEBUG, - "(%t) starting the thread!\n")); + ACE_TEXT ("(%t) starting the thread!\n"))); return (func) (arg); } @@ -86,7 +86,7 @@ Barrier_Task::svc (void) iterations++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d\n"), + ACE_TEXT ("(%t) in iteration %d\n"), iterations)); // Block until all other threads have waited, then continue. @@ -102,9 +102,9 @@ Barrier_Task::svc (void) #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Task_Test")); + ACE_START_TEST (ACE_TEXT ("Task_Test")); #if defined (ACE_HAS_THREADS) // Set the thread hook! @@ -122,7 +122,7 @@ main (int, ASYS_TCHAR *[]) delete ACE_Thread_Hook::thread_hook (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp index ef71f96e00d..f06e3d45603 100644 --- a/tests/Thread_Manager_Test.cpp +++ b/tests/Thread_Manager_Test.cpp @@ -86,7 +86,7 @@ static void * worker (int iterations) { #if defined (VXWORKS) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) %s: stack size is %u\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) %s: stack size is %u\n"), ACE_OS::thr_self (), ACE_OS::thr_min_stack ())); #endif /* VXWORKS */ @@ -102,7 +102,7 @@ worker (int iterations) thread_start->wait (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) worker starting loop\n"))); + ACE_TEXT ("(%t) worker starting loop\n"))); for (int i = 0; i < iterations; i++) { @@ -112,14 +112,14 @@ worker (int iterations) if (been_signalled (t_id)) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) had received signal\n"))); + ACE_TEXT ("(%t) had received signal\n"))); // Only test for cancellation after we've been signaled, // to avoid race conditions for suspend() and resume(). if (thr_mgr->testcancel (ACE_Thread::self ()) != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) has been cancelled " + ACE_TEXT ("(%t) has been cancelled " "before iteration %d!\n"), i)); break; @@ -129,8 +129,8 @@ worker (int iterations) if (thr_mgr->testcancel (ACE_Thread::self ()) != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) has been cancelled " - "before iteration %d!\n"), + ACE_TEXT ("(%t) has been cancelled ") + ACE_TEXT ("before iteration %d!\n"), i)); break; } @@ -148,9 +148,9 @@ static const int DEFAULT_ITERATIONS = 10000; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Manager_Test")); int status = 0; #if defined (ACE_HAS_THREADS) @@ -200,7 +200,7 @@ main (int, ASYS_TCHAR *[]) char[32], -1); ACE_OS::sprintf (thread_name[i], - ASYS_TEXT ("thread%u"), + ACE_TEXT ("thread%u"), i); } else @@ -233,15 +233,15 @@ main (int, ASYS_TCHAR *[]) // Wait for 1 second and then suspend every thread in the group. ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) suspending group\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) suspending group\n"))); if (thr_mgr->suspend_grp (grp_id) == -1) { // Pthreads w/o UNIX 98 extensions doesn't support suspend/resume, // so it's allowed to ENOTSUP; anything else is a hard fail. ACE_ASSERT (errno == ENOTSUP); ACE_DEBUG((LM_DEBUG, - ASYS_TEXT (" OK: suspend_grp isn't supported with ") - ASYS_TEXT ("Pthreads\n"))); + ACE_TEXT (" OK: suspend_grp isn't supported with ") + ACE_TEXT ("Pthreads\n"))); } // Wait for 1 more second and then resume every thread in the @@ -249,14 +249,14 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (ACE_Time_Value (1)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) resuming group\n"))); + ACE_TEXT ("(%t) resuming group\n"))); if (thr_mgr->resume_grp (grp_id) == -1) { ACE_ASSERT (errno == ENOTSUP); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" OK: resume_grp isn't supported with ") - ASYS_TEXT ("Pthreads\n"))); + ACE_TEXT (" OK: resume_grp isn't supported with ") + ACE_TEXT ("Pthreads\n"))); } // Wait for 1 more second and then send a SIGINT to every thread in @@ -264,7 +264,7 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (ACE_Time_Value (1)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) signaling group\n"))); + ACE_TEXT ("(%t) signaling group\n"))); #if defined (ACE_HAS_WTHREADS) thr_mgr->kill_grp (grp_id, @@ -287,7 +287,7 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (ACE_Time_Value (1)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) cancelling group\n"))); + ACE_TEXT ("(%t) cancelling group\n"))); ACE_ASSERT (thr_mgr->cancel_grp (grp_id) != -1); @@ -299,16 +299,16 @@ main (int, ASYS_TCHAR *[]) { if (errno == ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + ACE_TEXT ("maximum wait time of %d msec exceeded\n"), max_wait.msec ())); else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), ASYS_TEXT ("wait"))); + ACE_TEXT ("%p\n"), ACE_TEXT ("wait"))); status = -1; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) main thread finished\n"))); + ACE_TEXT ("(%t) main thread finished\n"))); #if defined (VXWORKS) for (i = 0; i < n_threads - 1; ++i) @@ -328,7 +328,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/Thread_Mutex_Test.cpp b/tests/Thread_Mutex_Test.cpp index 24d6b5484cc..e847f34fae9 100644 --- a/tests/Thread_Mutex_Test.cpp +++ b/tests/Thread_Mutex_Test.cpp @@ -34,12 +34,12 @@ test (void *args) for (size_t i = 0; i < ACE_MAX_ITERATIONS / 2; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = trying to acquire on iteration %d\n"), + ACE_TEXT ("(%P|%t) = trying to acquire on iteration %d\n"), i)); int result = mutex->acquire (); ACE_ASSERT (result == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = acquired on iteration %d\n"), + ACE_TEXT ("(%P|%t) = acquired on iteration %d\n"), i)); // Sleep for a random amount of time between 0 and 2 seconds. @@ -50,7 +50,7 @@ test (void *args) result = mutex->release (); ACE_ASSERT (result == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = released on iteration %d\n"), + ACE_TEXT ("(%P|%t) = released on iteration %d\n"), i)); } @@ -69,22 +69,22 @@ spawn (void) (void *) &mutex, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("%p\n%a"), + ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Mutex_Test")); spawn (); diff --git a/tests/Thread_Pool_Reactor_Test.cpp b/tests/Thread_Pool_Reactor_Test.cpp index a1f7e5e8dbd..a56c3e05816 100644 --- a/tests/Thread_Pool_Reactor_Test.cpp +++ b/tests/Thread_Pool_Reactor_Test.cpp @@ -56,7 +56,7 @@ typedef ACE_Strategy_Acceptor <Request_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR; // Accepting end point. This is actually "localhost:10010", but some // platform couldn't resolve the name so we use the IP address // directly here. -static const ASYS_TCHAR *rendezvous = ASYS_TEXT ("127.0.0.1:10010"); +static const ACE_TCHAR *rendezvous = ACE_TEXT ("127.0.0.1:10010"); // Total number of server threads. static size_t svr_thrno = ACE_MAX_THREADS; @@ -81,9 +81,9 @@ static size_t cli_req_no = ACE_MAX_THREADS ACE_LOAD_FACTOR; static int req_delay = 50; static void -parse_arg (int argc, ASYS_TCHAR *argv[]) +parse_arg (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("r:s:c:d:i:n:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("r:s:c:d:i:n:")); int c; @@ -111,10 +111,10 @@ parse_arg (int argc, ASYS_TCHAR *argv[]) break; default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Usage: Thread_Pool_Reactor_Test [-r <hostname:port#>]") - ASYS_TEXT ("\t[-s <server thr#>] [-c <client thr#>] [-d <delay>]") - ASYS_TEXT ("\t[-i <client conn attempt#>]") - ASYS_TEXT ("[-n <client request# per conn>]\n"))); + ACE_TEXT ("Usage: Thread_Pool_Reactor_Test [-r <hostname:port#>]") + ACE_TEXT ("\t[-s <server thr#>] [-c <client thr#>] [-d <delay>]") + ACE_TEXT ("\t[-i <client conn attempt#>]") + ACE_TEXT ("[-n <client request# per conn>]\n"))); break; } } @@ -132,10 +132,10 @@ Request_Handler::Request_Handler (ACE_Thread_Manager *thr_mgr) int Request_Handler::handle_input (ACE_HANDLE fd) { - ASYS_TCHAR buffer[BUFSIZ]; - ASYS_TCHAR len = 0; + ACE_TCHAR buffer[BUFSIZ]; + ACE_TCHAR len = 0; ssize_t result = this->peer ().recv (&len, - sizeof (ASYS_TCHAR)); + sizeof (ACE_TCHAR)); if (result > 0 && this->peer ().recv_n (buffer, len) == len) @@ -143,17 +143,17 @@ Request_Handler::handle_input (ACE_HANDLE fd) ++this->nr_msgs_rcvd_; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) svr input; fd: 0x%x; input: %s\n"), + ACE_TEXT ("(%t) svr input; fd: 0x%x; input: %s\n"), fd, buffer)); if (ACE_OS::strcmp (buffer, - ASYS_TEXT ("shutdown")) == 0) + ACE_TEXT ("shutdown")) == 0) ACE_Reactor::end_event_loop (); return 0; } else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Request_Handler: end handle input (0x%x)\n"), + ACE_TEXT ("(%t) Request_Handler: end handle input (0x%x)\n"), fd)); return -1; } @@ -162,12 +162,12 @@ int Request_Handler::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) svr close; fd: 0x%x, rcvd %d msgs\n"), + ACE_TEXT ("(%t) svr close; fd: 0x%x, rcvd %d msgs\n"), fd, this->nr_msgs_rcvd_)); if (this->nr_msgs_rcvd_ != cli_req_no) ACE_ERROR((LM_ERROR, - ASYS_TEXT ("(%t) Expected %d messages; got %d\n"), + ACE_TEXT ("(%t) Expected %d messages; got %d\n"), cli_req_no, this->nr_msgs_rcvd_)); this->destroy (); @@ -182,16 +182,16 @@ svr_worker (void *) while (!ACE_Reactor::event_loop_done ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handling events ....\n"))); + ACE_TEXT ("(%t) handling events ....\n"))); if (ACE_Reactor::instance ()->handle_events () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("Error handling events"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("Error handling events"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) I am done handling events. Bye, bye\n"))); + ACE_TEXT ("(%t) I am done handling events. Bye, bye\n"))); return 0; } @@ -203,30 +203,30 @@ cli_worker (void *arg) ACE_SOCK_Stream stream; ACE_SOCK_Connector connect; ACE_Time_Value delay (0, req_delay); - size_t len = * ACE_reinterpret_cast (ASYS_TCHAR *, arg); + size_t len = * ACE_reinterpret_cast (ACE_TCHAR *, arg); for (size_t i = 0 ; i < cli_conn_no; i++) { if (connect.connect (stream, addr) < 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("connect"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("connect"))); continue; } for (size_t j = 0; j < cli_req_no; j++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) conn_worker handle 0x%x, req %d\n"), + ACE_TEXT ("(%t) conn_worker handle 0x%x, req %d\n"), stream.get_handle (), j+1)); if (stream.send_n (arg, - len + sizeof (ASYS_TCHAR)) == -1) + len + sizeof (ACE_TCHAR)) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("send_n"))); continue; } ACE_OS::sleep (delay); @@ -242,15 +242,15 @@ static void * worker (void *) { ACE_OS::sleep (3); - const ASYS_TCHAR *msg = ASYS_TEXT ("Message from Connection worker"); - ASYS_TCHAR buf [BUFSIZ]; - buf[0] = (ACE_OS::strlen (msg) + 1) * sizeof (ASYS_TCHAR); + const ACE_TCHAR *msg = ACE_TEXT ("Message from Connection worker"); + ACE_TCHAR buf [BUFSIZ]; + buf[0] = (ACE_OS::strlen (msg) + 1) * sizeof (ACE_TCHAR); ACE_OS::strcpy (&buf[1], msg); ACE_INET_Addr addr (rendezvous); ACE_DEBUG((LM_DEBUG, - ASYS_TEXT ("(%t) Spawning %d client threads...\n"), + ACE_TEXT ("(%t) Spawning %d client threads...\n"), cli_thrno)); int grp = ACE_Thread_Manager::instance ()->spawn_n (cli_thrno, &cli_worker, @@ -260,25 +260,25 @@ worker (void *) ACE_Thread_Manager::instance ()->wait_grp (grp); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Client threads done; shutting down...\n"))); + ACE_TEXT ("(%t) Client threads done; shutting down...\n"))); ACE_SOCK_Stream stream; ACE_SOCK_Connector connect; if (connect.connect (stream, addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p Error while connecting\n"), - ASYS_TEXT ("connect"))); + ACE_TEXT ("(%t) %p Error while connecting\n"), + ACE_TEXT ("connect"))); const char *sbuf = "\011shutdown"; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("shutdown stream handle = %x\n"), + ACE_TEXT ("shutdown stream handle = %x\n"), stream.get_handle ())); if (stream.send_n (sbuf, ACE_OS::strlen (sbuf) + 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("send_n"))); stream.close (); @@ -286,9 +286,9 @@ worker (void *) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Reactor_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); parse_arg (argc, argv); // Changed the default @@ -301,12 +301,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (acceptor.open (accept_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 1); ACE_DEBUG((LM_DEBUG, - ASYS_TEXT ("(%t) Spawning %d server threads...\n"), + ACE_TEXT ("(%t) Spawning %d server threads...\n"), svr_thrno)); ACE_Thread_Manager::instance ()->spawn_n (svr_thrno, svr_worker); @@ -338,12 +338,12 @@ template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Reactor_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index 68fa98bab5b..0efeb6137dc 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -90,7 +90,7 @@ int Thread_Pool::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) worker thread closing down\n"))); + ACE_TEXT ("(%t) worker thread closing down\n"))); return 0; } @@ -129,8 +129,8 @@ Thread_Pool::svc (void) { // The queue has been deactivated, so let's bail out. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, ") - ASYS_TEXT ("queue deactivated, exiting\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, ") + ACE_TEXT ("queue deactivated, exiting\n"), count, this->msg_queue ()->message_count ())); @@ -141,8 +141,8 @@ Thread_Pool::svc (void) if (length > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, ") - ASYS_TEXT ("length = %d, text = \"%*s\"\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, ") + ACE_TEXT ("length = %d, text = \"%*s\"\n"), count, this->msg_queue ()->message_count (), length, @@ -155,8 +155,8 @@ Thread_Pool::svc (void) if (length == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, ") - ASYS_TEXT ("got \"empty\" message, exiting\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, ") + ACE_TEXT ("got \"empty\" message, exiting\n"), count, this->msg_queue ()->message_count ())); break; @@ -172,15 +172,15 @@ int Thread_Pool::open (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) producer start, dumping the Thread_Pool\n"))); + ACE_TEXT ("(%t) producer start, dumping the Thread_Pool\n"))); this->dump (); // Create a pool of worker threads. if (this->activate (THR_NEW_LWP, this->n_threads_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("activate failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("activate failed")), -1); return 0; } @@ -219,7 +219,8 @@ Thread_Pool::test_queue_deactivation_shutdown (void) if (manual) { ACE_DEBUG ((LM_DEBUG, - "(%t) enter a new message for the task pool...")); + ACE_TEXT ("(%t) enter a new message for ") + ACE_TEXT ("the task pool..."))); n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); @@ -246,13 +247,13 @@ Thread_Pool::test_queue_deactivation_shutdown (void) { // Send a normal message to the waiting threads and continue // producing. - mb->wr_ptr (n * sizeof (ASYS_TCHAR)); + mb->wr_ptr (n * sizeof (ACE_TCHAR)); // Pass the message to the Thread_Pool. if (this->put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } else { @@ -262,8 +263,8 @@ Thread_Pool::test_queue_deactivation_shutdown (void) mb->release (); // Deactivate the message queue and return. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) deactivating queue for %d threads, ") - ASYS_TEXT ("dump of task:\n"), + ACE_TEXT ("\n(%t) deactivating queue for %d threads, ") + ACE_TEXT ("dump of task:\n"), this->thr_count ())); this->dump (); @@ -308,7 +309,8 @@ Thread_Pool::test_empty_message_shutdown (void) if (manual) { ACE_DEBUG ((LM_DEBUG, - "(%t) enter a new message for the task pool...")); + ACE_TEXT ("(%t) enter a new message for ") + ACE_TEXT ("the task pool..."))); n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); @@ -335,20 +337,20 @@ Thread_Pool::test_empty_message_shutdown (void) { // Send a normal message to the waiting threads and continue // producing. - mb->wr_ptr (n * sizeof (ASYS_TCHAR)); + mb->wr_ptr (n * sizeof (ACE_TCHAR)); // Pass the message to the Thread_Pool. if (this->put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } else { // Send a shutdown message to the waiting threads and return. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) sending shutdown message to %d threads, ") - ASYS_TEXT ("dump of task:\n"), + ACE_TEXT ("\n(%t) sending shutdown message to %d threads, ") + ACE_TEXT ("dump of task:\n"), this->thr_count ())); this->dump (); @@ -361,8 +363,8 @@ Thread_Pool::test_empty_message_shutdown (void) i--) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) end of input, ") - ASYS_TEXT ("enqueueing \"empty\" message %d\n"), + ACE_TEXT ("(%t) end of input, ") + ACE_TEXT ("enqueueing \"empty\" message %d\n"), i)); // Note the use of reference counting to avoid copying @@ -371,14 +373,14 @@ Thread_Pool::test_empty_message_shutdown (void) if (this->put (dup) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } mb->release (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) end loop, dump of task:\n"))); + ACE_TEXT ("\n(%t) end loop, dump of task:\n"))); this->dump (); return 0; @@ -395,9 +397,9 @@ template class ACE_Lock_Adapter<ACE_Thread_Mutex>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Pool_Test")); #if defined (ACE_HAS_THREADS) int n_threads = ACE_MAX_THREADS; @@ -406,11 +408,11 @@ main (int, ASYS_TCHAR *[]) Thread_Pool thread_pool (n_threads); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running test with %d threads\n"), + ACE_TEXT ("(%t) running test with %d threads\n"), n_threads)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting empty message shutdown test\n"))); + ACE_TEXT ("(%t) starting empty message shutdown test\n"))); // Activate the task's thread pool, produce the messages that are, // produce the messages that are consumed by the threads in the @@ -420,7 +422,7 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n"))); + ACE_TEXT ("(%t) waiting for worker tasks to finish...\n"))); // Wait for all the threads to reach their exit point, at which // point the barrier in the destructor of the <ACE_Task> portion of // <Thread_Pool> will return. @@ -428,7 +430,7 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting queue deactivation shutdown test\n"))); + ACE_TEXT ("(%t) starting queue deactivation shutdown test\n"))); // Activate the task's thread pool, produce the messages that are // consumed by the threads in the thread pool, and demonstate how to @@ -437,7 +439,7 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n"))); + ACE_TEXT ("(%t) waiting for worker tasks to finish...\n"))); // Wait for all the threads to reach their exit point, at which // point the barrier in the destructor of the <ACE_Task> portion of // <Thread_Pool> will return. @@ -445,10 +447,10 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) all worker tasks destroyed, exiting test...\n"))); + ACE_TEXT ("(%t) all worker tasks destroyed, exiting test...\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp index 84228df9573..46f10b82542 100644 --- a/tests/Time_Service_Test.cpp +++ b/tests/Time_Service_Test.cpp @@ -34,13 +34,13 @@ ACE_TEXT ("main") ACE_PLATFORM_EXE_SUFFIX \ ACE_TEXT (" -f ") ACE_PLATFORM int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Time_Service_Test")); + ACE_START_TEST (ACE_TEXT ("Time_Service_Test")); #if defined (ACE_LACKS_FORK) && !defined (ACE_WIN32) ACE_ERROR ((LM_INFO, - ASYS_TEXT ("fork is not supported on this platform\n"))); + ACE_TEXT ("fork is not supported on this platform\n"))); #else /* ! ACE_LACKS_FORK || ACE_WIN32 */ // Make sure that the backing store is not there. We need to make @@ -48,7 +48,7 @@ main (int, ASYS_TCHAR *[]) // the Clerk is not allowed to do a graceful shutdown. By cleaning // the backing store here, we are sure that we get a fresh start and // no garbage data from a possible aborted run - TCHAR backing_store[MAXPATHLEN + 1]; + ACE_TCHAR backing_store[MAXPATHLEN + 1]; #if defined (ACE_DEFAULT_BACKING_STORE) // Create a temporary file. @@ -59,8 +59,8 @@ main (int, ASYS_TCHAR *[]) MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Temporary path too long, ") - ASYS_TEXT ("defaulting to current directory\n"))); + ACE_TEXT ("Temporary path too long, ") + ACE_TEXT ("defaulting to current directory\n"))); backing_store[0] = 0; } @@ -72,45 +72,45 @@ main (int, ASYS_TCHAR *[]) ACE_OS::unlink (backing_store); - LPCTSTR server_cl = APPLICATION ACE_TEXT ("server.conf"); + const ACE_TCHAR *server_cl = APPLICATION ACE_TEXT ("server.conf"); ACE_Process_Options server_options; server_options.command_line (server_cl); ACE_Process server; if (server.spawn (server_options) == -1) ACE_ERROR_RETURN ((LM_DEBUG, - ASYS_TEXT ("%n; %p (%s).\n"), - ASYS_TEXT ("Server fork failed"), + ACE_TEXT ("%n; %p (%s).\n"), + ACE_TEXT ("Server fork failed"), server_cl), -1); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Server forked with pid = %d.\n"), + ACE_TEXT ("Server forked with pid = %d.\n"), server.getpid ())); ACE_OS::sleep (3); - LPCTSTR clerk_cl = APPLICATION ACE_TEXT ("clerk.conf"); + const ACE_TCHAR *clerk_cl = APPLICATION ACE_TEXT ("clerk.conf"); ACE_Process_Options clerk_options; clerk_options.command_line (clerk_cl); ACE_Process clerk; if (clerk.spawn (clerk_options) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%n; %p: (%s).\n"), - ASYS_TEXT ("Clerk fork failed"), clerk_cl), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%n; %p: (%s).\n"), + ACE_TEXT ("Clerk fork failed"), clerk_cl), -1); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Clerk forked with pid = %d.\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Clerk forked with pid = %d.\n"), clerk.getpid ())); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Sleeping...\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sleeping...\n"))); ACE_OS::sleep (10); if (clerk.terminate () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Terminate failed for clerk.\n")), + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Terminate failed for clerk.\n")), -1); if (server.terminate () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Terminate failed for server.\n")), + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Terminate failed for server.\n")), -1); // Because we kill the clerk process, on Win32 it may not do a diff --git a/tests/Time_Value_Test.cpp b/tests/Time_Value_Test.cpp index b1b6f396dc8..15e828257fc 100644 --- a/tests/Time_Value_Test.cpp +++ b/tests/Time_Value_Test.cpp @@ -51,7 +51,7 @@ ACE_RCSID(tests, Time_Value_Test, "$Id$") #if defined (sun) && !defined (ACE_LACKS_LONGLONG_T) static u_long -check_ace_u_longlong (const ASYS_TCHAR *const name, +check_ace_u_longlong (const ACE_TCHAR *const name, const ACE_U_LongLong ull, const u_long hi, const u_long lo) @@ -60,8 +60,8 @@ check_ace_u_longlong (const ASYS_TCHAR *const name, return 0; else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%s; hi: %x, should be %x; ") - ASYS_TEXT ("lo: %x, should be %x.\n"), + ACE_TEXT ("%s; hi: %x, should be %x; ") + ACE_TEXT ("lo: %x, should be %x.\n"), name, ull.hi (), hi, ull.lo (), lo), 1); } @@ -73,101 +73,101 @@ test_ace_u_longlong (void) u_long errors = 0; ACE_U_LongLong ull1 (0x21,1); - errors += check_ace_u_longlong (ASYS_TEXT ("ull1"), ull1, 1, 0x21); + errors += check_ace_u_longlong (ACE_TEXT ("ull1"), ull1, 1, 0x21); ACE_U_LongLong ull2 (0x20,2); - errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 2, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 2, 0x20); ull2 -= ull1; - errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 0, 0xfffffffful); + errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 0, 0xfffffffful); ull2 += ull1; - errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 2, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 2, 0x20); ACE_U_LongLong ull3 = ull1 + ull1; - errors += check_ace_u_longlong (ASYS_TEXT ("ull3"), ull3, 2, 0x42); + errors += check_ace_u_longlong (ACE_TEXT ("ull3"), ull3, 2, 0x42); ACE_U_LongLong ull4 = ACE_U_LongLong (0x1111, 0) - ACE_U_LongLong (0x1112, 0); - errors += check_ace_u_longlong (ASYS_TEXT ("ull4"), ull4, 0xfffffffful, 0xfffffffful); + errors += check_ace_u_longlong (ACE_TEXT ("ull4"), ull4, 0xfffffffful, 0xfffffffful); ACE_U_LongLong ull5 = ACE_U_LongLong (0x1111, 1) - ACE_U_LongLong (0x1112, 0); - errors += check_ace_u_longlong (ASYS_TEXT ("ull5"), ull5, 0, 0xfffffffful); + errors += check_ace_u_longlong (ACE_TEXT ("ull5"), ull5, 0, 0xfffffffful); ++ull5; - errors += check_ace_u_longlong (ASYS_TEXT ("ull5"), ull5, 1, 0); + errors += check_ace_u_longlong (ACE_TEXT ("ull5"), ull5, 1, 0); ACE_U_LongLong ull6 = ull2 + ACE_U_LongLong (0, 1); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 3, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 3, 0x20); ull6 += ACE_U_LongLong (0xffffffff, 0xfff0); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 0xfff4, 0x1f); + errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 0xfff4, 0x1f); ++ull6; - errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 0xfff4, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 0xfff4, 0x20); // The hi part of ull6 will be lost in the following, because // the quotient has only 32 bits. - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 / 1"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 / 1"), (ACE_U_LongLong) (ull6 / 1u), 0, 0x20); // There's apparently a small loss in precision in // ACE_U_LongLong::operator/. It calculates // ull6 / 0xd0000 as 0x13b013b4 instead of 0x13b04ec4. - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 / 0x10000 / 0xd"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 / 0x10000 / 0xd"), (ACE_U_LongLong) (ull6 / 0x10000u / 0xd), 0, 0x13b04ec4); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 % 5"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 % 5"), (ACE_U_LongLong) (ull6 % 5), 0, 1); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 % 0x20007"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 % 0x20007"), (ACE_U_LongLong) (ull6 % 0x20007), 0, 0x3f63); ACE_U_LongLong ull7 (12); ull7 *= 3125; - errors += check_ace_u_longlong (ASYS_TEXT ("12 * 3125"), + errors += check_ace_u_longlong (ACE_TEXT ("12 * 3125"), ull7, 0, 37500); ull7 *= 100; - errors += check_ace_u_longlong (ASYS_TEXT ("37500 * 100"), + errors += check_ace_u_longlong (ACE_TEXT ("37500 * 100"), ull7, 0, 3750000); - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 << 16"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 << 16"), ull7 << 16 , 0x39, 0x38700000); - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 >> 16"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 >> 16"), ull7 >> 16, 0, 0x39); ull7 <<= 32; - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 <<= 32"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 <<= 32"), ull7, 3750000, 0); ull7 >>= 12; - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 <<= 32 >>= 15"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 <<= 32 >>= 15"), ull7, 0x393, 0x87000000); ACE_U_LongLong ull8 (0x0f0f, 0xf0f0); ACE_U_LongLong ull9 (0xf0f0, 0xf0f0); ull8 |= ull9; - errors += check_ace_u_longlong (ASYS_TEXT ("ull8 |= ull9"), + errors += check_ace_u_longlong (ACE_TEXT ("ull8 |= ull9"), ull8, 0xf0f0, 0xffff); ull9.lo (0x5678); ull9.hi (0x1234); ull8 &= ull9; - errors += check_ace_u_longlong (ASYS_TEXT ("ull8 &= 0x12345678"), + errors += check_ace_u_longlong (ACE_TEXT ("ull8 &= 0x12345678"), ull9, 0x1234, 0x5678); @@ -177,11 +177,11 @@ test_ace_u_longlong (void) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { int ret = 0; - ACE_START_TEST (ASYS_TEXT ("Time_Value_Test")); + ACE_START_TEST (ACE_TEXT ("Time_Value_Test")); ACE_Time_Value tv1; ACE_Time_Value tv2 (2); diff --git a/tests/Timeprobe_Test.cpp b/tests/Timeprobe_Test.cpp index 9fb2ab7a77d..ec30b4af233 100644 --- a/tests/Timeprobe_Test.cpp +++ b/tests/Timeprobe_Test.cpp @@ -96,9 +96,9 @@ int static_singleton_creator = create_singleton (); #endif /* ! ACE_HAS_PURIFY */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Timeprobe_Test")); + ACE_START_TEST (ACE_TEXT ("Timeprobe_Test")); ACE_TIMEPROBE ("Starting Test"); diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp index dfaa41b605f..5b6ca9903f8 100644 --- a/tests/Timer_Queue_Test.cpp +++ b/tests/Timer_Queue_Test.cpp @@ -192,7 +192,7 @@ test_functionality (ACE_Timer_Queue *tq) static void test_performance (ACE_Timer_Queue *tq, - const ASYS_TCHAR *test_name) + const ACE_TCHAR *test_name) { Example_Handler eh; ACE_Profile_Timer timer; @@ -228,13 +228,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to schedule %d timers for %s\n"), + ACE_TEXT ("time to schedule %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to cancel all the timers. @@ -251,13 +251,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to cancel %d timers for %s\n"), + ACE_TEXT ("time to cancel %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to schedule and expire all the @@ -288,13 +288,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to schedule and expire %d timers for %s\n"), + ACE_TEXT ("time to schedule and expire %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to randomly cancel all the @@ -328,16 +328,16 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to randomly cancel %d timers for %s\n"), + ACE_TEXT ("time to randomly cancel %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to randomly schedule all the timers. @@ -364,15 +364,15 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to randomly schedule %d timers for %s\n"), + ACE_TEXT ("time to randomly schedule %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to cancel all the timers. @@ -394,13 +394,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to expire %d randomly scheduled timers for %s\n"), + ACE_TEXT ("time to expire %d randomly scheduled timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); delete [] times; @@ -416,7 +416,7 @@ class Timer_Queue_Stack public: // = Initialization method Timer_Queue_Stack (ACE_Timer_Queue *queue, - const ASYS_TCHAR *name, + const ACE_TCHAR *name, Timer_Queue_Stack *next = NULL) : queue_ (queue), name_ (name), @@ -427,7 +427,7 @@ public: ACE_Timer_Queue *queue_; // Pointer to the subclass of <ACE_Timer_Queue> that we're testing. - const ASYS_TCHAR *name_; + const ACE_TCHAR *name_; // Name of the Queue that we're testing. Timer_Queue_Stack *next_; @@ -435,9 +435,9 @@ public: }; int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Timer_Queue_Test")); + ACE_START_TEST (ACE_TEXT ("Timer_Queue_Test")); ACE_OS::srand (ACE_OS::time (0L)); @@ -454,28 +454,28 @@ main (int argc, ASYS_TCHAR *argv[]) // Timer_Hash (Heap) ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Hash_Heap, - ASYS_TEXT ("ACE_Timer_Hash (Heap)"), + ACE_TEXT ("ACE_Timer_Hash (Heap)"), tq_stack), -1); // Timer_Hash ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Hash, - ASYS_TEXT ("ACE_Timer_Hash"), + ACE_TEXT ("ACE_Timer_Hash"), tq_stack), -1); // Timer_stack ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_List, - ASYS_TEXT ("ACE_Timer_List"), + ACE_TEXT ("ACE_Timer_List"), tq_stack), -1); // Timer_Wheel without preallocated memory ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Wheel, - ASYS_TEXT ("ACE_Timer_Wheel (non-preallocated)"), + ACE_TEXT ("ACE_Timer_Wheel (non-preallocated)"), tq_stack), -1); @@ -484,20 +484,20 @@ main (int argc, ASYS_TCHAR *argv[]) Timer_Queue_Stack (new ACE_Timer_Wheel (ACE_DEFAULT_TIMER_WHEEL_SIZE, ACE_DEFAULT_TIMER_WHEEL_RESOLUTION, max_iterations), - ASYS_TEXT ("ACE_Timer_Wheel (preallocated)"), + ACE_TEXT ("ACE_Timer_Wheel (preallocated)"), tq_stack), -1); // Timer_Heap without preallocated memory. ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Heap, - ASYS_TEXT ("ACE_Timer_Heap (non-preallocated)"), + ACE_TEXT ("ACE_Timer_Heap (non-preallocated)"), tq_stack), -1); // Timer_Heap with preallocate memory. ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Heap (max_iterations, 1), - ASYS_TEXT ("ACE_Timer_Heap (preallocated)"), + ACE_TEXT ("ACE_Timer_Heap (preallocated)"), tq_stack), -1); @@ -511,7 +511,7 @@ main (int argc, ASYS_TCHAR *argv[]) while (tq_ptr != NULL) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** starting test of %s\n"), + ACE_TEXT ("**** starting test of %s\n"), tq_ptr->name_)); test_functionality (tq_ptr->queue_); test_performance (tq_ptr->queue_, diff --git a/tests/TkReactor_Test.cpp b/tests/TkReactor_Test.cpp index e4c2576400a..45f37469a2c 100644 --- a/tests/TkReactor_Test.cpp +++ b/tests/TkReactor_Test.cpp @@ -33,7 +33,7 @@ ACE_RCSID(tests, TkReactor_Test, "$Id$") int main (int, char*[]) { - ACE_START_TEST (ASYS_TEXT ("TkReactor_Test")); + ACE_START_TEST (ACE_TEXT ("TkReactor_Test")); ACE_ERROR ((LM_ERROR, "Tk not supported on this platform\n")); @@ -267,7 +267,7 @@ init (Tcl_Interp *interp) int main (int argc, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("TkReactor_Test")); + ACE_START_TEST (ACE_TEXT ("TkReactor_Test")); tcl_interp = Tcl_CreateInterp (); diff --git a/tests/Tokens_Test.cpp b/tests/Tokens_Test.cpp index 528932d7cb0..30113586aac 100644 --- a/tests/Tokens_Test.cpp +++ b/tests/Tokens_Test.cpp @@ -40,7 +40,7 @@ ACE_RCSID(tests, Tokens_Test, "$Id$") typedef ACE_Token_Invariant_Manager TOKEN_INVARIANTS; -static const ASYS_TCHAR *server_host = ACE_DEFAULT_SERVER_HOST; +static const ACE_TCHAR *server_host = ACE_DEFAULT_SERVER_HOST; static const int server_port = 23456; // Synchronize starts of threads, so that they all start before one @@ -54,7 +54,7 @@ struct Test_Params public: ACE_Token_Proxy *token1_; ACE_Token_Proxy *token2_; - const ASYS_TCHAR *collection_name_; + const ACE_TCHAR *collection_name_; }; static void * @@ -65,7 +65,7 @@ run_thread (void *vp) collection.insert (*(tp->token1_)); collection.insert (*(tp->token2_)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) new thread.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) new thread.\n"))); thread_start->wait (); int count = 50; @@ -75,19 +75,19 @@ run_thread (void *vp) { if (ACE_OS::last_error () == EDEADLK) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("deadlock detected in acquire"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("deadlock detected in acquire"))); continue; } ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p acquire failed\n"), - ASYS_TEXT ("run_thread"))); + ACE_TEXT ("(%t) %p acquire failed\n"), + ACE_TEXT ("run_thread"))); return (void *) -1; } ACE_ASSERT ((TOKEN_INVARIANTS::instance ()->acquired (tp->token1_) == 1) || (TOKEN_INVARIANTS::instance ()->acquired (tp->token2_) == 1)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %s acquired.\n"), collection.name ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %s acquired.\n"), collection.name ())); TOKEN_INVARIANTS::instance ()->releasing (tp->token1_); TOKEN_INVARIANTS::instance ()->releasing (tp->token2_); @@ -96,18 +96,18 @@ run_thread (void *vp) { if (ACE_OS::last_error () == EDEADLK) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("deadlock detected"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("deadlock detected"))); goto deadlock; } - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p renew failed\n"), - ASYS_TEXT ("run_thread"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p renew failed\n"), + ACE_TEXT ("run_thread"))); return (void *) -1; } ACE_ASSERT (TOKEN_INVARIANTS::instance ()->acquired (tp->token1_) == 1 || TOKEN_INVARIANTS::instance ()->acquired (tp->token2_) == 1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %s renewed.\n"), collection.name ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %s renewed.\n"), collection.name ())); deadlock: @@ -116,15 +116,15 @@ run_thread (void *vp) if (collection.release () == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p release failed\n"),ASYS_TEXT ("run_thread"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p release failed\n"),ACE_TEXT ("run_thread"))); return (void *) -1; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %s released.\n"), collection.name ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %s released.\n"), collection.name ())); } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) thread finished.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) thread finished.\n"))); return 0; } @@ -140,15 +140,15 @@ run_test (ACE_Token_Proxy *A, // tp1 and tp2 can run concurrently. Neither tp1 or tp3 can run // when tp2 is running. - tp1.collection_name_ = ASYS_TEXT ("A and Reader"); + tp1.collection_name_ = ACE_TEXT ("A and Reader"); tp1.token1_ = A; tp1.token2_ = R; - tp2.collection_name_ = ASYS_TEXT ("A and Writer"); + tp2.collection_name_ = ACE_TEXT ("A and Writer"); tp2.token1_ = A; tp2.token2_ = W; - tp3.collection_name_ = ASYS_TEXT ("B and Reader"); + tp3.collection_name_ = ACE_TEXT ("B and Reader"); tp3.token1_ = B; tp3.token2_ = R; @@ -157,40 +157,40 @@ run_test (ACE_Token_Proxy *A, if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp1, THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn 1 failed")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn 1 failed")), -1); if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp2, THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn 2 failed")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn 2 failed")), -1); if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp3, THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn 3 failed")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn 3 failed")), -1); // Wait for all threads to exit. mgr->wait (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Test finished.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test finished.\n"))); return 0; } #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Tokens_Test")); + ACE_START_TEST (ACE_TEXT ("Tokens_Test")); #if defined (ACE_HAS_THREADS) ACE_Token_Proxy *A = 0, *B = 0, *R = 0, *W = 0; - ACE_NEW_RETURN (A, ACE_Local_Mutex (ASYS_TEXT ("L Mutex A"), 0, 0), -1); - ACE_NEW_RETURN (B, ACE_Local_Mutex (ASYS_TEXT ("L Mutex B"), 0, 0), -1); - ACE_NEW_RETURN (R, ACE_Local_RLock (ASYS_TEXT ("L Reader Lock"), 0, 0), -1); - ACE_NEW_RETURN (W, ACE_Local_WLock (ASYS_TEXT ("L Writer Lock"), 0, 0), -1); + ACE_NEW_RETURN (A, ACE_Local_Mutex (ACE_TEXT ("L Mutex A"), 0, 0), -1); + ACE_NEW_RETURN (B, ACE_Local_Mutex (ACE_TEXT ("L Mutex B"), 0, 0), -1); + ACE_NEW_RETURN (R, ACE_Local_RLock (ACE_TEXT ("L Reader Lock"), 0, 0), -1); + ACE_NEW_RETURN (W, ACE_Local_WLock (ACE_TEXT ("L Writer Lock"), 0, 0), -1); ACE_NEW_RETURN (thread_start, ACE_Barrier (3), -1); run_test (A, B, R, W); - LPCTSTR cl = + const ACE_TCHAR * cl = ACE_TEXT ("..") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("netsvcs") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("servers") ACE_DIRECTORY_SEPARATOR_STR @@ -201,23 +201,23 @@ main (int, ASYS_TCHAR *[]) ACE_Process_Options options; options.command_line (cl); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Forking Token Service.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Forking Token Service.\n"))); // Start up the token server for the remote test. ACE_Process new_process; if (new_process.spawn (options) == -1) - ACE_ERROR ((LM_DEBUG, ASYS_TEXT ("%n; %p (%s), will not run remote test.\n"), - ASYS_TEXT ("Server fork failed"), cl)); + ACE_ERROR ((LM_DEBUG, ACE_TEXT ("%n; %p (%s), will not run remote test.\n"), + ACE_TEXT ("Server fork failed"), cl)); else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Server forked with pid = %d.\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Server forked with pid = %d.\n"), new_process.getpid ())); // Wait for the server to start. ACE_OS::sleep (3); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Using Token Server on %s at port %d.\n"), + ACE_TEXT ("Using Token Server on %s at port %d.\n"), server_host, server_port)); ACE_Remote_Mutex::set_server_address (ACE_INET_Addr (server_port, server_host)); @@ -227,10 +227,10 @@ main (int, ASYS_TCHAR *[]) delete R; delete W; - ACE_NEW_RETURN (A, ACE_Remote_Mutex (ASYS_TEXT ("R Mutex A"), 0, 1), -1); - ACE_NEW_RETURN (B, ACE_Remote_Mutex (ASYS_TEXT ("R Mutex B"), 0, 1), -1); - ACE_NEW_RETURN (R, ACE_Remote_RLock (ASYS_TEXT ("R Reader Lock"), 0, 1), -1); - ACE_NEW_RETURN (W, ACE_Remote_WLock (ASYS_TEXT ("R Writer Lock"), 0, 1), -1); + ACE_NEW_RETURN (A, ACE_Remote_Mutex (ACE_TEXT ("R Mutex A"), 0, 1), -1); + ACE_NEW_RETURN (B, ACE_Remote_Mutex (ACE_TEXT ("R Mutex B"), 0, 1), -1); + ACE_NEW_RETURN (R, ACE_Remote_RLock (ACE_TEXT ("R Reader Lock"), 0, 1), -1); + ACE_NEW_RETURN (W, ACE_Remote_WLock (ACE_TEXT ("R Writer Lock"), 0, 1), -1); run_test (A, B, R, W); @@ -239,7 +239,7 @@ main (int, ASYS_TCHAR *[]) // Kill the token server. if (new_process.terminate () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Kill failed.\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Kill failed.\n")), -1); } delete thread_start; @@ -249,10 +249,10 @@ main (int, ASYS_TCHAR *[]) delete R; delete W; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) main thread exiting.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) main thread exiting.\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/UPIPE_SAP_Test.cpp b/tests/UPIPE_SAP_Test.cpp index 7e2d2397d7e..a6e6ae999c0 100644 --- a/tests/UPIPE_SAP_Test.cpp +++ b/tests/UPIPE_SAP_Test.cpp @@ -42,11 +42,11 @@ connector (void *) ACE_OS::sleep (5); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) connector starting connect\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) connector starting connect\n"))); ACE_UPIPE_Connector con; if (con.connect (c_stream, addr) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) connector ACE_UPIPE_Connector failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) connector ACE_UPIPE_Connector failed\n"))); ACE_Message_Block *mb; @@ -55,10 +55,10 @@ connector (void *) mb->copy ("hello"); if (c_stream.send (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) error connector send\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) error connector send\n"))); if (c_stream.recv (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) error connector recv\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) error connector recv\n"))); ACE_ASSERT (ACE_OS::strcmp (mb->rd_ptr (), "thanks") == 0); @@ -68,10 +68,10 @@ connector (void *) // Now try the send()/recv() interface. char mytext[] = "This string is sent by connector as a buffer"; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) connector sending text\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) connector sending text\n"))); if (c_stream.send (mytext, sizeof (mytext)) == -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) buffer send from connector failed\n"))); + ACE_TEXT ("(%t) buffer send from connector failed\n"))); char conbuf[BUFSIZ]; // Buffer to receive response. @@ -81,17 +81,17 @@ connector (void *) { if (c_stream.recv (&c, 1) == -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) buffer recv from connector failed\n"))); + ACE_TEXT ("(%t) buffer recv from connector failed\n"))); else conbuf[i] = c; } conbuf[i] = '\0'; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) conbuf = %s\n"), conbuf)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) conbuf = %s\n"), conbuf)); ACE_ASSERT (ACE_OS::strcmp (conbuf, "this is the acceptor response!") == 0); c_stream.close (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) exiting thread\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) exiting thread\n"))); return 0; } @@ -103,12 +103,12 @@ acceptor (void *args) if (acceptor->accept (s_stream) == -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) ACE_UPIPE_Acceptor.accept failed\n"))); + ACE_TEXT ("(%t) ACE_UPIPE_Acceptor.accept failed\n"))); ACE_Message_Block *mb = 0; if (s_stream.recv (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor recv failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor recv failed\n"))); ACE_ASSERT (ACE_OS::strcmp (mb->rd_ptr (), "hello") == 0); @@ -116,13 +116,13 @@ acceptor (void *args) mb->copy ("thanks"); if (s_stream.send (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor send failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor send failed\n"))); char s_buf[BUFSIZ]; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor sleeping on recv\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor sleeping on recv\n"))); if (s_stream.recv (s_buf, sizeof (s_buf)) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor recv failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor recv failed\n"))); else ACE_ASSERT (ACE_OS::strcmp (s_buf, "This string is sent by connector as a buffer") == 0); @@ -131,18 +131,18 @@ acceptor (void *args) ACE_OS::strcpy (s_buf, svr_response); if (s_stream.send (s_buf, sizeof (svr_response)) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor send failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor send failed\n"))); s_stream.close (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) exiting thread\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) exiting thread\n"))); return 0; } #endif /* ACE_HAS_THREADS && defined ACE_HAS_STREAM_PIPES || (ACE_WIN32&&NT4)*/ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("UPIPE_SAP_Test")); + ACE_START_TEST (ACE_TEXT ("UPIPE_SAP_Test")); #if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || \ (defined (ACE_WIN32) && \ @@ -155,17 +155,17 @@ main (int, ASYS_TCHAR *[]) (void *) &acc, THR_NEW_LWP, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn")), 1); // Spawn a connector thread. if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (connector), (void *) 0, THR_NEW_LWP, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn")), 1); ACE_Thread_Manager::instance ()->wait (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) joined with acceptor thread\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) joined with acceptor thread\n"))); // Close the acceptor acc.close (); @@ -173,9 +173,9 @@ main (int, ASYS_TCHAR *[]) #else #if !defined (ACE_HAS_THREADS) - ACE_ERROR ((LM_INFO, ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_ERROR ((LM_INFO, ACE_TEXT ("threads not supported on this platform\n"))); #else - ACE_ERROR ((LM_INFO, ASYS_TEXT ("UPIPE is not supported on this platform\n"))); + ACE_ERROR ((LM_INFO, ACE_TEXT ("UPIPE is not supported on this platform\n"))); #endif /* !defined (ACE_HAS_THREADS) */ #endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) && NT4) */ diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp index bc1e4193218..27b68c2b5c2 100644 --- a/tests/Upgradable_RW_Test.cpp +++ b/tests/Upgradable_RW_Test.cpp @@ -105,16 +105,16 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-r n_readers] [-w n_writers]\n") - ASYS_TEXT (" [-e max_entries] [-u try update] ") - ASYS_TEXT ("[-n iteration_count] [-f for FIFO threads]\n"))); + ACE_TEXT ("usage: %n [-r n_readers] [-w n_writers]\n") + ACE_TEXT (" [-e max_entries] [-u try update] ") + ACE_TEXT ("[-n iteration_count] [-f for FIFO threads]\n"))); ACE_OS::exit (1); } static void -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("e:fr:w:n:u")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("e:fr:w:n:u")); int c; @@ -205,7 +205,7 @@ Reader_Task::svc (void) } else if (result == -1 && errno != EBUSY) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) failure in upgrading to write lock!\n"), + ACE_TEXT (" (%t) failure in upgrading to write lock!\n"), 1)); } @@ -290,23 +290,23 @@ Time_Calculation ::print_stats (void) double tmp = 1000 / elapsed_time.real_time; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n") - ASYS_TEXT ("\treal_time\t = %0.06f ms, \n") - ASYS_TEXT ("\tuser_time\t = %0.06f ms, \n") - ASYS_TEXT ("\tsystem_time\t = %0.06f ms, \n") - ASYS_TEXT ("\t%0.00f calls/second\n"), + ACE_TEXT ("\n") + ACE_TEXT ("\treal_time\t = %0.06f ms, \n") + ACE_TEXT ("\tuser_time\t = %0.06f ms, \n") + ACE_TEXT ("\tsystem_time\t = %0.06f ms, \n") + ACE_TEXT ("\t%0.00f calls/second\n"), elapsed_time.real_time < 0.0 ? 0.0 : elapsed_time.real_time, elapsed_time.user_time < 0.0 ? 0.0 : elapsed_time.user_time, elapsed_time.system_time < 0.0 ? 0.0 : elapsed_time.system_time, tmp < 0.0 ? 0.0 : tmp)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of reported times: %d\n"), + ACE_TEXT ("Number of reported times: %d\n"), this->reported_times_)); } else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("\tNo time stats printed. Zero iterations or error ocurred.\n"))); + ACE_TEXT ("\tNo time stats printed. Zero iterations or error ocurred.\n"))); } static int @@ -351,9 +351,9 @@ template class ACE_Guard<ACE_RW_Mutex>; // Spawn off threads. int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Upgradable_RW_Test")); + ACE_START_TEST (ACE_TEXT ("Upgradable_RW_Test")); int status = 0; #if defined (ACE_HAS_THREADS) @@ -369,7 +369,7 @@ main (int argc, ASYS_TCHAR *argv[]) init (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) main thread starting\n"))); + ACE_TEXT (" (%t) main thread starting\n"))); Time_Calculation time_Calculation; // for the time calculation @@ -429,10 +429,10 @@ main (int argc, ASYS_TCHAR *argv[]) { if (errno == ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + ACE_TEXT ("maximum wait time of %d msec exceeded\n"), max_wait.msec ())); else - ACE_OS::perror ("wait"); + ACE_OS::perror (ACE_TEXT ("wait")); status = -1; } @@ -442,16 +442,16 @@ main (int argc, ASYS_TCHAR *argv[]) if (not_upgraded != 0 || upgraded != 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("upgraded to not upgraded ratio = %f \n"), + ACE_TEXT ("upgraded to not upgraded ratio = %f \n"), (float) upgraded / (float) (not_upgraded + upgraded))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of times, that find was called: %d\n"), + ACE_TEXT ("Number of times, that find was called: %d\n"), find_called)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main thread\n"))); + ACE_TEXT (" (%t) exiting main thread\n"))); // Delete the memory of the Double_Linked_List ACE_CString *cString_ptr; @@ -488,7 +488,7 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/XtReactor_Test.cpp b/tests/XtReactor_Test.cpp index 6660fe777cf..b29fcac9f2e 100644 --- a/tests/XtReactor_Test.cpp +++ b/tests/XtReactor_Test.cpp @@ -261,7 +261,7 @@ template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; int main (int argc, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("XtReactor_Test")); + ACE_START_TEST (ACE_TEXT ("XtReactor_Test")); #if defined (ACE_HAS_XT) XtAppContext app_context; diff --git a/tests/test_config.h b/tests/test_config.h index 2a63e9e36f7..f9ba817d022 100644 --- a/tests/test_config.h +++ b/tests/test_config.h @@ -43,52 +43,22 @@ #undef ACE_NDEBUG #if defined (ACE_HAS_WINCE) - -#define ACE_LOG_DIRECTORY_A "log\\" -#define MAKE_PIPE_NAME_A(X) "\\\\.\\pipe\\"#X - -#define ACE_LOG_DIRECTORY_W ASYS_TEXT (ACE_LOG_DIRECTORY_A) -#define MAKE_PIPE_NAME_W(X) ASYS_TEXT (MAKE_PIPE_NAME_A(X)) - +# define ACE_LOG_DIRECTORY ACE_TEXT ("log\\") +# define MAKE_PIPE_NAME(X) ACE_TEXT ("\\\\.\\pipe\\"#X) #elif defined (ACE_WIN32) - -#define ACE_LOG_DIRECTORY_A "log\\" -#define MAKE_PIPE_NAME_A(X) "\\\\.\\pipe\\"#X - -#define ACE_LOG_DIRECTORY_W L"log\\" -#define MAKE_PIPE_NAME_W(X) L"\\\\.\\pipe\\"#X - +# define ACE_LOG_DIRECTORY ACE_TEXT ("log\\") +# define MAKE_PIPE_NAME(X) ACE_TEXT ("\\\\.\\pipe\\"#X) #else - -#define ACE_LOG_DIRECTORY_A "log/" -#define MAKE_PIPE_NAME_A(X) X - -#if defined (ACE_HAS_UNICODE) -#define ACE_LOG_DIRECTORY_W L"log/" -#define MAKE_PIPE_NAME_W(X) L##X -#else -#define ACE_LOG_DIRECTORY_W "log/" -#define MAKE_PIPE_NAME_W(X) X -#endif /* ACE_HAS_UNICODE */ - +# define ACE_LOG_DIRECTORY ACE_TEXT ("log/") +# define MAKE_PIPE_NAME(X) ACE_TEXT (X) #endif /* ACE_WIN32 */ #if defined (ACE_HAS_WINCE) -#define ACE_LOG_FILE_EXT_NAME_A ".txt" -#define ACE_LOG_FILE_EXT_NAME_W ACE_TEXT (ACE_LOG_FILE_EXT_NAME_A) +#define ACE_LOG_FILE_EXT_NAME ACE_TEXT (".txt") #else -#define ACE_LOG_FILE_EXT_NAME_W L".log" -#define ACE_LOG_FILE_EXT_NAME_A ".log" +#define ACE_LOG_FILE_EXT_NAME ACE_TEXT (".log") #endif /* ACE_HAS_WINCE */ -#if defined (UNICODE) -#define ACE_LOG_DIRECTORY ACE_LOG_DIRECTORY_W -#define MAKE_PIPE_NAME MAKE_PIPE_NAME_W -#else -#define ACE_LOG_DIRECTORY ACE_LOG_DIRECTORY_A -#define MAKE_PIPE_NAME MAKE_PIPE_NAME_A -#endif /* UNICODE */ - #if defined (ACE_HAS_WINCE) || defined (ACE_HAS_PHARLAP) const size_t ACE_MAX_CLIENTS = 4; #else @@ -107,35 +77,35 @@ const size_t ACE_MAX_THREADS = 4; char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; #define ACE_START_TEST(NAME) \ - const ASYS_TCHAR *program = NAME; \ + const ACE_TCHAR *program = NAME; \ ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE); \ if (ace_file_stream::instance()->set_output (program) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Starting %s test at %D\n"), program)) + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)) #define ACE_END_TEST \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \ ace_file_stream::instance()->close () #if !defined (ACE_WIN32) #define ACE_APPEND_LOG(NAME) \ - const ASYS_TCHAR *program = NAME; \ + const ACE_TCHAR *program = NAME; \ ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE); \ ace_file_stream::instance()->close (); \ if (ace_file_stream::instance()->set_output (program, 1) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); #else /* ACE_WIN32 */ #define ACE_APPEND_LOG(NAME) \ - const ASYS_TCHAR *program = NAME; \ + const ACE_TCHAR *program = NAME; \ ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE); \ if (ace_file_stream::instance()->set_output (program, 1) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); #endif /* ACE_WIN32 */ #define ACE_END_LOG \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Ending %s test at %D\n\n"), program)); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n\n"), program)); \ ACE_LOG_MSG->set_flags(ACE_Log_Msg::SILENT); \ ace_file_stream::instance()->close (); @@ -143,12 +113,12 @@ char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; // This is the only way I could figure out to avoid an error // about attempting to unlink a non-existant file. #define ACE_INIT_LOG(NAME) \ - ASYS_TCHAR temp[MAXPATHLEN]; \ - ACE_OS::sprintf (temp, ASYS_TEXT ("%s%s%s"), \ - ASYS_TEXT (ACE_LOG_DIRECTORY_A), \ - ACE::basename (NAME, ASYS_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A)), \ - ASYS_TEXT (ACE_LOG_FILE_EXT_NAME_A)); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ + ACE_TCHAR temp[MAXPATHLEN]; \ + ACE_OS::sprintf (temp, ACE_TEXT ("%s%s%s"), \ + ACE_LOG_DIRECTORY, \ + ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR), \ + ACE_LOG_FILE_EXT_NAME); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ int fd_init_log; \ if ((fd_init_log = ACE_OS::open (temp, \ O_WRONLY | O_CREAT, 0x644)) != ERROR) \ @@ -164,12 +134,12 @@ char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; #endif /* ghs */ #else /* ! VXWORKS */ #define ACE_INIT_LOG(NAME) \ - ASYS_TCHAR temp[MAXPATHLEN]; \ - ACE_OS::sprintf (temp, ASYS_TEXT ("%s%s%s"), \ - ASYS_TEXT (ACE_LOG_DIRECTORY_A), \ - ACE::basename (NAME, ASYS_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A)), \ - ASYS_TEXT (ACE_LOG_FILE_EXT_NAME_A)); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ + ACE_TCHAR temp[MAXPATHLEN]; \ + ACE_OS::sprintf (temp, ACE_TEXT ("%s%s%s"), \ + ACE_LOG_DIRECTORY, \ + ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR), \ + ACE_LOG_FILE_EXT_NAME); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ ACE_OS::unlink (temp); #endif /* ! VXWORKS */ @@ -184,7 +154,7 @@ class ACE_Test_Output public: ACE_Test_Output (void); ~ACE_Test_Output (void); - int set_output (const ASYS_TCHAR *filename, int append = 0); + int set_output (const ACE_TCHAR *filename, int append = 0); OFSTREAM *output_file (void); void close (void); @@ -217,7 +187,7 @@ ACE_Test_Output::~ACE_Test_Output (void) } int -ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) +ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) { #if defined (ACE_HAS_PHARLAP) // For PharLap, just send it all to the host console for now - redirect @@ -226,23 +196,23 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) ACE_LOG_MSG->msg_ostream (&cout); #else - ASYS_TCHAR temp[MAXPATHLEN]; + ACE_TCHAR temp[MAXPATHLEN]; // Ignore the error value since the directory may already exist. - const ASYS_TCHAR *test_dir; + const ACE_TCHAR *test_dir; #if !defined (ACE_HAS_WINCE) - test_dir = ACE_OS::getenv (ASYS_TEXT ("ACE_TEST_DIR")); + test_dir = ACE_OS::getenv (ACE_TEXT ("ACE_TEST_DIR")); if (test_dir == 0) #endif /* ACE_HAS_WINCE */ - test_dir = ASYS_TEXT (""); + test_dir = ACE_TEXT (""); ACE_OS::sprintf (temp, - ASYS_TEXT ("%s%s%s%s"), + ACE_TEXT ("%s%s%s%s"), test_dir, - ASYS_TEXT (ACE_LOG_DIRECTORY_A), - ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR_A), - ASYS_TEXT (ACE_LOG_FILE_EXT_NAME_A)); + ACE_LOG_DIRECTORY, + ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR), + ACE_LOG_FILE_EXT_NAME); #if defined (VXWORKS) // This is the only way I could figure out to avoid a console @@ -260,20 +230,20 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) // directory does exist, it causes a wierd console error message // about "cat: input error on standard input: Is a directory". So, // VxWorks users must create the directory manually. - ACE_OS::mkdir (ASYS_TEXT (ACE_LOG_DIRECTORY_A)); + ACE_OS::mkdir (ACE_LOG_DIRECTORY); # endif /* ! VXWORKS */ # if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - this->output_file_->open (ASYS_ONLY_MULTIBYTE_STRING (temp), + this->output_file_->open (ACE_TEXT_ALWAYS_CHAR (temp), ios::out | (append ? ios::app : ios::trunc)); if (this->output_file_->bad ()) return -1; #else /* when ACE_LACKS_IOSTREAM_TOTALLY */ - ASYS_TCHAR *fmode = 0; + ACE_TCHAR *fmode = 0; if (append) - fmode = ASYS_TEXT ("a"); + fmode = ACE_TEXT ("a"); else - fmode = ASYS_TEXT ("w"); + fmode = ACE_TEXT ("w"); this->output_file_ = ACE_OS::fopen (temp, fmode); # endif /* ACE_LACKS_IOSTREAM_TOTALLY */ |