68 err(
"Cannot create directory for '%s', redirecting 'WARN_LOGFILE' output to 'stderr'\n",
g_warnlogFile.data());
74 err(
"Cannot open '%s' for writing, redirecting 'WARN_LOGFILE' output to 'stderr'\n",
g_warnlogFile.data());
102 std::unique_lock<std::mutex> lock(
g_mutex);
109 vfprintf(stdout,
fmt, args);
131 "$version",versionSubst
137 msgText +=
" (warning treated as error, aborting now)";
142 std::unique_lock<std::mutex> lock(
g_mutex);
162 std::unique_lock<std::mutex> lock(
g_mutex);
163 QCString msgText =
" (warning treated as error, aborting now)\n";
178 if (!enabled)
return;
181 va_copy(argsCopy, args);
192 size_t bufSize = vsnprintf(
nullptr, 0,
fmt, args) + l;
198 vsnprintf(text.
rawData()+l, bufSize-l+1,
fmt, argsCopy);
283 std::unique_lock<std::mutex> lock(
g_mutex);
291 for (
size_t i=0; i<l; i++) fprintf(
g_warnFile,
" ");
322 if (!warnFile.is_open())
330 while (getline(warnFile,line))
332 fprintf(stderr,
"%s\n",line.c_str());
static bool isFlagSet(const DebugMask mask)
static double elapsedTime()
Class representing a directory in the file system.
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Minimal replacement for QFileInfo.
std::string dirPath(bool absPath=true) const
This is an alternative implementation of QCString.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
char * rawData()
Returns a writable pointer to the data.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString & setNum(short n)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
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,...)
static bool g_warnlogTemp
static QCString g_warnLineFormat
static std::atomic_bool g_warnStat
void warn_(const QCString &file, int line, const char *fmt,...)
void warn_incomplete_doc_(const QCString &file, int line, const char *fmt,...)
static const char * g_errorStr
static WARN_AS_ERROR_t g_warnBehavior
void va_warn(const QCString &file, int line, const char *fmt, va_list args)
static const char * g_warningStr
static QCString g_warnFormat
void warn_doc_error_(const QCString &file, int line, const char *fmt,...)
void msg(const char *fmt,...)
static std::mutex g_mutex
void warn_undoc_(const QCString &file, int line, const char *fmt,...)
void term_(const char *fmt,...)
static void format_warn(const QCString &file, int line, const QCString &text)
static void handle_warn_as_error()
static QCString g_warnlogFile
static void do_warn(bool enabled, const QCString &file, int line, const char *prefix, const char *fmt, va_list args)
std::ifstream openInputStream(const QCString &name, bool binary=false, bool openAtEnd=false)
void unlink(const QCString &fileName)
FILE * fopen(const QCString &fileName, const QCString &mode)
Portable versions of functions that are platform dependent.
char * qstrncpy(char *dst, const char *src, size_t len)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
const char * qPrint(const char *s)