From ba2bd8705698411cbdff71d1a7e5285251129b13 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 14 Feb 2010 02:48:14 +0000 Subject: Switch back to stdio.h-based debug funcs, iostreams was broken and silly --- src/utils/debug.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/utils/debug.h b/src/utils/debug.h index c7f19c1b1..271e0047b 100644 --- a/src/utils/debug.h +++ b/src/utils/debug.h @@ -9,26 +9,23 @@ #define BOTAN_DEBUG_H__ #include -#include +#include namespace Botan { namespace Debug { -template -void print_vec(const std::string& name, - const T array[], size_t array_len) +inline void print_vec(const std::string& name, + const byte array[], size_t array_len) { - std::cout << name << " = "; - + std::printf("%s = ", name.c_str()); for(size_t i = 0; i != array_len; ++i) - std::cout << std::hex << array[i]; - std::cout << std::endl; + std::printf("%02X", array[i]); + std::printf("\n"); } -template -void print_vec(const std::string& name, - const MemoryRegion& vec) +inline void print_vec(const std::string& name, + const MemoryRegion& vec) { print_vec(name, &vec[0], vec.size()); } -- cgit v1.2.3