diff options
Diffstat (limited to 'src')
61 files changed, 1281 insertions, 1089 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 625df51..9662cef 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -152,8 +152,8 @@ class ClassDefImpl /*! Is the class part of an unnamed namespace? */ bool isStatic; - /*! Is the class part implemented in Objective C? */ - bool isObjC; + /*! Language used for this class */ + SrcLangExt lang; /*! TRUE if classes members are merged with those of the base classes. */ bool membersMerged; @@ -259,7 +259,7 @@ ClassDef::ClassDef( setReference(lref); m_impl = new ClassDefImpl; m_impl->compType = ct; - m_impl->isObjC = FALSE; + m_impl->lang = SrcLangExt_Unknown; m_impl->init(defFileName,name(),compoundTypeString(),fName); } @@ -951,13 +951,13 @@ void ClassDef::showUsedFiles(OutputList &ol) if (fortranOpt) { ol.parseText(theTranslator->trGeneratedFromFilesFortran( - m_impl->isObjC && m_impl->compType==Interface ? Class : m_impl->compType, + m_impl->lang==SrcLangExt_ObjC && m_impl->compType==Interface ? Class : m_impl->compType, m_impl->files.count()==1)); } else { ol.parseText(theTranslator->trGeneratedFromFiles( - m_impl->isObjC && m_impl->compType==Interface ? Class : m_impl->compType, + m_impl->lang==SrcLangExt_ObjC && m_impl->compType==Interface ? Class : m_impl->compType, m_impl->files.count()==1)); } @@ -1148,7 +1148,7 @@ void ClassDef::writeInheritanceGraph(OutputList &ol) } else { - err("Error: invalid marker %d in inherits list!\n",entryIndex); + err("error: invalid marker %d in inherits list!\n",entryIndex); } index=newIndex+matchLen; } @@ -1419,7 +1419,7 @@ void ClassDef::writeDocumentation(OutputList &ol) else { pageTitle = theTranslator->trCompoundReference(displayName(), - m_impl->compType == Interface && m_impl->isObjC ? Class : m_impl->compType, + m_impl->compType == Interface && m_impl->lang==SrcLangExt_ObjC ? Class : m_impl->compType, m_impl->tempArgs != 0); } @@ -1680,7 +1680,7 @@ void ClassDef::writeDocumentationForInnerClasses(OutputList &ol) (innerCd->protection()!=Private || Config_getBool("EXTRACT_PRIVATE")) ) { - msg("Generating docs for nested compound %s...\n",innerCd->name().data()); + msg("Generating docs for nested compound %s...\n",qPrint(innerCd->name())); innerCd->writeDocumentation(ol); innerCd->writeMemberList(ol); } @@ -1847,7 +1847,7 @@ void ClassDef::writeMemberList(OutputList &ol) ol.writeString("<td>"); } if ( - (prot!=Public || (virt!=Normal && !m_impl->isObjC) || + (prot!=Public || (virt!=Normal && m_impl->lang!=SrcLangExt_ObjC) || md->isFriend() || md->isRelated() || md->isExplicit() || md->isMutable() || (md->isInline() && Config_getBool("INLINE_INFO")) || md->isSignal() || md->isSlot() || @@ -1872,7 +1872,7 @@ void ClassDef::writeMemberList(OutputList &ol) else if (prot==Private) sl.append("private"); else if (prot==Package) sl.append("package"); if (virt==Virtual && - !m_impl->isObjC) sl.append("virtual"); + m_impl->lang!=SrcLangExt_ObjC) sl.append("virtual"); else if (virt==Pure) sl.append("pure virtual"); if (md->isStatic()) sl.append("static"); if (md->isSignal()) sl.append("signal"); @@ -2156,7 +2156,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) //printf("isBaseClass(cd=%s) looking for %s\n",cd->name().data(),bcd->name().data()); if (level>256) { - err("Possible recursive class relation while inside %s and looking for %s\n",name().data(),bcd->name().data()); + err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(name()),qPrint(bcd->name())); abort(); return FALSE; } @@ -2730,7 +2730,7 @@ void ClassDef::determineIntfUsageRelation() QCString ClassDef::compoundTypeString() const { - if (m_impl->compType==Interface && m_impl->isObjC) return "class"; + if (m_impl->compType==Interface && m_impl->lang==SrcLangExt_ObjC) return "class"; if (Config_getBool("OPTIMIZE_FOR_FORTRAN")) { switch (m_impl->compType) @@ -2933,7 +2933,7 @@ ClassDef *ClassDef::getVariableInstance(const char *templSpec) ClassDef *templateClass=m_impl->variableInstances->find(templSpec); if (templateClass==0) { - Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",name().data(),templSpec); + Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec)); templateClass = new ClassDef("<code>",1,name()+templSpec, ClassDef::Class,0,0,FALSE); templateClass->addMembersToTemplateInstance( this, templSpec ); @@ -3080,9 +3080,16 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( if (!scName.isEmpty()) scName+=scopeSeparator; - scName+=className(); - ArgumentList *al=0; bool isSpecialization = localName().find('<')!=-1; + bool isGeneric = m_impl->lang==SrcLangExt_CSharp; + + QCString clName = className(); + if (isGeneric && clName.right(2)=="-g") + { + clName = clName.left(clName.length()-2); + } + scName+=clName; + ArgumentList *al=0; if (templateArguments()) { if (actualParams && (al=actualParams->current())) @@ -3387,7 +3394,12 @@ bool ClassDef::isAbstract() const bool ClassDef::isObjectiveC() const { - return m_impl->isObjC; + return m_impl->lang==SrcLangExt_ObjC; +} + +bool ClassDef::isCSharp() const +{ + return m_impl->lang==SrcLangExt_CSharp; } ClassDef *ClassDef::categoryOf() const @@ -3430,9 +3442,9 @@ void ClassDef::setIsStatic(bool b) m_impl->isStatic=b; } -void ClassDef::setIsObjectiveC(bool b) +void ClassDef::setLanguage(SrcLangExt lang) { - m_impl->isObjC=b; + m_impl->lang=lang; } void ClassDef::setCompoundType(CompoundType t) diff --git a/src/classdef.h b/src/classdef.h index 4b85739..cd5cfdc 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -23,7 +23,7 @@ #include <qdict.h> #include <qstrlist.h> -//#include "entry.h" +#include "util.h" #include "memberlist.h" #include "definition.h" #include "sortdict.h" @@ -237,6 +237,9 @@ class ClassDef : public Definition /*! Returns TRUE if this class is implemented in Objective-C */ bool isObjectiveC() const; + /*! Returns TRUE if this class is implemented in C# */ + bool isCSharp() const; + /*! Returns the class of which this is a category (Objective-C only) */ ClassDef *categoryOf() const; @@ -282,7 +285,7 @@ class ClassDef : public Definition void addUsedClass(ClassDef *cd,const char *accessName); void addUsedByClass(ClassDef *cd,const char *accessName); void setIsStatic(bool b); - void setIsObjectiveC(bool b); + void setLanguage(SrcLangExt lang); void setCompoundType(CompoundType t); void setClassName(const char *name); @@ -2390,8 +2390,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} } <Body>"("{B}*("*"{B}*)+{SCOPENAME}*{B}*")"/{B}* { // (*p)->func() but not "if (p) ..." g_code->codify(yytext); - int s=0;while (s<yyleng && !isId(yytext[s])) s++; - int e=yyleng-1;while (e>=0 && !isId(yytext[e])) e--; + int s=0;while (s<(int)yyleng && !isId(yytext[s])) s++; + int e=(int)yyleng-1;while (e>=0 && !isId(yytext[e])) e--; QCString varname = ((QCString)yytext).mid(s,e-s+1); addType(); g_name=varname; diff --git a/src/commentscan.l b/src/commentscan.l index b805fff..bd92350 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -433,6 +433,7 @@ static QCString getDocSectionName(int s) case Entry::CATEGORYDOC_SEC: return "\\category"; case Entry::ENUMDOC_SEC: return "\\enum"; case Entry::PAGEDOC_SEC: return "\\page"; + case Entry::VARIABLEDOC_SEC: return "\\var"; case Entry::MEMBERDOC_SEC: return "\\fn"; case Entry::OVERLOADDOC_SEC: return "\\overload"; case Entry::FILEDOC_SEC: return "\\file"; @@ -451,6 +452,7 @@ static QCString getDocSectionName(int s) static bool makeStructuralIndicator(Entry::Sections s) { + //printf("current->section=%x\n",current->section); if (!getDocSectionName(current->section).isEmpty()) { return TRUE; @@ -1098,18 +1100,18 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <ReadFormulaShort>{CMD}"f$" { // end of inline formula formulaText+="$"; - addOutput(addFormula()); + addOutput(" "+addFormula()); BEGIN(Comment); } <ReadFormulaLong>{CMD}"f]" { // end of block formula formulaText+="\\]"; - addOutput(addFormula()); + addOutput(" "+addFormula()); BEGIN(Comment); } <ReadFormulaLong>{CMD}"f}" { // end of custom env formula formulaText+="\\end"; formulaText+=formulaEnv; - addOutput(addFormula()); + addOutput(" "+addFormula()); BEGIN(Comment); } <ReadFormulaLong,ReadFormulaShort>[^\\@\n]+ { // any non-special character @@ -1136,7 +1138,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <EnumDocArg1>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: missing argument after \\enum." + "warning: missing argument after \\enum." ); addOutput('\n'); if (*yytext=='\n') yyLineNr++; @@ -1157,7 +1159,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <NameSpaceDocArg1>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: missing argument after " + "warning: missing argument after " "\\namespace." ); addOutput('\n'); @@ -1179,7 +1181,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <PackageDocArg1>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: missing argument after " + "warning: missing argument after " "\\package." ); addOutput('\n'); @@ -1210,7 +1212,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <ClassDocArg1,CategoryDocArg1>{DOCNL} { warn(yyFileName,yyLineNr, - "Warning: missing argument after " + "warning: missing argument after " "\\%s.",YY_START==ClassDocArg1?"class":"category" ); addOutput('\n'); @@ -1271,7 +1273,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <GroupDocArg1>{DOCNL} { // missing argument! warn(yyFileName,yyLineNr, - "Warning: missing group name after %s", + "warning: missing group name after %s", current->groupDocCmd() ); addOutput('\n'); @@ -1292,7 +1294,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ) // defgroup requires second argument { warn(yyFileName,yyLineNr, - "Warning: missing title after " + "warning: missing title after " "\\defgroup %s", current->name.data() ); } @@ -1312,7 +1314,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <PageDocArg1>{DOCNL} { warn(yyFileName,yyLineNr, - "Warning: missing argument after " + "warning: missing argument after " "\\page." ); if (*yytext=='\n') yyLineNr++; @@ -1358,7 +1360,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <XRefItemParam1>{DOCNL} { // missing arguments warn(yyFileName,yyLineNr, - "Warning: Missing first argument of \\xrefitem" + "warning: Missing first argument of \\xrefitem" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1378,7 +1380,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <XRefItemParam2>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: Missing second argument of \\xrefitem" + "warning: Missing second argument of \\xrefitem" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1399,7 +1401,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <XRefItemParam3>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: Missing third argument of \\xrefitem" + "warning: Missing third argument of \\xrefitem" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1426,7 +1428,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <RelatesParam1>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: Missing argument of \\relates or \\memberof command" + "warning: Missing argument of \\relates or \\memberof command" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1461,7 +1463,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <SectionLabel>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: \\section command has no label" + "warning: \\section command has no label" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1469,7 +1471,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <SectionLabel>. { // invalid character for section label warn(yyFileName,yyLineNr, - "Warning: Invalid or missing section label" + "warning: Invalid or missing section label" ); BEGIN(Comment); } @@ -1516,7 +1518,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <SubpageLabel>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: \\subpage command has no label" + "warning: \\subpage command has no label" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1546,7 +1548,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <AnchorLabel>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: \\anchor command has no label" + "warning: \\anchor command has no label" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1554,7 +1556,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <AnchorLabel>. { // invalid character for anchor label warn(yyFileName,yyLineNr, - "Warning: Invalid or missing anchor label" + "warning: Invalid or missing anchor label" ); BEGIN(Comment); } @@ -1586,7 +1588,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" if (g_commentCount<0 && blockName!="verbatim") { warn(yyFileName,yyLineNr, - "Warning: found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data()); + "warning: found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data()); } } <FormatBlock>. { @@ -1594,7 +1596,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <FormatBlock><<EOF>> { warn(yyFileName,yyLineNr, - "Warning: reached end of comment while inside a @%s block; check for missing @end%s tag!", + "warning: reached end of comment while inside a @%s block; check for missing @end%s tag!", blockName.data(),blockName.data() ); yyterminate(); @@ -1670,7 +1672,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" if (guards.isEmpty()) { warn(yyFileName,yyLineNr, - "Warning: found @endif without matching start command"); + "warning: found @endif without matching start command"); } else { @@ -1682,7 +1684,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" if (guards.isEmpty()) { warn(yyFileName,yyLineNr, - "Warning: found @else without matching start command"); + "warning: found @else without matching start command"); } else { @@ -1699,7 +1701,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" if (guards.isEmpty()) { warn(yyFileName,yyLineNr, - "Warning: found @elseif without matching start command"); + "warning: found @elseif without matching start command"); } else { @@ -1803,7 +1805,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" if (!inGroupParamFound) { warn(yyFileName,yyLineNr, - "Warning: Missing group name for \\ingroup command" + "warning: Missing group name for \\ingroup command" ); } if (*yytext=='\n') yyLineNr++; @@ -1884,7 +1886,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <InheritParam>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: \\inherit command has no argument" + "warning: \\inherit command has no argument" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -1892,7 +1894,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <InheritParam>. { // invalid character for anchor label warn(yyFileName,yyLineNr, - "Warning: Invalid or missing name for \\inherit command" + "warning: Invalid or missing name for \\inherit command" ); BEGIN(Comment); } @@ -1907,7 +1909,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } <ExtendsParam>{DOCNL} { // missing argument warn(yyFileName,yyLineNr, - "Warning: \\extends or \\implements command has no argument" + "warning: \\extends or \\implements command has no argument" ); if (*yytext=='\n') yyLineNr++; addOutput('\n'); @@ -2201,7 +2203,7 @@ static bool handleMemberOf(const QCString &) static bool handleRefItem(const QCString &) { - addOutput("@refitem "); + addOutput(" @refitem "); BEGIN(LineParam); return FALSE; } @@ -2209,7 +2211,7 @@ static bool handleRefItem(const QCString &) static bool handleSection(const QCString &s) { setOutput(OutputDoc); - addOutput("@"+s+" "); + addOutput(" @"+s+" "); BEGIN(SectionLabel); if (s=="section") g_sectionLevel=1; else if (s=="subsection") g_sectionLevel=2; @@ -2226,23 +2228,23 @@ static bool handleSubpage(const QCString &s) ) { warn(yyFileName,yyLineNr, - "Warning: found \\subpage command in a comment block that is not marked as a page!"); + "warning: found \\subpage command in a comment block that is not marked as a page!"); } - addOutput("@"+s+" "); + addOutput(" @"+s+" "); BEGIN(SubpageLabel); return FALSE; } static bool handleAnchor(const QCString &s) { - addOutput("@"+s+" "); + addOutput(" @"+s+" "); BEGIN(AnchorLabel); return FALSE; } static bool handleFormatBlock(const QCString &s) { - addOutput("@"+s+" "); + addOutput(" @"+s+" "); //printf("handleFormatBlock(%s)\n",s.data()); blockName=s; g_commentCount=0; @@ -2252,7 +2254,7 @@ static bool handleFormatBlock(const QCString &s) static bool handleAddIndex(const QCString &) { - addOutput("@addindex "); + addOutput(" @addindex "); BEGIN(LineParam); return FALSE; } @@ -2278,7 +2280,7 @@ static bool handleElseIf(const QCString &) if (guards.isEmpty()) { warn(yyFileName,yyLineNr, - "Warning: found \\else without matching start command"); + "warning: found \\else without matching start command"); } else { @@ -2293,7 +2295,7 @@ static bool handleElse(const QCString &) if (guards.isEmpty()) { warn(yyFileName,yyLineNr, - "Warning: found \\else without matching start command"); + "warning: found \\else without matching start command"); } else { @@ -2307,7 +2309,7 @@ static bool handleEndIf(const QCString &) if (guards.isEmpty()) { warn(yyFileName,yyLineNr, - "Warning: found \\endif without matching start command"); + "warning: found \\endif without matching start command"); } else { @@ -2449,7 +2451,7 @@ static void checkFormula() { if (YY_START==ReadFormulaShort || YY_START==ReadFormulaLong) { - warn(yyFileName,yyLineNr,"Warning: End of comment block while inside formula."); + warn(yyFileName,yyLineNr,"warning: End of comment block while inside formula."); } } @@ -2574,14 +2576,14 @@ void groupLeaveFile(const char *fileName,int line) { //if (g_memberGroupId!=DOX_NOGROUP) //{ - // warn(fileName,line,"Warning: end of file while inside a member group\n"); + // warn(fileName,line,"warning: end of file while inside a member group\n"); //} g_memberGroupId=DOX_NOGROUP; g_memberGroupRelates.resize(0); g_memberGroupDocs.resize(0); if (!g_autoGroupStack.isEmpty()) { - warn(fileName,line,"Warning: end of file while inside a group\n"); + warn(fileName,line,"warning: end of file while inside a group\n"); } } @@ -2589,7 +2591,7 @@ void groupEnterCompound(const char *fileName,int line,const char *name) { if (g_memberGroupId!=DOX_NOGROUP) { - warn(fileName,line,"Warning: try to put compound %s inside a member group\n",name); + warn(fileName,line,"warning: try to put compound %s inside a member group\n",name); } g_memberGroupId=DOX_NOGROUP; g_memberGroupRelates.resize(0); @@ -2612,7 +2614,7 @@ void groupLeaveCompound(const char *,int,const char * /*name*/) //printf("groupLeaveCompound(%s)\n",name); //if (g_memberGroupId!=DOX_NOGROUP) //{ - // warn(fileName,line,"Warning: end of compound %s while inside a member group\n",name); + // warn(fileName,line,"warning: end of compound %s while inside a member group\n",name); //} g_memberGroupId=DOX_NOGROUP; g_memberGroupRelates.resize(0); diff --git a/src/config.h b/src/config.h index dbf3a37..2ae0979 100644 --- a/src/config.h +++ b/src/config.h @@ -24,7 +24,8 @@ #include <qfile.h> #include <qdict.h> #include <qlist.h> -#include <qtextstream.h> +#include "ftextstream.h" + /*! \brief Abstract base class for any configuration option. * @@ -71,17 +72,17 @@ class ConfigOption void setEncoding(const QCString &e) { m_encoding = e; } protected: - virtual void writeTemplate(QTextStream &t,bool sl,bool upd) = 0; + virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0; virtual void convertStrToVal() {} virtual void substEnvVars() = 0; - virtual void writeXML(QTextStream&) {} + virtual void writeXML(FTextStream&) {} virtual void init() {} QCString convertToComment(const QCString &s); - void writeBoolValue(QTextStream &t,bool v); - void writeIntValue(QTextStream &t,int i); - void writeStringValue(QTextStream &t,QCString &s); - void writeStringList(QTextStream &t,QStrList &l); + void writeBoolValue(FTextStream &t,bool v); + void writeIntValue(FTextStream &t,int i); + void writeStringValue(FTextStream &t,QCString &s); + void writeStringList(FTextStream &t,QStrList &l); QCString m_spaces; QCString m_name; @@ -103,7 +104,7 @@ class ConfigInfo : public ConfigOption m_name = name; m_doc = doc; } - void writeTemplate(QTextStream &t, bool sl,bool) + void writeTemplate(FTextStream &t, bool sl,bool) { if (!sl) { @@ -134,7 +135,7 @@ class ConfigList : public ConfigOption void setWidgetType(WidgetType w) { m_widgetType = w; } WidgetType widgetType() const { return m_widgetType; } QStrList *valueRef() { return &m_value; } - void writeTemplate(QTextStream &t,bool sl,bool) + void writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) { @@ -147,7 +148,7 @@ class ConfigList : public ConfigOption t << "\n"; } void substEnvVars(); - void writeXML(QTextStream&); + void writeXML(FTextStream&); void init() { m_value.clear(); } private: QStrList m_value; @@ -175,7 +176,7 @@ class ConfigEnum : public ConfigOption } QCString *valueRef() { return &m_value; } void substEnvVars(); - void writeTemplate(QTextStream &t,bool sl,bool) + void writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) { @@ -187,7 +188,7 @@ class ConfigEnum : public ConfigOption writeStringValue(t,m_value); t << "\n"; } - void writeXML(QTextStream&); + void writeXML(FTextStream&); void init() { m_value = m_defValue.copy(); } private: @@ -217,7 +218,7 @@ class ConfigString : public ConfigOption WidgetType widgetType() const { return m_widgetType; } void setDefaultValue(const char *v) { m_defValue = v; } QCString *valueRef() { return &m_value; } - void writeTemplate(QTextStream &t,bool sl,bool) + void writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) { @@ -230,7 +231,7 @@ class ConfigString : public ConfigOption t << "\n"; } void substEnvVars(); - void writeXML(QTextStream&); + void writeXML(FTextStream&); void init() { m_value = m_defValue.copy(); } private: @@ -261,7 +262,7 @@ class ConfigInt : public ConfigOption int maxVal() const { return m_maxVal; } void convertStrToVal(); void substEnvVars(); - void writeTemplate(QTextStream &t,bool sl,bool upd) + void writeTemplate(FTextStream &t,bool sl,bool upd) { if (!sl) { @@ -280,7 +281,7 @@ class ConfigInt : public ConfigOption } t << "\n"; } - void writeXML(QTextStream&); + void writeXML(FTextStream&); void init() { m_value = m_defValue; } private: int m_value; @@ -309,7 +310,7 @@ class ConfigBool : public ConfigOption void convertStrToVal(); void substEnvVars(); void setValueString(const QCString &v) { m_valueString = v; } - void writeTemplate(QTextStream &t,bool sl,bool upd) + void writeTemplate(FTextStream &t,bool sl,bool upd) { if (!sl) { @@ -328,7 +329,7 @@ class ConfigBool : public ConfigOption } t << "\n"; } - void writeXML(QTextStream&); + void writeXML(FTextStream&); void init() { m_value = m_defValue; } private: bool m_value; @@ -344,9 +345,9 @@ class ConfigObsolete : public ConfigOption public: ConfigObsolete(const char *name,OptionType t) : ConfigOption(t) { m_name = name; } - void writeTemplate(QTextStream &,bool,bool) {} + void writeTemplate(FTextStream &,bool,bool) {} void substEnvVars() {} - void writeXML(QTextStream&); + void writeXML(FTextStream&); }; @@ -535,10 +536,10 @@ class Config * is \c TRUE the description of each configuration option will * be omitted. */ - void writeTemplate(QTextStream &t,bool shortIndex,bool updateOnly); + void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly); /** Write XML representation of the config file */ - void writeXML(QTextStream &t); + void writeXML(FTextStream &t); ///////////////////////////// // internal API diff --git a/src/config.l b/src/config.l index 5f1ba37..97571c8 100644 --- a/src/config.l +++ b/src/config.l @@ -104,18 +104,18 @@ QCString ConfigOption::convertToComment(const QCString &s) return result; } -void ConfigOption::writeBoolValue(QTextStream &t,bool v) +void ConfigOption::writeBoolValue(FTextStream &t,bool v) { t << " "; if (v) t << "YES"; else t << "NO"; } -void ConfigOption::writeIntValue(QTextStream &t,int i) +void ConfigOption::writeIntValue(FTextStream &t,int i) { t << " " << i; } -void ConfigOption::writeStringValue(QTextStream &t,QCString &s) +void ConfigOption::writeStringValue(FTextStream &t,QCString &s) { char c; bool needsEscaping=FALSE; @@ -146,7 +146,7 @@ void ConfigOption::writeStringValue(QTextStream &t,QCString &s) } } -void ConfigOption::writeStringList(QTextStream &t,QStrList &l) +void ConfigOption::writeStringList(FTextStream &t,QStrList &l) { const char *p = l.first(); bool first=TRUE; @@ -175,7 +175,7 @@ void ConfigInt::convertStrToVal() int val = m_valueString.toInt(&ok); if (!ok || val<m_minVal || val>m_maxVal) { - config_warn("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" + config_warn("warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n" "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value); } m_value=val; @@ -197,7 +197,7 @@ void ConfigBool::convertStrToVal() } else { - config_warn("Warning: argument `%s' for option %s is not a valid boolean value\n" + config_warn("warning: argument `%s' for option %s is not a valid boolean value\n" "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO"); } } @@ -286,7 +286,7 @@ bool &Config::getBool(const char *fileName,int num,const char *name) const /* ----------------------------------------------------------------- */ -void ConfigInt::writeXML(QTextStream& t) +void ConfigInt::writeXML(FTextStream& t) { t << " <option type='int' " "id='" << convertToXML(name()) << "' " @@ -298,7 +298,7 @@ void ConfigInt::writeXML(QTextStream& t) t << "/>" << endl; } -void ConfigBool::writeXML(QTextStream& t) +void ConfigBool::writeXML(FTextStream& t) { t << " <option type='bool' " "id='" << convertToXML(name()) << "' " @@ -308,7 +308,7 @@ void ConfigBool::writeXML(QTextStream& t) t << "/>" << endl; } -void ConfigString::writeXML(QTextStream& t) +void ConfigString::writeXML(FTextStream& t) { QString format; switch (m_widgetType) @@ -326,7 +326,7 @@ void ConfigString::writeXML(QTextStream& t) t << "/>" << endl; } -void ConfigEnum::writeXML(QTextStream &t) +void ConfigEnum::writeXML(FTextStream &t) { t << " <option type='enum' " "id='" << convertToXML(name()) << "' " @@ -345,7 +345,7 @@ void ConfigEnum::writeXML(QTextStream &t) t << " </option>" << endl; } -void ConfigList::writeXML(QTextStream &t) +void ConfigList::writeXML(FTextStream &t) { QString format; switch (m_widgetType) @@ -371,7 +371,7 @@ void ConfigList::writeXML(QTextStream &t) t << " </option>" << endl; } -void ConfigObsolete::writeXML(QTextStream &t) +void ConfigObsolete::writeXML(FTextStream &t) { t << " <option type='obsolete' " "id='" << convertToXML(name()) << "'/>" << endl; @@ -459,7 +459,7 @@ static QCString configStringRecode( void *cd = portable_iconv_open(outputEncoding,inputEncoding); if (cd==(void *)(-1)) { - fprintf(stderr,"Error: unsupported character conversion: '%s'->'%s'\n", + fprintf(stderr,"error: unsupported character conversion: '%s'->'%s'\n", inputEncoding.data(),outputEncoding.data()); exit(1); } @@ -476,7 +476,7 @@ static QCString configStringRecode( } else { - fprintf(stderr,"Error: failed to translate characters from %s to %s: %s\n", + fprintf(stderr,"error: failed to translate characters from %s to %s: %s\n", inputEncoding.data(),outputEncoding.data(),strerror(errno)); exit(1); } @@ -497,7 +497,7 @@ static FILE *tryPath(const char *path,const char *fileName) if (fi.exists() && fi.isFile()) { FILE *f=portable_fopen(absName,"r"); - if (!f) config_err("Error: could not open file %s for reading\n",absName.data()); + if (!f) config_err("error: could not open file %s for reading\n",absName.data()); return f; } return 0; @@ -542,7 +542,7 @@ static FILE *findFile(const char *fileName) static void readIncludeFile(const char *incName) { if (includeDepth==MAX_INCLUDE_DEPTH) { - config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n", + config_err("error: maximum include depth (%d) reached, %s is not included. Aborting...\n", MAX_INCLUDE_DEPTH,incName); exit(1); } @@ -582,7 +582,7 @@ static void readIncludeFile(const char *incName) } else { - config_err("Error: @INCLUDE = %s: not found!\n",inc.data()); + config_err("error: @INCLUDE = %s: not found!\n",inc.data()); exit(1); } } @@ -612,7 +612,7 @@ static void readIncludeFile(const char *incName) ConfigOption *option = config->get(cmd); if (option==0) // oops not known { - config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + config_err("warning: ignoring unsupported tag `%s' at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); } @@ -652,7 +652,7 @@ static void readIncludeFile(const char *incName) BEGIN(GetString); break; case ConfigOption::O_Obsolete: - config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n" + config_err("warning: Tag `%s' at line %d of file %s has become obsolete.\n" "To avoid this warning please update your configuration " "file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); @@ -665,7 +665,7 @@ static void readIncludeFile(const char *incName) ConfigOption *option = config->get(cmd); if (option==0) // oops not known { - config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n", + config_err("warning: ignoring unsupported tag `%s' at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); } @@ -686,12 +686,12 @@ static void readIncludeFile(const char *incName) case ConfigOption::O_String: case ConfigOption::O_Int: case ConfigOption::O_Bool: - config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", + config_err("warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n", yytext,yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); break; case ConfigOption::O_Obsolete: - config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n" + config_err("warning: Tag `%s' at line %d of file %s has become obsolete.\n" "To avoid this warning please update your configuration " "file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data()); BEGIN(SkipInvalid); @@ -728,7 +728,7 @@ static void readIncludeFile(const char *incName) } } -<Start>[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } +<Start>[a-z_A-Z0-9]+ { config_err("warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); } <GetString,GetBool,SkipInvalid>\n { yyLineNr++; BEGIN(Start); } <GetStrList>\n { yyLineNr++; @@ -769,7 +769,7 @@ static void readIncludeFile(const char *incName) } if (*yytext=='\n') { - config_err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); + config_err("warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data()); yyLineNr++; } BEGIN(lastState); @@ -788,7 +788,7 @@ static void readIncludeFile(const char *incName) else { *b=FALSE; - config_warn("Warning: Invalid value `%s' for " + config_warn("warning: Invalid value `%s' for " "boolean tag in line %d, file %s; use YES or NO\n", bs.data(),yyLineNr,yyFileName.data()); } @@ -807,7 +807,7 @@ static void readIncludeFile(const char *incName) /*@ ---------------------------------------------------------------------------- */ -void Config::writeTemplate(QTextStream &t,bool sl,bool upd) +void Config::writeTemplate(FTextStream &t,bool sl,bool upd) { t << "# Doxyfile " << versionString << endl << endl; if (!sl) @@ -830,7 +830,7 @@ void Config::writeTemplate(QTextStream &t,bool sl,bool upd) } } -void Config::writeXML(QTextStream &t) +void Config::writeXML(FTextStream &t) { t << "<doxygenconfig>" << endl; bool first=TRUE; @@ -1060,15 +1060,15 @@ void Config::check() { if (warnFormat.find("$file")==-1) { - config_err("Warning: warning format does not contain a $file tag!\n"); + config_err("warning: warning format does not contain a $file tag!\n"); } if (warnFormat.find("$line")==-1) { - config_err("Warning: warning format does not contain a $line tag!\n"); + config_err("warning: warning format does not contain a $line tag!\n"); } if (warnFormat.find("$text")==-1) { - config_err("Warning: warning format foes not contain a $text tag!\n"); + config_err("warning: warning format foes not contain a $text tag!\n"); } } @@ -1089,7 +1089,7 @@ void Config::check() if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && paperType!="legal" && paperType!="executive") { - config_err("Error: Unknown page type specified"); + config_err("error: Unknown page type specified"); } QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); @@ -1129,7 +1129,7 @@ void Config::check() QFileInfo fi(headerFile); if (!fi.exists()) { - config_err("Error: tag HTML_HEADER: header file `%s' " + config_err("error: tag HTML_HEADER: header file `%s' " "does not exist\n",headerFile.data()); exit(1); } @@ -1141,7 +1141,7 @@ void Config::check() QFileInfo fi(footerFile); if (!fi.exists()) { - config_err("Error: tag HTML_FOOTER: footer file `%s' " + config_err("error: tag HTML_FOOTER: footer file `%s' " "does not exist\n",footerFile.data()); exit(1); } @@ -1153,7 +1153,7 @@ void Config::check() QFileInfo fi(latexHeaderFile); if (!fi.exists()) { - config_err("Error: tag LATEX_HEADER: header file `%s' " + config_err("error: tag LATEX_HEADER: header file `%s' " "does not exist\n",latexHeaderFile.data()); exit(1); } @@ -1164,7 +1164,7 @@ void Config::check() while (s) { QFileInfo fi(s); - if (!fi.exists()) config_err("Warning: tag INCLUDE_PATH: include path `%s' " + if (!fi.exists()) config_err("warning: tag INCLUDE_PATH: include path `%s' " "does not exist\n",s); s=includePath.next(); } @@ -1207,7 +1207,7 @@ void Config::check() QFileInfo dp(dotPath+"/dot"+portable_commandExtension()); if (!dp.exists() || !dp.isFile()) { - config_err("Warning: the dot tool could not be found at %s\n",dotPath.data()); + config_err("warning: the dot tool could not be found at %s\n",dotPath.data()); dotPath=""; } else @@ -1231,7 +1231,7 @@ void Config::check() QFileInfo dp(mscgenPath+"/mscgen"+portable_commandExtension()); if (!dp.exists() || !dp.isFile()) { - config_err("Warning: the mscgen tool could not be found at %s\n",mscgenPath.data()); + config_err("warning: the mscgen tool could not be found at %s\n",mscgenPath.data()); mscgenPath=""; } else @@ -1264,7 +1264,7 @@ void Config::check() QFileInfo fi(s); if (!fi.exists()) { - config_err("Warning: tag INPUT: input source `%s' does not exist\n",s); + config_err("warning: tag INPUT: input source `%s' does not exist\n",s); } s=inputSources.next(); } @@ -1348,14 +1348,14 @@ void Config::check() Config_getString("GENERATE_TAGFILE").isEmpty() ) { - config_err("Warning: No output formats selected! Set at least one of the main GENERATE_* options to YES.\n"); + config_err("warning: No output formats selected! Set at least one of the main GENERATE_* options to YES.\n"); } // check HTMLHELP creation requirements if (!Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) { - config_err("Warning: GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n"); + config_err("warning: GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n"); } // check QHP creation requirements @@ -1363,13 +1363,13 @@ void Config::check() { if (Config_getString("QHP_NAMESPACE").isEmpty()) { - config_err("Error: GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n"); + config_err("error: GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n"); Config_getString("QHP_NAMESPACE")="org.doxygen.doc"; } if (Config_getString("QHP_VIRTUAL_FOLDER").isEmpty()) { - config_err("Error: GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n"); + config_err("error: GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n"); Config_getString("QHP_VIRTUAL_FOLDER")="doc"; } } @@ -1453,7 +1453,7 @@ void Config::check() if (!b3) s3=" HIDE_SCOPE_NAMES = YES (was NO)\n"; else s3=""; if (!b4) s4=" EXTRACT_PRIVATE = YES (was NO)\n"; else s4=""; - config_err("Warning: enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n" + config_err("warning: enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n" "%s%s%s%s",s1,s2,s3,s4 ); @@ -1514,7 +1514,7 @@ static QCString configFileToString(const char *name) QFileInfo fi(name); if (!fi.exists() || !fi.isFile()) { - config_err("Error: file `%s' not found\n",name); + config_err("error: file `%s' not found\n",name); return ""; } f.setName(name); @@ -1535,7 +1535,7 @@ static QCString configFileToString(const char *name) } if (!fileOpened) { - config_err("Error: cannot open file `%s' for reading\n",name); + config_err("error: cannot open file `%s' for reading\n",name); } return ""; } diff --git a/src/config.xml b/src/config.xml index b58e33b..c3693ee 100644 --- a/src/config.xml +++ b/src/config.xml @@ -975,6 +975,13 @@ when you change the font size after a successful doxygen run you need to manually remove any form_*.png images from the HTML output directory to force them to be regenerated. ' minval='8' maxval='50' defval='10' depends='GENERATE_HTML'/> + <option type='bool' id='FORMULA_TRANSPARENT' docs=' +Use the FORMULA_TRANPARENT tag to determine whether or not the images +generated for formulas are transparent PNGs. Transparent PNGs are +not supported properly for IE 6.0, but are supported on all modern browsers. +Note that when changing this option you need to delete any form_*.png files +in the HTML output before the changes have effect. +' defval='1' depends='GENERATE_HTML'/> <option type='bool' id='SEARCHENGINE' docs=' When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript diff --git a/src/configoptions.cpp b/src/configoptions.cpp index abbc7c8..5f7f281 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -1449,6 +1449,17 @@ void addConfigOptions(Config *cfg) ci->addDependency("GENERATE_HTML"); //---- cb = cfg->addBool( + "FORMULA_TRANSPARENT", + "Use the FORMULA_TRANPARENT tag to determine whether or not the images\n" + "generated for formulas are transparent PNGs. Transparent PNGs are\n" + "not supported properly for IE 6.0, but are supported on all modern browsers.\n" + "Note that when changing this option you need to delete any form_*.png files\n" + "in the HTML output before the changes have effect.", + TRUE + ); + cb->addDependency("GENERATE_HTML"); + //---- + cb = cfg->addBool( "SEARCHENGINE", "When the SEARCHENGINE tag is enabled doxygen will generate a search box\n" "for the HTML output. The underlying search engine uses javascript\n" diff --git a/src/constexp.y b/src/constexp.y index 04c6224..9f230c2 100644 --- a/src/constexp.y +++ b/src/constexp.y @@ -34,7 +34,7 @@ int cppExpYYerror(const char *s) { warn(g_constExpFileName,g_constExpLineNr, - "Problem during constant expression evaluation: %s",s); + "warning: preprocessing issue while doing constant expression evaluation: %s",s); return 0; } diff --git a/src/dbusxmlscanner.cpp b/src/dbusxmlscanner.cpp index a6141fa..857fa27 100644 --- a/src/dbusxmlscanner.cpp +++ b/src/dbusxmlscanner.cpp @@ -666,7 +666,7 @@ private: entry->protection = Public ; entry->virt = Normal; entry->stat = false; - entry->objc = false; + entry->lang = SrcLangExt_XML; entry->spec = 0; entry->fileName = m_fileName; diff --git a/src/defgen.cpp b/src/defgen.cpp index 16b57f4..dea14e7 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -562,13 +562,13 @@ void generateDEF() dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { - err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " + err("error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " "exist and cannot be created\n",outputDirectory.data()); exit(1); } else if (!Config_getBool("QUIET")) { - err("Notice: Output directory `%s' does not exist. " + err("notice: Output directory `%s' does not exist. " "I have created it for you.\n", outputDirectory.data()); } dir.cd(outputDirectory); diff --git a/src/definition.cpp b/src/definition.cpp index 4abf509..fb31731 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -782,7 +782,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) } else { - err("Error: translation error: invalid markers in trDefinedInSourceFile()\n"); + err("error: translation error: invalid markers in trDefinedInSourceFile()\n"); } } ol.popGeneratorState(); @@ -1075,7 +1075,7 @@ Definition *Definition::findInnerCompound(const char *) void Definition::addInnerCompound(Definition *) { - err("Error: Definition::addInnerCompound() called\n"); + err("error: Definition::addInnerCompound() called\n"); } QCString Definition::qualifiedName() const @@ -1287,6 +1287,10 @@ void Definition::writePathFragment(OutputList &ol) const { ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const PageDef*)this)->title()); } + else if (definitionType()==Definition::TypeClass) + { + ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const ClassDef*)this)->displayName()); + } else { ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_impl->localName); diff --git a/src/diagram.cpp b/src/diagram.cpp index ce81a6c..dee8928 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -156,7 +156,6 @@ static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath, { if (cd->isLinkable()) { - QCString *dest; QCString ref=cd->getReference(); t << "<area "; if (!ref.isEmpty()) @@ -1247,7 +1246,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path, portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); + err("error: Problems running epstopdf. Check your TeX installation!\n"); portable_sysTimerStop(); return; } diff --git a/src/docparser.cpp b/src/docparser.cpp index e552365..c3f6992 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -267,14 +267,14 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type) else { warn_doc_error(g_fileName,doctokenizerYYlineno, - "Warning: could not write output image %s",outputFile.data()); + "warning: could not write output image %s",qPrint(outputFile)); } } } else { warn_doc_error(g_fileName,doctokenizerYYlineno, - "Warning: could not open image %s",fileName); + "warning: could not open image %s",qPrint(fileName)); } if (type==DocImage::Latex && Config_getBool("USE_PDFLATEX") && @@ -290,7 +290,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type) portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); + err("error: Problems running epstopdf. Check your TeX installation!\n"); } portable_sysTimerStop(); return baseName; @@ -299,7 +299,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type) else if (ambig) { QCString text; - text.sprintf("Warning: image file name %s is ambiguous.\n",fileName); + text.sprintf("warning: image file name %s is ambiguous.\n",qPrint(fileName)); text+="Possible candidates:\n"; text+=showFileDefMatches(Doxygen::imageNameDict,fileName); warn_doc_error(g_fileName,doctokenizerYYlineno,text); @@ -310,8 +310,8 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type) if (result.left(5)!="http:" && result.left(6)!="https:") { warn_doc_error(g_fileName,doctokenizerYYlineno, - "Warning: image file %s is not found in IMAGE_PATH: " - "assuming external image.",fileName + "warning: image file %s is not found in IMAGE_PATH: " + "assuming external image.",qPrint(fileName) ); } } @@ -336,7 +336,7 @@ static void checkArgumentName(const QCString &name,bool isParam) static QRegExp re("[a-zA-Z0-9_\\x80-\\xFF]+\\.*"); int p=0,i=0,l; - while ((i=re.match(name.data(),p,&l))!=-1) // to handle @param x,y + while ((i=re.match(name,p,&l))!=-1) // to handle @param x,y { QCString aName=name.mid(i,l); //printf("aName=`%s'\n",aName.data()); @@ -369,17 +369,18 @@ static void checkArgumentName(const QCString &name,bool isParam) if (inheritedMd) // documentation was inherited { inheritedFrom.sprintf(" inherited from member %s at line " - "%d in file %s",inheritedMd->name().data(), - inheritedMd->docLine(),inheritedMd->docFile().data()); + "%d in file %s",qPrint(inheritedMd->name()), + inheritedMd->docLine(),qPrint(inheritedMd->docFile())); docFile = g_memberDef->getDefFileName(); docLine = g_memberDef->getDefLine(); } + QCString alStr = argListToString(al.pointer()); warn_doc_error(docFile,docLine, - "Warning: argument '%s' of command @param " + "warning: argument '%s' of command @param " "is not found in the argument list of %s%s%s%s", - aName.data(),scope.data(),g_memberDef->name().data(), - argListToString(al.pointer()).data(),inheritedFrom.data()); + qPrint(aName), qPrint(scope), qPrint(g_memberDef->name()), + qPrint(alStr), qPrint(inheritedFrom)); } p=i+l; } @@ -421,7 +422,7 @@ static void checkUndocumentedParams() { bool first=TRUE; QCString errMsg= - "Warning: The following parameters of "+ + "warning: The following parameters of "+ QCString(g_memberDef->qualifiedName()) + QCString(argListToString(al.pointer())) + " are not documented:\n"; @@ -703,7 +704,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, PageDef *pd=0; bool found = getDefs( g_context.find('.')==-1?g_context.data():"", // `find('.') is a hack to detect files - name.data(), + name, args.isEmpty()?0:args.data(), md,cd,fd,nd,gd,FALSE,0,TRUE); //printf("found=%d context=%s name=%s\n",found,g_context.data(),name.data()); @@ -794,13 +795,13 @@ static bool defaultHandleToken(DocNode *parent,int tok, static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, const QCString &cmdName) { - DBG(("handleStyleArgument(%s)\n",cmdName.data())); + DBG(("handleStyleArgument(%s)\n",qPrint(cmdName))); QCString tokenName = g_token->name; int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return tok; } while ((tok=doctokenizerYYlex()) && @@ -822,12 +823,12 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command \\%s as the argument of a \\%s command", - g_token->name.data(),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command \\%s as the argument of a \\%s command", + qPrint(g_token->name),qPrint(cmdName)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found while handling command %s", - g_token->name.data(),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found while handling command %s", + qPrint(g_token->name),qPrint(cmdName)); break; case TK_HTMLTAG: if (insideLI(parent) && Mappers::htmlTagMapper->map(g_token->name) && g_token->endTag) @@ -837,14 +838,14 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, return tok; break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s while handling command %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s while handling command %s", + tokToString(tok),qPrint(cmdName)); break; } break; } } - DBG(("handleStyleArgument(%s) end tok=%x\n",cmdName.data(),tok)); + DBG(("handleStyleArgument(%s) end tok=%x\n",qPrint(cmdName),tok)); return (tok==TK_NEWPARA || tok==TK_LISTITEM || tok==TK_ENDLIST ) ? tok : RetVal_OK; } @@ -875,13 +876,18 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children, { if (g_styleStack.isEmpty()) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found </%s> tag without matching <%s>", - tagName,tagName); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </%s> tag without matching <%s>", + qPrint(tagName),qPrint(tagName)); + } + else if (g_styleStack.top()->style()!=s) + { + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </%s> tag while expecting </%s>", + qPrint(tagName),qPrint(g_styleStack.top()->styleString())); } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found </%s> tag while expecting </%s>", - tagName,g_styleStack.top()->styleString()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </%s> at different nesting level (%d) than expected (%d)", + qPrint(tagName),g_nodeStack.count(),g_styleStack.top()->position()); } } else // end the section @@ -938,7 +944,7 @@ static int handleAHref(DocNode *parent,QList<DocNode> &children,const HtmlAttrib } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found <a> tag with name option but without value!"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found <a> tag with name option but without value!"); } } else if (opt->name=="href") // <a href=url>..</a> tag @@ -988,8 +994,8 @@ static void handleUnclosedStyleCommands() g_initialStyleStack.pop(); handleUnclosedStyleCommands(); warn_doc_error(g_fileName,doctokenizerYYlineno, - "Warning: end of comment block while expecting " - "command </%s>",sc->styleString()); + "warning: end of comment block while expecting " + "command </%s>",qPrint(sc->styleString())); } } @@ -1011,7 +1017,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ) ) { - //printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE); + //printf("resolveRef %s = %p (linkable?=%d)\n",qPrint(g_token->name),member,member ? member->isLinkable() : FALSE); if (member && member->isLinkable()) // member link { if (member->isObjCMethod()) @@ -1085,11 +1091,23 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) cd->briefDescriptionAsTooltip() )); } + else if (!g_insideHtmlLink && (cd=getClass(g_token->name+"-g"))) + { + // special case 3, where the token name is not a class, but could + // be a C# generic + children.append(new + DocLinkedWord(parent,name, + cd->getReference(), + cd->getOutputFileBase(), + "", + cd->briefDescriptionAsTooltip() + )); + } else // normal non-linkable word { - if (g_token->name.at(0)=='#' || g_token->name.left(2)=="::") + if (g_token->name.left(1)=='#' || g_token->name.left(2)=="::") { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: explicit link request to '%s' could not be resolved",name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: explicit link request to '%s' could not be resolved",qPrint(name)); } children.append(new DocWord(parent,name)); } @@ -1114,7 +1132,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children tok==TK_COMMAND || tok==TK_HTMLTAG ) { - DBG((" name=%s",g_token->name.data())); + DBG((" name=%s",qPrint(g_token->name))); } DBG(("\n")); reparsetoken: @@ -1160,7 +1178,7 @@ reparsetoken: if (tok==TK_NEWPARA) goto handlepara; else if (tok==TK_WORD || tok==TK_HTMLTAG) { - DBG(("CMD_EMPHASIS: reparsing command %s\n",g_token->name.data())); + DBG(("CMD_EMPHASIS: reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; } } @@ -1174,7 +1192,7 @@ reparsetoken: if (tok==TK_NEWPARA) goto handlepara; else if (tok==TK_WORD || tok==TK_HTMLTAG) { - DBG(("CMD_BOLD: reparsing command %s\n",g_token->name.data())); + DBG(("CMD_BOLD: reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; } } @@ -1188,7 +1206,7 @@ reparsetoken: if (tok==TK_NEWPARA) goto handlepara; else if (tok==TK_WORD || tok==TK_HTMLTAG) { - DBG(("CMD_CODE: reparsing command %s\n",g_token->name.data())); + DBG(("CMD_CODE: reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; } } @@ -1198,7 +1216,7 @@ reparsetoken: doctokenizerYYsetStateHtmlOnly(); tok = doctokenizerYYlex(); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_exampleName)); - if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker"); + if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: htmlonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -1207,7 +1225,7 @@ reparsetoken: doctokenizerYYsetStateManOnly(); tok = doctokenizerYYlex(); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName)); - if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker"); + if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: manonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -1216,7 +1234,7 @@ reparsetoken: doctokenizerYYsetStateLatexOnly(); tok = doctokenizerYYlex(); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_exampleName)); - if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker",doctokenizerYYlineno); + if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: latexonly section ended without end marker",doctokenizerYYlineno); doctokenizerYYsetStatePara(); } break; @@ -1225,7 +1243,7 @@ reparsetoken: doctokenizerYYsetStateXmlOnly(); tok = doctokenizerYYlex(); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName)); - if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: xmlonly section ended without end marker",doctokenizerYYlineno); + if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: xmlonly section ended without end marker",doctokenizerYYlineno); doctokenizerYYsetStatePara(); } break; @@ -1240,21 +1258,21 @@ reparsetoken: tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - tokenName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(tokenName)); break; } tok=doctokenizerYYlex(); if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s",tokenName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s",qPrint(tokenName)); break; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),tokenName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(tokenName)); break; } DocAnchor *anchor = new DocAnchor(parent,g_token->name,FALSE); @@ -1266,8 +1284,8 @@ reparsetoken: tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - tokenName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(tokenName)); break; } doctokenizerYYsetStateInternalRef(); @@ -1275,8 +1293,8 @@ reparsetoken: DocInternalRef *ref=0; if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),tokenName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(tokenName)); doctokenizerYYsetStatePara(); break; } @@ -1295,10 +1313,10 @@ reparsetoken: switch (Mappers::htmlTagMapper->map(tokenName)) { case HTML_DIV: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found <div> tag in heading\n"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found <div> tag in heading\n"); break; case HTML_PRE: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found <pre> tag in heading\n"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found <pre> tag in heading\n"); break; case HTML_BOLD: if (!g_token->endTag) @@ -1437,7 +1455,7 @@ handlepara: DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName,char *letter) { int l=symName.length(); - DBG(("decodeSymbol(%s) l=%d\n",symName.data(),l)); + DBG(("decodeSymbol(%s) l=%d\n",qPrint(symName),l)); if (symName=="©") return DocSymbol::Copy; else if (symName=="™") return DocSymbol::Tm; else if (symName=="&tm;") return DocSymbol::Tm; // alias for ™ @@ -1552,23 +1570,24 @@ static void readTextFileByName(const QCString &file,QCString &text) } else if (ambig) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included file name %s is ambiguous" - "Possible candidates:\n%s",file.data(), - showFileDefMatches(Doxygen::exampleNameDict,file).data() + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: included file name %s is ambiguous" + "Possible candidates:\n%s",qPrint(file), + qPrint(showFileDefMatches(Doxygen::exampleNameDict,file)) ); } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included file %s is not found. " - "Check your EXAMPLE_PATH",file.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: included file %s is not found. " + "Check your EXAMPLE_PATH",qPrint(file)); } } //--------------------------------------------------------------------------- DocWord::DocWord(DocNode *parent,const QCString &word) : - m_parent(parent), m_word(word) + m_word(word) { + m_parent = parent; //printf("new word %s url=%s\n",word.data(),g_searchUrl.data()); if (Doxygen::searchIndex && !g_searchUrl.isEmpty()) { @@ -1581,10 +1600,11 @@ DocWord::DocWord(DocNode *parent,const QCString &word) : DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word, const QCString &ref,const QCString &file, const QCString &anchor,const QCString &tooltip) : - m_parent(parent), m_word(word), m_ref(ref), + m_word(word), m_ref(ref), m_file(file), m_relPath(g_relPath), m_anchor(anchor), m_tooltip(tooltip) { + m_parent = parent; //printf("new word %s url=%s\n",word.data(),g_searchUrl.data()); if (Doxygen::searchIndex && !g_searchUrl.isEmpty()) { @@ -1595,11 +1615,11 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word, //--------------------------------------------------------------------------- DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) - : m_parent(parent) { + m_parent = parent; if (id.isEmpty()) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Empty anchor label"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Empty anchor label"); } if (newAnchor) // found <a name="label"> { @@ -1621,7 +1641,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid anchor id `%s'",id.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid anchor id `%s'",qPrint(id)); m_anchor = "invalid"; m_file = "invalid"; } @@ -1633,9 +1653,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) DocVerbatim::DocVerbatim(DocNode *parent,const QCString &context, const QCString &text, Type t,bool isExample, const QCString &exampleFile) - : m_parent(parent), m_context(context), m_text(text), m_type(t), + : m_context(context), m_text(text), m_type(t), m_isExample(isExample), m_exampleFile(exampleFile), m_relPath(g_relPath) -{ +{ + m_parent = parent; } @@ -1643,7 +1664,7 @@ DocVerbatim::DocVerbatim(DocNode *parent,const QCString &context, void DocInclude::parse() { - DBG(("DocInclude::parse(file=%s,text=%s)\n",m_file.data(),m_text.data())); + DBG(("DocInclude::parse(file=%s,text=%s)\n",qPrint(m_file),qPrint(m_text))); switch(m_type) { case IncWithLines: @@ -1672,7 +1693,7 @@ void DocIncOperator::parse() const char *p = g_includeFileText; uint l = g_includeFileLength; uint o = g_includeFileOffset; - DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",p,o,l)); + DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",qPrint(p),o,l)); uint so = o,bo; bool nonEmpty = FALSE; switch(type()) @@ -1695,7 +1716,7 @@ void DocIncOperator::parse() if (g_includeFileText.mid(so,o-so).find(m_pattern)!=-1) { m_text = g_includeFileText.mid(so,o-so); - DBG(("DocIncOperator::parse() Line: %s\n",m_text.data())); + DBG(("DocIncOperator::parse() Line: %s\n",qPrint(m_text))); } g_includeFileOffset = QMIN(l,o+1); // set pointer to start of new line break; @@ -1720,7 +1741,7 @@ void DocIncOperator::parse() if (g_includeFileText.mid(so,o-so).find(m_pattern)!=-1) { m_text = g_includeFileText.mid(so,o-so); - DBG(("DocIncOperator::parse() SkipLine: %s\n",m_text.data())); + DBG(("DocIncOperator::parse() SkipLine: %s\n",qPrint(m_text))); break; } o++; // skip new line @@ -1775,7 +1796,7 @@ void DocIncOperator::parse() if (g_includeFileText.mid(so,o-so).find(m_pattern)!=-1) { m_text = g_includeFileText.mid(bo,o-bo); - DBG(("DocIncOperator::parse() Until: %s\n",m_text.data())); + DBG(("DocIncOperator::parse() Until: %s\n",qPrint(m_text))); break; } o++; // skip new line @@ -1813,6 +1834,7 @@ void DocCopy::parse() } g_styleStack.clear(); g_nodeStack.clear(); + g_paramsFound.clear(); g_copyStack.append(def); // make sure the descriptions end with a newline, so the parser will correctly // handle them in all cases. @@ -1864,22 +1886,23 @@ void DocCopy::parse() } else // oops, recursion { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: recursive call chain of \\copydoc commands detected at %d\n", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: recursive call chain of \\copydoc commands detected at %d\n", doctokenizerYYlineno); } } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: target %s of \\copydoc command not found", - m_link.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: target %s of \\copydoc command not found", + qPrint(m_link)); } } //--------------------------------------------------------------------------- DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) : - m_parent(parent), m_id(id), m_key(key), m_relPath(g_relPath) + m_id(id), m_key(key), m_relPath(g_relPath) { + m_parent = parent; } bool DocXRefItem::parse() @@ -1929,8 +1952,9 @@ bool DocXRefItem::parse() //--------------------------------------------------------------------------- DocFormula::DocFormula(DocNode *parent,int id) : - m_parent(parent), m_relPath(g_relPath) + m_relPath(g_relPath) { + m_parent = parent; QCString formCmd; formCmd.sprintf("\\form#%d",id); Formula *formula=Doxygen::formulaNameDict[formCmd]; @@ -1985,15 +2009,15 @@ void DocSecRefItem::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\refitem", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\refitem", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2017,13 +2041,13 @@ void DocSecRefItem::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning reference to unknown section %s", - m_target.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: reference to unknown section %s", + qPrint(m_target)); } } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning reference to empty target"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: reference to empty target"); } DBG(("DocSecRefItem::parse() end\n")); @@ -2053,13 +2077,13 @@ void DocSecRefList::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after \\refitem command"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after \\refitem command"); break; } tok=doctokenizerYYlex(); if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of \\refitem", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of \\refitem", tokToString(tok)); break; } @@ -2072,8 +2096,8 @@ void DocSecRefList::parse() case CMD_ENDSECREFLIST: goto endsecreflist; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\secreflist", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\secreflist", + qPrint(g_token->name)); goto endsecreflist; } } @@ -2083,7 +2107,7 @@ void DocSecRefList::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s inside section reference list", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s inside section reference list", tokToString(tok)); goto endsecreflist; } @@ -2099,8 +2123,9 @@ endsecreflist: //--------------------------------------------------------------------------- DocInternalRef::DocInternalRef(DocNode *parent,const QCString &ref) - : m_parent(parent), m_relPath(g_relPath) + : m_relPath(g_relPath) { + m_parent = parent; int i=ref.find('#'); if (i!=-1) { @@ -2126,15 +2151,15 @@ void DocInternalRef::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\ref", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\ref", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2150,8 +2175,9 @@ void DocInternalRef::parse() //--------------------------------------------------------------------------- DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) : - m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE) + m_refToSection(FALSE), m_refToAnchor(FALSE) { + m_parent = parent; Definition *compound = 0; QCString anchor; //printf("DocRef::DocRef(target=%s,context=%s\n",target.data(),context.data()); @@ -2211,11 +2237,11 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) : } } m_text = linkToText(target,FALSE); - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command", - target.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unable to resolve reference to `%s' for \\ref command", + qPrint(target)); } -static void flattenParagraphs(QList<DocNode> &children) +static void flattenParagraphs(DocNode *root,QList<DocNode> &children) { QListIterator<DocNode> li(children); QList<DocNode> newChildren; @@ -2240,6 +2266,7 @@ static void flattenParagraphs(QList<DocNode> &children) for (li3.toFirst();(dn=li3.current());++li3) { children.append(dn); + dn->setParent(root); } } @@ -2256,17 +2283,17 @@ void DocRef::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\ref", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\ref", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; case TK_HTMLTAG: break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2280,7 +2307,7 @@ void DocRef::parse() internalValidatingParseDoc(this,m_children,m_text); docParserPopContext(); g_insideHtmlLink=FALSE; - flattenParagraphs(m_children); + flattenParagraphs(this,m_children); } handlePendingStyleCommands(this,m_children); @@ -2291,9 +2318,9 @@ void DocRef::parse() //--------------------------------------------------------------------------- -DocLink::DocLink(DocNode *parent,const QCString &target) : - m_parent(parent) +DocLink::DocLink(DocNode *parent,const QCString &target) { + m_parent = parent; Definition *compound; //PageInfo *page; QCString anchor; @@ -2323,8 +2350,8 @@ DocLink::DocLink(DocNode *parent,const QCString &target) : } // bogus link target - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve link to `%s' for \\link command", - target.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unable to resolve link to `%s' for \\link command", + qPrint(target)); } @@ -2347,24 +2374,24 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink) case CMD_ENDLINK: if (isJavaLink) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: {@link.. ended with @endlink command"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: {@link.. ended with @endlink command"); } goto endlink; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\link", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\link", + qPrint(g_token->name)); break; } break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; case TK_HTMLTAG: if (g_token->name!="see" || !isXmlLink) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected xml/html command %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected xml/html command %s found", + qPrint(g_token->name)); } goto endlink; case TK_LNKWORD: @@ -2391,7 +2418,7 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink) m_children.append(new DocWord(this,g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2399,7 +2426,7 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink) } if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected end of comment while inside" " link command\n"); } endlink: @@ -2420,8 +2447,9 @@ endlink: //--------------------------------------------------------------------------- DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &context) : - m_parent(parent), m_name(name), m_relPath(g_relPath), m_context(context) + m_name(name), m_relPath(g_relPath), m_context(context) { + m_parent = parent; } void DocDotFile::parse() @@ -2438,15 +2466,15 @@ void DocDotFile::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\dotfile", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\dotfile", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2465,8 +2493,8 @@ void DocDotFile::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unknown option %s after image title", + qPrint(g_token->name)); } tok=doctokenizerYYlex(); } @@ -2482,15 +2510,15 @@ void DocDotFile::parse() } else if (ambig) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included dot file name %s is ambiguous.\n" - "Possible candidates:\n%s",m_name.data(), - showFileDefMatches(Doxygen::exampleNameDict,m_name).data() + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: included dot file name %s is ambiguous.\n" + "Possible candidates:\n%s",qPrint(m_name), + qPrint(showFileDefMatches(Doxygen::exampleNameDict,m_name)) ); } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included dot file %s is not found " - "in any of the paths specified via DOTFILE_DIRS!",m_name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: included dot file %s is not found " + "in any of the paths specified via DOTFILE_DIRS!",qPrint(m_name)); } DBG(("DocDotFile::parse() end\n")); @@ -2502,9 +2530,10 @@ void DocDotFile::parse() //--------------------------------------------------------------------------- DocImage::DocImage(DocNode *parent,const HtmlAttribList &attribs,const QCString &name,Type t) : - m_parent(parent), m_attribs(attribs), m_name(name), + m_attribs(attribs), m_name(name), m_type(t), m_relPath(g_relPath) { + m_parent = parent; } void DocImage::parse() @@ -2530,15 +2559,15 @@ void DocImage::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\image", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a \\image", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2558,8 +2587,8 @@ void DocImage::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unknown option %s after image title", + qPrint(g_token->name)); } tok=doctokenizerYYlex(); } @@ -2588,8 +2617,8 @@ int DocHtmlHeader::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <h%d> tag", - g_token->name.data(),m_level); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a <h%d> tag", + qPrint(g_token->name),m_level); break; case TK_HTMLTAG: { @@ -2598,7 +2627,7 @@ int DocHtmlHeader::parse() { if (m_level!=1) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h1>", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: <h%d> ended with </h1>", m_level); } goto endheader; @@ -2607,7 +2636,7 @@ int DocHtmlHeader::parse() { if (m_level!=2) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h2>", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: <h%d> ended with </h2>", m_level); } goto endheader; @@ -2616,7 +2645,7 @@ int DocHtmlHeader::parse() { if (m_level!=3) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h3>", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: <h%d> ended with </h3>", m_level); } goto endheader; @@ -2625,7 +2654,7 @@ int DocHtmlHeader::parse() { if (m_level!=4) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h4>", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: <h%d> ended with </h4>", m_level); } goto endheader; @@ -2634,7 +2663,7 @@ int DocHtmlHeader::parse() { if (m_level!=5) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h5>", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: <h%d> ended with </h5>", m_level); } goto endheader; @@ -2643,7 +2672,7 @@ int DocHtmlHeader::parse() { if (m_level!=6) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h6>", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: <h%d> ended with </h6>", m_level); } goto endheader; @@ -2662,18 +2691,18 @@ int DocHtmlHeader::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <h%d> context", - g_token->endTag?"/":"",g_token->name.data(),m_level); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected html tag <%s%s> found within <h%d> context", + g_token->endTag?"/":"",qPrint(g_token->name),m_level); } } break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2681,7 +2710,7 @@ int DocHtmlHeader::parse() } if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected end of comment while inside" " <h%d> tag\n",m_level); } endheader: @@ -2708,12 +2737,12 @@ int DocHRef::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <a>..</a> block", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a <a>..</a> block", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; case TK_HTMLTAG: { @@ -2724,13 +2753,13 @@ int DocHRef::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <a href=...> context", - g_token->endTag?"/":"",g_token->name.data(),doctokenizerYYlineno); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected html tag <%s%s> found within <a href=...> context", + g_token->endTag?"/":"",qPrint(g_token->name),doctokenizerYYlineno); } } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok),doctokenizerYYlineno); break; } @@ -2738,7 +2767,7 @@ int DocHRef::parse() } if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected end of comment while inside" " <a href=...> tag",doctokenizerYYlineno); } endhref: @@ -2776,7 +2805,7 @@ int DocInternal::parse(int level) } if (retval==TK_LISTITEM) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found",doctokenizerYYlineno); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid list item found",doctokenizerYYlineno); } } while (retval!=0 && retval!=RetVal_Section && @@ -2801,7 +2830,7 @@ int DocInternal::parse(int level) if (retval==RetVal_Internal) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: \\internal command found inside internal section"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: \\internal command found inside internal section"); } DBG(("DocInternal::parse() end\n")); @@ -2820,7 +2849,7 @@ int DocIndexEntry::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after \\addindex command"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after \\addindex command"); goto endindexentry; } doctokenizerYYsetStateTitle(); @@ -2859,7 +2888,7 @@ int DocIndexEntry::parse() case DocSymbol::Ndash: m_entry+="--"; break; case DocSymbol::Mdash: m_entry+="---"; break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected symbol found as argument of \\addindex"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected symbol found as argument of \\addindex"); break; } } @@ -2877,13 +2906,13 @@ int DocIndexEntry::parse() case CMD_PERCENT: m_entry+='%'; break; case CMD_QUOTE: m_entry+='"'; break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command %s found as argument of \\addindex", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected command %s found as argument of \\addindex", + qPrint(g_token->name)); break; } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2913,12 +2942,12 @@ int DocHtmlCaption::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <caption> tag", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a <caption> tag", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; case TK_HTMLTAG: { @@ -2930,13 +2959,13 @@ int DocHtmlCaption::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <caption> context", - g_token->endTag?"/":"",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected html tag <%s%s> found within <caption> context", + g_token->endTag?"/":"",qPrint(g_token->name)); } } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -2944,7 +2973,7 @@ int DocHtmlCaption::parse() } if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected end of comment while inside" " <caption> tag",doctokenizerYYlineno); } endcaption: @@ -3060,21 +3089,21 @@ int DocHtmlRow::parse() } else // found some other tag { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <td> or <th> tag but " - "found <%s> instead!",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <td> or <th> tag but " + "found <%s> instead!",qPrint(g_token->name)); doctokenizerYYpushBackHtmlTag(g_token->name); goto endrow; } } else if (tok==0) // premature end of comment { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while looking" " for a html description title"); goto endrow; } else // token other than html token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <td> or <th> tag but found %s token instead!", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <td> or <th> tag but found %s token instead!", tokToString(tok)); goto endrow; } @@ -3124,21 +3153,21 @@ int DocHtmlRow::parseXml(bool isHeading) } else // found some other tag { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <term> or <description> tag but " - "found <%s> instead!",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <term> or <description> tag but " + "found <%s> instead!",qPrint(g_token->name)); doctokenizerYYpushBackHtmlTag(g_token->name); goto endrow; } } else if (tok==0) // premature end of comment { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while looking" " for a html description title"); goto endrow; } else // token other than html token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <td> or <th> tag but found %s token instead!", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <td> or <th> tag but found %s token instead!", tokToString(tok)); goto endrow; } @@ -3187,7 +3216,7 @@ getrow: { if (m_caption) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: table already has a caption, found another one"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: table already has a caption, found another one"); } else { @@ -3202,18 +3231,18 @@ getrow: } else // found wrong token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <tr> or <caption> tag but " - "found <%s%s> instead!", g_token->endTag ? "/" : "", g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <tr> or <caption> tag but " + "found <%s%s> instead!", g_token->endTag ? "/" : "", qPrint(g_token->name)); } } else if (tok==0) // premature end of comment { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while looking" " for a <tr> or <caption> tag"); } else // token other than html token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <tr> tag but found %s token instead!", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <tr> tag but found %s token instead!", tokToString(tok)); } @@ -3325,8 +3354,8 @@ int DocHtmlDescTitle::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(g_token->name)); } else { @@ -3334,8 +3363,8 @@ int DocHtmlDescTitle::parse() tok=doctokenizerYYlex(); // get the reference id if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); } else { @@ -3355,8 +3384,8 @@ int DocHtmlDescTitle::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); } else { @@ -3364,8 +3393,8 @@ int DocHtmlDescTitle::parse() tok=doctokenizerYYlex(); if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); } else { @@ -3383,14 +3412,14 @@ int DocHtmlDescTitle::parse() break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <dt> tag", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a <dt> tag", + qPrint(g_token->name)); } } break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; case TK_HTMLTAG: { @@ -3417,13 +3446,13 @@ int DocHtmlDescTitle::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <dt> context", - g_token->endTag?"/":"",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected html tag <%s%s> found within <dt> context", + g_token->endTag?"/":"",qPrint(g_token->name)); } } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -3431,7 +3460,7 @@ int DocHtmlDescTitle::parse() } if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected end of comment while inside" " <dt> tag"); } endtitle: @@ -3491,21 +3520,21 @@ int DocHtmlDescList::parse() } else // found some other tag { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <dt> tag but " - "found <%s> instead!",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <dt> tag but " + "found <%s> instead!",qPrint(g_token->name)); doctokenizerYYpushBackHtmlTag(g_token->name); goto enddesclist; } } else if (tok==0) // premature end of comment { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while looking" " for a html description title"); goto enddesclist; } else // token other than html token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <dt> tag but found %s token instead!", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <dt> tag but found %s token instead!", tokToString(tok)); goto enddesclist; } @@ -3530,7 +3559,7 @@ int DocHtmlDescList::parse() if (retval==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside <dl> block"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while inside <dl> block"); } enddesclist: @@ -3586,7 +3615,7 @@ int DocHtmlListItem::parseXml() if (retval==0) break; //printf("new item: retval=%x g_token->name=%s g_token->endTag=%d\n", - // retval,g_token->name.data(),g_token->endTag); + // retval,qPrint(g_token->name),g_token->endTag); if (retval==RetVal_ListItem) { break; @@ -3625,21 +3654,21 @@ int DocHtmlList::parse() } else // found some other tag { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <li> tag but " - "found <%s> instead!",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <li> tag but " + "found <%s> instead!",qPrint(g_token->name)); doctokenizerYYpushBackHtmlTag(g_token->name); goto endlist; } } else if (tok==0) // premature end of comment { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while looking" " for a html list item"); goto endlist; } else // token other than html token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <li> tag but found %s token instead!", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <li> tag but found %s token instead!", tokToString(tok)); goto endlist; } @@ -3653,7 +3682,7 @@ int DocHtmlList::parse() if (retval==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside <%cl> block", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while inside <%cl> block", m_type==Unordered ? 'u' : 'o'); } @@ -3679,28 +3708,28 @@ int DocHtmlList::parseXml() if (tok==TK_HTMLTAG) { int tagId=Mappers::htmlTagMapper->map(g_token->name); - //printf("g_token->name=%s g_token->endTag=%d\n",g_token->name.data(),g_token->endTag); + //printf("g_token->name=%s g_token->endTag=%d\n",qPrint(g_token->name),g_token->endTag); if (tagId==XML_ITEM && !g_token->endTag) // found <item> tag { // ok, we can go on. } else // found some other tag { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <item> tag but " - "found <%s> instead!",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <item> tag but " + "found <%s> instead!",qPrint(g_token->name)); doctokenizerYYpushBackHtmlTag(g_token->name); goto endlist; } } else if (tok==0) // premature end of comment { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while looking" " for a html list item"); goto endlist; } else // token other than html token { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected <item> tag but found %s token instead!", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected <item> tag but found %s token instead!", tokToString(tok)); goto endlist; } @@ -3711,12 +3740,12 @@ int DocHtmlList::parseXml() m_children.append(li); retval=li->parseXml(); if (retval==0) break; - //printf("retval=%x g_token->name=%s\n",retval,g_token->name.data()); + //printf("retval=%x g_token->name=%s\n",retval,qPrint(g_token->name)); } while (retval==RetVal_ListItem); if (retval==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside <list type=\"%s\"> block", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment while inside <list type=\"%s\"> block", m_type==Unordered ? "bullet" : "number"); } @@ -3812,15 +3841,15 @@ void DocTitle::parse() switch (tok) { case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a title section", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal command %s as part of a title section", + qPrint(g_token->name)); break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -3841,8 +3870,9 @@ void DocTitle::parseFromString(const QCString &text) //-------------------------------------------------------------------------- DocSimpleSect::DocSimpleSect(DocNode *parent,Type t) : - m_parent(parent), m_type(t) + m_type(t) { + m_parent = parent; m_title=0; } @@ -4013,8 +4043,8 @@ int DocParamList::parse(const QCString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); } doctokenizerYYsetStateParam(); tok=doctokenizerYYlex(); @@ -4037,8 +4067,8 @@ int DocParamList::parse(const QCString &cmdName) doctokenizerYYsetStatePara(); if (tok==0) /* premature end of comment block */ { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s",cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s",qPrint(cmdName)); retval=0; goto endparamlist; } @@ -4111,7 +4141,7 @@ int DocParamList::parseXml(const QCString ¶mName) if (retval==0) /* premature end of comment block */ { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unterminated param or exception tag"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unterminated param or exception tag"); } else { @@ -4239,12 +4269,12 @@ int DocPara::handleXRefItem() void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t) { - DBG(("handleIncludeOperator(%s)\n",cmdName.data())); + DBG(("handleIncludeOperator(%s)\n",qPrint(cmdName))); int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } doctokenizerYYsetStatePattern(); @@ -4252,14 +4282,14 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type doctokenizerYYsetStatePara(); if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s", cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s", qPrint(cmdName)); return; } else if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } DocIncOperator *op = new DocIncOperator(this,t,g_token->name,g_context,g_isExample,g_exampleName); @@ -4293,22 +4323,22 @@ void DocPara::handleImage(const QCString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } tok=doctokenizerYYlex(); if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } DocImage::Type t; @@ -4318,9 +4348,9 @@ void DocPara::handleImage(const QCString &cmdName) else if (imgType=="rtf") t=DocImage::Rtf; else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: image type %s specified as the first argument of " + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: image type %s specified as the first argument of " "%s is not valid", - imgType.data(),cmdName.data()); + qPrint(imgType),qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); @@ -4328,8 +4358,8 @@ void DocPara::handleImage(const QCString &cmdName) doctokenizerYYsetStatePara(); if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } HtmlAttribList attrList; @@ -4343,8 +4373,8 @@ void DocPara::handleDotFile(const QCString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); @@ -4352,8 +4382,8 @@ void DocPara::handleDotFile(const QCString &cmdName) doctokenizerYYsetStatePara(); if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } QCString name = g_token->name; @@ -4367,16 +4397,16 @@ void DocPara::handleLink(const QCString &cmdName,bool isJavaLink) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } doctokenizerYYsetStateLink(); tok=doctokenizerYYlex(); if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } doctokenizerYYsetStatePara(); @@ -4391,12 +4421,12 @@ void DocPara::handleLink(const QCString &cmdName,bool isJavaLink) void DocPara::handleRef(const QCString &cmdName) { - DBG(("handleRef(%s)\n",cmdName.data())); + DBG(("handleRef(%s)\n",qPrint(cmdName))); int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } doctokenizerYYsetStateRef(); @@ -4404,8 +4434,8 @@ void DocPara::handleRef(const QCString &cmdName) DocRef *ref=0; if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); goto endref; } ref = new DocRef(this,g_token->name,g_context); @@ -4418,12 +4448,12 @@ endref: void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) { - DBG(("handleInclude(%s)\n",cmdName.data())); + DBG(("handleInclude(%s)\n",qPrint(cmdName))); int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } doctokenizerYYsetStateFile(); @@ -4431,14 +4461,14 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) doctokenizerYYsetStatePara(); if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s",cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s",qPrint(cmdName)); return; } else if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } DocInclude *inc = new DocInclude(this,g_token->name,g_context,t,g_isExample,g_exampleName); @@ -4452,21 +4482,21 @@ void DocPara::handleSection(const QCString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); return; } tok=doctokenizerYYlex(); if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s\n", cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s\n", qPrint(cmdName)); return; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); return; } g_token->sectionId = g_token->name; @@ -4503,7 +4533,7 @@ int DocPara::handleStartCode() i++; } m_children.append(new DocVerbatim(this,g_context,g_token->verb.mid(li),DocVerbatim::Code,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: code section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: code section ended without end marker"); doctokenizerYYsetStatePara(); return retval; } @@ -4536,13 +4566,13 @@ void DocPara::handleInheritDoc() int DocPara::handleCommand(const QCString &cmdName) { - DBG(("handleCommand(%s)\n",cmdName.data())); + DBG(("handleCommand(%s)\n",qPrint(cmdName))); int retval = RetVal_OK; int cmdId = Mappers::cmdMapper->map(cmdName); switch (cmdId) { case CMD_UNKNOWN: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Found unknown command `\\%s'",cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Found unknown command `\\%s'",qPrint(cmdName)); break; case CMD_EMPHASIS: m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,TRUE)); @@ -4679,7 +4709,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateHtmlOnly(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: htmlonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4688,7 +4718,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateManOnly(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: manonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4697,7 +4727,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateLatexOnly(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: latexonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4706,7 +4736,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateXmlOnly(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: xmlonly section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: xmlonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4715,7 +4745,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateVerbatim(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: verbatim section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: verbatim section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4724,7 +4754,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateDot(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: dot section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: dot section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4733,7 +4763,7 @@ int DocPara::handleCommand(const QCString &cmdName) doctokenizerYYsetStateMsc(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Msc,g_isExample,g_exampleName)); - if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: msc section ended without end marker"); + if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: msc section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -4745,10 +4775,10 @@ int DocPara::handleCommand(const QCString &cmdName) case CMD_ENDLINK: case CMD_ENDVERBATIM: case CMD_ENDDOT: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected command %s",qPrint(g_token->name)); break; case CMD_ENDMSC: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected command %s",qPrint(g_token->name)); break; case CMD_PARAM: retval = handleParamSection(cmdName,DocParamSect::Param,FALSE,g_token->paramDir); @@ -4776,21 +4806,21 @@ int DocPara::handleCommand(const QCString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); break; } tok=doctokenizerYYlex(); if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s",cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s",qPrint(cmdName)); break; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); break; } DocAnchor *anchor = new DocAnchor(this,g_token->name,FALSE); @@ -4816,21 +4846,21 @@ int DocPara::handleCommand(const QCString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", - cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(cmdName)); break; } tok=doctokenizerYYlex(); if (tok==0) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " - "argument of command %s\n", cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected end of comment block while parsing the " + "argument of command %s\n", qPrint(cmdName)); break; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected token %s as the argument of %s", + tokToString(tok),qPrint(cmdName)); break; } DocCopy *cpy = new DocCopy(this,g_token->name, @@ -4891,10 +4921,10 @@ int DocPara::handleCommand(const QCString &cmdName) } break; case CMD_SECREFITEM: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected command %s",qPrint(g_token->name)); break; case CMD_ENDSECREFLIST: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected command %s",qPrint(g_token->name)); break; case CMD_FORMULA: { @@ -4906,7 +4936,7 @@ int DocPara::handleCommand(const QCString &cmdName) // retval = handleLanguageSwitch(); // break; case CMD_INTERNALREF: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: unexpected command %s",qPrint(g_token->name)); break; case CMD_INHERITDOC: handleInheritDoc(); @@ -4921,7 +4951,7 @@ int DocPara::handleCommand(const QCString &cmdName) retval==RetVal_Section || retval==RetVal_EndList || retval==RetVal_Internal || retval==RetVal_SwitchLang ); - DBG(("handleCommand(%s) end retval=%x\n",cmdName.data(),retval)); + DBG(("handleCommand(%s) end retval=%x\n",qPrint(cmdName),retval)); return retval; } @@ -4945,13 +4975,13 @@ static bool findAttribute(const HtmlAttribList &tagHtmlAttribs, int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs) { - DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagHtmlAttribs.count())); + DBG(("handleHtmlStartTag(%s,%d)\n",qPrint(tagName),tagHtmlAttribs.count())); int retval=RetVal_OK; int tagId = Mappers::htmlTagMapper->map(tagName); if (g_token->emptyTag && !(tagId&XML_CmdMask) && tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: HTML tags may not use the 'empty tag' XHTML syntax."); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: HTML tags may not use the 'empty tag' XHTML syntax."); } switch (tagId) { @@ -4972,7 +5002,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta case HTML_LI: if (!insideUL(this) && !insideOL(this)) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: lonely <li> tag found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: lonely <li> tag found"); } else { @@ -5034,7 +5064,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta retval = RetVal_DescTitle; break; case HTML_DD: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag <dd> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag <dd> found"); break; case HTML_TABLE: { @@ -5053,7 +5083,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta retval = RetVal_TableHCell; break; case HTML_CAPTION: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag <caption> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag <caption> found"); break; case HTML_BR: { @@ -5111,7 +5141,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } if (!found) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: IMG tag does not have a SRC attribute!\n"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: IMG tag does not have a SRC attribute!\n"); } } break; @@ -5141,13 +5171,23 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta QCString paramName; if (findAttribute(tagHtmlAttribs,"name",¶mName)) { - retval = handleParamSection(paramName, - tagId==XML_PARAM ? DocParamSect::Param : DocParamSect::TemplateParam, - TRUE); + if (paramName.isEmpty()) + { + if (Config_getBool("WARN_NO_PARAMDOC")) + { + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: empty 'name' attribute for <param> tag."); + } + } + else + { + retval = handleParamSection(paramName, + tagId==XML_PARAM ? DocParamSect::Param : DocParamSect::TemplateParam, + TRUE); + } } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'name' attribute from <param> tag."); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Missing 'name' attribute from <param> tag."); } } break; @@ -5165,7 +5205,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'name' attribute from <param%sref> tag.",tagId==XML_PARAMREF?"":"type"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Missing 'name' attribute from <param%sref> tag.",tagId==XML_PARAMREF?"":"type"); } } break; @@ -5178,7 +5218,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'name' attribute from <exception> tag."); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Missing 'name' attribute from <exception> tag."); } } break; @@ -5194,7 +5234,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: lonely <item> tag found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: lonely <item> tag found"); } break; case XML_RETURNS: @@ -5243,7 +5283,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'cref' attribute from <see> tag."); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Missing 'cref' attribute from <see> tag."); } } break; @@ -5275,7 +5315,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Missing 'cref' attribute from <seealso> tag."); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Missing 'cref' attribute from <seealso> tag."); } } break; @@ -5308,7 +5348,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta // These tags are defined in .Net but are currently unsupported break; case HTML_UNKNOWN: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported xml/html tag <%s> found", tagName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported xml/html tag <%s> found", qPrint(tagName)); m_children.append(new DocWord(this, "<"+tagName+tagHtmlAttribs.toString()+">")); break; default: @@ -5321,7 +5361,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta int DocPara::handleHtmlEndTag(const QCString &tagName) { - DBG(("handleHtmlEndTag(%s)\n",tagName.data())); + DBG(("handleHtmlEndTag(%s)\n",qPrint(tagName))); int tagId = Mappers::htmlTagMapper->map(tagName); int retval=RetVal_OK; switch (tagId) @@ -5329,7 +5369,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) case HTML_UL: if (!insideUL(this)) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found </ul> tag without matching <ul>"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </ul> tag without matching <ul>"); } else { @@ -5339,7 +5379,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) case HTML_OL: if (!insideOL(this)) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found </ol> tag without matching <ol>"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </ol> tag without matching <ol>"); } else { @@ -5349,7 +5389,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) case HTML_LI: if (!insideLI(this)) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found </li> tag without matching <li>"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </li> tag without matching <li>"); } else { @@ -5359,7 +5399,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) //case HTML_PRE: // if (!insidePRE(this)) // { - // warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found </pre> tag without matching <pre>"); + // warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found </pre> tag without matching <pre>"); // } // else // { @@ -5423,28 +5463,28 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) // ignore </th> tag break; case HTML_CAPTION: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </caption> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </caption> found"); break; case HTML_BR: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Illegal </br> tag found\n"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Illegal </br> tag found\n"); break; case HTML_H1: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h1> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </h1> found"); break; case HTML_H2: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h2> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </h2> found"); break; case HTML_H3: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h3> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </h3> found"); break; case HTML_IMG: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </img> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </img> found"); break; case HTML_HR: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </hr> found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </hr> found"); break; case HTML_A: - //warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </a> found"); + //warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected tag </a> found"); // ignore </a> tag (can be part of <a name=...></a> break; @@ -5477,12 +5517,12 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) // These tags are defined in .Net but are currently unsupported break; case HTML_UNKNOWN: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported xml/html tag </%s> found", tagName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported xml/html tag </%s> found", qPrint(tagName)); m_children.append(new DocWord(this,"</"+tagName+">")); break; default: // we should not get here! - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end tag %s\n",tagName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected end tag %s\n",qPrint(tagName)); ASSERT(0); break; } @@ -5505,7 +5545,7 @@ reparsetoken: tok==TK_COMMAND || tok==TK_HTMLTAG ) { - DBG((" name=%s",g_token->name.data())); + DBG((" name=%s",qPrint(g_token->name))); } DBG(("\n")); switch(tok) @@ -5600,7 +5640,7 @@ reparsetoken: { tok = TK_COMMAND; } - DBG(("reparsing command %s\n",g_token->name.data())); + DBG(("reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; } else if (retval==TK_ENDLIST) @@ -5633,13 +5673,13 @@ reparsetoken: } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: End of list marker found " + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: End of list marker found " "has invalid indent level"); } } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: End of list marker found without any preceding " + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: End of list marker found without any preceding " "list items"); } break; @@ -5699,7 +5739,7 @@ reparsetoken: { tok = TK_COMMAND; } - DBG(("reparsing command %s\n",g_token->name.data())); + DBG(("reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; } else if (retval==RetVal_OK) @@ -5751,8 +5791,8 @@ reparsetoken: } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); } break; } @@ -5787,7 +5827,7 @@ reparsetoken: break; default: warn_doc_error(g_fileName,doctokenizerYYlineno, - "Warning: Found unexpected token (id=%x)\n",tok); + "warning: Found unexpected token (id=%x)\n",tok); break; } } @@ -5808,7 +5848,7 @@ endparagraph: int DocSection::parse() { - DBG(("DocSection::parse() start %s level=%d\n",g_token->sectionId.data(),m_level)); + DBG(("DocSection::parse() start %s level=%d\n",qPrint(g_token->sectionId),m_level)); int retval=RetVal_OK; g_nodeStack.push(this); @@ -5848,7 +5888,7 @@ int DocSection::parse() } if (retval==TK_LISTITEM) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid list item found"); } } while (retval!=0 && retval!=RetVal_Internal && @@ -5906,7 +5946,7 @@ int DocSection::parse() if (retval==RetVal_Subsection) level=2; else if (retval==RetVal_Subsubsection) level=3; else level=4; - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected %s " + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected %s " "command found inside %s!", sectionLevelToName[level],sectionLevelToName[m_level]); retval=0; // stop parsing @@ -5965,8 +6005,8 @@ void DocText::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unsupported symbol %s found", + qPrint(g_token->name)); } } break; @@ -6001,13 +6041,13 @@ void DocText::parse() m_children.append(new DocSymbol(this,DocSymbol::Quot)); break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command `%s' found", - g_token->name.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected command `%s' found", + qPrint(g_token->name)); break; } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Unexpected token %s", tokToString(tok)); break; } @@ -6049,19 +6089,19 @@ void DocRoot::parse() } if (retval==TK_LISTITEM) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid list item found"); } else if (retval==RetVal_Subsection) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found subsection command outside of section context!"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found subsection command outside of section context!"); } else if (retval==RetVal_Subsubsection) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found subsubsection command outside of subsection context!"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found subsubsection command outside of subsection context!"); } else if (retval==RetVal_Paragraph) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found paragraph command outside of subsubsection context!"); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found paragraph command outside of subsubsection context!"); } } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal); if (lastPar) lastPar->markLast(); @@ -6080,7 +6120,7 @@ void DocRoot::parse() } else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid section id `%s'; ignoring section",g_token->sectionId.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid section id `%s'; ignoring section",qPrint(g_token->sectionId)); retval = 0; } } diff --git a/src/docparser.h b/src/docparser.h index 6deb1f5..7a63cb2 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -134,7 +134,7 @@ class DocNode Kind_Text = 47 }; /*! Creates a new node */ - DocNode() : m_insidePre(FALSE) {} + DocNode() : m_parent(0), m_insidePre(FALSE) {} /*! Destroys a node. */ virtual ~DocNode() {} @@ -143,7 +143,10 @@ class DocNode virtual Kind kind() const = 0; /*! Returns the parent of this node or 0 for the root node. */ - virtual DocNode *parent() const = 0; + DocNode *parent() const { return m_parent; } + + /*! Sets a new parent for this node. */ + void setParent(DocNode *parent) { m_parent = parent; } /*! Acceptor function for node visitors. Part of the visitor pattern. * @param v Abstract visitor. @@ -156,6 +159,7 @@ class DocNode protected: /*! Sets whether or not this item is inside a preformatted section */ void setInsidePreformatted(bool p) { m_insidePre = p; } + DocNode *m_parent; private: bool m_insidePre; @@ -191,11 +195,9 @@ class DocWord : public DocNode DocWord(DocNode *parent,const QCString &word); QCString word() const { return m_word; } Kind kind() const { return Kind_Word; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; QCString m_word; }; @@ -209,7 +211,6 @@ class DocLinkedWord : public DocNode const QCString &anchor,const QCString &tooltip); QCString word() const { return m_word; } Kind kind() const { return Kind_LinkedWord; } - DocNode *parent() const { return m_parent; } QCString file() const { return m_file; } QCString relPath() const { return m_relPath; } QCString ref() const { return m_ref; } @@ -218,7 +219,6 @@ class DocLinkedWord : public DocNode void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; QCString m_word; QCString m_ref; QCString m_file; @@ -232,15 +232,13 @@ class DocURL : public DocNode { public: DocURL(DocNode *parent,const QCString &url,bool isEmail) : - m_parent(parent), m_url(url), m_isEmail(isEmail) {} + m_url(url), m_isEmail(isEmail) { m_parent=parent; } QCString url() const { return m_url; } Kind kind() const { return Kind_URL; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } bool isEmail() const { return m_isEmail; } private: - DocNode *m_parent; QCString m_url; bool m_isEmail; }; @@ -249,28 +247,22 @@ class DocURL : public DocNode class DocLineBreak : public DocNode { public: - DocLineBreak(DocNode *parent) : - m_parent(parent) {} + DocLineBreak(DocNode *parent) { m_parent=parent; } Kind kind() const { return Kind_LineBreak; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; }; /*! @brief Node representing a horizonal ruler */ class DocHorRuler : public DocNode { public: - DocHorRuler(DocNode *parent) : - m_parent(parent) {} + DocHorRuler(DocNode *parent) { m_parent = parent; } Kind kind() const { return Kind_HorRuler; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; }; /*! @brief Node representing an anchor */ @@ -279,13 +271,11 @@ class DocAnchor : public DocNode public: DocAnchor(DocNode *parent,const QCString &id,bool newAnchor); Kind kind() const { return Kind_Anchor; } - DocNode *parent() const { return m_parent; } QCString anchor() const { return m_anchor; } QCString file() const { return m_file; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; QCString m_anchor; QCString m_file; }; @@ -300,19 +290,17 @@ class DocStyleChange : public DocNode }; DocStyleChange(DocNode *parent,uint position,Style s,bool enable, const HtmlAttribList *attribs=0) : - m_parent(parent), m_position(position), m_style(s), m_enable(enable) - { if (attribs) m_attribs=*attribs; } + m_position(position), m_style(s), m_enable(enable) + { m_parent = parent; if (attribs) m_attribs=*attribs; } Kind kind() const { return Kind_StyleChange; } Style style() const { return m_style; } const char *styleString() const; bool enable() const { return m_enable; } uint position() const { return m_position; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } const HtmlAttribList &attribs() const { return m_attribs; } private: - DocNode *m_parent; uint m_position; Style m_style; bool m_enable; @@ -329,16 +317,14 @@ class DocSymbol : public DocNode Lsquo, Rsquo, Ldquo, Rdquo, Ndash, Mdash, Aelig, AElig }; DocSymbol(DocNode *parent,SymType s,char letter='\0') : - m_parent(parent), m_symbol(s), m_letter(letter) {} + m_symbol(s), m_letter(letter) { m_parent = parent; } SymType symbol() const { return m_symbol; } char letter() const { return m_letter; } Kind kind() const { return Kind_Symbol; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } static SymType decodeSymbol(const QCString &symName,char *letter); private: - DocNode *m_parent; SymType m_symbol; char m_letter; }; @@ -348,13 +334,11 @@ class DocWhiteSpace : public DocNode { public: DocWhiteSpace(DocNode *parent,const QCString &chars) : - m_parent(parent), m_chars(chars) {} + m_chars(chars) { m_parent = parent; } Kind kind() const { return Kind_WhiteSpace; } QCString chars() const { return m_chars; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; QCString m_chars; }; @@ -370,14 +354,12 @@ class DocVerbatim : public DocNode Type type() const { return m_type; } QCString text() const { return m_text; } QCString context() const { return m_context; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } bool isExample() const { return m_isExample; } QCString exampleFile() const { return m_exampleFile; } QCString relPath() const { return m_relPath; } private: - DocNode *m_parent; QCString m_context; QCString m_text; Type m_type; @@ -395,8 +377,8 @@ class DocInclude : public DocNode DocInclude(DocNode *parent,const QCString &file, const QCString context, Type t, bool isExample,const QCString exampleFile) : - m_parent(parent), m_file(file), m_context(context), m_type(t), - m_isExample(isExample), m_exampleFile(exampleFile) {} + m_file(file), m_context(context), m_type(t), + m_isExample(isExample), m_exampleFile(exampleFile) { m_parent = parent; } Kind kind() const { return Kind_Include; } QCString file() const { return m_file; } QCString extension() const { int i=m_file.findRev('.'); @@ -408,14 +390,12 @@ class DocInclude : public DocNode Type type() const { return m_type; } QCString text() const { return m_text; } QCString context() const { return m_context; } - DocNode *parent() const { return m_parent; } bool isExample() const { return m_isExample; } QCString exampleFile() const { return m_exampleFile; } void accept(DocVisitor *v) { v->visit(this); } void parse(); private: - DocNode *m_parent; QCString m_file; QCString m_context; QCString m_text; @@ -431,15 +411,14 @@ class DocIncOperator : public DocNode enum Type { Line, SkipLine, Skip, Until }; DocIncOperator(DocNode *parent,Type t,const QCString &pat, const QCString &context,bool isExample,const QCString &exampleFile) : - m_parent(parent), m_type(t), m_pattern(pat), m_context(context), + m_type(t), m_pattern(pat), m_context(context), m_isFirst(FALSE), m_isLast(FALSE), - m_isExample(isExample), m_exampleFile(exampleFile) {} + m_isExample(isExample), m_exampleFile(exampleFile) { m_parent = parent; } Kind kind() const { return Kind_IncOperator; } Type type() const { return m_type; } QCString text() const { return m_text; } QCString pattern() const { return m_pattern; } QCString context() const { return m_context; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } bool isFirst() const { return m_isFirst; } bool isLast() const { return m_isLast; } @@ -450,7 +429,6 @@ class DocIncOperator : public DocNode void parse(); private: - DocNode *m_parent; Type m_type; QCString m_text; QCString m_pattern; @@ -471,12 +449,10 @@ class DocFormula : public DocNode QCString text() const { return m_text; } QCString relPath() const { return m_relPath; } int id() const { return m_id; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } bool isInline() { return text().at(0)!='\\'; } private: - DocNode *m_parent; QCString m_name; QCString m_text; QCString m_relPath; @@ -488,17 +464,15 @@ class DocIndexEntry : public DocNode { public: DocIndexEntry(DocNode *parent,Definition *scope,MemberDef *md) - : m_parent(parent), m_scope(scope), m_member(md) { } + : m_scope(scope), m_member(md) { m_parent = parent; } Kind kind() const { return Kind_IndexEntry; } int parse(); - DocNode *parent() const { return m_parent; } Definition *scope() const { return m_scope; } MemberDef *member() const { return m_member; } QCString entry() const { return m_entry; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; QCString m_entry; Definition *m_scope; MemberDef *m_member; @@ -511,16 +485,14 @@ class DocCopy : public CompAccept<DocCopy>, public DocNode { public: DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails) - : m_parent(parent), m_link(link), - m_copyBrief(copyBrief), m_copyDetails(copyDetails) { } + : m_link(link), + m_copyBrief(copyBrief), m_copyDetails(copyDetails) { m_parent = parent; } Kind kind() const { return Kind_Copy; } QCString link() const { return m_link; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); } void parse(); private: - DocNode *m_parent; QCString m_link; bool m_copyBrief; bool m_copyDetails; @@ -532,18 +504,16 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode public: DocAutoList(DocNode *parent,int indent,bool isEnumList, int depth) : - m_parent(parent), m_indent(indent), m_isEnumList(isEnumList), - m_depth(depth) {} + m_indent(indent), m_isEnumList(isEnumList), + m_depth(depth) { m_parent = parent; } Kind kind() const { return Kind_AutoList; } bool isEnumList() const { return m_isEnumList; } int indent() const { return m_indent; } - DocNode *parent() const { return m_parent; } int depth() const { return m_depth; } void accept(DocVisitor *v) { CompAccept<DocAutoList>::accept(this,v); } int parse(); private: - DocNode *m_parent; int m_indent; bool m_isEnumList; int m_depth; @@ -554,15 +524,13 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode class DocTitle : public CompAccept<DocTitle>, public DocNode { public: - DocTitle(DocNode *parent) : m_parent(parent) {} + DocTitle(DocNode *parent) { m_parent = parent; } void parse(); void parseFromString(const QCString &title); Kind kind() const { return Kind_Title; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocTitle>::accept(this,v); } private: - DocNode *m_parent; }; /*! @brief Node representing an item of a cross-referenced list */ @@ -575,7 +543,6 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode QCString file() const { return m_file; } QCString anchor() const { return m_anchor; } QCString title() const { return m_title; } - DocNode *parent() const { return m_parent; } QCString relPath() const { return m_relPath; } QCString key() const { return m_key; } void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); } @@ -583,7 +550,6 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode const QList<DocNode> &children() const { return m_children; } private: - DocNode *m_parent; int m_id; QCString m_key; QCString m_file; @@ -601,7 +567,6 @@ class DocImage : public CompAccept<DocImage>, public DocNode Kind kind() const { return Kind_Image; } Type type() const { return m_type; } QCString name() const { return m_name; } - DocNode *parent() const { return m_parent; } bool hasCaption() const { return !m_children.isEmpty(); } QCString width() const { return m_width; } QCString height() const { return m_height; } @@ -611,7 +576,6 @@ class DocImage : public CompAccept<DocImage>, public DocNode void parse(); private: - DocNode *m_parent; HtmlAttribList m_attribs; QCString m_name; Type m_type; @@ -633,11 +597,9 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode bool hasCaption() const { return !m_children.isEmpty(); } QCString width() const { return m_width; } QCString height() const { return m_height; } - DocNode *parent() const { return m_parent; } QCString context() const { return m_context; } void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); } private: - DocNode *m_parent; QCString m_name; QCString m_file; QCString m_relPath; @@ -657,11 +619,9 @@ class DocLink : public CompAccept<DocLink>, public DocNode QCString relPath() const { return m_relPath; } QCString ref() const { return m_ref; } QCString anchor() const { return m_anchor; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocLink>::accept(this,v); } private: - DocNode *m_parent; QCString m_file; QCString m_relPath; QCString m_ref; @@ -681,14 +641,12 @@ class DocRef : public CompAccept<DocRef>, public DocNode QCString ref() const { return m_ref; } QCString anchor() const { return m_anchor; } QCString targetTitle() const { return m_text; } - DocNode *parent() const { return m_parent; } bool hasLinkText() const { return !m_children.isEmpty(); } bool refToAnchor() const { return m_refToAnchor; } bool refToSection() const { return m_refToSection; } void accept(DocVisitor *v) { CompAccept<DocRef>::accept(this,v); } private: - DocNode * m_parent; bool m_refToSection; bool m_refToAnchor; QCString m_file; @@ -708,11 +666,9 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode QCString file() const { return m_file; } QCString relPath() const { return m_relPath; } QCString anchor() const { return m_anchor; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); } private: - DocNode * m_parent; QCString m_file; QCString m_relPath; QCString m_anchor; @@ -740,16 +696,14 @@ class DocHRef : public CompAccept<DocHRef>, public DocNode { public: DocHRef(DocNode *parent,const HtmlAttribList &attribs,const QCString &url) : - m_parent(parent), m_attribs(attribs), m_url(url) {} + m_attribs(attribs), m_url(url) { m_parent = parent; } int parse(); QCString url() const { return m_url; } Kind kind() const { return Kind_HRef; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHRef>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } private: - DocNode * m_parent; HtmlAttribList m_attribs; QCString m_url; }; @@ -759,16 +713,14 @@ class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode { public: DocHtmlHeader(DocNode *parent,const HtmlAttribList &attribs,int level) : - m_parent(parent), m_level(level), m_attribs(attribs) {} + m_level(level), m_attribs(attribs) { m_parent = parent; } int level() const { return m_level; } Kind kind() const { return Kind_HtmlHeader; } const HtmlAttribList &attribs() const { return m_attribs; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHtmlHeader>::accept(this,v); } int parse(); private: - DocNode * m_parent; int m_level; HtmlAttribList m_attribs; }; @@ -778,15 +730,13 @@ class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode { public: DocHtmlDescTitle(DocNode *parent,const HtmlAttribList &attribs) : - m_parent(parent), m_attribs(attribs) {} + m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlDescTitle; } - DocNode *parent() const { return m_parent; } const HtmlAttribList &attribs() const { return m_attribs; } void accept(DocVisitor *v) { CompAccept<DocHtmlDescTitle>::accept(this,v); } int parse(); private: - DocNode * m_parent; HtmlAttribList m_attribs; }; @@ -794,16 +744,14 @@ class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode { public: - DocHtmlDescList(DocNode *parent,const HtmlAttribList &attribs) - : m_parent(parent), m_attribs(attribs) {} + DocHtmlDescList(DocNode *parent,const HtmlAttribList &attribs) : + m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlDescList; } - DocNode *parent() const { return m_parent; } const HtmlAttribList &attribs() const { return m_attribs; } void accept(DocVisitor *v) { CompAccept<DocHtmlDescList>::accept(this,v); } int parse(); private: - DocNode * m_parent; HtmlAttribList m_attribs; }; @@ -812,19 +760,17 @@ class DocSection : public CompAccept<DocSection>, public DocNode { public: DocSection(DocNode *parent,int level,const QCString &id) : - m_parent(parent), m_level(level), m_id(id) {} + m_level(level), m_id(id) { m_parent = parent; } Kind kind() const { return Kind_Section; } int level() const { return m_level; } QCString title() const { return m_title; } QCString anchor() const { return m_anchor; } QCString id() const { return m_id; } QCString file() const { return m_file; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocSection>::accept(this,v); } int parse(); private: - DocNode *m_parent; int m_level; QCString m_id; QCString m_title; @@ -837,18 +783,16 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode { public: DocSecRefItem(DocNode *parent,const QCString &target) : - m_parent(parent), m_target(target) {} + m_target(target) { m_parent = parent; } Kind kind() const { return Kind_SecRefItem; } QCString target() const { return m_target; } QCString file() const { return m_file; } QCString anchor() const { return m_anchor; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocSecRefItem>::accept(this,v); } void parse(); const QList<DocNode> &children() const { return m_children; } private: - DocNode *m_parent; QCString m_target; QCString m_file; QCString m_anchor; @@ -858,42 +802,36 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode class DocSecRefList : public CompAccept<DocSecRefList>, public DocNode { public: - DocSecRefList(DocNode *parent) : m_parent(parent) {} + DocSecRefList(DocNode *parent) { m_parent = parent; } void parse(); Kind kind() const { return Kind_SecRefList; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocSecRefList>::accept(this,v); } private: - DocNode *m_parent; }; /*! @brief Node representing an internal section of documentation */ class DocInternal : public CompAccept<DocInternal>, public DocNode { public: - DocInternal(DocNode *parent) : m_parent(parent) {} + DocInternal(DocNode *parent) { m_parent = parent; } int parse(int); Kind kind() const { return Kind_Internal; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocInternal>::accept(this,v); } private: - DocNode *m_parent; }; /*! @brief Node representing a simple list */ class DocSimpleList : public CompAccept<DocSimpleList>, public DocNode { public: - DocSimpleList(DocNode *parent) : m_parent(parent) {} + DocSimpleList(DocNode *parent) { m_parent = parent; } Kind kind() const { return Kind_SimpleList; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocSimpleList>::accept(this,v); } int parse(); private: - DocNode *m_parent; }; /*! @brief Node representing a Html list */ @@ -902,17 +840,15 @@ class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode public: enum Type { Unordered, Ordered }; DocHtmlList(DocNode *parent,const HtmlAttribList &attribs,Type t) : - m_parent(parent), m_type(t), m_attribs(attribs) {} + m_type(t), m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlList; } Type type() const { return m_type; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHtmlList>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } int parse(); int parseXml(); private: - DocNode * m_parent; Type m_type; HtmlAttribList m_attribs; }; @@ -931,7 +867,6 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode Kind kind() const { return Kind_SimpleSect; } Type type() const { return m_type; } QCString typeString() const; - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v); int parse(bool userTitle,bool needsSeparator); int parseRcs(); @@ -940,7 +875,6 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode const QList<DocNode> &children() const { return m_children; } private: - DocNode * m_parent; Type m_type; DocTitle * m_title; }; @@ -951,13 +885,11 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode class DocSimpleSectSep : public DocNode { public: - DocSimpleSectSep(DocNode *parent) : m_parent(parent) {} + DocSimpleSectSep(DocNode *parent) { m_parent = parent; } Kind kind() const { return Kind_SimpleSectSep; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } private: - DocNode *m_parent; }; /*! Node representing a parameter section */ @@ -973,15 +905,13 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode In=1, Out=2, InOut=3, Unspecified=0 }; DocParamSect(DocNode *parent,Type t) - : m_parent(parent), m_type(t) {} + : m_type(t) { m_parent = parent; } int parse(const QCString &cmdName,bool xmlContext,Direction d); Kind kind() const { return Kind_ParamSect; } Type type() const { return m_type; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocParamSect>::accept(this,v); } private: - DocNode * m_parent; Type m_type; Direction m_dir; }; @@ -990,11 +920,10 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode class DocPara : public CompAccept<DocPara>, public DocNode { public: - DocPara(DocNode *parent) : m_parent(parent), - m_isFirst(FALSE), m_isLast(FALSE) {} + DocPara(DocNode *parent) : + m_isFirst(FALSE), m_isLast(FALSE) { m_parent = parent; } int parse(); Kind kind() const { return Kind_Para; } - DocNode *parent() const { return m_parent; } bool isEmpty() const { return m_children.isEmpty(); } void accept(DocVisitor *v) { CompAccept<DocPara>::accept(this,v); } void markFirst(bool v=TRUE) { m_isFirst=v; } @@ -1025,7 +954,6 @@ class DocPara : public CompAccept<DocPara>, public DocNode bool injectToken(int tok,const QCString &tokText); private: - DocNode *m_parent; QCString m_sectionId; bool m_isFirst; bool m_isLast; @@ -1036,11 +964,10 @@ class DocParamList : public DocNode { public: DocParamList(DocNode *parent,DocParamSect::Type t,DocParamSect::Direction d) - : m_parent(parent) , m_type(t), m_dir(d), m_isFirst(TRUE), m_isLast(TRUE) - { m_paragraphs.setAutoDelete(TRUE); } + : m_type(t), m_dir(d), m_isFirst(TRUE), m_isLast(TRUE) + { m_paragraphs.setAutoDelete(TRUE); m_parent = parent; } virtual ~DocParamList() { } Kind kind() const { return Kind_ParamList; } - DocNode *parent() const { return m_parent; } const QList<DocNode> ¶meters() { return m_params; } DocParamSect::Type type() const { return m_type; } DocParamSect::Direction direction() const { return m_dir; } @@ -1060,7 +987,6 @@ class DocParamList : public DocNode int parseXml(const QCString ¶mName); private: - DocNode * m_parent; QList<DocPara> m_paragraphs; QList<DocNode> m_params; DocParamSect::Type m_type; @@ -1073,11 +999,10 @@ class DocParamList : public DocNode class DocAutoListItem : public DocNode { public: - DocAutoListItem(DocNode *parent,int num) : m_parent(parent), m_itemNum(num) - { m_paragraph=new DocPara(this); } + DocAutoListItem(DocNode *parent,int num) : m_itemNum(num) + { m_paragraph=new DocPara(this); m_parent = parent; } virtual ~DocAutoListItem() { delete m_paragraph; } Kind kind() const { return Kind_AutoListItem; } - DocNode *parent() const { return m_parent; } int itemNumber() const { return m_itemNum; } void accept(DocVisitor *v) { @@ -1088,7 +1013,6 @@ class DocAutoListItem : public DocNode int parse(); private: - DocNode *m_parent; DocPara *m_paragraph; int m_itemNum; }; @@ -1097,12 +1021,11 @@ class DocAutoListItem : public DocNode class DocSimpleListItem : public DocNode { public: - DocSimpleListItem(DocNode *parent) : m_parent(parent) - { m_paragraph=new DocPara(this); } + DocSimpleListItem(DocNode *parent) + { m_paragraph=new DocPara(this); m_parent = parent; } int parse(); virtual ~DocSimpleListItem() { delete m_paragraph; } Kind kind() const { return Kind_SimpleListItem; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visitPre(this); @@ -1111,7 +1034,6 @@ class DocSimpleListItem : public DocNode } private: - DocNode *m_parent; DocPara *m_paragraph; }; @@ -1120,18 +1042,16 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode { public: DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs,int num) : - m_parent(parent), m_attribs(attribs), m_itemNum(num) {} + m_attribs(attribs), m_itemNum(num) { m_parent = parent; } Kind kind() const { return Kind_HtmlListItem; } int itemNumber() const { return m_itemNum; } const HtmlAttribList &attribs() const { return m_attribs; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); } int parse(); int parseXml(); const QList<DocNode> &children() const { return m_children; } private: - DocNode * m_parent; HtmlAttribList m_attribs; int m_itemNum; }; @@ -1140,17 +1060,14 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode { public: - DocHtmlDescData(DocNode *parent) : - m_parent(parent) {} + DocHtmlDescData(DocNode *parent) { m_parent = parent; } Kind kind() const { return Kind_HtmlDescData; } const HtmlAttribList &attribs() const { return m_attribs; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHtmlDescData>::accept(this,v); } int parse(); const QList<DocNode> &children() const { return m_children; } private: - DocNode * m_parent; HtmlAttribList m_attribs; }; @@ -1159,13 +1076,12 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode { public: DocHtmlCell(DocNode *parent,const HtmlAttribList &attribs,bool isHeading) : - m_parent(parent), m_isHeading(isHeading), - m_isFirst(FALSE), m_isLast(FALSE), m_attribs(attribs) {} + m_isHeading(isHeading), + m_isFirst(FALSE), m_isLast(FALSE), m_attribs(attribs) { m_parent = parent; } bool isHeading() const { return m_isHeading; } bool isFirst() const { return m_isFirst; } bool isLast() const { return m_isLast; } Kind kind() const { return Kind_HtmlCell; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHtmlCell>::accept(this,v); } void markFirst(bool v=TRUE) { m_isFirst=v; } void markLast(bool v=TRUE) { m_isLast=v; } @@ -1175,7 +1091,6 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode int parseXml(); private: - DocNode * m_parent; bool m_isHeading; bool m_isFirst; bool m_isLast; @@ -1187,15 +1102,13 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode { public: DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs) : - m_parent(parent), m_attribs(attribs) {} + m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlCaption; } - DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { CompAccept<DocHtmlCaption>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } int parse(); private: - DocNode * m_parent; HtmlAttribList m_attribs; bool m_atTop; }; @@ -1204,10 +1117,9 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode { public: - DocHtmlRow(DocNode *parent,const HtmlAttribList &attribs) - : m_parent(parent), m_attribs(attribs) {} + DocHtmlRow(DocNode *parent,const HtmlAttribList &attribs) : + m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlRow; } - DocNode *parent() const { return m_parent; } uint numCells() const { return m_children.count(); } void accept(DocVisitor *v) { CompAccept<DocHtmlRow>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } @@ -1215,7 +1127,6 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode int parseXml(bool header); private: - DocNode * m_parent; HtmlAttribList m_attribs; }; @@ -1224,11 +1135,9 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode { public: DocHtmlTable(DocNode *parent,const HtmlAttribList &attribs) - : m_parent(parent), m_attribs(attribs) - { m_caption=0; } + : m_attribs(attribs) { m_caption=0; m_parent = parent; } ~DocHtmlTable() { delete m_caption; } Kind kind() const { return Kind_HtmlTable; } - DocNode *parent() const { return m_parent; } uint numRows() const { return m_children.count(); } bool hasCaption() { return m_caption!=0; } const HtmlAttribList &attribs() const { return m_attribs; } @@ -1238,7 +1147,6 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode void accept(DocVisitor *v); private: - DocNode * m_parent; DocHtmlCaption *m_caption; HtmlAttribList m_attribs; }; @@ -1249,7 +1157,6 @@ class DocText : public CompAccept<DocText>, public DocNode public: DocText() {} Kind kind() const { return Kind_Text; } - DocNode *parent() const { return 0; } void accept(DocVisitor *v) { CompAccept<DocText>::accept(this,v); } void parse(); }; @@ -1260,7 +1167,6 @@ class DocRoot : public CompAccept<DocRoot>, public DocNode public: DocRoot(bool indent,bool sl) : m_indent(indent), m_singleLine(sl) {} Kind kind() const { return Kind_Root; } - DocNode *parent() const { return 0; } void accept(DocVisitor *v) { CompAccept<DocRoot>::accept(this,v); } void parse(); bool indent() const { return m_indent; } diff --git a/src/docsets.cpp b/src/docsets.cpp index 76e90db..b69f91d 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -272,16 +272,17 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md, lang="cpp"; // C++ } break; - case SrcLangExt_IDL: lang="idl"; break; // IDL - case SrcLangExt_CSharp: lang="csharp"; break; // C# - case SrcLangExt_PHP: lang="php"; break; // PHP4/5 - case SrcLangExt_D: lang="d"; break; // D - case SrcLangExt_Java: lang="java"; break; // Java - case SrcLangExt_JS: lang="javascript"; break; // Javascript - case SrcLangExt_Python: lang="python"; break; // Python - case SrcLangExt_F90: lang="fortran"; break; // Fortran - case SrcLangExt_VHDL: lang="vhdl"; break; // VHDL - case SrcLangExt_XML: lang="xml"; break; // DBUS XML + case SrcLangExt_IDL: lang="idl"; break; // IDL + case SrcLangExt_CSharp: lang="csharp"; break; // C# + case SrcLangExt_PHP: lang="php"; break; // PHP4/5 + case SrcLangExt_D: lang="d"; break; // D + case SrcLangExt_Java: lang="java"; break; // Java + case SrcLangExt_JS: lang="javascript"; break; // Javascript + case SrcLangExt_Python: lang="python"; break; // Python + case SrcLangExt_F90: lang="fortran"; break; // Fortran + case SrcLangExt_VHDL: lang="vhdl"; break; // VHDL + case SrcLangExt_XML: lang="xml"; break; // DBUS XML + case SrcLangExt_Unknown: lang="unknown"; break; // should not happen! } if (md) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index e00d38b..4285b6c 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -919,20 +919,20 @@ REFWORD {LABELID}|{REFWORD2} BEGIN(St_Sections); } <St_SecTitle,St_SecLabel1,St_SecLabel2>. { - warn(g_fileName,yylineno,"Error: Unexpected character `%s' while looking for section label or title",yytext); + warn(g_fileName,yylineno,"warning: Unexpected character `%s' while looking for section label or title",yytext); } /* Generic rules that work for all states */ <*>\n { - warn(g_fileName,yylineno,"Error: Unexpected new line character"); + warn(g_fileName,yylineno,"warning: Unexpected new line character"); } <*>[\\@<>&$#%~"] { /* unescaped special character */ - //warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext); + //warn(g_fileName,yylineno,"warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext); g_token->name = yytext; return TK_COMMAND; } <*>. { - warn(g_fileName,yylineno,"Error: Unexpected character `%s'",yytext); + warn(g_fileName,yylineno,"warning: Unexpected character `%s'",yytext); } %% diff --git a/src/dot.cpp b/src/dot.cpp index 4847d08..58a8a84 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -136,7 +136,7 @@ static bool convertMapFile(FTextStream &t,const char *mapName, QFile f(mapName); if (!f.open(IO_ReadOnly)) { - err("Error opening map file %s for inclusion in the docs!\n" + err("error: problems opening map file %s for inclusion in the docs!\n" "If you installed Graphviz/dot after a previous failing run, \n" "try deleting the output directory and rerun doxygen.\n",mapName); return FALSE; @@ -158,7 +158,7 @@ static bool convertMapFile(FTextStream &t,const char *mapName, QCString result; if (urlOnly) // for user defined dot graphs { - if (link.left(5)=="\\ref ") // \ref url + if (link.left(5)=="\\ref " || link.left(5)=="@ref ") // \ref url { result="href=\""; // fake ref node to resolve the url @@ -390,7 +390,7 @@ static void checkDotResult(const QCString &imgName) { if (!(data[1]=='P' && data[2]=='N' && data[3]=='G')) { - err("Error! Image `%s' produced by dot is not a valid PNG!\n" + err("error: Image `%s' produced by dot is not a valid PNG!\n" "You should either select a different format " "(DOT_IMAGE_FORMAT in the config file) or install a more " "recent version of graphviz (1.7+)\n",imgName.data() @@ -399,12 +399,12 @@ static void checkDotResult(const QCString &imgName) } else { - err("Error: Could not read image `%s' generated by dot!\n",imgName.data()); + err("error: Could not read image `%s' generated by dot!\n",imgName.data()); } } else { - err("Error: Could not open image `%s' generated by dot!\n",imgName.data()); + err("error: Could not open image `%s' generated by dot!\n",imgName.data()); } } } @@ -429,6 +429,17 @@ static bool insertMapFile(FTextStream &out,const QCString &mapFile, return FALSE; // no map file yet, need to generate it } +static void removeDotGraph(const QCString &dotName) +{ + static bool dotCleanUp = Config_getBool("DOT_CLEANUP"); + if (dotCleanUp) + { + QDir d; + d.remove(dotName); + } +} + + /*! Checks if a file "baseName".md5 exists. If so the contents * are compared with \a md5. If equal FALSE is returned. If the .md5 @@ -550,7 +561,7 @@ bool DotRunner::run() } if (!m_postCmd.isEmpty() && portable_system(m_postCmd,m_postArgs)!=0) { - err("Error: Problems running '%s' as a post-processing step for dot output\n",m_postCmd.data()); + err("error: Problems running '%s' as a post-processing step for dot output\n",m_postCmd.data()); return FALSE; } if (m_checkResult) checkDotResult(m_imageName); @@ -613,13 +624,13 @@ bool DotMapConverter::run() QFile fo(m_patchFile); if (!fi.open(IO_ReadOnly)) { - err("Error opening file %s for patching!\n",tmpName.data()); + err("error: problem opening file %s for patching!\n",tmpName.data()); QDir::current().rename(tmpName,m_patchFile); return FALSE; } if (!fo.open(IO_WriteOnly)) { - err("Error opening file %s for patching!\n",m_patchFile.data()); + err("error: problem opening file %s for patching!\n",m_patchFile.data()); QDir::current().rename(tmpName,m_patchFile); return FALSE; } @@ -1525,7 +1536,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out, // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } // put each connected subgraph of the hierarchy in a row of the HTML output @@ -1575,7 +1586,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out, MD5SigToString(md5_sig,sigStr.data(),33); bool regenerate=FALSE; if (checkAndUpdateMd5Signature(absBaseName,sigStr) || - !checkDeliverables(absMapName)) + !checkDeliverables(absImgName,absMapName)) { regenerate=TRUE; // image was new or has changed @@ -1591,7 +1602,10 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out, dotRun->addJob(imgExt,absImgName); dotRun->addJob(MAP_CMD,absMapName); DotManager::instance()->addRun(dotRun); - + } + else + { + removeDotGraph(absBaseName+".dot"); } Doxygen::indexList.addImageFile(imgName); // write image and map in a table row @@ -2253,18 +2267,13 @@ static bool updateDotGraph(DotNode *root, // TODO: write graph to theGraph, then compute md5 checksum QCString md5 = computeMd5Signature( root,gt,format,lrRank,renderParents,backArrows,theGraph); - if (checkAndUpdateMd5Signature(baseName,md5)) // graph needs to be regenerated + QFile f(baseName+".dot"); + if (f.open(IO_WriteOnly)) { - QFile f; - f.setName(baseName+".dot"); - if (f.open(IO_WriteOnly)) - { - FTextStream t(&f); - t << theGraph; - } - return TRUE; + FTextStream t(&f); + t << theGraph; } - return FALSE; + return checkAndUpdateMd5Signature(baseName,md5); // graph needs to be regenerated } QCString DotClassGraph::diskName() const @@ -2300,7 +2309,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out, // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -2408,6 +2417,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out, out << endl << "% FIG " << figId << endl; } } + if (!regenerate) removeDotGraph(absDotName); return baseName; } @@ -2610,7 +2620,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -2694,6 +2704,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, out << endl << "% FIG " << figId << endl; } } + if (!regenerate) removeDotGraph(absDotName); return baseName; } @@ -2885,7 +2896,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -2967,6 +2978,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, out << endl << "% FIG " << figId << endl; } } + if (!regenerate) removeDotGraph(absDotName); return baseName; } @@ -3004,7 +3016,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out, // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -3094,6 +3106,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out, out << endl << "% FIG " << figId << endl; } } + if (!regenerate) removeDotGraph(absDotName); return baseName; } @@ -3111,7 +3124,7 @@ void generateGraphLegend(const char *path) // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } QGString theGraph; @@ -3165,6 +3178,10 @@ void generateGraphLegend(const char *path) dotRun->addJob(imgExt,absImgName); DotManager::instance()->addRun(dotRun); } + else + { + removeDotGraph(absDotName); + } } @@ -3174,7 +3191,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, QDir d(outDir); if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",outDir); exit(1); + err("error: Output dir %s does not exist!\n",outDir); exit(1); } QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); @@ -3214,7 +3231,6 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, * dotfiles to generate image maps. * \param inFile just the basename part of the filename * \param outDir output directory - * \param fileName file name in which the map will be embedded * \param relPath relative path the to root of the output dir * \param context the scope in which this graph is found (for resolving links) * \returns a string which is the HTML image map (without the \<map\>\</map\>) @@ -3227,7 +3243,7 @@ QCString getDotImageMapFromFile(const QCString& inFile, const QCString& outDir, QDir d(outDir); if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",outDir.data()); exit(1); + err("error: Output dir %s does not exist!\n",outDir.data()); exit(1); } QCString absInFile = QCString(d.absPath())+"/"+inFile; @@ -3469,7 +3485,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat fo // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); exit(1); + err("error: Output dir %s does not exist!\n",path); exit(1); } static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -3581,6 +3597,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat fo t << endl << "% FIG " << figId << endl; } } + if (!regenerate) removeDotGraph(absDotName); return baseName; } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 6b3720e..1818621 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -118,7 +118,7 @@ QDict<void> Doxygen::expandAsDefinedDict(257); // all macros that should be QIntDict<MemberGroupInfo> Doxygen::memGrpInfoDict(1009); // dictionary of the member groups heading PageDef *Doxygen::mainPage = 0; bool Doxygen::insideMainPage = FALSE; // are we generating docs for the main page? -QTextStream Doxygen::tagFile; +FTextStream Doxygen::tagFile; NamespaceDef *Doxygen::globalScope = 0; QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross-referenced item lists bool Doxygen::parseSourcesNeeded = FALSE; @@ -505,7 +505,7 @@ static void buildGroupListFiltered(EntryNav *rootNav,bool additional) { warn( root->fileName,root->startLine, "group %s: ignoring title \"%s\" that does not match old title \"%s\"\n", - root->name.data(), root->type.data(), gd->groupTitle() ); + qPrint(root->name), qPrint(root->type), qPrint(gd->groupTitle()) ); } gd->setBriefDescription(root->brief,root->briefFile,root->briefLine); gd->setDocumentation( root->doc, root->docFile, root->docLine ); @@ -643,7 +643,7 @@ static void buildFileList(EntryNav *rootNav) { warn( root->fileName,root->startLine, - "Warning: file %s already documented. " + "warning: file %s already documented. " "Skipping documentation.", root->name.data() ); @@ -676,9 +676,9 @@ static void buildFileList(EntryNav *rootNav) { const char *fn = root->fileName.data(); QCString text; - text.sprintf("Warning: the name `%s' supplied as " + text.sprintf("warning: the name `%s' supplied as " "the second argument in the \\file statement ", - root->name.data() + qPrint(root->name) ); if (ambig) // name is ambiguous { @@ -732,9 +732,9 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root) ) { // explicit request QCString text; - text.sprintf("Warning: the name `%s' supplied as " + text.sprintf("warning: the name `%s' supplied as " "the argument of the \\class, \\struct, \\union, or \\include command ", - includeFile.data() + qPrint(includeFile) ); if (ambig) // name is ambiguous { @@ -1154,7 +1154,7 @@ static void addClassToContext(EntryNav *rootNav) fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); - cd->setIsObjectiveC(root->objc); + cd->setLanguage(root->lang); cd->setHidden(root->hidden); cd->setArtificial(root->artificial); cd->setTypeConstraints(root->typeConstr); @@ -1290,7 +1290,7 @@ static void resolveClassNestingRelations() d->addInnerCompound(cd); cd->setOuterScope(d); warn(cd->getDefFileName(),cd->getDefLine(), - "Warning: Internal inconsistency: scope for class %s not " + "warning: Internal inconsistency: scope for class %s not " "found!",name.data() ); } @@ -1346,7 +1346,7 @@ static void buildNamespaceList(EntryNav *rootNav) { warn( root->fileName,root->startLine, - "Warning: namespace %s already has a detailed description found in file %s at line %d. " + "warning: namespace %s already has a detailed description found in file %s at line %d. " "Skipping the documentation found here.", fullName.data(),nd->docFile().data(),nd->docLine()); } @@ -1360,7 +1360,7 @@ static void buildNamespaceList(EntryNav *rootNav) else if (!nd->briefDescription().isEmpty() && !root->brief.isEmpty()) { warn(root->fileName,root->startLine, - "Warning: namespace %s already has a brief description found in file %s at line %d. " + "warning: namespace %s already has a brief description found in file %s at line %d. " "Skipping the documentation found here.", fullName.data(),nd->docFile().data(),nd->docLine() ); @@ -1902,7 +1902,7 @@ static MemberDef *addVariableToClass( // member already in the scope { - if (root->objc && + if (root->lang==SrcLangExt_ObjC && root->mtype==Property && md->memberType()==MemberDef::Variable) { // Objective-C 2.0 property @@ -3165,7 +3165,7 @@ static void buildFunctionList(EntryNav *rootNav) else if (rname.isEmpty()) { warn(root->fileName,root->startLine, - "Warning: Illegal member name found." + "warning: Illegal member name found." ); } @@ -3920,7 +3920,7 @@ static bool findTemplateInstanceRelation(Entry *root, ClassDef *instanceClass = templateClass->insertTemplateInstance( root->fileName,root->startLine,templSpec,freshInstance); if (isArtificial) instanceClass->setArtificial(TRUE); - instanceClass->setIsObjectiveC(root->objc); + instanceClass->setLanguage(root->lang); if (freshInstance) { @@ -4220,6 +4220,11 @@ static bool findClassRelation( //printf("root->name=%s biName=%s baseClassName=%s\n", // root->name.data(),biName.data(),baseClassName.data()); + if (cd->isCSharp() && i!=-1) // C# generic -> add internal -g postfix + { + baseClassName+="-g"; + templSpec.resize(0); + } if (!found) { @@ -4231,7 +4236,7 @@ static bool findClassRelation( } bool isATemplateArgument = templateNames!=0 && templateNames->find(biName)!=0; // make templSpec canonical - // Warning: the following line doesn't work for Mixin classes (see bug 560623) + // warning: the following line doesn't work for Mixin classes (see bug 560623) // templSpec = getCanonicalTemplateSpec(cd, cd->getFileDef(), templSpec); //printf("3. found=%d\n",found); @@ -4265,7 +4270,7 @@ static bool findClassRelation( { //printf(" => insert base class\n"); QCString usedName; - if (baseClassTypeDef) + if (baseClassTypeDef || cd->isCSharp()) { usedName=biName; //printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data()); @@ -4479,7 +4484,7 @@ static void computeClassRelations() ) warn_undoc( root->fileName,root->startLine, - "Warning: Compound %s is not documented.", + "warning: Compound %s is not documented.", root->name.data() ); } @@ -4831,7 +4836,7 @@ static void addMemberDocs(EntryNav *rootNav, { warn( root->fileName,root->startLine, - "Warning: member %s belongs to two different groups. The second " + "warning: member %s belongs to two different groups. The second " "one found here will be ignored.", md->name().data() ); @@ -4969,7 +4974,7 @@ static bool findGlobalMember(EntryNav *rootNav, QCString fullFuncDecl=decl; if (root->argList) fullFuncDecl+=argListToString(root->argList,TRUE); QCString warnMsg = - QCString("Warning: no matching file member found for \n")+fullFuncDecl; + QCString("warning: no matching file member found for \n")+fullFuncDecl; if (mn->count()>0) { warnMsg+="Possible candidates:\n"; @@ -4993,7 +4998,7 @@ static bool findGlobalMember(EntryNav *rootNav, ) { warn(root->fileName,root->startLine, - "Warning: documented function `%s' was not declared or defined.",decl + "warning: documented function `%s' was not declared or defined.",decl ); } } @@ -5160,10 +5165,10 @@ static void findMember(EntryNav *rootNav, Debug::print(Debug::FindMembers,0, "findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d," "isFunc=%d mGrpId=%d tArgList=%p (#=%d) " - "spec=%d isObjC=%d\n", + "spec=%d lang=%x\n", root,funcDecl.data(),root->relates.data(),overloaded,isFunc,root->mGrpId, root->tArgLists,root->tArgLists ? root->tArgLists->count() : 0, - root->spec,root->objc + root->spec,root->lang ); QCString scopeName; @@ -5242,7 +5247,7 @@ static void findMember(EntryNav *rootNav, else { // extract information from the declarations - parseFuncDecl(funcDecl,root->objc,scopeName,funcType,funcName, + parseFuncDecl(funcDecl,root->lang==SrcLangExt_ObjC,scopeName,funcType,funcName, funcArgs,funcTempList,exceptions ); } @@ -5641,7 +5646,7 @@ static void findMember(EntryNav *rootNav, } } - QCString warnMsg = "Warning: no "; + QCString warnMsg = "warning: no "; if (noMatchCount>1) warnMsg+="uniquely "; warnMsg+="matching class member found for \n"; @@ -5822,7 +5827,7 @@ static void findMember(EntryNav *rootNav, QCString fullFuncDecl=funcDecl.copy(); if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); warn(root->fileName,root->startLine, - "Warning: Cannot determine class for function\n%s", + "warning: Cannot determine class for function\n%s", fullFuncDecl.data() ); } @@ -6019,7 +6024,7 @@ static void findMember(EntryNav *rootNav, QCString fullFuncDecl=funcDecl.copy(); if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); warn(root->fileName,root->startLine, - "Warning: Cannot determine file/namespace for relatedalso function\n%s", + "warning: Cannot determine file/namespace for relatedalso function\n%s", fullFuncDecl.data() ); } @@ -6028,7 +6033,7 @@ static void findMember(EntryNav *rootNav, else { warn_undoc(root->fileName,root->startLine, - "Warning: class `%s' for related function `%s' is not " + "warning: class `%s' for related function `%s' is not " "documented.", className.data(),funcName.data() ); @@ -6089,14 +6094,14 @@ localObjCMethod: if (className.isEmpty() && !globMem) { warn(root->fileName,root->startLine, - "Warning: class for member `%s' cannot " + "warning: class for member `%s' cannot " "be found.", funcName.data() ); } else if (!className.isEmpty() && !globMem) { warn(root->fileName,root->startLine, - "Warning: member `%s' of class `%s' cannot be found", + "warning: member `%s' of class `%s' cannot be found", funcName.data(),className.data()); } } @@ -6105,7 +6110,7 @@ localObjCMethod: { // this should not be called warn(root->fileName,root->startLine, - "Warning: member with no name found."); + "warning: member with no name found."); } return; } @@ -6864,7 +6869,7 @@ static void findEnumDocumentation(EntryNav *rootNav) if (!found) { warn(root->fileName,root->startLine, - "Warning: Documentation for undefined enum `%s' found.", + "warning: Documentation for undefined enum `%s' found.", name.data() ); } @@ -7696,19 +7701,9 @@ static void findDefineDocumentation(EntryNav *rootNav) { if (md->memberType()==MemberDef::Define) { -#if 0 - if (md->documentation().isEmpty()) -#endif - { - md->setDocumentation(root->doc,root->docFile,root->docLine); - md->setDocsForDefinition(!root->proto); - } -#if 0 - if (md->briefDescription().isEmpty()) -#endif - { - md->setBriefDescription(root->brief,root->briefFile,root->briefLine); - } + md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setDocsForDefinition(!root->proto); + md->setBriefDescription(root->brief,root->briefFile,root->briefLine); if (md->inbodyDocumentation().isEmpty()) { md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); @@ -7769,7 +7764,7 @@ static void findDefineDocumentation(EntryNav *rootNav) } md=mn->next(); } - //warn("Warning: define %s found in the following files:\n",root->name.data()); + //warn("warning: define %s found in the following files:\n",root->name.data()); //warn("Cannot determine where to add the documentation found " // "at line %d of file %s. \n", // root->startLine,root->fileName.data()); @@ -7781,14 +7776,14 @@ static void findDefineDocumentation(EntryNav *rootNav) if (preEnabled) { warn(root->fileName,root->startLine, - "Warning: documentation for unknown define %s found.\n", + "warning: documentation for unknown define %s found.\n", root->name.data() ); } else { warn(root->fileName,root->startLine, - "Warning: found documented #define but ignoring it because " + "warning: found documented #define but ignoring it because " "ENABLE_PREPROCESSING is NO.\n", root->name.data() ); @@ -7835,7 +7830,7 @@ static void findDirDocumentation(EntryNav *rootNav) if (matchingDir) { warn(root->fileName,root->startLine, - "Warning: \\dir command matches multiple directories.\n" + "warning: \\dir command matches multiple directories.\n" " Applying the command for directory %s\n" " Ignoring the command for directory %s\n", matchingDir->name().data(),dir->name().data() @@ -7857,7 +7852,7 @@ static void findDirDocumentation(EntryNav *rootNav) } else { - warn(root->fileName,root->startLine,"Warning: No matching " + warn(root->fileName,root->startLine,"warning: No matching " "directory found for command \\dir %s\n",normalizedName.data()); } rootNav->releaseEntry(); @@ -7934,7 +7929,7 @@ static void findMainPage(EntryNav *rootNav) else { warn(root->fileName,root->startLine, - "Warning: found more than one \\mainpage comment block! Skipping this " + "warning: found more than one \\mainpage comment block! Skipping this " "block." ); } @@ -7990,7 +7985,7 @@ static void checkPageRelations() { if (ppd==pd) { - err("Warning: page defined at line %d of file %s with label %s is a subpage " + err("warning: page defined at line %d of file %s with label %s is a subpage " "of itself! Please remove this cyclic dependency.\n", pd->docLine(),pd->docFile().data(),pd->name().data()); exit(1); @@ -8104,7 +8099,7 @@ static void buildExampleList(EntryNav *rootNav) if (Doxygen::exampleSDict->find(root->name)) { warn(root->fileName,root->startLine, - "Warning: Example %s was already documented. Ignoring " + "warning: Example %s was already documented. Ignoring " "documentation found here.", root->name.data() ); @@ -8312,7 +8307,7 @@ static QCString fixSlashes(QCString &s) // << "else" << endl // << " echo \"Content-Type: text/html\"" << endl // << " echo \"\"" << endl -// << " echo \"<h2>Error: $DOXYSEARCH not found. Check cgi script!</h2>\"" << endl +// << " echo \"<h2>error: $DOXYSEARCH not found. Check cgi script!</h2>\"" << endl // << "fi" << endl; // // f.close(); @@ -8322,7 +8317,7 @@ static QCString fixSlashes(QCString &s) // } // else // { -// err("Error: Cannot open file %s for writing\n",fileName.data()); +// err("error: Cannot open file %s for writing\n",fileName.data()); // } //#else /* Windows platform */ // // create cgi program @@ -8351,7 +8346,7 @@ static QCString fixSlashes(QCString &s) // t << " if (system(buf))" << endl; // t << " {" << endl; // t << " printf(\"Content-Type: text/html\\n\\n\");" << endl; -// t << " printf(\"<h2>Error: failed to execute %s</h2>\\n\",DOXYSEARCH);" << endl; +// t << " printf(\"<h2>error: failed to execute %s</h2>\\n\",DOXYSEARCH);" << endl; // t << " exit(1);" << endl; // t << " }" << endl; // t << " return 0;" << endl; @@ -8360,7 +8355,7 @@ static QCString fixSlashes(QCString &s) // } // else // { -// err("Error: Cannot open file %s for writing\n",fileName.data()); +// err("error: Cannot open file %s for writing\n",fileName.data()); // } //#endif /* !defined(_WIN32) */ // @@ -8376,7 +8371,7 @@ static QCString fixSlashes(QCString &s) // } // else // { -// err("Error: Cannot open file %s for writing\n",fileName.data()); +// err("error: Cannot open file %s for writing\n",fileName.data()); // } // //g_outputList->generateExternalIndex(); // g_outputList->pushGeneratorState(); @@ -8428,8 +8423,7 @@ static void generateConfigFile(const char *configFile,bool shortList, bool writeToStdout=(configFile[0]=='-' && configFile[1]=='\0'); if (fileOpened) { - QTextStream t(&f); - t.setEncoding(QTextStream::UnicodeUTF8); + FTextStream t(&f); Config::instance()->writeTemplate(t,shortList,updateOnly); if (!writeToStdout) { @@ -8451,7 +8445,7 @@ static void generateConfigFile(const char *configFile,bool shortList, } else { - err("Error: Cannot open file %s for writing\n",configFile); + err("error: Cannot open file %s for writing\n",configFile); exit(1); } } @@ -8491,7 +8485,7 @@ static void readTagFile(Entry *root,const char *tl) QFileInfo fi(fileName); if (!fi.exists() || !fi.isFile()) { - err("Error: Tag file `%s' does not exist or is not a file. Skipping it...\n", + err("error: Tag file `%s' does not exist or is not a file. Skipping it...\n", fileName.data()); return; } @@ -8527,12 +8521,12 @@ static void copyStyleSheet() } else { - err("Error: could not write to style sheet %s\n",destFileName.data()); + err("error: could not write to style sheet %s\n",destFileName.data()); } } else { - err("Error: could not open user specified style sheet %s\n",Config_getString("HTML_STYLESHEET").data()); + err("error: could not open user specified style sheet %s\n",Config_getString("HTML_STYLESHEET").data()); htmlStyleSheet.resize(0); // revert to the default } } @@ -8550,7 +8544,7 @@ static void parseFiles(Entry *root,EntryNav *rootNav) { if (!(cd = portable_iconv_open("UTF-8", inpEncoding))) { - err("Error: unsupported character enconding: '%s'",inpEncoding.data()); + err("error: unsupported character enconding: '%s'",inpEncoding.data()); exit(1); } } @@ -8709,7 +8703,7 @@ int readDir(QFileInfo *fi, { if (errorIfNotExist) { - err("Warning: source %s is not a readable file or directory... skipping.\n",cfi->absFilePath().data()); + err("warning: source %s is not a readable file or directory... skipping.\n",cfi->absFilePath().data()); } } else if (cfi->isFile() && @@ -8800,7 +8794,7 @@ int readFileOrDirectory(const char *s, { if (errorIfNotExist) { - err("Warning: source %s is not a readable file or directory... skipping.\n",s); + err("warning: source %s is not a readable file or directory... skipping.\n",s); } } else if (!Config_getBool("EXCLUDE_SYMLINKS") || !fi.isSymLink()) @@ -8869,7 +8863,7 @@ void readFormulaRepository() int se=line.find(':'); // find name and text separator. if (se==-1) { - err("Warning: formula.repository is corrupted!\n"); + err("warning: formula.repository is corrupted!\n"); break; } else @@ -8973,7 +8967,7 @@ void readAliases() //---------------------------------------------------------------------------- -static void dumpSymbol(QTextStream &t,Definition *d) +static void dumpSymbol(FTextStream &t,Definition *d) { QCString anchor; if (d->definitionType()==Definition::TypeMember) @@ -9000,7 +8994,7 @@ static void dumpSymbolMap() QFile f("symbols.sql"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); QDictIterator<DefinitionIntf> di(*Doxygen::symbolMap); DefinitionIntf *intf; for (;(intf=di.current());++di) @@ -9031,7 +9025,7 @@ void dumpConfigAsXML() QFile f("config.xml"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); Config::instance()->writeXML(t); } } @@ -9248,7 +9242,7 @@ void readConfiguration(int argc, char **argv) formatName=getArg(argc,argv,optind); if (!formatName) { - err("Error:option -e is missing format specifier rtf.\n"); + err("error: option -e is missing format specifier rtf.\n"); cleanUpDoxygen(); exit(1); } @@ -9256,7 +9250,7 @@ void readConfiguration(int argc, char **argv) { if (optind+1>=argc) { - err("Error: option \"-e rtf\" is missing an extensions file name\n"); + err("error: option \"-e rtf\" is missing an extensions file name\n"); cleanUpDoxygen(); exit(1); } @@ -9268,7 +9262,7 @@ void readConfiguration(int argc, char **argv) cleanUpDoxygen(); exit(1); } - err("Error: option \"-e\" has invalid format specifier.\n"); + err("error: option \"-e\" has invalid format specifier.\n"); cleanUpDoxygen(); exit(1); break; @@ -9276,7 +9270,7 @@ void readConfiguration(int argc, char **argv) formatName=getArg(argc,argv,optind); if (!formatName) { - err("Error: option -w is missing format specifier rtf, html or latex\n"); + err("error: option -w is missing format specifier rtf, html or latex\n"); cleanUpDoxygen(); exit(1); } @@ -9284,7 +9278,7 @@ void readConfiguration(int argc, char **argv) { if (optind+1>=argc) { - err("Error: option \"-w rtf\" is missing a style sheet file name\n"); + err("error: option \"-w rtf\" is missing a style sheet file name\n"); cleanUpDoxygen(); exit(1); } @@ -9302,7 +9296,7 @@ void readConfiguration(int argc, char **argv) { if (!Config::instance()->parse(argv[optind+4])) { - err("Error opening or reading configuration file %s!\n",argv[optind+4]); + err("error opening or reading configuration file %s!\n",argv[optind+4]); cleanUpDoxygen(); exit(1); } @@ -9316,7 +9310,7 @@ void readConfiguration(int argc, char **argv) } if (optind+3>=argc) { - err("Error: option \"-w html\" does not have enough arguments\n"); + err("error: option \"-w html\" does not have enough arguments\n"); cleanUpDoxygen(); exit(1); } @@ -9324,7 +9318,7 @@ void readConfiguration(int argc, char **argv) QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); if (!setTranslator(outputLanguage)) { - err("Warning: Output language %s not supported! Using English instead.\n", outputLanguage.data()); + err("warning: Output language %s not supported! Using English instead.\n", outputLanguage.data()); } QFile f; @@ -9351,7 +9345,7 @@ void readConfiguration(int argc, char **argv) { if (!Config::instance()->parse(argv[optind+3])) { - err("Error opening or reading configuration file %s!\n",argv[optind+3]); + err("error opening or reading configuration file %s!\n",argv[optind+3]); exit(1); } Config::instance()->substituteEnvironmentVars(); @@ -9364,7 +9358,7 @@ void readConfiguration(int argc, char **argv) } if (optind+2>=argc) { - err("Error: option \"-w latex\" does not have enough arguments\n"); + err("error: option \"-w latex\" does not have enough arguments\n"); cleanUpDoxygen(); exit(1); } @@ -9372,7 +9366,7 @@ void readConfiguration(int argc, char **argv) QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); if (!setTranslator(outputLanguage)) { - err("Warning: Output language %s not supported! Using English instead.\n", outputLanguage.data()); + err("warning: Output language %s not supported! Using English instead.\n", outputLanguage.data()); } QFile f; @@ -9390,7 +9384,7 @@ void readConfiguration(int argc, char **argv) } else { - err("Error: Illegal format specifier %s: should be one of rtf, html, or latex\n",formatName); + err("error: Illegal format specifier %s: should be one of rtf, html, or latex\n",formatName); cleanUpDoxygen(); exit(1); } @@ -9483,7 +9477,7 @@ void readConfiguration(int argc, char **argv) } else { - err("Error: configuration file %s not found!\n",argv[optind]); + err("error: configuration file %s not found!\n",argv[optind]); usage(argv[0]); } } @@ -9491,7 +9485,7 @@ void readConfiguration(int argc, char **argv) if (!Config::instance()->parse(configName)) { - err("Error: could not open or read configuration file %s!\n",configName); + err("error: could not open or read configuration file %s!\n",configName); cleanUpDoxygen(); exit(1); } @@ -9526,7 +9520,7 @@ void adjustConfiguration() QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); if (!setTranslator(outputLanguage)) { - err("Warning: Output language %s not supported! Using English instead.\n", + err("warning: Output language %s not supported! Using English instead.\n", outputLanguage.data()); } QStrList &includePath = Config_getList("INCLUDE_PATH"); @@ -9801,7 +9795,7 @@ void parseInput() dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { - err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " + err("error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " "exist and cannot be created\n",outputDirectory.data()); cleanUpDoxygen(); exit(1); @@ -9927,11 +9921,12 @@ void parseInput() { msg("Parsing layout file %s...\n",layoutFileName.data()); QTextStream t(&layoutFile); + t.setEncoding(QTextStream::Latin1); LayoutDocManager::instance().parse(t); } else if (!defaultLayoutUsed) { - err("Warning: failed to open layout file '%s' for reading!\n",layoutFileName.data()); + err("warning: failed to open layout file '%s' for reading!\n",layoutFileName.data()); } /************************************************************************** @@ -10246,9 +10241,7 @@ void generateOutput() { g_outputList->add(new HtmlGenerator); HtmlGenerator::init(); -#if 0 - if (Config_getBool("GENERATE_INDEXLOG")) Doxygen::indexList.addIndex(new IndexLog); -#endif + bool generateHtmlHelp = Config_getBool("GENERATE_HTMLHELP"); bool generateEclipseHelp = Config_getBool("GENERATE_ECLIPSEHELP"); bool generateQhp = Config_getBool("GENERATE_QHP"); @@ -10260,13 +10253,17 @@ void generateOutput() if (generateTreeView) Doxygen::indexList.addIndex(new FTVHelp(TRUE)); if (generateDocSet) Doxygen::indexList.addIndex(new DocSets); Doxygen::indexList.initialize(); - Doxygen::indexList.addImageFile("tab_r.gif"); - Doxygen::indexList.addImageFile("tab_l.gif"); - Doxygen::indexList.addImageFile("tab_b.gif"); - Doxygen::indexList.addStyleSheetFile("tabs.css"); - Doxygen::indexList.addImageFile("doxygen.png"); + HtmlGenerator::writeTabData(); + +#if 0 + if (Config_getBool("GENERATE_INDEXLOG")) Doxygen::indexList.addIndex(new IndexLog); +#endif //if (Config_getBool("HTML_DYNAMIC_SECTIONS")) HtmlGenerator::generateSectionImages(); copyStyleSheet(); + if (!generateTreeView && Config_getBool("USE_INLINE_TREES")) + { + FTVHelp::generateTreeViewImages(); + } } if (Config_getBool("GENERATE_LATEX")) { @@ -10289,9 +10286,9 @@ void generateOutput() Htags::useHtags = TRUE; QCString htmldir = Config_getString("HTML_OUTPUT"); if (!Htags::execute(htmldir)) - err("Error: USE_HTAGS is YES but htags(1) failed. \n"); + err("error: USE_HTAGS is YES but htags(1) failed. \n"); if (!Htags::loadFilemap(htmldir)) - err("Error: htags(1) ended normally but failed to load the filemap. \n"); + err("error: htags(1) ended normally but failed to load the filemap. \n"); } /************************************************************************** @@ -10305,14 +10302,13 @@ void generateOutput() tag=new QFile(generateTagFile); if (!tag->open(IO_WriteOnly)) { - err("Error: cannot open tag file %s for writing\n", + err("error: cannot open tag file %s for writing\n", generateTagFile.data() ); cleanUpDoxygen(); exit(1); } Doxygen::tagFile.setDevice(tag); - Doxygen::tagFile.setEncoding(QTextStream::UnicodeUTF8); Doxygen::tagFile << "<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>" << endl; Doxygen::tagFile << "<tagfile>" << endl; } @@ -10349,7 +10345,7 @@ void generateOutput() QDir searchDir(searchDirName); if (!searchDir.exists() && !searchDir.mkdir(searchDirName)) { - err("Error: Could not create search results directory '%s' $PWD='%s'\n", + err("error: Could not create search results directory '%s' $PWD='%s'\n", searchDirName.data(),QDir::currentDirPath().data()); exit(1); } @@ -10486,6 +10482,27 @@ void generateOutput() msg("Generating Perl module output...\n"); generatePerlMod(); } + if (Config_getBool("GENERATE_HTML") && searchEngine && serverBasedSearch) + { + msg("Generating search index\n"); + HtmlGenerator::writeSearchPage(); + Doxygen::searchIndex->write(Config_getString("HTML_OUTPUT")+"/search/search.idx"); + } + + if (Config_getBool("GENERATE_RTF")) + { + msg("Combining RTF output...\n"); + if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf")) + { + err("An error occurred during post-processing the RTF files!\n"); + } + } + + if (Config_getBool("HAVE_DOT")) + { + DotManager::instance()->run(); + } + if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty()) @@ -10496,7 +10513,7 @@ void generateOutput() portable_sysTimerStart(); if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", FALSE)) { - err("Error: failed to run html help compiler on index.hhp\n"); + err("error: failed to run html help compiler on index.hhp\n"); } portable_sysTimerStop(); QDir::setCurrent(oldDir); @@ -10515,32 +10532,12 @@ void generateOutput() portable_sysTimerStart(); if (portable_system(Config_getString("QHG_LOCATION"), args.data(), FALSE)) { - err("Error: failed to run qhelpgenerator on index.qhp\n"); + err("error: failed to run qhelpgenerator on index.qhp\n"); } portable_sysTimerStop(); QDir::setCurrent(oldDir); } - if (Config_getBool("GENERATE_HTML") && searchEngine && serverBasedSearch) - { - msg("Generating search index\n"); - HtmlGenerator::writeSearchPage(); - Doxygen::searchIndex->write(Config_getString("HTML_OUTPUT")+"/search/search.idx"); - } - - if (Config_getBool("GENERATE_RTF")) - { - msg("Combining RTF output...\n"); - if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf")) - { - err("An error occurred during post-processing the RTF files!\n"); - } - } - - if (Config_getBool("HAVE_DOT")) - { - DotManager::instance()->run(); - } if (Debug::isFlagSet(Debug::Time)) { diff --git a/src/doxygen.css b/src/doxygen.css index 035445f..4b20a23 100644 --- a/src/doxygen.css +++ b/src/doxygen.css @@ -152,10 +152,10 @@ div.ah { font-weight: bold; color: #ffffff; margin-bottom: 3px; - margin-top: 3px - padding: .2em; + margin-top: 3px; + padding: 0.2em; border: solid thin #333; - border-radius: .5em; + border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; -webkit-box-shadow: 2px 2px 3px #999; @@ -432,12 +432,12 @@ table.memberdecls { -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, #F8 95%, #F0); + background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, ##F8 95%, ##F0); /* webkit specific markup */ -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0)); + background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,##FF), color-stop(0.95,##F8), to(##F0)); } .paramkey { diff --git a/src/doxygen.h b/src/doxygen.h index bf408e6..0c2e7fc 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -20,9 +20,9 @@ #define DOXYGEN_H #include "qtbc.h" -#include <qtextstream.h> #include <qdatetime.h> #include <qcache.h> +#include "ftextstream.h" #include "groupdef.h" #include "filedef.h" #include "classdef.h" @@ -95,7 +95,7 @@ class Doxygen static QStrList tagfileList; static MemberNameSDict *memberNameSDict; static MemberNameSDict *functionNameSDict; - static QTextStream tagFile; + static FTextStream tagFile; static SectionDict sectionDict; static StringDict namespaceAliasDict; static GroupSDict *groupSDict; diff --git a/src/doxygen_css.h b/src/doxygen_css.h index a9a2d0d..fd64f79 100644 --- a/src/doxygen_css.h +++ b/src/doxygen_css.h @@ -152,10 +152,10 @@ " font-weight: bold;\n" " color: #ffffff;\n" " margin-bottom: 3px;\n" -" margin-top: 3px\n" -" padding: .2em;\n" +" margin-top: 3px;\n" +" padding: 0.2em;\n" " border: solid thin #333;\n" -" border-radius: .5em;\n" +" border-radius: 0.5em;\n" " -webkit-border-radius: .5em;\n" " -moz-border-radius: .5em;\n" " -webkit-box-shadow: 2px 2px 3px #999;\n" @@ -432,12 +432,12 @@ " -moz-border-radius-bottomleft: 8px;\n" " -moz-border-radius-bottomright: 8px;\n" " -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\n" -" background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, #F8 95%, #F0);\n" +" background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, ##F8 95%, ##F0);\n" " /* webkit specific markup */\n" " -webkit-border-bottom-left-radius: 8px;\n" " -webkit-border-bottom-right-radius: 8px;\n" " -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\n" -" background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0));\n" +" background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,##FF), color-stop(0.95,##F8), to(##F0));\n" "}\n" "\n" ".paramkey {\n" diff --git a/src/entry.cpp b/src/entry.cpp index 6ef5a1e..745a7f9 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -118,8 +118,7 @@ Entry::Entry(const Entry &e) write = e.write; inside = e.inside; exception = e.exception; - typeConstr = new ArgumentList; - typeConstr->setAutoDelete(TRUE); + typeConstr = 0; bodyLine = e.bodyLine; endBodyLine = e.endBodyLine; mGrpId = e.mGrpId; @@ -145,7 +144,7 @@ Entry::Entry(const Entry &e) { sli=0; } - objc = e.objc; + lang = e.lang; hidden = e.hidden; artificial = e.artificial; groupDocType = e.groupDocType; @@ -199,6 +198,8 @@ Entry::Entry(const Entry &e) // deep copy type contraint list if (e.typeConstr) { + typeConstr = new ArgumentList; + typeConstr->setAutoDelete(TRUE); QListIterator<Argument> tcli(*e.typeConstr); for (;(a=tcli.current());++tcli) { @@ -283,7 +284,7 @@ void Entry::reset() proto = FALSE; explicitExternal = FALSE; spec = 0; - objc = FALSE; + lang = SrcLangExt_Unknown; hidden = FALSE; artificial = FALSE; subGrouping = TRUE; diff --git a/src/entry.h b/src/entry.h index 2a9bcd7..9e9aa84 100644 --- a/src/entry.h +++ b/src/entry.h @@ -22,6 +22,7 @@ #include <qlist.h> #include <qgstring.h> +#include "util.h" struct SectionInfo; class QFile; @@ -283,7 +284,6 @@ class Entry GROUPDOC_WEAK //!< weakgroup }; //!< kind of group - Entry(); Entry(const Entry &); ~Entry(); @@ -358,7 +358,7 @@ class Entry QCString fileName; //!< file this entry was extracted from int startLine; //!< start line of entry in the source QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in - bool objc; //!< Objective-C construct + SrcLangExt lang; //!< programming language in which this entry was found bool hidden; //!< does this represent an entity that is hidden from the output bool artificial; //!< Artificially introduced item GroupDocType groupDocType; diff --git a/src/filedef.cpp b/src/filedef.cpp index d963688..786fcf1 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -1464,7 +1464,7 @@ void FileDef::acquireFileVersion() FILE *f=portable_popen(cmd,"r"); if (!f) { - err("Error: could not execute %s\n",vercmd.data()); + err("error: could not execute %s\n",vercmd.data()); return; } const int bufSize=1024; diff --git a/src/formula.cpp b/src/formula.cpp index 149c06f..486c56a 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -19,8 +19,8 @@ #include "qtbc.h" #include <qfile.h> -#include <qtextstream.h> #include <qfileinfo.h> +#include <qtextstream.h> #include <qdir.h> #include "formula.h" @@ -31,6 +31,7 @@ #include "portable.h" #include "index.h" #include "doxygen.h" +#include "ftextstream.h" Formula::Formula(const char *text) { @@ -53,7 +54,7 @@ void FormulaList::generateBitmaps(const char *path) int x1,y1,x2,y2; QDir d(path); // store the original directory - if (!d.exists()) { err("Error: Output dir %s does not exist!\n",path); exit(1); } + if (!d.exists()) { err("error: Output dir %s does not exist!\n",path); exit(1); } QCString oldDir = convertToQCString(QDir::currentDirPath()); // go to the html output directory (i.e. path) QDir::setCurrent(d.absPath()); @@ -68,7 +69,7 @@ void FormulaList::generateBitmaps(const char *path) bool formulaError=FALSE; if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); if (Config_getBool("LATEX_BATCHMODE")) t << "\\batchmode" << endl; t << "\\documentclass{article}" << endl; t << "\\usepackage{epsfig}" << endl; // for those who want to include images @@ -149,7 +150,7 @@ void FormulaList::generateBitmaps(const char *path) } else { - err("Error: Couldn't extract bounding box!\n"); + err("error: Couldn't extract bounding box!\n"); } } // next we generate a postscript file which contains the eps @@ -157,7 +158,7 @@ void FormulaList::generateBitmaps(const char *path) f.setName(formBase+".ps"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); t << "1 1 1 setrgbcolor" << endl; // anti-alias to white background t << "newpath" << endl; t << "-1 -1 moveto" << endl; @@ -207,7 +208,7 @@ void FormulaList::generateBitmaps(const char *path) if (!t.eof()) s=t.readLine(); if (s.length()<2 || s.left(2)!="P6") - err("Error: ghostscript produced an illegal image format!"); + err("error: ghostscript produced an illegal image format!"); else { // assume the size if after the first line that does not start with @@ -303,7 +304,7 @@ void FormulaList::generateBitmaps(const char *path) f.setName("formula.repository"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); for (fli.toFirst();(formula=fli.current());++fli) { t << "\\form#" << formula->getId() << ":" << formula->getFormulaText() << endl; diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index d888d31..c391a34 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -561,7 +561,7 @@ void FTVHelp::generateTreeViewImages() } else { - fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); + fprintf(stderr,"warning: Cannot open file %s for writing\n",fileName.data()); } f.close(); p++; diff --git a/src/ftvhelp.h b/src/ftvhelp.h index e843b3c..5cbd073 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -92,9 +92,9 @@ class FTVHelp : public IndexIntf void addStyleSheetFile(const char *) {} void generateTreeView(); void generateTreeViewInline(FTextStream &t); + static void generateTreeViewImages(); private: void generateScript(FTextStream &t); - void generateTreeViewImages(); void generateTree(FTextStream &t,const QList<FTVNode> &nl,int level); void generateIndent(FTextStream &t,FTVNode *n,int level); void generateLink(FTextStream &t,FTVNode *n); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index f75cc94..4ddcb58 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -1159,7 +1159,7 @@ void addMemberToGroups(Entry *root,MemberDef *md) if (fgd && gd!=fgd && g->pri==pri) { warn(root->fileName.data(), root->startLine, - "Warning: Member %s found in multiple %s groups! " + "warning: Member %s found in multiple %s groups! " "The member will be put in group %s, and not in group %s", md->name().data(), Grouping::getGroupPriName( pri ), gd->name().data(), fgd->name().data() @@ -1204,7 +1204,7 @@ void addMemberToGroups(Entry *root,MemberDef *md) else if (!root->doc.isEmpty() && md->getGroupHasDocs()) { warn(md->getGroupFileName(),md->getGroupStartLine(), - "Warning: Member documentation for %s found several times in %s groups!\n" + "warning: Member documentation for %s found several times in %s groups!\n" "%s:%d: The member will remain in group %s, and won't be put into group %s", md->name().data(), Grouping::getGroupPriName( pri ), root->fileName.data(), root->startLine, diff --git a/src/htags.cpp b/src/htags.cpp index 9f45163..087d216 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -53,14 +53,14 @@ bool Htags::execute(const QCString &htmldir) { g_inputDir.setPath(inputSource.first()); if (!g_inputDir.exists()) - err("Error: Cannot find directory %s. " + err("error: Cannot find directory %s. " "Check the value of the INPUT tag in the configuration file.\n", inputSource.first() ); } else { - err("Error: If you use USE_HTAGS then INPUT should specific a single directory. \n"); + err("error: If you use USE_HTAGS then INPUT should specific a single directory. \n"); return FALSE; } @@ -146,7 +146,7 @@ bool Htags::loadFilemap(const QCString &htmlDir) } else { - err("Error: file %s cannot be opened\n",fileMapName.data()); + err("error: file %s cannot be opened\n",fileMapName.data()); } } return FALSE; diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index ae89918..c5c2b67 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -204,7 +204,7 @@ void HtmlDocVisitor::visit(DocSymbol *s) case DocSymbol::AElig: m_t << "Æ"; break; case DocSymbol::Aelig: m_t << "æ"; break; default: - err("Error: unknown symbol found\n"); + err("error: unknown symbol found\n"); } } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index f084228..9be1600 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -683,6 +683,7 @@ static void writeImgData(const char *dir,img_data_item *data) { fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name); } + Doxygen::indexList.addImageFile(QCString("/search/")+data->name); data++; } } @@ -707,6 +708,7 @@ static void writeColoredImgData(const char *dir,colored_img_data_item *data) { fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name); } + Doxygen::indexList.addImageFile(data->name); data++; } } @@ -726,11 +728,6 @@ static colored_img_data_item colored_tab_data[] = { 0, 0, 0, 0, 0 } }; -static void writeTabData(const char *dir) -{ - writeColoredImgData(dir,colored_tab_data); -} - static img_data_item search_client_data[] = { { "mag_sel.png", mag_sel_png, mag_sel_png_len }, @@ -835,28 +832,32 @@ void HtmlGenerator::init() QFile f(fileName); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); t << replaceColorMarkers(tabs_css); } else { fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); } +} - writeTabData(dname); +/// Additional initialization after indices have been created +void HtmlGenerator::writeTabData() +{ + Doxygen::indexList.addStyleSheetFile("tabs.css"); + QCString dname=Config_getString("HTML_OUTPUT"); + writeColoredImgData(dname,colored_tab_data); } void HtmlGenerator::writeSearchData(const char *dir) { static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH"); writeImgData(dir,serverBasedSearch ? search_server_data : search_client_data); - Doxygen::indexList.addImageFile("search/close.png"); - Doxygen::indexList.addImageFile("search/search.png"); QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search"; QFile f(searchDirName+"/search.css"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); t << replaceColorMarkers(search_styleSheet); } Doxygen::indexList.addStyleSheetFile("search/search.css"); @@ -866,7 +867,7 @@ void HtmlGenerator::writeSearchData(const char *dir) void HtmlGenerator::writeStyleSheetFile(QFile &file) { - QTextStream t(&file); + FTextStream t(&file); t << replaceColorMarkers(defaultStyleSheet); } @@ -913,7 +914,7 @@ static void writeDefaultHeaderFile(FTextStream &t, const char *title, QFileInfo cssfi(cssname); if (!cssfi.exists()) { - err("Error: user specified HTML style sheet file does not exist!\n"); + err("error: user specified HTML style sheet file does not exist!\n"); } t << relPathStr << cssfi.fileName(); } @@ -943,14 +944,12 @@ static void writeDefaultHeaderFile(FTextStream &t, const char *title, void HtmlGenerator::writeHeaderFile(QFile &file) { FTextStream t(&file); - //t.setEncoding(QTextStream::UnicodeUTF8); writeDefaultHeaderFile(t,"$title",relativePathToRoot(0),TRUE); } void HtmlGenerator::writeFooterFile(QFile &file) { - QTextStream t(&file); - t.setEncoding(QTextStream::UnicodeUTF8); + FTextStream t(&file); t << "<hr class=\"footer\"/><address class=\"footer\"><small>\n"; t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ); t << " <a href=\"http://www.doxygen.org/index.html\">" @@ -1211,7 +1210,7 @@ void HtmlGenerator::writeStyleInfo(int part) QFileInfo cssfi(cssname); if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable()) { - err("Error: style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data()); + err("error: style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data()); } else { @@ -2518,7 +2517,6 @@ void HtmlGenerator::writeSearchPage() if (f.open(IO_WriteOnly)) { FTextStream t(&f); - //t.setEncoding(QTextStream::UnicodeUTF8); if (g_header.isEmpty()) { writeDefaultHeaderFile(t,theTranslator->trSearch().data(),0,FALSE,TRUE); @@ -2610,7 +2608,7 @@ void HtmlGenerator::writeSearchPage() QFile sf(scriptName); if (sf.open(IO_WriteOnly)) { - QTextStream t(&sf); + FTextStream t(&sf); t << "function SearchBox(name, resultsPath, inFrame, label)\n"; t << "{\n"; t << " this.searchLabel = label;\n"; diff --git a/src/htmlgen.h b/src/htmlgen.h index a3c0b81..c4b9da4 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -37,6 +37,7 @@ class HtmlGenerator : public OutputGenerator static void writeHeaderFile(QFile &f); static void writeFooterFile(QFile &f); static void writeSearchPage(); + static void writeTabData(); void enable() { if (genStack->top()) active=*genStack->top(); else active=TRUE; } diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index a488db2..037dd72 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -66,7 +66,7 @@ class HtmlHelpIndex void addItem(const char *first,const char *second, const char *url, const char *anchor, bool hasLink,bool reversed); - void writeFields(QTextStream &t); + void writeFields(FTextStream &t); private: IndexFieldSDict *dict; }; @@ -147,7 +147,7 @@ void HtmlHelpIndex::addItem(const char *level1,const char *level2, * b1 -> link to url#anchor * </pre> */ -void HtmlHelpIndex::writeFields(QTextStream &t) +void HtmlHelpIndex::writeFields(FTextStream &t) { dict->sort(); IndexFieldSDict::Iterator ifli(*dict); @@ -305,7 +305,6 @@ void HtmlHelp::initialize() } /* Write the header of the contents file */ cts.setDevice(cf); - cts.setEncoding(QTextStream::Latin1); cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" "<HTML><HEAD></HEAD><BODY>\n" "<OBJECT type=\"text/site properties\">\n" @@ -323,7 +322,6 @@ void HtmlHelp::initialize() } /* Write the header of the contents file */ kts.setDevice(kf); - kts.setEncoding(QTextStream::Latin1); kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" "<HTML><HEAD></HEAD><BODY>\n" "<OBJECT type=\"text/site properties\">\n" @@ -446,12 +444,7 @@ void HtmlHelp::createProjectFile() QFile f(fName); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); -#if QT_VERSION >= 200 - t.setEncoding(QTextStream::Latin1); -#endif - - + FTextStream t(&f); QCString indexName="index"+Doxygen::htmlFileExtension; if (Config_getBool("GENERATE_TREEVIEW")) indexName="main"+Doxygen::htmlFileExtension; diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 226fb90..bee84dd 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -22,9 +22,9 @@ #define HTMLHELP_H #include "qtbc.h" -#include <qtextstream.h> #include <qstrlist.h> #include "index.h" +#include "ftextstream.h" class QFile; class HtmlHelpIndex; @@ -87,7 +87,7 @@ class HtmlHelp : public IndexIntf void createProjectFile(); QFile *cf,*kf; - QTextStream cts,kts; + FTextStream cts,kts; HtmlHelpIndex *index; int dc; QStrList indexFiles; diff --git a/src/image.cpp b/src/image.cpp index 76f9661..ac7c8d1 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -166,28 +166,6 @@ static Color palette[] = { 0xc0, 0xc0, 0xc0, 0xff } }; -#if 0 -static Color palette2[] = -{ - { 0xff, 0xff, 0xff }, - { 0xe0, 0xe0, 0xe0 }, - { 0xd0, 0xd0, 0xd0 }, - { 0xc0, 0xc0, 0xc0 }, - { 0xb0, 0xb0, 0xb0 }, - { 0xa0, 0xa0, 0xa0 }, - { 0x90, 0x90, 0x90 }, - { 0x80, 0x80, 0x80 }, - { 0x70, 0x70, 0x70 }, - { 0x60, 0x60, 0x60 }, - { 0x50, 0x50, 0x50 }, - { 0x40, 0x40, 0x40 }, - { 0x30, 0x30, 0x30 }, - { 0x20, 0x20, 0x20 }, - { 0x10, 0x10, 0x10 }, - { 0x00, 0x00, 0x00 } -}; -#endif - // for alpha we use x^(1/1.3) static Color palette2[] = { @@ -209,6 +187,27 @@ static Color palette2[] = { 0x00, 0x00, 0x00, 0xff } }; +static Color palette3[] = +{ + { 0xff, 0xff, 0xff, 0xff }, + { 0xe0, 0xe0, 0xe0, 0xff }, + { 0xd0, 0xd0, 0xd0, 0xff }, + { 0xc0, 0xc0, 0xc0, 0xff }, + { 0xb0, 0xb0, 0xb0, 0xff }, + { 0xa0, 0xa0, 0xa0, 0xff }, + { 0x90, 0x90, 0x90, 0xff }, + { 0x80, 0x80, 0x80, 0xff }, + { 0x70, 0x70, 0x70, 0xff }, + { 0x60, 0x60, 0x60, 0xff }, + { 0x50, 0x50, 0x50, 0xff }, + { 0x40, 0x40, 0x40, 0xff }, + { 0x30, 0x30, 0x30, 0xff }, + { 0x20, 0x20, 0x20, 0xff }, + { 0x10, 0x10, 0x10, 0xff }, + { 0x00, 0x00, 0x00, 0xff } +}; + + Image::Image(int w,int h) { static int hue = Config_getInt("HTML_COLORSTYLE_HUE"); @@ -401,12 +400,15 @@ bool Image::save(const char *fileName,int mode) return FALSE; } #endif + static bool useTransparency = Config_getBool("FORMULA_TRANSPARENT"); uchar* buffer; size_t bufferSize; LodePNG_Encoder encoder; LodePNG_Encoder_init(&encoder); int numCols = mode==0 ? 8 : 16; - Color *pPal = mode==0 ? palette : palette2; + Color *pPal = mode==0 ? palette : + useTransparency ? palette2 : + palette3 ; int i; for (i=0;i<numCols;i++,pPal++) { diff --git a/src/index.cpp b/src/index.cpp index 0add07b..eab4f4e 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2495,7 +2495,7 @@ class SearchIndexCategoryMapping categoryLabel[SEARCH_INDEX_RELATED] = theTranslator->trFriends(); categoryLabel[SEARCH_INDEX_DEFINES] = theTranslator->trDefines(); } - QString categoryLabel[NUM_SEARCH_INDICES]; + QCString categoryLabel[NUM_SEARCH_INDICES]; }; void writeJavascriptSearchIndex() @@ -2607,8 +2607,7 @@ void writeJavascriptSearchIndex() QFile outFile(fileName); if (outFile.open(IO_WriteOnly)) { - QTextStream t(&outFile); - t.setEncoding(QTextStream::UnicodeUTF8); + FTextStream t(&outFile); t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl; t << "<html><head><title></title>" << endl; @@ -2837,8 +2836,7 @@ void writeJavascriptSearchIndex() QFile f(searchDirName+"/search.js"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); - t.setEncoding(QTextStream::UnicodeUTF8); + FTextStream t(&f); t << "// Search script generated by doxygen" << endl; t << "// Copyright (C) 2009 by Dimitri van Heesch." << endl << endl; t << "// The code in this file is loosly based on main.js, part of Natural Docs," << endl; @@ -2888,8 +2886,7 @@ void writeJavascriptSearchIndex() QFile f(searchDirName+"/nomatches.html"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); - t.setEncoding(QTextStream::UnicodeUTF8); + FTextStream t(&f); t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" " "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl; t << "<html><head><title></title>" << endl; @@ -3184,7 +3181,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ftv) if (level>20) { warn(gd->getDefFileName(),gd->getDefLine(), - "Warning: maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",gd->name().data() + "warning: maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",gd->name().data() ); return; } @@ -3404,7 +3401,7 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv) if (level>20) { warn(dd->getDefFileName(),dd->getDefLine(), - "Warning: maximum nesting level exceeded for directory %s: " + "warning: maximum nesting level exceeded for directory %s: " "check for possible recursive directory relation!\n",dd->name().data() ); return; diff --git a/src/instdox.cpp b/src/instdox.cpp index a446a9a..692df53 100644 --- a/src/instdox.cpp +++ b/src/instdox.cpp @@ -21,7 +21,6 @@ #include "qtbc.h" #include <qfile.h> #include <qfileinfo.h> -#include <qtextstream.h> #include "instdox.h" #include "doxygen.h" @@ -34,7 +33,7 @@ void writeInstallScript() QFile f(fileName); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + FTextStream t(&f); t << "#!" << Config_getString("PERL_PATH") << endl << endl << "%subst = ( "; char *s=Config_getList("TAGFILES").first(); diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 4c39d45..116b6da 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -197,7 +197,7 @@ void LatexDocVisitor::visit(DocSymbol *s) case DocSymbol::AElig: m_t << "{\\AE}"; break; case DocSymbol::Aelig: m_t << "{\\ae}"; break; default: - err("Error: unknown symbol found\n"); + err("error: unknown symbol found\n"); } } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 6d562ce..85e2905 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -659,7 +659,6 @@ void LatexGenerator::writeHeaderFile(QFile &f) void LatexGenerator::writeStyleSheetFile(QFile &f) { FTextStream t(&f); - //t.setEncoding(QTextStream::UnicodeUTF8); writeDefaultStyleSheetPart1(t); QCString &projectName = Config_getString("PROJECT_NAME"); @@ -1602,7 +1601,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) } -//void LatexGenerator::docifyStatic(QTextStream &t,const char *str) void LatexGenerator::docify(const char *str) { filterLatexString(t,str,insideTabbing,FALSE); diff --git a/src/layout.cpp b/src/layout.cpp index 815dd15..a0b9a6b 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -46,7 +46,7 @@ static bool elemIsVisible(const QXmlAttributes &attrib,bool defVal=TRUE) } else if (!opt) { - err("Warning: found unsupported value %s for visible attribute in layout file\n", + err("error: found unsupported value %s for visible attribute in layout file\n", visible.data()); } } @@ -827,11 +827,11 @@ class LayoutParser : public QXmlDefaultHandler { if (type.isEmpty()) { - err("Warning: an entry tag within a navindex has no type attribute! Check your layout file!\n"); + err("error: an entry tag within a navindex has no type attribute! Check your layout file!\n"); } else { - err("Warning: the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n"); + err("error: the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n"); } return; } @@ -982,7 +982,7 @@ class LayoutParser : public QXmlDefaultHandler } else { - err("Warning: Unexpected start tag `%s' found in scope='%s'!\n", + err("error: Unexpected start tag `%s' found in scope='%s'!\n", name.data(),m_scope.data()); } return TRUE; @@ -1027,21 +1027,21 @@ class LayoutErrorHandler : public QXmlErrorHandler public: bool warning( const QXmlParseException &exception ) { - err("Warning at line %d column %d: %s\n", + err("error: at line %d column %d: %s\n", exception.lineNumber(),exception.columnNumber(), exception.message().data()); return FALSE; } bool error( const QXmlParseException &exception ) { - err("Error at line %d column %d: %s\n", + err("error: at line %d column %d: %s\n", exception.lineNumber(),exception.columnNumber(), exception.message().data()); return FALSE; } bool fatalError( const QXmlParseException &exception ) { - err("Fatal error at line %d column %d: %s\n", + err("error: at line %d column %d: %s\n", exception.lineNumber(),exception.columnNumber(), exception.message().data()); return FALSE; diff --git a/src/logos.cpp b/src/logos.cpp index 0657af3..112fb8d 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -2220,7 +2220,7 @@ void writeLogo(const char *dir) f.writeBlock((char *)doxygen_png_data,doxygen_png_len); else { - fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); + fprintf(stderr,"warning: Cannot open file %s for writing\n",fileName.data()); } f.close(); } @@ -2233,7 +2233,7 @@ void writeSearchButton(const char *dir) f.writeBlock((char *)search_png,search_png_len); else { - fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); + fprintf(stderr,"warning: Cannot open file %s for writing\n",fileName.data()); } f.close(); } @@ -2247,7 +2247,7 @@ void writeDoxFont(const char *dir) f.writeBlock((char *)FreeSans_ttf,FreeSans_ttf_len); else { - fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); + fprintf(stderr,"error: Cannot open file %s for writing\n",fileName.data()); } f.close(); } diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index b4886b6..902b37c 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -105,7 +105,7 @@ void ManDocVisitor::visit(DocSymbol *s) case DocSymbol::Ring: m_t << s->letter() << "\\*o"; break; case DocSymbol::Nbsp: m_t << " "; break; default: - err("Error: unknown symbol found\n"); + err("error: unknown symbol found\n"); } m_firstCol=FALSE; } diff --git a/src/marshal.cpp b/src/marshal.cpp index 803c53b..4f01aa4 100644 --- a/src/marshal.cpp +++ b/src/marshal.cpp @@ -410,7 +410,7 @@ void marshalEntry(StorageIntf *s,Entry *e) marshalQCString(s,e->fileName); marshalInt(s,e->startLine); marshalItemInfoList(s,e->sli); - marshalBool(s,e->objc); + marshalInt(s,(int)e->lang); marshalBool(s,e->hidden); marshalBool(s,e->artificial); marshalInt(s,(int)e->groupDocType); @@ -806,7 +806,7 @@ Entry * unmarshalEntry(StorageIntf *s) e->fileName = unmarshalQCString(s); e->startLine = unmarshalInt(s); e->sli = unmarshalItemInfoList(s); - e->objc = unmarshalBool(s); + e->lang = (SrcLangExt)unmarshalInt(s); e->hidden = unmarshalBool(s); e->artificial = unmarshalBool(s); e->groupDocType = (Entry::GroupDocType)unmarshalInt(s); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 3c6dfd2..aadb796 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -791,8 +791,8 @@ QCString MemberDef::getOutputFileBase() const if (baseName.isEmpty()) { warn(getDefFileName(),getDefLine(), - "Warning: Internal inconsistency: member %s does not belong to any" - " container!",name().data() + "warning: Internal inconsistency: member %s does not belong to any" + " container!",qPrint(name()) ); return "dummy"; } @@ -2225,7 +2225,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } else { - err("Error: translation error: no marker in trReimplementsFromList()\n"); + err("error: translation error: no marker in trReimplementsFromList()\n"); } ol.endParagraph(); } @@ -2334,7 +2334,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, DotCallGraph callGraph(this,FALSE); if (!callGraph.isTrivial() && !callGraph.isTooBig()) { - msg("Generating call graph for function %s\n",qualifiedName().data()); + msg("Generating call graph for function %s\n",qPrint(qualifiedName())); ol.disable(OutputGenerator::Man); ol.startParagraph(); ol.startCallGraph(); @@ -2351,7 +2351,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, DotCallGraph callerGraph(this, TRUE); if (!callerGraph.isTrivial() && !callerGraph.isTooBig()) { - msg("Generating caller graph for function %s\n",qualifiedName().data()); + msg("Generating caller graph for function %s\n",qPrint(qualifiedName())); ol.disable(OutputGenerator::Man); ol.startParagraph(); ol.startCallGraph(); @@ -2389,14 +2389,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (!hasDocumentedParams()) { warn_doc_error(docFile(),docLine(), - "Warning: parameters of member %s are not (all) documented", - qualifiedName().data()); + "warning: parameters of member %s are not (all) documented", + qPrint(qualifiedName())); } - if (!hasDocumentedReturnType()) + if (!hasDocumentedReturnType() && !isDefine() && hasDocumentation()) { warn_doc_error(docFile(),docLine(), - "Warning: return type of member %s is not documented", - qualifiedName().data()); + "warning: return type of member %s is not documented", + qPrint(qualifiedName())); } } @@ -2453,8 +2453,8 @@ void MemberDef::warnIfUndocumented() (m_impl->prot!=Private || Config_getBool("EXTRACT_PRIVATE")) ) { - warn_undoc(getDefFileName(),getDefLine(),"Warning: Member %s%s (%s) of %s %s is not documented.", - name().data(),argsString()?argsString():"",memberTypeName().data(),t,d->name().data()); + warn_undoc(getDefFileName(),getDefLine(),"warning: Member %s%s (%s) of %s %s is not documented.", + qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),t,qPrint(d->name())); } } @@ -2692,7 +2692,7 @@ void MemberDef::addListReference(Definition *) { makeResident(); static bool optimizeOutputForC = Config_getBool("OPTIMIZE_OUTPUT_FOR_C"); - static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES"); + //static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES"); static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); visited=TRUE; @@ -2712,6 +2712,9 @@ void MemberDef::addListReference(Definition *) } QCString memName = name(); Definition *pd=getOuterScope(); + QCString pdName = pd->definitionType()==Definition::TypeClass ? + ((ClassDef*)pd)->displayName() : pd->name(); + QCString sep = optimizeOutputJava ? "." : "::"; QCString memArgs; if (!isRelated() /* && commented out as a result of bug 597016 @@ -2729,14 +2732,9 @@ void MemberDef::addListReference(Definition *) { memName = "[" + pd->name() + " " + name() + "]"; } - else if (optimizeOutputJava) - { - if (!hideScopeNames && pd!=Doxygen::globalScope) memName.prepend(pd->name()+"."); - memArgs = argsString(); - } - else + else { - if (!hideScopeNames && pd!=Doxygen::globalScope) memName.prepend(pd->name()+"::"); + if (pd!=Doxygen::globalScope) memName.prepend(pdName+sep); memArgs = argsString(); } } @@ -2776,8 +2774,8 @@ Specifier MemberDef::virtualness(int count) const if (count>25) { warn(getDefFileName(),getDefLine(), - "Warning: Internal inconsistency: recursion detected in overload relation for member %s!" - ,name().data() + "warning: Internal inconsistency: recursion detected in overload relation for member %s!" + ,qPrint(name()) ); return Normal; } diff --git a/src/msc.cpp b/src/msc.cpp index d844b32..87ec5d3 100644 --- a/src/msc.cpp +++ b/src/msc.cpp @@ -32,7 +32,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName,const QCString rel QFile f(mapName); if (!f.open(IO_ReadOnly)) { - err("Error opening map file %s for inclusion in the docs!\n" + err("error: failed to open map file %s for inclusion in the docs!\n" "If you installed Graphviz/dot after a previous failing run, \n" "try deleting the output directory and rerun doxygen.\n",mapName); return FALSE; @@ -132,7 +132,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir, portable_sysTimerStart(); if (portable_system("epstopdf",epstopdfArgs)!=0) { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); + err("error: Problems running epstopdf. Check your TeX installation!\n"); } portable_sysTimerStop(); } diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 46fd91a..49ae643 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -29,7 +29,7 @@ #include <qstack.h> #include <qdict.h> #include <qfile.h> -#include <qtextstream.h> +#include "ftextstream.h" #define PERLOUTPUT_MAX_INDENTATION 40 @@ -38,9 +38,9 @@ class PerlModOutputStream public: QCString m_s; - QTextStream *m_t; + FTextStream *m_t; - PerlModOutputStream(QTextStream *t = 0) : m_t(t) { } + PerlModOutputStream(FTextStream *t = 0) : m_t(t) { } void add(char c); void add(const char *s); @@ -555,7 +555,7 @@ void PerlModDocVisitor::visit(DocSymbol *sy) case DocSymbol::Apos: s = "\\\'"; break; case DocSymbol::Aelig: symbol = "aelig"; break; case DocSymbol::AElig: symbol = "AElig"; break; - case DocSymbol::Unknown: err("Error: unknown symbol found\n"); + case DocSymbol::Unknown: err("error: unknown symbol found\n"); break; } if (c != 0) @@ -811,7 +811,7 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s) case DocSimpleSect::User: type = "par"; break; case DocSimpleSect::Rcs: type = "rcs"; break; case DocSimpleSect::Unknown: - err("Error: unknown simple section found\n"); + err("error: unknown simple section found\n"); break; } leaveText(); @@ -1170,7 +1170,7 @@ void PerlModDocVisitor::visitPre(DocParamSect *s) case DocParamSect::Exception: type = "exceptions"; break; case DocParamSect::TemplateParam: type = "templateparam"; break; case DocParamSect::Unknown: - err("Error: unknown parameter section found\n"); + err("error: unknown parameter section found\n"); break; } openOther(); @@ -2035,7 +2035,7 @@ bool PerlModGenerator::generatePerlModOutput() if (!createOutputFile(outputFile, pathDoxyDocsPM)) return false; - QTextStream outputTextStream(&outputFile); + FTextStream outputTextStream(&outputFile); PerlModOutputStream outputStream(&outputTextStream); m_output.setPerlModOutputStream(&outputStream); m_output.add("$doxydocs=").openHash(); @@ -2118,13 +2118,13 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir) dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { - err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " + err("error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " "exist and cannot be created\n",outputDirectory.data()); exit(1); } else if (!Config_getBool("QUIET")) { - err("Notice: Output directory `%s' does not exist. " + err("notice: Output directory `%s' does not exist. " "I have created it for you.\n", outputDirectory.data()); } dir.cd(outputDirectory); @@ -2158,7 +2158,7 @@ bool PerlModGenerator::generateDoxyStructurePM() if (!createOutputFile(doxyModelPM, pathDoxyStructurePM)) return false; - QTextStream doxyModelPMStream(&doxyModelPM); + FTextStream doxyModelPMStream(&doxyModelPM); doxyModelPMStream << "sub memberlist($) {\n" " my $prefix = $_[0];\n" @@ -2345,7 +2345,7 @@ bool PerlModGenerator::generateDoxyRules() bool perlmodLatex = Config_getBool("PERLMOD_LATEX"); QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX"); - QTextStream doxyRulesStream(&doxyRules); + FTextStream doxyRulesStream(&doxyRules); doxyRulesStream << prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" << prefix << "DOXYFILE = " << pathDoxyfile << "\n" << @@ -2442,7 +2442,7 @@ bool PerlModGenerator::generateMakefile() bool perlmodLatex = Config_getBool("PERLMOD_LATEX"); QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX"); - QTextStream makefileStream(&makefile); + FTextStream makefileStream(&makefile); makefileStream << ".PHONY: default clean" << (perlmodLatex ? " pdf" : "") << "\n" "default: " << (perlmodLatex ? "pdf" : "clean") << "\n" @@ -2466,7 +2466,7 @@ bool PerlModGenerator::generateDoxyLatexStructurePL() if (!createOutputFile(doxyLatexStructurePL, pathDoxyLatexStructurePL)) return false; - QTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL); + FTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL); doxyLatexStructurePLStream << "use DoxyStructure;\n" "\n" @@ -2500,7 +2500,7 @@ bool PerlModGenerator::generateDoxyLatexPL() if (!createOutputFile(doxyLatexPL, pathDoxyLatexPL)) return false; - QTextStream doxyLatexPLStream(&doxyLatexPL); + FTextStream doxyLatexPLStream(&doxyLatexPL); doxyLatexPLStream << "use DoxyStructure;\n" "use DoxyDocs;\n" @@ -2623,7 +2623,7 @@ bool PerlModGenerator::generateDoxyFormatTex() if (!createOutputFile(doxyFormatTex, pathDoxyFormatTex)) return false; - QTextStream doxyFormatTexStream(&doxyFormatTex); + FTextStream doxyFormatTexStream(&doxyFormatTex); doxyFormatTexStream << "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n" "\\Defcs{Empty}{}\n" @@ -2786,7 +2786,7 @@ bool PerlModGenerator::generateDoxyLatexTex() if (!createOutputFile(doxyLatexTex, pathDoxyLatexTex)) return false; - QTextStream doxyLatexTexStream(&doxyLatexTex); + FTextStream doxyLatexTexStream(&doxyLatexTex); doxyLatexTexStream << "\\documentclass[a4paper,12pt]{article}\n" "\\usepackage[latin1]{inputenc}\n" diff --git a/src/portable.cpp b/src/portable.cpp index ff9b803..7a78131 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -26,8 +26,8 @@ extern char **environ; #endif //#include "doxygen.h" -static double sysElapsedTime; -static QTime time; +static double g_sysElapsedTime; +static QTime g_time; int portable_system(const char *command,const char *args,bool commandHasConsole) { @@ -378,17 +378,17 @@ int portable_pclose(FILE *stream) void portable_sysTimerStart() { - time.start(); + g_time.start(); } void portable_sysTimerStop() { - sysElapsedTime+=((double)time.elapsed())/1000.0; + g_sysElapsedTime+=((double)g_time.elapsed())/1000.0; } double portable_getSysElapsedTime() { - return sysElapsedTime; + return g_sysElapsedTime; } void portable_sleep(int ms) @@ -152,8 +152,7 @@ static void decrLevel() } else { - err("%s:%d: Error: More #endif's than #if's found.\n", - g_yyFileName.data(),g_yyLineNr); + warn(g_yyFileName,g_yyLineNr,"warning: More #endif's than #if's found.\n"); } } @@ -161,8 +160,7 @@ static bool otherCaseDone() { if (g_level==0) { - err("%s:%d: Error: Found an #else without a preceding #if.\n", - g_yyFileName.data(),g_yyLineNr); + warn(g_yyFileName,g_yyLineNr,"warning: Found an #else without a preceding #if.\n"); return TRUE; } else @@ -971,7 +969,7 @@ QCString removeIdsAndMarkers(const char *s) nextChar: result+=c; char lc=tolower(c); - if (!isId(lc) && lc!='.' && lc!='-' && lc!='+') inNum=FALSE; + if (!isId(lc) && lc!='.' /*&& lc!='-' && lc!='+'*/) inNum=FALSE; p++; } } @@ -1270,7 +1268,7 @@ static void readIncludeFile(const QCString &inc) if (Debug::isFlagSet(Debug::Preprocessor)) { msg("#include %s: not found or already included! skipping...\n",incFileName.data()); - //printf("Error: include file %s not found\n",yytext); + //printf("error: include file %s not found\n",yytext); } if (g_curlyCount>0 && !alreadyIncluded) // failed to find #include inside { ... } { @@ -2010,7 +2008,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(CopyCComment); } <DefineText>"//"[!/]? { - outputChar('/');outputChar('/'); + outputArray(yytext,yyleng); g_lastCPPContext=YY_START; g_defLitText+=' '; BEGIN(SkipCPPComment); @@ -2237,7 +2235,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } else { - //printf("Error: define %s is defined more than once!\n",g_defName.data()); + //printf("error: define %s is defined more than once!\n",g_defName.data()); } } delete g_argDict; g_argDict=0; diff --git a/src/pyscanner.l b/src/pyscanner.l index 18d0872..24b2672 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -132,7 +132,7 @@ static void initEntry() current->mtype = mtype; current->virt = virt; current->stat = gstat; - current->objc = FALSE; //insideObjC; + current->lang = SrcLangExt_Python; current->setParent(current_root); initGroupInfo(current); } @@ -501,7 +501,7 @@ STARTDOCSYMS ^{B}"##"/[^#] current->bodyLine = yyLineNr; current->section = Entry::FUNCTION_SEC; current->protection = protection = Public; - current->objc = FALSE; + current->lang = SrcLangExt_Python; current->virt = Normal; current->stat = FALSE; current->mtype = mtype = Method; diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index a713b40..e420601 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -222,7 +222,7 @@ void RTFDocVisitor::visit(DocSymbol *s) case DocSymbol::Aelig: m_t << "\346"; break; case DocSymbol::AElig: m_t << "\306"; break; default: - err("Error: unknown symbol found\n"); + err("error: unknown symbol found\n"); } m_lastIsPara=FALSE; } diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index b86fe4e..fad3ae2 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1994,7 +1994,7 @@ void RTFGenerator::incrementIndentLevel() m_listLevel++; if (m_listLevel>rtf_maxIndentLevels-1) { - err("Warning: Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels); + err("error: Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels); m_listLevel=rtf_maxIndentLevels-1; } } @@ -2004,7 +2004,7 @@ void RTFGenerator::decrementIndentLevel() m_listLevel--; if (m_listLevel<0) { - err("Warning: Negative indent level while generating RTF output!\n"); + err("error: Negative indent level while generating RTF output!\n"); m_listLevel=0; } } @@ -2279,7 +2279,7 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl QFile f(infName); if (!f.open(IO_ReadOnly)) { - err("Error opening rtf file %s for reading\n",infName.data()); + err("error: problems opening rtf file %s for reading\n",infName.data()); return FALSE; } @@ -2477,7 +2477,7 @@ void testRTFOutput(const char *name) } if (bcount==0) return; // file is OK. err: - err("Error: RTF integrity test failed at line %d of %s due to a bracket mismatch.\n",line,name); + err("error: RTF integrity test failed at line %d of %s due to a bracket mismatch.\n",line,name); err(" Please try to create a small code example that produces this error \n" " and send that to dimitri@stack.nl.\n"); } @@ -2492,7 +2492,7 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name) // store the original directory if (!d.exists()) { - err("Error: Output dir %s does not exist!\n",path); + err("error: Output dir %s does not exist!\n",path); return FALSE; } QCString oldDir = convertToQCString(QDir::currentDirPath()); diff --git a/src/scanner.l b/src/scanner.l index 0eecb14..732dfbc 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -107,6 +107,7 @@ static QCString formulaText; static QCString formulaEnd; static bool useOverrideCommands = FALSE; +static SrcLangExt language; static bool insideIDL = FALSE; //!< processing IDL code? static bool insideJava = FALSE; //!< processing Java code? static bool insideCS = FALSE; //!< processing C# code? @@ -216,7 +217,7 @@ static void initEntry() current->mtype = mtype; current->virt = virt; current->stat = gstat; - current->objc = insideObjC; + current->lang = language; //if (!autoGroupStack.isEmpty()) //{ // //printf("Appending group %s\n",autoGroupStack.top()->groupname.data()); @@ -325,14 +326,14 @@ static bool nameIsOperator(QCString &name) static void setContext() { QCString fileName = yyFileName; - SrcLangExt langExt = getLanguageFromFileName(fileName); - insideIDL = langExt==SrcLangExt_IDL; - insideJava = langExt==SrcLangExt_Java; - insideCS = langExt==SrcLangExt_CSharp; - insideD = langExt==SrcLangExt_D; - insidePHP = langExt==SrcLangExt_PHP; - insideObjC = langExt==SrcLangExt_ObjC; - insideJS = langExt==SrcLangExt_JS; + language = getLanguageFromFileName(fileName); + insideIDL = language==SrcLangExt_IDL; + insideJava = language==SrcLangExt_Java; + insideCS = language==SrcLangExt_CSharp; + insideD = language==SrcLangExt_D; + insidePHP = language==SrcLangExt_PHP; + insideObjC = language==SrcLangExt_ObjC; + insideJS = language==SrcLangExt_JS; if ( insidePHP ) { useOverrideCommands = TRUE; @@ -1022,7 +1023,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->bodyLine = yyLineNr; current->section = Entry::FUNCTION_SEC; current->protection = protection = Public ; - current->objc = TRUE; + language = current->lang = SrcLangExt_ObjC; + insideObjC = TRUE; current->virt = Virtual; current->stat=yytext[0]=='+'; current->mtype = mtype = Method; @@ -1350,7 +1352,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) lineCount(); isTypedef=FALSE; current->section = Entry::OBJCIMPL_SEC; - current->objc = insideObjC = TRUE; + language = current->lang = SrcLangExt_ObjC; + insideObjC = TRUE; current->protection = protection = Public ; addType( current ) ; current->type += " implementation" ; @@ -1364,7 +1367,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) isTypedef=FALSE; current->section = Entry::CLASS_SEC; current->spec = Entry::Interface; - current->objc = insideObjC = !insideJava; + if (!insideJava) + { + language = current->lang = SrcLangExt_ObjC; + insideObjC = TRUE; + } current->protection = protection = Public ; addType( current ) ; current->type += " interface" ; @@ -1378,7 +1385,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) isTypedef=FALSE; current->section = Entry::CLASS_SEC; current->spec = Entry::Protocol; - current->objc = insideObjC = TRUE; + language = current->lang = SrcLangExt_ObjC; + insideObjC = TRUE; current->protection = protection = Public ; addType( current ) ; current->type += " protocol" ; @@ -1409,7 +1417,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; - current->objc = insideObjC = yytext[0]=='@'; + if (yytext[0]=='@') + { + language = current->lang = SrcLangExt_ObjC; + insideObjC = TRUE; + } lineCount() ; if (yytext[yyleng-1]=='{') unput('{'); if (insidePHP && current->spec&Entry::Abstract) @@ -2074,7 +2086,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) BEGIN(DefineEnd); } <DefineEnd>\n { - //printf("End define\n"); + //printf("End define: doc=%s docFile=%s docLine=%d\n",current->doc.data(),current->docFile.data(),current->docLine); yyLineNr++; current->fileName = yyFileName; current->startLine = yyLineNr; @@ -3167,6 +3179,13 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } } } +<MemberSpec>"(" { // function with struct return type + addType(current); + current->name = msName; + current->spec = 0; + unput('('); + BEGIN(FindMembers); + } <MemberSpec>[,;] { //printf("current->name=`%s' msName=`%s'\n",current->name.data(),msName.data()); if (msName.isEmpty() && !current->name.isEmpty()) @@ -3351,7 +3370,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } } <FuncPtr>. { - //printf("Error: FuncPtr `%c' unexpected at line %d of %s\n",*yytext,yyLineNr,yyFileName); + //printf("error: FuncPtr `%c' unexpected at line %d of %s\n",*yytext,yyLineNr,yyFileName); } <FuncPtrOperator>"("{BN}*")"{BN}*/"(" { current->name += yytext; @@ -3676,7 +3695,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) <CopyArgComment,CopyArgVerbatim>. { fullArgString+=*yytext; } <CopyArgComment>{CMD}("brief"|"short"){B}+ { warn(yyFileName,yyLineNr, - "Warning: Ignoring %cbrief command inside argument documentation",*yytext + "warning: Ignoring %cbrief command inside argument documentation",*yytext ); fullArgString+=' '; } @@ -4288,7 +4307,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } <SkipInits>; { warn(yyFileName,yyLineNr, - "Warning: Found ';' while parsing initializer list! " + "warning: Found ';' while parsing initializer list! " "(doxygen could be confused by a macro call without semicolon)" ); BEGIN( FindMembers ); @@ -4357,6 +4376,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } else if (insideCS) // C# generic class { + current->name+="-g"; BEGIN( CSGeneric ); } else // C++ template specialization @@ -4377,9 +4397,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->tArgLists->append(al); currentArgumentList = al; templateStr="<"; - current->name += "<"; + //current->name += "<"; fullArgString = templateStr; - copyArgString = ¤t->name; + //copyArgString = ¤t->name; + copyArgString = &templateStr; currentArgumentContext = ClassVar; BEGIN( ReadTempArgs ); } @@ -4651,6 +4672,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) { current->type.prepend("typedef"); } + if ((yytext[0]=='*' || yytext[0]=='&') && + current->section == Entry::ENUM_SEC) + { // found "enum a *b" -> variable + current->section = Entry::VARIABLE_SEC ; + } BEGIN( FindMembers ); } <Bases,ClassVar>"///"/[^/] { @@ -4794,8 +4820,12 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } else // template specialization { - baseName += *yytext; - specName = &baseName; + //if (insideCS) // generic + //{ + // baseName+="-g"; + //} + templateStr = yytext; + specName = &templateStr; BEGIN ( Specialization ); } } @@ -4805,7 +4835,24 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) <Specialization>">" { *specName += *yytext; if (roundCount==0 && --sharpCount<=0) + { + if (1 /*!insideCS*/) + { + baseName+=*specName; + } + else + { + if (current->tArgLists==0) + { + current->tArgLists = new QList<ArgumentList>; + current->tArgLists->setAutoDelete(TRUE); + } + ArgumentList *al = new ArgumentList; + current->tArgLists->append(al); + stringToArgumentList(*specName,al); + } BEGIN(lastSkipSharpContext); + } } <Specialization>{BN}+ { lineCount(); *specName +=' '; } <Specialization>"<<" { *specName += yytext; } @@ -5240,7 +5287,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } <DocCopyBlock><<EOF>> { warn(yyFileName,yyLineNr, - "Warning: reached end of file while inside a %s block!\n" + "warning: reached end of file while inside a %s block!\n" "The command that should end the block seems to be missing!\n", docBlockName.data()); yyterminate(); @@ -5516,7 +5563,7 @@ static void parseCompounds(Entry *rt) yyFileName = ce->fileName; //setContext(); yyLineNr = ce->startLine ; - insideObjC = ce->objc; + insideObjC = ce->lang==SrcLangExt_ObjC; //printf("---> Inner block starts at line %d objC=%d\n",yyLineNr,insideObjC); //current->reset(); if (current) delete current; @@ -5537,7 +5584,7 @@ static void parseCompounds(Entry *rt) } else if (ce->spec&(Entry::Interface | Entry::Ref | Entry::Value | Entry::Struct | Entry::Union)) { - if (ce->objc) + if (ce->lang==SrcLangExt_ObjC) { current->protection = protection = Protected ; } diff --git a/src/tagreader.cpp b/src/tagreader.cpp index ae94194..700095c 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -325,7 +325,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unknown compound attribute `%s' found!\n",kind.data()); + warn("warning: Unknown compound attribute `%s' found!\n",kind.data()); } if (isObjC=="yes" && m_curClass) { @@ -352,7 +352,7 @@ class TagFileParser : public QXmlDefaultHandler case InPackage: m_tagFilePackages.append(m_curPackage); m_curPackage=0; break; default: - warn("Warning: tag `compound' was not expected!\n"); + warn("warning: tag `compound' was not expected!\n"); } } @@ -398,7 +398,7 @@ class TagFileParser : public QXmlDefaultHandler case InNamespace: m_curNamespace->members.append(m_curMember); break; case InGroup: m_curGroup->members.append(m_curMember); break; case InPackage: m_curPackage->members.append(m_curMember); break; - default: warn("Warning: Unexpected tag `member' found\n"); break; + default: warn("warning: Unexpected tag `member' found\n"); break; } } @@ -414,7 +414,7 @@ class TagFileParser : public QXmlDefaultHandler case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break; - default: warn("Warning: Unexpected tag `member' found\n"); break; + default: warn("warning: Unexpected tag `member' found\n"); break; } } @@ -427,7 +427,7 @@ class TagFileParser : public QXmlDefaultHandler case InNamespace: m_curNamespace->classList.append(m_curString); break; case InGroup: m_curGroup->classList.append(m_curString); break; case InPackage: m_curPackage->classList.append(m_curString); break; - default: warn("Warning: Unexpected tag `class' found\n"); break; + default: warn("warning: Unexpected tag `class' found\n"); break; } } @@ -438,7 +438,7 @@ class TagFileParser : public QXmlDefaultHandler case InNamespace: m_curNamespace->classList.append(m_curString); break; case InFile: m_curFile->namespaceList.append(m_curString); break; case InGroup: m_curGroup->namespaceList.append(m_curString); break; - default: warn("Warning: Unexpected tag `namespace' found\n"); break; + default: warn("warning: Unexpected tag `namespace' found\n"); break; } } @@ -448,7 +448,7 @@ class TagFileParser : public QXmlDefaultHandler { case InGroup: m_curGroup->fileList.append(m_curString); break; case InDir: m_curDir->fileList.append(m_curString); break; - default: warn("Warning: Unexpected tag `file' found\n"); break; + default: warn("warning: Unexpected tag `file' found\n"); break; } } @@ -457,7 +457,7 @@ class TagFileParser : public QXmlDefaultHandler switch(m_state) { case InGroup: m_curGroup->fileList.append(m_curString); break; - default: warn("Warning: Unexpected tag `page' found\n"); break; + default: warn("warning: Unexpected tag `page' found\n"); break; } } @@ -466,7 +466,7 @@ class TagFileParser : public QXmlDefaultHandler switch(m_state) { case InDir: m_curDir->subdirList.append(m_curString); break; - default: warn("Warning: Unexpected tag `page' found\n"); break; + default: warn("warning: Unexpected tag `page' found\n"); break; } } @@ -489,7 +489,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `type' found\n"); + warn("warning: Unexpected tag `type' found\n"); } } @@ -505,7 +505,7 @@ class TagFileParser : public QXmlDefaultHandler case InDir: m_curDir->name = m_curString; break; case InMember: m_curMember->name = m_curString; break; case InPackage: m_curPackage->name = m_curString; break; - default: warn("Warning: Unexpected tag `name' found\n"); break; + default: warn("warning: Unexpected tag `name' found\n"); break; } } @@ -539,7 +539,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `base' found\n"); + warn("warning: Unexpected tag `base' found\n"); } } @@ -551,7 +551,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `base' found\n"); + warn("warning: Unexpected tag `base' found\n"); } } @@ -568,7 +568,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `includes' found\n"); + warn("warning: Unexpected tag `includes' found\n"); } m_curString=""; } @@ -591,7 +591,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `templarg' found\n"); + warn("warning: Unexpected tag `templarg' found\n"); } } @@ -606,7 +606,7 @@ class TagFileParser : public QXmlDefaultHandler case InPage: m_curPage->filename = m_curString; break; case InPackage: m_curPackage->filename = m_curString; break; case InDir: m_curDir->filename = m_curString; break; - default: warn("Warning: Unexpected tag `filename' found\n"); break; + default: warn("warning: Unexpected tag `filename' found\n"); break; } } @@ -616,7 +616,7 @@ class TagFileParser : public QXmlDefaultHandler { case InFile: m_curFile->path = m_curString; break; case InDir: m_curDir->path = m_curString; break; - default: warn("Warning: Unexpected tag `path' found\n"); break; + default: warn("warning: Unexpected tag `path' found\n"); break; } } @@ -628,7 +628,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `anchor' found\n"); + warn("warning: Unexpected tag `anchor' found\n"); } } @@ -640,7 +640,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `anchorfile' found\n"); + warn("warning: Unexpected tag `anchorfile' found\n"); } } @@ -652,7 +652,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `arglist' found\n"); + warn("warning: Unexpected tag `arglist' found\n"); } } void endTitle() @@ -661,7 +661,7 @@ class TagFileParser : public QXmlDefaultHandler { case InGroup: m_curGroup->title = m_curString; break; case InPage: m_curPage->title = m_curString; break; - default: warn("Warning: Unexpected tag `title' found\n"); break; + default: warn("warning: Unexpected tag `title' found\n"); break; } } @@ -673,7 +673,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unexpected tag `subgroup' found\n"); + warn("warning: Unexpected tag `subgroup' found\n"); } } @@ -764,7 +764,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unknown tag `%s' found!\n",name.data()); + warn("warning: Unknown tag `%s' found!\n",name.data()); } return TRUE; } @@ -779,7 +779,7 @@ class TagFileParser : public QXmlDefaultHandler } else { - warn("Warning: Unknown tag `%s' found!\n",name.data()); + warn("warning: Unknown tag `%s' found!\n",name.data()); } return TRUE; } @@ -1191,7 +1191,7 @@ void TagFileParser::buildLists(Entry *root) ti->tagName = m_tagName; ti->fileName = tci->filename; ce->tagInfo = ti; - ce->objc = tci->isObjC; + ce->lang = tci->isObjC ? SrcLangExt_ObjC : SrcLangExt_Unknown; // transfer base class list if (tci->bases) { diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp index 4119d83..a39e16a 100644 --- a/src/textdocvisitor.cpp +++ b/src/textdocvisitor.cpp @@ -58,7 +58,7 @@ void TextDocVisitor::visit(DocSymbol *s) case DocSymbol::Aelig: m_t << "æ"; break; case DocSymbol::AElig: m_t << "Æ"; break; default: - err("Error: unknown symbol found\n"); + err("error: unknown symbol found\n"); } } diff --git a/src/translator_tr.h b/src/translator_tr.h index b596633..a7b02f2 100644 --- a/src/translator_tr.h +++ b/src/translator_tr.h @@ -40,7 +40,7 @@ Translator class (by the local maintainer) when the localized translator is made up-to-date again. */ -class TranslatorTurkish : public TranslatorAdapter_1_6_0 +class TranslatorTurkish : public Translator { public: @@ -77,7 +77,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_6_0 /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() { - return "iso-8859-9"; + return "utf-8"; } // --- Language translation methods ------------------- @@ -1048,24 +1048,24 @@ class TranslatorTurkish : public TranslatorAdapter_1_6_0 "<p>\n" "Yukarıdaki şemadaki kutular aşağıda açıklanmıştır:\n" "<ul>\n" - "<li>%A dolu gri kutu şemanın ait olduğu yapı(struct) ya da sınıfı " + "<li>Dolu gri kutu şemanın ait olduğu yapı(struct) ya da sınıfı " "gösterir.\n" - "<li>%A siyah çerçeveli bir kutu dokümante edilmiş bir yapı(struct) ya da sınıfı gösterir.\n" - "<li>%A gri çerçeveli bir kutu dokümante edilmemiş bir yapı(struct) ya da sınıfı gösterir.\n" - "<li>%A kırmızı çerçeveli bir kutu tüm kalıtım/içerme ilişkileri gösterilmemiş ve dokümante " + "<li>Siyah çerçeveli bir kutu dokümante edilmiş bir yapı(struct) ya da sınıfı gösterir.\n" + "<li>Gri çerçeveli bir kutu dokümante edilmemiş bir yapı(struct) ya da sınıfı gösterir.\n" + "<li>Kırmızı çerçeveli bir kutu tüm kalıtım/içerme ilişkileri gösterilmemiş ve dokümante " "edilmiş bir yapı(struct) ya da sınıfı gösterir. %A şema belirlenen sınırlara " "sığmıyorsa sadeleştirilir.\n" "</ul>\n" "Okların anlamı aşağıdaki gibidir:\n" "<ul>\n" - "<li>%A koyu mavi ok iki sınıf arasındaki public kalıtım ilişkisini " + "<li>Koyu mavi ok iki sınıf arasındaki public kalıtım ilişkisini " "göstermekte kullanılır.\n" - "<li>%A koyu yeşil ok korumalı kalıtımı gösterir.\n" - "<li>%A koyu kırmızı ok özel kalıtımı gösterir.\n" - "<li>%A mor kesikli çizgi bir sınıfın diğeri tarafından içeriliyor ya da kullanılıyor " + "<li>Koyu yeşil ok korumalı kalıtımı gösterir.\n" + "<li>Koyu kırmızı ok özel kalıtımı gösterir.\n" + "<li>Mor kesikli çizgi bir sınıfın diğeri tarafından içeriliyor ya da kullanılıyor " "olduğunu gösterir. Ok işaret edilen sınıfın hangi değişken(ler) tarafından erişildiğini " "gösteren etiketle işaretleniştir.\n" - "<li>%A Sarı kesikli çizgi şablondan üretilen bir sınıf ve ilgili şablon sınıfı " + "<li>Sarı kesikli çizgi şablondan üretilen bir sınıf ve ilgili şablon sınıfı " "arasındaki ilişkiyi gösterir. Ok türeyen sınıfın şablon parametreleriyle " "etiketlenmiştir.\n" "</ul>\n"; @@ -1775,7 +1775,98 @@ class TranslatorTurkish : public TranslatorAdapter_1_6_0 { return "Tip Sınırlamaları"; } - + + + ////////////////////////////////////////////////////////////////////////// + // new since 1.6.0 (mainly for the new search engine) + ////////////////////////////////////////////////////////////////////////// + + /*! directory relation for \a name */ + virtual QCString trDirRelation(const char *name) + { + return QCString(name)+" İlişkisi"; + } + + /*! Loading message shown when loading search results */ + virtual QCString trLoading() + { + return "Yüklüyor..."; + } + + /*! Label used for search results in the global namespace */ + virtual QCString trGlobalNamespace() + { + return "En Üst Seviye"; + } + + /*! Message shown while searching */ + virtual QCString trSearching() + { + return "Arıyor..."; + } + + /*! Text shown when no search results are found */ + virtual QCString trNoMatches() + { + return "Eşleşme Yok"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.6.3 (missing items for the directory pages) + ////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)(name) + (QCString)" için dizin bağımlılık grafiği"; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)(name) + (QCString)" dizinindeki dosya"; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)(name) + (QCString)" dizinindeki dosyayı kapsıyor"; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Pzt","Sal","Çar","Per","Cma","Cmt","Pzr" }; + static const char *months[] = { "Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Ekm","Kas","Ara" }; + QCString sdate; + sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + + }; -#endif +#endif
\ No newline at end of file diff --git a/src/util.cpp b/src/util.cpp index 31c8cf7..f3ea0df 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -463,7 +463,7 @@ NamespaceDef *getResolvedNamespace(const char *name) } if (count==10) { - err("Warning: possible recursive namespace alias detected for %s!\n",name); + err("warning: possible recursive namespace alias detected for %s!\n",name); } return Doxygen::namespaceSDict->find(subst->data()); } @@ -1217,6 +1217,10 @@ static void getResolvedSymbol(Definition *scope, } else { + bestMatch = 0; + bestTypedef = md; + bestTemplSpec.resize(0); + bestResolvedType.resize(0); //printf(" no match\n"); } } @@ -1295,12 +1299,22 @@ ClassDef *getResolvedClassRec(Definition *scope, return 0; // empty name } + //printf("Looking for symbol %s\n",name.data()); DefinitionIntf *di = Doxygen::symbolMap->find(name); - //printf("Looking for symbol %s result=%p\n",name.data(),di); if (di==0) { - return 0; + di = Doxygen::symbolMap->find(name+"-g"); + if (di==0) + { + di = Doxygen::symbolMap->find(name+"-p"); + if (di==0) + { + //printf("no such symbol!\n"); + return 0; + } + } } + //printf("found symbol!\n"); bool hasUsingStatements = (fileScope && ((fileScope->getUsedNamespaces() && @@ -1844,6 +1858,15 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, found=TRUE; } } + else if ((cd=getClass(matchWord+"-g"))) // C# generic as well + { + // add link to the result + if (external ? cd->isLinkable() : cd->isLinkableInProject()) + { + out.writeLink(cd->getReference(),cd->getOutputFileBase(),0,word); + found=TRUE; + } + } else { //printf(" -> nothing\n"); @@ -2125,7 +2148,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t void *cd = portable_iconv_open(outputEncoding,inputEncoding); if (cd==(void *)(-1)) { - err("Error: unsupported character conversion: '%s'->'%s'\n", + err("error: unsupported character conversion: '%s'->'%s'\n", inputEncoding.data(),outputEncoding.data()); exit(1); } @@ -2142,7 +2165,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t } else { - err("Error: failed to translate characters from %s to %s: %s\n", + err("error: failed to translate characters from %s to %s: %s\n", inputEncoding.data(),outputEncoding.data(),strerror(errno)); exit(1); } @@ -2164,7 +2187,7 @@ QCString transcodeCharacterStringToUTF8(const QCString &input) void *cd = portable_iconv_open(outputEncoding,inputEncoding); if (cd==(void *)(-1)) { - err("Error: unsupported character conversion: '%s'->'%s'\n", + err("error: unsupported character conversion: '%s'->'%s'\n", inputEncoding.data(),outputEncoding); error=TRUE; } @@ -2183,7 +2206,7 @@ QCString transcodeCharacterStringToUTF8(const QCString &input) } else { - err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n", + err("error: failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n", inputEncoding.data(),outputEncoding,input.data()); error=TRUE; } @@ -2228,7 +2251,7 @@ QCString fileToString(const char *name,bool filter) QFileInfo fi(name); if (!fi.exists() || !fi.isFile()) { - err("Error: file `%s' not found\n",name); + err("error: file `%s' not found\n",name); return ""; } QCString filterName = getFileFilter(name); @@ -2262,7 +2285,7 @@ QCString fileToString(const char *name,bool filter) FILE *f=portable_popen(cmd,"r"); if (!f) { - err("Error: could not execute filter %s\n",filterName.data()); + err("error: could not execute filter %s\n",filterName.data()); return ""; } const int bSize=4096; @@ -2284,7 +2307,7 @@ QCString fileToString(const char *name,bool filter) } if (!fileOpened) { - err("Error: cannot open file `%s' for reading\n",name); + err("error: cannot open file `%s' for reading\n",name); } return ""; } @@ -2340,7 +2363,7 @@ int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level) if (cd==bcd) return level; if (level==256) { - err("Error: Internal inconsistency: found class %s seem to have a recursive " + err("error: Internal inconsistency: found class %s seem to have a recursive " "inheritance relation! Please send a bug report to dimitri@stack.nl\n",cd->name().data()); return -1; } @@ -3238,6 +3261,10 @@ static QCString getCanonicalTypeForIdentifier( { result = mType->qualifiedName(); } + else if (mType && mType->isTypedef()) // a typedef + { + result = mType->qualifiedName(); + } else // fallback { resolvedType = resolveTypeDef(d,word); @@ -4087,7 +4114,10 @@ static bool getScopeDefs(const char *docScope,const char *scope, QCString fullName=scopeName.copy(); if (scopeOffset>0) fullName.prepend(docScopeName.left(scopeOffset)+"::"); - if ((cd=getClass(fullName)) && cd->isLinkable()) + if (((cd=getClass(fullName)) || // normal class + (cd=getClass(fullName+"-p")) || // ObjC protocol + (cd=getClass(fullName+"-g")) // C# generic + ) && cd->isLinkable()) { return TRUE; // class link written => quit } @@ -4434,6 +4464,11 @@ bool resolveLink(/* in */ const char *scName, *resContext=cd; return TRUE; } + else if ((cd=getClass(linkRef+"-g"))) // C# generic link + { + *resContext=cd; + return TRUE; + } else if ((nd=Doxygen::namespaceSDict->find(linkRef))) { *resContext=nd; @@ -6547,6 +6582,26 @@ bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n) return FALSE; } +int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos) +{ + int bytes=1; + if (startPos>=len) return len; + char c = utf8Str[startPos]; + if (c<0) // multibyte utf-8 character + { + bytes++; // 1xxx.xxxx: >=2 byte character + if (((uchar)c&0xE0)==0xE0) + { + bytes++; // 111x.xxxx: >=3 byte character + } + if (((uchar)c&0xF0)==0xF0) + { + bytes++; // 1111.xxxx: 4 byte character + } + } + return startPos+bytes; +} + QCString parseCommentAsText(const Definition *scope,const MemberDef *md, const QCString &doc,const QCString &fileName,int lineNr) { @@ -6561,20 +6616,32 @@ QCString parseCommentAsText(const Definition *scope,const MemberDef *md, delete root; QCString result = s.data(); int i=0; - if (result.length()>80) + int charCnt=0; + int l=result.length(); + bool addEllipsis=FALSE; + while ((i=nextUtf8CharPosition(result,l,i))<l) { - for (i=80;i<100;i++) // search for nice truncation point + charCnt++; + if (charCnt>=80) break; + } + if (charCnt>=80) // try to truncate the string + { + while ((i=nextUtf8CharPosition(result,l,i))<l && charCnt<100) { - if (isspace(result.at(i)) || - result.at(i)==',' || - result.at(i)=='.' || - result.at(i)=='?') + charCnt++; + if (isspace(result.at(i))) + { + addEllipsis=TRUE; + } + else if (result.at(i)==',' || + result.at(i)=='.' || + result.at(i)=='?') { break; } } } - if (i>0) result=result.left(i)+"..."; + if (addEllipsis || charCnt==100) result=result.left(i)+"..."; return result.data(); } @@ -6815,7 +6882,7 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size void *cd = portable_iconv_open(outputEncoding,inputEncoding); if (cd==(void *)(-1)) { - err("Error: unsupported character conversion: '%s'->'%s': %s\n" + err("error: unsupported character conversion: '%s'->'%s': %s\n" "Check the INPUT_ENCODING setting in the config file!\n", inputEncoding,outputEncoding,strerror(errno)); exit(1); @@ -6836,7 +6903,7 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size } else { - err("%s: Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", + err("%s: error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", fileName,inputEncoding,outputEncoding); exit(1); } @@ -6860,7 +6927,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf) QFile f(fileName); if (!f.open(IO_ReadOnly)) { - err("Error: could not open file %s\n",fileName); + err("error: could not open file %s\n",fileName); return FALSE; } size=fi.size(); @@ -6868,7 +6935,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf) inBuf.skip(size); if (f.readBlock(inBuf.data()/*+oldPos*/,size)!=size) { - err("Error while reading file %s\n",fileName); + err("error: problems while reading file %s\n",fileName); return FALSE; } } @@ -6879,7 +6946,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf) FILE *f=portable_popen(cmd,"r"); if (!f) { - err("Error: could not execute filter %s\n",filterName.data()); + err("error: could not execute filter %s\n",filterName.data()); return FALSE; } const int bufSize=1024; @@ -89,18 +89,19 @@ class TextGeneratorOLImpl : public TextGeneratorIntf enum SrcLangExt { - SrcLangExt_IDL = 0x0008, - SrcLangExt_Java = 0x0010, - SrcLangExt_CSharp = 0x0020, - SrcLangExt_D = 0x0040, - SrcLangExt_PHP = 0x0080, - SrcLangExt_ObjC = 0x0100, - SrcLangExt_Cpp = 0x0200, - SrcLangExt_JS = 0x0400, - SrcLangExt_Python = 0x0800, - SrcLangExt_F90 = 0x1000, - SrcLangExt_VHDL = 0x2000, - SrcLangExt_XML = 0x4000 + SrcLangExt_Unknown = 0x0000, + SrcLangExt_IDL = 0x0008, + SrcLangExt_Java = 0x0010, + SrcLangExt_CSharp = 0x0020, + SrcLangExt_D = 0x0040, + SrcLangExt_PHP = 0x0080, + SrcLangExt_ObjC = 0x0100, + SrcLangExt_Cpp = 0x0200, + SrcLangExt_JS = 0x0400, + SrcLangExt_Python = 0x0800, + SrcLangExt_F90 = 0x1000, + SrcLangExt_VHDL = 0x2000, + SrcLangExt_XML = 0x4000 }; //-------------------------------------------------------------------- diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 72c6e9d..d4c6d52 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -622,7 +622,7 @@ void VhdlDocGen::addFuncDoc(EntryNav* rootNav) if (!func && Config_getBool("WARNINGS")) { warn(root->fileName,root->docLine, - "Warning: documentation for unknown function %s found.\n", + "warning: documentation for unknown function %s found.\n", root->name.data() ); } diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index cbe3c1d..2c09a0a 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -101,7 +101,7 @@ void XmlDocVisitor::visit(DocSymbol *s) case DocSymbol::Aelig: m_t << "<aelig/>"; break; case DocSymbol::AElig: m_t << "<AElig/>"; break; default: - err("Error: unknown symbol found\n"); + err("error: unknown symbol found\n"); } } diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index e6bb475..0539c5d 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1845,13 +1845,13 @@ void generateXML() dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { - err("Error: tag XML_OUTPUT: Output directory `%s' does not " + err("error: tag XML_OUTPUT: Output directory `%s' does not " "exist and cannot be created\n",outputDirectory.data()); exit(1); } else if (!Config_getBool("QUIET")) { - err("Notice: Output directory `%s' does not exist. " + err("notice: Output directory `%s' does not exist. " "I have created it for you.\n", outputDirectory.data()); } dir.cd(outputDirectory); |