diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-03-18 13:33:26 +0000 |
---|---|---|
committer | <> | 2015-07-08 14:41:01 +0000 |
commit | bb0ef45f7c46b0ae221b26265ef98a768c33f820 (patch) | |
tree | 98bae10dde41c746c51ae97ec4f879e330415aa7 /subversion/include/private/svn_debug.h | |
parent | 239dfafe71711b2f4c43d7b90a1228d7bdc5195e (diff) | |
download | subversion-tarball-subversion-1.8.13.tar.gz |
Imported from /home/lorry/working-area/delta_subversion-tarball/subversion-1.8.13.tar.gz.subversion-1.8.13
Diffstat (limited to 'subversion/include/private/svn_debug.h')
-rw-r--r-- | subversion/include/private/svn_debug.h | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/subversion/include/private/svn_debug.h b/subversion/include/private/svn_debug.h index 2b89e4a..a596ba1 100644 --- a/subversion/include/private/svn_debug.h +++ b/subversion/include/private/svn_debug.h @@ -23,27 +23,41 @@ #ifndef SVN_DEBUG_H #define SVN_DEBUG_H -/* Only available when SVN_DEBUG is defined (ie. svn developers). Note that - we do *not* provide replacement macros/functions for proper releases. - The debug stuff should be removed before a commit. - - ### maybe we will eventually decide to allow certain debug stuff to - ### remain in the code. at that point, we can rejigger this header. */ #ifdef SVN_DEBUG +#define SVN_DBG__PROTOTYPES +#endif -#include <stdio.h> +#ifdef SVN_DBG__PROTOTYPES +#define APR_WANT_STDIO +#include <apr_want.h> +#include <apr_hash.h> +#endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/* A couple helper functions for the macros below. */ +#ifdef SVN_DBG__PROTOTYPES +/* A few helper functions for the macros below. */ void svn_dbg__preamble(const char *file, long line, FILE *output); void svn_dbg__printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void +svn_dbg__print_props(apr_hash_t *props, + const char *header_fmt, + ...) + __attribute__((format(printf, 2, 3))); +#endif +/* Only available when SVN_DEBUG is defined (ie. svn developers). Note that + we do *not* provide replacement macros/functions for proper releases. + The debug stuff should be removed before a commit. + + ### maybe we will eventually decide to allow certain debug stuff to + ### remain in the code. at that point, we can rejigger this header. */ +#ifdef SVN_DEBUG /* Print to stdout. Edit this line if you need stderr. */ #define SVN_DBG_OUTPUT stdout @@ -55,6 +69,7 @@ svn_dbg__printf(const char *fmt, ...) #ifdef SVN_DBG_QUIET #define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, NULL) +#define SVN_DBG_PROPS(ARGS) svn_dbg__preamble(__FILE__, __LINE__, NULL) #else @@ -63,7 +78,7 @@ svn_dbg__printf(const char *fmt, ...) * usage: * * <pre> - * SVN_DBG(("rev=%ld kind=%s\n", revnum, svn_kind_to_word(kind))); + * SVN_DBG(("rev=%ld kind=%s\n", revnum, svn_node_kind_to_word(kind))); * </pre> * * outputs: @@ -77,17 +92,16 @@ svn_dbg__printf(const char *fmt, ...) */ #define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__, SVN_DBG_OUTPUT), \ svn_dbg__printf ARGS) +#define SVN_DBG_PROPS(ARGS) (svn_dbg__preamble(__FILE__, __LINE__, \ + SVN_DBG_OUTPUT), \ + svn_dbg__print_props ARGS) #endif +#endif /* SVN_DEBUG */ #ifdef __cplusplus } #endif /* __cplusplus */ -#else /* SVN_DEBUG */ - -/* We DON'T define SVN_DBG in release mode. See top of this file. */ - -#endif /* SVN_DEBUG */ #endif /* SVN_DEBUG_H */ |