diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-06-18 18:53:27 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-06-18 18:53:27 +0000 |
commit | 152c0f5c127eac99b5c9097aa4db2b34e14e6dd0 (patch) | |
tree | 0d399a92623e98588cd34e4fe0c2cf7fed880173 /examples/Misc/test_read_buffer.cpp | |
parent | 7e7f4a5d3e77a42e648b7dd2e1b9cf23a3780955 (diff) | |
download | ATCD-MyACE.tar.gz |
This commit was manufactured by cvs2svn to create branch 'MyACE'.MyACE
Diffstat (limited to 'examples/Misc/test_read_buffer.cpp')
-rw-r--r-- | examples/Misc/test_read_buffer.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/examples/Misc/test_read_buffer.cpp b/examples/Misc/test_read_buffer.cpp deleted file mode 100644 index 1c24aec98b7..00000000000 --- a/examples/Misc/test_read_buffer.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ - -#include "ace/OS_main.h" -#include "ace/OS_NS_fcntl.h" -#include "ace/OS_NS_unistd.h" -#include "ace/Malloc_Base.h" -#include "ace/Service_Config.h" -#include "ace/Read_Buffer.h" -#include "ace/OS_NS_stdlib.h" - - -ACE_RCSID (Misc, - test_read_buffer, - "$Id$") - -int -ACE_TMAIN (int argc, ACE_TCHAR *argv[]) -{ - ACE_HANDLE handle = argc > 1 ? ACE_OS::open (argv[1], O_RDONLY) : ACE_STDIN; - int term = argc > 2 ? ACE_OS::atoi (argv[2]) : EOF; - int search = argc > 3 ? ACE_OS::atoi (argv[3]) : '\n'; - int replace = argc > 4 ? ACE_OS::atoi (argv[4]) : '\0'; - - ACE_Read_Buffer rb (handle); - - char *buf; - - while ((buf = rb.read (term, search, replace)) != 0) - { - ACE_OS::write (ACE_STDOUT, buf, rb.size ()); - ACE_Allocator::instance ()->free (buf); - } - return 0; -} |