Utils.cpp

Go to the documentation of this file.
00001 /*
00002 
00003 $Header$
00004 
00005 */
00006 
00007 #include <cstdio>
00008 
00009 #include "Utils.h"
00010 
00011 #ifdef DEBUG_MODE
00012 void Utils::dump(const char *data, unsigned int size)
00013 {
00014   unsigned int i;
00015   unsigned char c;
00016 
00017   ::fprintf(stderr, "\nMemory dump (%u bytes).\n", size);
00018   for (i = 0; i < size; ++i) {
00019     if (i % 16 == 0)
00020       ::fprintf(stderr, "\n");
00021     c = (unsigned char)(data[i]);
00022     ::fprintf(stderr, "%02X-%c ", c, (c < 32 || c > 127 ? '.' : c));
00023   }
00024   ::fprintf(stderr, "\n");
00025 }
00026 #endif

Generated on Thu Sep 6 20:11:25 2007 for Pylon Application Platform by  doxygen 1.5.1