From c4430187fd4c172f1c37c3b37ad70aaa5c4fa736 Mon Sep 17 00:00:00 2001 From: Henri Herscher Date: Tue, 29 Aug 2006 19:36:32 +0000 Subject: Added memory handling routines. git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@331 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkbasecxx/MemUtils.cpp | 104 ++++++++++++++++++++++++++++++++++++++++++++++++ orkbasecxx/MemUtils.h | 29 ++++++++++++++ orkbasecxx/OrkBase.dsp | 8 ++++ 3 files changed, 141 insertions(+) create mode 100644 orkbasecxx/MemUtils.cpp create mode 100644 orkbasecxx/MemUtils.h diff --git a/orkbasecxx/MemUtils.cpp b/orkbasecxx/MemUtils.cpp new file mode 100644 index 0000000..22f69a3 --- /dev/null +++ b/orkbasecxx/MemUtils.cpp @@ -0,0 +1,104 @@ +/* + * Oreka -- A media capture and retrieval platform + * + * Copyright (C) 2005, orecx LLC + * + * http://www.orecx.com + * + * This program is free software, distributed under the terms of + * the GNU General Public License. + * Please refer to http://www.gnu.org/copyleft/gpl.html + * + */ + +#include "ace/OS_NS_stdlib.h" +#include "ace/OS_NS_strings.h" +#include "ace/OS_NS_ctype.h" + +#include "MemUtils.h" + +// Convert a piece of memory to hex string +void MemToHex(unsigned char* input, size_t len, CStdString&output) +{ + char byteAsHex[10]; + for(int i=0; i