diff options
Diffstat (limited to 'examples/Mem_Map/file-reverse')
-rw-r--r-- | examples/Mem_Map/file-reverse/Makefile | 59 | ||||
-rw-r--r-- | examples/Mem_Map/file-reverse/file-reverse.cpp | 45 |
2 files changed, 0 insertions, 104 deletions
diff --git a/examples/Mem_Map/file-reverse/Makefile b/examples/Mem_Map/file-reverse/Makefile deleted file mode 100644 index 4056d367f39..00000000000 --- a/examples/Mem_Map/file-reverse/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for Mem_Map file reverse test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = file-reverse - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/file-reverse.o .shobj/file-reverse.so: file-reverse.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Mem_Map/file-reverse/file-reverse.cpp b/examples/Mem_Map/file-reverse/file-reverse.cpp deleted file mode 100644 index 0e357ded29f..00000000000 --- a/examples/Mem_Map/file-reverse/file-reverse.cpp +++ /dev/null @@ -1,45 +0,0 @@ - -// $Id$ - -#include "ace/Mem_Map.h" - -static void -putline (const char *s) -{ - while (putchar (*s++) != '\n') - continue; -} - -static void -print_array_in_reverse (char *array, int size) -{ - size--; - - if (array[size] == '\0') - array[size] = '\n'; - - while (--size >= 0) - if (array[size] == '\n') - putline (array + size + 1); - - putline (array); -} - -int -main (int argc, char **argv) -{ - ACE_LOG_MSG->open (argv[0]); - void *cp; - - if (argc != 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %n file\n%a"), -1); - - ACE_Mem_Map mmap; - - if (mmap.map (argv[1]) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n%a", "mmap"), -1); - - print_array_in_reverse ((char *) mmap.addr (), mmap.size ()); - - return 0; -} |