diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-23 09:38:33 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-23 09:38:33 +0000 |
commit | 81203eb031ef8453a968a8dd728013856d3de299 (patch) | |
tree | dafe3392999d1c5532b4a3b583d412957e74b715 /include/parserutils | |
parent | ffec2c5dbdc4d0fc6a0500c886b372415996a051 (diff) | |
download | libparserutils-81203eb031ef8453a968a8dd728013856d3de299.tar.gz libparserutils-81203eb031ef8453a968a8dd728013856d3de299.tar.bz2 |
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
Diffstat (limited to 'include/parserutils')
-rw-r--r-- | include/parserutils/input/inputstream.h | 8 |
1 files 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 |