chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a null pointer deref.
[disorder]
/
lib
/
log.h
diff --git
a/lib/log.h
b/lib/log.h
index e7f6e43c221026e6666ad5db172f38c33ad59bcd..f1f55d2cce3dcb5c43dabcfe267ae93db0ff524b 100644
(file)
--- a/
lib/log.h
+++ b/
lib/log.h
@@
-30,13
+30,13
@@
void set_progname(char **argv);
void elog(int pri, int errno_value, const char *fmt, va_list ap);
void elog(int pri, int errno_value, const char *fmt, va_list ap);
-void fatal(int errno_value, const char *msg, ...) attribute((noreturn))
+void
disorder_
fatal(int errno_value, const char *msg, ...) attribute((noreturn))
attribute((format (printf, 2, 3)));
attribute((format (printf, 2, 3)));
-void error(int errno_value, const char *msg, ...)
+void
disorder_
error(int errno_value, const char *msg, ...)
attribute((format (printf, 2, 3)));
attribute((format (printf, 2, 3)));
-void info(const char *msg, ...)
+void
disorder_
info(const char *msg, ...)
attribute((format (printf, 1, 2)));
attribute((format (printf, 1, 2)));
-void debug(const char *msg, ...)
+void d
isorder_d
ebug(const char *msg, ...)
attribute((format (printf, 1, 2)));
/* report a message of the given class. @errno_value@ if present an
* non-zero is included. @fatal@ terminates the process. */
attribute((format (printf, 1, 2)));
/* report a message of the given class. @errno_value@ if present an
* non-zero is included. @fatal@ terminates the process. */
@@
-55,12
+55,18
@@
extern struct log_output log_stderr, log_syslog, *log_default;
extern const char *debug_filename;
extern int debug_lineno;
extern const char *debug_filename;
extern int debug_lineno;
+extern int logdate;
+/** @brief Issue a debug message if debugging is turned on
+ * @param x Parenthesized debug arguments
+ *
+ * Use in the format: D(("format string", arg, arg, ...));
+ */
#define D(x) do { \
if(debugging) { \
debug_filename=__FILE__; \
debug_lineno=__LINE__; \
#define D(x) do { \
if(debugging) { \
debug_filename=__FILE__; \
debug_lineno=__LINE__; \
- d
ebug x;
\
+ d
isorder_debug x;
\
} \
} while(0)
} \
} while(0)