From 81203eb031ef8453a968a8dd728013856d3de299 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 23 Aug 2008 09:38:33 +0000 Subject: Conditionalise noisy logging. I quite like to be able to run hubbub's testsuite without running out of hard drive space. svn path=/trunk/libparserutils/; revision=5183 --- include/parserutils/input/inputstream.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h index f56ce48..3784f08 100644 --- a/include/parserutils/input/inputstream.h +++ b/include/parserutils/input/inputstream.h @@ -89,8 +89,10 @@ static inline uintptr_t parserutils_inputstream_peek( return PARSERUTILS_INPUTSTREAM_OOD; #ifndef NDEBUG +#ifdef VERBOSE_INPUTSTREAM fprintf(stdout, "Peek: len: %zu cur: %u off: %zu\n", stream->utf8->length, stream->cursor, offset); +#endif parserutils_buffer_randomise(stream->utf8); #endif @@ -116,13 +118,13 @@ static inline uintptr_t parserutils_inputstream_peek( error == PARSERUTILS_NEEDDATA) { uintptr_t data = parserutils_inputstream_peek_slow(stream, offset, length); -#ifndef NDEBUG +#if !defined(NDEBUG) && defined(VERBOSE_INPUTSTREAM) fprintf(stdout, "clen: %lu\n", *length); #endif return data; } -#ifndef NDEBUG +#if !defined(NDEBUG) && defined(VERBOSE_INPUTSTREAM) fprintf(stdout, "clen: %lu\n", len); #endif @@ -143,7 +145,7 @@ static inline void parserutils_inputstream_advance( if (stream == NULL) return; -#ifndef NDEBUG +#if !defined(NDEBUG) && defined(VERBOSE_INPUTSTREAM) fprintf(stdout, "Advance: len: %zu cur: %u bytes: %zu\n", stream->utf8->length, stream->cursor, bytes); #endif -- cgit v1.2.3