浏览该文件的文档.
53 void msg(
const char *fmt, ...)
57 std::unique_lock<std::mutex> lock(
g_mutex);
64 vfprintf(stdout, fmt, args);
86 "$version",versionSubst
92 msgText +=
" (warning treated as error, aborting now)";
97 std::unique_lock<std::mutex> lock(
g_mutex);
113 std::unique_lock<std::mutex> lock(
g_mutex);
114 QCString msgText =
" (warning treated as error, aborting now)\n";
122 static void do_warn(
bool enabled,
const QCString &file,
int line,
const char *prefix,
const char *fmt, va_list args)
124 if (!enabled)
return;
127 va_copy(argsCopy, args);
132 l=(int)strlen(prefix);
138 int bufSize = vsnprintf(NULL, 0, fmt, args) + l + 1;
144 vsnprintf(text.
rawData()+l, bufSize-l, fmt, argsCopy);
145 text[bufSize-1]=
'\0';
203 void err(
const char *fmt, ...)
220 void term(
const char *fmt, ...)
223 std::unique_lock<std::mutex> lock(
g_mutex);
243 void printlex(
int dbg,
bool enter,
const char *lexName,
const char *fileName)
245 const char *enter_txt =
"entering";
246 const char *enter_txt_uc =
"Entering";
250 enter_txt =
"finished";
251 enter_txt_uc =
"Finished";
254 std::unique_lock<std::mutex> lock(
g_mutex);
258 fprintf(stderr,
"--%s lexical analyzer: %s (for: %s)\n",enter_txt,
qPrint(lexName),
qPrint(fileName));
260 fprintf(stderr,
"--%s lexical analyzer: %s\n",enter_txt,
qPrint(lexName));
static const char * g_warningStr
void warn_incomplete_doc(const QCString &file, int line, const char *fmt,...)
static WARN_AS_ERROR_t g_warnBehavior
char * rawData()
Returns a writable pointer to the data.
#define Config_getEnum(name)
FILE * fopen(const QCString &fileName, const QCString &mode)
static std::mutex g_mutex
uint length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty
char * qstrncpy(char *dst, const char *src, size_t len)
static QCString g_warnFormat
void warn_doc_error(const QCString &file, int line, const char *fmt,...)
void err(const char *fmt,...)
void warn_simple(const QCString &file, int line, const char *text)
static void do_warn(bool enabled, const QCString &file, int line, const char *prefix, const char *fmt, va_list args)
void warn(const QCString &file, int line, const char *fmt,...)
static bool isFlagSet(DebugMask mask)
static void format_warn(const QCString &file, int line, const QCString &text)
void warn_uncond(const char *fmt,...)
static void print(DebugMask mask, int prio, const char *fmt,...)
void warn_undoc(const QCString &file, int line, const char *fmt,...)
void va_warn(const QCString &file, int line, const char *fmt, va_list args)
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
QCString & setNum(short n)
static double elapsedTime()
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
#define Config_getBool(name)
static void handle_warn_as_error()
void msg(const char *fmt,...)
void term(const char *fmt,...)
static const char * g_errorStr
const char * qPrint(const char *s)
#define Config_getString(name)
void err_full(const QCString &file, int line, const char *fmt,...)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Portable versions of functions that are platform dependent.
This is an alternative implementation of QCString.