17 #include <qdatetime.h>
107 void msg(
const char *fmt, ...)
117 vfprintf(stdout, fmt, args);
122 static void format_warn(
const char *file,
int line,
const char *text)
124 QCString fileSubst = file==0 ?
"<unknown>" : file;
125 QCString lineSubst; lineSubst.setNum(line);
126 QCString textSubst = text;
127 QCString versionSubst;
149 "$version",versionSubst
155 msgText +=
" (warning treated as error, aborting now)";
160 fwrite(msgText.data(),1,msgText.length(),
warnFile);
167 static void do_warn(
bool enabled,
const char *file,
int line,
const char *prefix,
const char *fmt, va_list args)
169 if (!enabled)
return;
170 const int bufSize = 40960;
175 qstrncpy(text,prefix,bufSize);
178 vsnprintf(text+l, bufSize-l, fmt, args);
179 text[bufSize-1]=
'\0';
183 void warn(
const char *file,
int line,
const char *fmt, ...)
191 void va_warn(
const char *file,
int line,
const char *fmt,va_list args)
202 void warn_undoc(
const char *file,
int line,
const char *fmt, ...)
226 void err(
const char *fmt, ...)
234 extern void err_full(
const char *file,
int line,
const char *fmt, ...)
242 void printlex(
int dbg,
bool enter,
const char *lexName,
const char *fileName)
244 const char *enter_txt =
"entering";
245 const char *enter_txt_uc =
"Entering";
249 enter_txt =
"finished";
250 enter_txt_uc =
"Finished";
256 fprintf(stderr,
"--%s lexical analyzer: %s (for: %s)\n",enter_txt, qPrint(lexName), qPrint(fileName));
258 fprintf(stderr,
"--%s lexical analyzer: %s\n",enter_txt, qPrint(lexName));
263 Debug::print(
Debug::Lex,0,
"%s lexical analyzer: %s (for: %s)\n",enter_txt_uc, qPrint(lexName), qPrint(fileName));