60 "$version",versionSubst
66 msgText +=
" (warning treated as error, aborting now)";
71 std::unique_lock<std::mutex> lock(
g_mutex);
93 std::unique_lock<std::mutex> lock(
g_mutex);
94 QCString msgText =
" (warning treated as error, aborting now)\n";
117void msg_(fmt::string_view
fmt, fmt::format_args args)
121 std::unique_lock<std::mutex> lock(
g_mutex);
126 fmt::print(
"{}",fmt::vformat(
fmt,args));
134 bool enabled =
false;
159void err_(fmt::string_view
fmt, fmt::format_args args)
174void term_(fmt::string_view
fmt, fmt::format_args args)
177 std::unique_lock<std::mutex> lock(
g_mutex);
182 for (
size_t i=0; i<l; i++) fmt::print(
g_warnFile,
" ");
187 fmt::print(
"See '{}' for the reason of termination.\n",
g_warnlogFile);
245 err(
"Cannot create directory for '{}', redirecting 'WARN_LOGFILE' output to 'stderr'\n",
g_warnlogFile);
251 err(
"Cannot open '{}' for writing, redirecting 'WARN_LOGFILE' output to 'stderr'\n",
g_warnlogFile);
288 if (!warnFile.is_open())
296 while (getline(warnFile,line))
298 fmt::print(stderr,
"{}\n",line);
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.
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_(fmt::string_view fmt, fmt::format_args args)
QCString warn_line(const QCString &file, int line)
static void do_warn(const QCString &file, int line, const char *prefix, fmt::string_view fmt, fmt::format_args args)
static bool g_warnlogTemp
static QCString g_warnLineFormat
void warn_(WarningType type, const QCString &file, int line, fmt::string_view fmt, fmt::format_args args)
static std::atomic_bool g_warnStat
static const char * g_errorStr
static WARN_AS_ERROR_t g_warnBehavior
void warn_uncond_(fmt::string_view fmt, fmt::format_args args)
static const char * g_warningStr
static QCString g_warnFormat
static std::mutex g_mutex
void msg_(fmt::string_view fmt, fmt::format_args args)
static void format_warn(const QCString &file, int line, const QCString &text)
void term_(fmt::string_view fmt, fmt::format_args args)
static void handle_warn_as_error()
void err_full_(const QCString &file, int line, fmt::string_view fmt, fmt::format_args args)
static QCString g_warnlogFile
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.
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)