24#define PRINTFLIKE(FORMAT, PARAM ) __attribute__((format(printf, FORMAT, PARAM)))
26#define PRINTFLIKE(FORMAT, PARAM )
47template<std::
size_t N>
50 return str[N-2]==
'\n';
53#define msg_no_newline_allowed(x) \
54 static_assert(!has_newline_at_end(x),"text: \"" x "\" should not have \\n at end");
56#define msg_newline_required(x) \
57 static_assert(has_newline_at_end(x),"text: \"" x "\" should have \\n at end");
59#define warn(file,line,fmt,...) do { \
60 msg_no_newline_allowed(fmt); \
61 warn_(removeLongPathMarker(file),line,fmt,##__VA_ARGS__); \
64#define warn_undoc(file,line,fmt,...) do { \
65 msg_no_newline_allowed(fmt); \
66 warn_undoc_(removeLongPathMarker(file),line,fmt,##__VA_ARGS__); \
69#define warn_incomplete_doc(file,line,fmt,...) do { \
70 msg_no_newline_allowed(fmt); \
71 warn_incomplete_doc_(removeLongPathMarker(file),line,fmt,##__VA_ARGS__); \
74#define warn_doc_error(file,line,fmt,...) do { \
75 msg_no_newline_allowed(fmt); \
76 warn_doc_error_(removeLongPathMarker(file),line,fmt,##__VA_ARGS__); \
79#define warn_uncond(fmt,...) do { \
80 msg_newline_required(fmt); \
81 warn_uncond_(fmt,##__VA_ARGS__); \
84#define err(fmt,...) do { \
85 msg_newline_required(fmt); \
86 err_(fmt,##__VA_ARGS__); \
89#define err_full(file,line,fmt,...) do { \
90 msg_no_newline_allowed(fmt); \
91 err_full_(removeLongPathMarker(file),line,fmt,##__VA_ARGS__); \
94#define term(fmt,...) do { \
95 msg_newline_required(fmt); \
96 term_(fmt,##__VA_ARGS__); \
This is an alternative implementation of QCString.
void err_(const char *fmt,...)
void warn_uncond_(const char *fmt,...)
QCString warn_line(const QCString &file, int line)
void err_full_(const QCString &file, int line, const char *fmt,...)
void warn_(const QCString &file, int line, const char *fmt,...)
void warn_incomplete_doc_(const QCString &file, int line, const char *fmt,...)
void va_warn(const QCString &file, int line, const char *fmt, va_list args)
void warn_doc_error_(const QCString &file, int line, const char *fmt,...)
void warn_undoc_(const QCString &file, int line, const char *fmt,...)
void term_(const char *fmt,...)
void msg(const char *fmt,...) PRINTFLIKE(1
constexpr bool has_newline_at_end(const char(&str)[N])
#define PRINTFLIKE(FORMAT, PARAM)
A bunch of utility functions.