My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
message.h File Reference
#include <stdio.h>
#include <stdarg.h>

Go to the source code of this file.

Functions

void msg (const char *fmt,...)
 
void warn (const char *file, int line, const char *fmt,...)
 
void va_warn (const char *file, int line, const char *fmt, va_list args)
 
void warn_simple (const char *file, int line, const char *text)
 
void warn_undoc (const char *file, int line, const char *fmt,...)
 
void warn_doc_error (const char *file, int line, const char *fmt,...)
 
void warn_uncond (const char *fmt,...)
 
void err (const char *fmt,...)
 
void err_full (const char *file, int line, const char *fmt,...)
 
void initWarningFormat ()
 
void printlex (int dbg, bool enter, const char *lexName, const char *fileName)
 

Function Documentation

void err ( const char *  fmt,
  ... 
)

Definition at line 226 of file message.cpp.

References error_str, and warnFile.

Referenced by MemberDef::_writeReimplements(), FileDef::acquireFileVersion(), Definition::addInnerCompound(), PropertyMapper< ModuleContext::ModuleContext::Private >::addProperty(), adjustConfiguration(), MemberContext::Private::callerGraph(), MemberContext::Private::callGraph(), checkDotResult(), checkPageRelations(), classInheritedProtectionLevel(), ClassContext::Private::collaborationDiagram(), convertMapFile(), copyExtraFiles(), copyFile(), copyLatexStyleSheet(), copyLogo(), ResourceMgr::copyResourceAs(), copyStyleSheet(), MemberList::countDecMembers(), PerlModGenerator::createOutputDir(), createOutputDirectory(), PerlModGenerator::createOutputFile(), HtmlHelp::createProjectFile(), createSVG(), FlowChart::createSVG(), RTFGenerator::decrementIndentLevel(), DirContext::Private::dirGraph(), elemIsVisible(), LayoutErrorHandler::error(), Htags::execute(), TagFileErrorHandler::fatalError(), LayoutErrorHandler::fatalError(), fileToString(), Qhp::finalize(), findAndCopyImage(), FlowChart::findLabel(), FormulaList::generateBitmaps(), generateConfigFile(), generateDEF(), generateDocbook(), generateDocbookForClass(), generateDocbookForDir(), generateDocbookForFile(), generateDocbookForGroup(), generateDocbookForNamespace(), generateDocbookForPage(), generateGraphLegend(), generateLink(), generateOutput(), CiteDict::generatePage(), generatePlantUMLOutput(), generateSqlite3(), generateTemplateFiles(), generateXML(), generateXMLForClass(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForNamespace(), generateXMLForPage(), ModuleContext::Private::groupGraph(), TranslateContext::Private::handleCollaborationDiagramFor(), MemberContext::Private::handleDetailsVisibleFor(), TranslateContext::Private::handleDirDependencyGraphFor(), TranslateContext::Private::handleGeneratedAt(), TranslateContext::Private::handleImplementedBy(), TranslateContext::Private::handleIncludeDependencyGraph(), TranslateContext::Private::handleInheritanceDiagramFor(), TranslateContext::Private::handleInheritedByList(), TranslateContext::Private::handleInheritsList(), MemberContext::Private::handleNameWithContextFor(), TranslateContext::Private::handleReimplementedBy(), TranslateContext::Private::handleSourceRefBys(), TranslateContext::Private::handleSourceRefs(), TranslateContext::Private::handleWriteList(), FileContext::Private::includedByGraph(), FileContext::Private::includeGraph(), RTFGenerator::incrementIndentLevel(), ClassContext::Private::inheritanceDiagram(), RTFGenerator::init(), ManGenerator::init(), LatexGenerator::init(), HtmlGenerator::init(), DocSets::initialize(), EclipseHelp::initialize(), HtmlHelp::initialize(), NamespaceDef::insertMember(), GroupDef::insertMember(), FileDef::insertMember(), ClassDef::internalInsertMember(), ClassDef::isBaseClass(), VhdlDocGen::isSubClass(), ClassDef::isSubClass(), TemplateEngine::Private::loadByName(), loadExtensions(), Htags::loadFilemap(), loadStylesheet(), TemplateNodeCreator< TemplateNodeBlock >::mkpath(), DocInclude::parse(), parseCode(), parseDoc(), parseInput(), preProcessFile(), RTFGenerator::preProcessFileInplace(), readBoundingBox(), readConfiguration(), readInputFile(), readTagFile(), GroupDef::removeMember(), DotRunner::run(), DotFilePatcher::run(), StyleData::setStyle(), LayoutParser::startElement(), LayoutParser::startNavEntry(), OutputGenerator::startPlainFile(), testRTFOutput(), transcodeCharacterBuffer(), transcodeCharacterStringToUTF8(), updateLanguageMapping(), DocbookDocVisitor::visit(), TextDocVisitor::visit(), RTFDocVisitor::visit(), XmlDocVisitor::visit(), HtmlDocVisitor::visit(), LatexDocVisitor::visit(), ManDocVisitor::visit(), PrintDocVisitor::visit(), PerlModDocVisitor::visit(), PerlModDocVisitor::visitPre(), SearchIndexExternal::write(), ResourceMgr::writeCategory(), writeCombineScript(), NamespaceSDict::writeDeclaration(), writeDefaultLayoutFile(), writeDiaGraphFromFile(), NamespaceDef::writeDocumentation(), GroupDef::writeDocumentation(), DirDef::writeDocumentation(), FileDef::writeDocumentation(), ClassDef::writeDocumentationContents(), writeDotGraphFromFile(), writeDotImageMapFromFile(), HtmlGenerator::writeExternalSearchPage(), ClassDiagram::writeFigure(), FlowChart::writeFlowChart(), DotGfxHierarchyTable::writeGraph(), DotClassGraph::writeGraph(), DotInclDepGraph::writeGraph(), DotCallGraph::writeGraph(), DotDirDeps::writeGraph(), DotGroupCollaboration::writeGraph(), ClassDef::writeInheritanceGraph(), writeJavascriptSearchIndex(), writeLatexMakefile(), writeMakeBat(), writeMscGraphFromFile(), writePlantUMLSource(), HtmlGenerator::writeSearchPage(), Definition::writeSourceDef(), HtmlGenerator::writeStyleInfo(), and writeTagFile().

{
va_list args;
va_start(args, fmt);
vfprintf(warnFile, (QCString(error_str) + fmt).data(), args);
va_end(args);
}
void err_full ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

Definition at line 234 of file message.cpp.

References do_warn(), and error_str.

Referenced by NamespaceDef::compoundTypeString().

{
va_list args;
va_start(args, fmt);
do_warn(TRUE, file, line, error_str, fmt, args);
va_end(args);
}
void initWarningFormat ( )

Definition at line 38 of file message.cpp.

References Config_getBool, Config_getString, error_str, outputFormat, portable_fopen(), warnFile, and warning_str.

Referenced by checkConfiguration().

{
// int filePos = Config_getString(WARN_FORMAT).find("$file");
// int linePos = Config_getString(WARN_FORMAT).find("$line");
// int textPos = Config_getString(WARN_FORMAT).find("$text");
//
// // sort items on position (there are 6 cases)
// warnFormatOrder = 1;
// if (filePos>linePos && filePos>textPos)
// {
// if (linePos>textPos) // $text,$line,$file
// {
// warnFormatOrder = 2;
// }
// else // $line,$text,$file
// {
// warnFormatOrder = 3;
// }
// }
// else if (filePos<linePos && filePos<textPos)
// {
// if (linePos>textPos) // $file,$text,$line
// {
// warnFormatOrder = 4;
// }
// }
// else if (filePos<linePos && filePos>textPos) // $text,$file,$line
// {
// warnFormatOrder = 5;
// }
// else // $line,$file,$text
// {
// warnFormatOrder = 6;
// }
// outputFormat =
// substitute(
// substitute(
// substitute(
// Config_getString(WARN_FORMAT),
// "$file","%s"
// ),
// "$text","%s"
// ),
// "$line","%d"
// )+'\n';
// replace(QRegExp("\\$file"),"%s").
// replace(QRegExp("\\$text"),"%s").
// replace(QRegExp("\\$line"),"%d")+
// '\n';
if (!Config_getString(WARN_LOGFILE).isEmpty())
{
}
if (!warnFile) // point it to something valid, because warn() relies on it
{
warnFile = stderr;
}
if (Config_getBool(WARN_AS_ERROR))
{
}
}
void msg ( const char *  fmt,
  ... 
)
void printlex ( int  dbg,
bool  enter,
const char *  lexName,
const char *  fileName 
)

Definition at line 242 of file message.cpp.

References Debug::Lex, and Debug::print().

{
const char *enter_txt = "entering";
const char *enter_txt_uc = "Entering";
if (!enter)
{
enter_txt = "finished";
enter_txt_uc = "Finished";
}
if (dbg)
{
if (fileName)
fprintf(stderr,"--%s lexical analyzer: %s (for: %s)\n",enter_txt, qPrint(lexName), qPrint(fileName));
else
fprintf(stderr,"--%s lexical analyzer: %s\n",enter_txt, qPrint(lexName));
}
else
{
if (fileName)
Debug::print(Debug::Lex,0,"%s lexical analyzer: %s (for: %s)\n",enter_txt_uc, qPrint(lexName), qPrint(fileName));
else
Debug::print(Debug::Lex,0,"%s lexical analyzer: %s\n",enter_txt_uc, qPrint(lexName));
}
}
void va_warn ( const char *  file,
int  line,
const char *  fmt,
va_list  args 
)

Definition at line 191 of file message.cpp.

References Config_getBool, do_warn(), and warning_str.

Referenced by TemplateContextImpl::warn(), and TemplateParser::warn().

{
do_warn(Config_getBool(WARNINGS), file, line, warning_str, fmt, args);
}
void warn ( const char *  file,
int  line,
const char *  fmt,
  ... 
)
void warn_doc_error ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

Definition at line 210 of file message.cpp.

References Config_getBool, do_warn(), and warning_str.

Referenced by checkArgumentName(), checkUndocumentedParams(), defaultHandleTitleAndSize(), defaultHandleToken(), detectNoDocumentedParams(), DocAnchor::DocAnchor(), DocCite::DocCite(), DocFormula::DocFormula(), DocHtmlCaption::DocHtmlCaption(), DocLink::DocLink(), DocRef::DocRef(), findAndCopyImage(), handleAHref(), handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), DocPara::handleFile(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlStartTag(), DocPara::handleImage(), handleImg(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), handleInternalRef(), DocPara::handleLink(), handleLinkedWord(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleStartCode(), handleStyleArgument(), handleStyleLeave(), handleUnclosedStyleCommands(), DocInclude::parse(), DocIndexEntry::parse(), DocCopy::parse(), DocTitle::parse(), DocDotFile::parse(), DocMscFile::parse(), DocDiaFile::parse(), DocVhdlFlow::parse(), DocLink::parse(), DocRef::parse(), DocInternalRef::parse(), DocHRef::parse(), DocHtmlHeader::parse(), DocHtmlDescTitle::parse(), DocHtmlDescList::parse(), DocSection::parse(), DocSecRefItem::parse(), DocSecRefList::parse(), DocInternal::parse(), DocHtmlList::parse(), DocPara::parse(), DocParamList::parse(), DocHtmlCaption::parse(), DocHtmlRow::parse(), DocHtmlTable::parse(), DocText::parse(), DocRoot::parse(), DocHtmlList::parseXml(), DocParamList::parseXml(), DocHtmlRow::parseXml(), processCopyDoc(), readTextFileByName(), and MemberDef::writeDocumentation().

{
va_list args;
va_start(args, fmt);
do_warn(Config_getBool(WARN_IF_DOC_ERROR), file, line, warning_str, fmt, args);
va_end(args);
}
void warn_simple ( const char *  file,
int  line,
const char *  text 
)

Definition at line 196 of file message.cpp.

References Config_getBool, format_warn(), and warning_str.

Referenced by findMember().

{
if (!Config_getBool(WARNINGS)) return; // warning type disabled
format_warn(file,line,QCString(warning_str) + text);
}
void warn_uncond ( const char *  fmt,
  ... 
)
void warn_undoc ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

Definition at line 202 of file message.cpp.

References Config_getBool, do_warn(), and warning_str.

Referenced by computeClassRelations(), findMember(), and MemberDef::warnIfUndocumented().

{
va_list args;
va_start(args, fmt);
do_warn(Config_getBool(WARN_IF_UNDOCUMENTED), file, line, warning_str, fmt, args);
va_end(args);
}