diff options
Diffstat (limited to 'src')
229 files changed, 2388 insertions, 1707 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index e6a7080..ae6c436 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2,7 +2,7 @@ # # # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/arguments.h b/src/arguments.h index 09f5b63..eba452c 100644 --- a/src/arguments.h +++ b/src/arguments.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/bufstr.h b/src/bufstr.h index 2e704f5..635b4cf 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/classdef.cpp b/src/classdef.cpp index 8517893..b285325 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2206,7 +2206,7 @@ void ClassDef::writeMemberList(OutputList &ol) ol.parseText(" "+theTranslator->trEnumValue()); else if (md->isTypedef()) ol.docify(" typedef"); - else if (md->isFriend() && !strcmp(md->typeString(),"friend class")) + else if (md->isFriend() && !qstrcmp(md->typeString(),"friend class")) ol.docify(" class"); //ol.writeString("\n"); } @@ -2574,8 +2574,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data()); if (level>256) { - err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(name()),qPrint(bcd->name())); - abort(); + err("Possible recursive class relation while inside %s and looking for base class %s\n",qPrint(name()),qPrint(bcd->name())); return FALSE; } if (baseClasses()) @@ -2597,6 +2596,31 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) return found; } +//---------------------------------------------------------------------- + +bool ClassDef::isSubClass(ClassDef *cd,int level) +{ + bool found=FALSE; + if (level>256) + { + err("Possible recursive class relation while inside %s and looking for derived class %s\n",qPrint(name()),qPrint(cd->name())); + return FALSE; + } + if (subClasses()) + { + BaseClassListIterator bcli(*subClasses()); + for ( ; bcli.current() && !found ; ++bcli) + { + ClassDef *ccd=bcli.current()->classDef; + if (ccd==cd) + found=TRUE; + else + found=ccd->isSubClass(cd,level+1); + } + } + return found; +} + //---------------------------------------------------------------------------- static bool isStandardFunc(MemberDef *md) diff --git a/src/classdef.h b/src/classdef.h index 1525dfd..53e1c15 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -185,6 +185,11 @@ class ClassDef : public Definition */ bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0); + /** Returns TRUE iff \a bcd is a direct or indirect sub class of this + * class. + */ + bool isSubClass(ClassDef *bcd,int level=0); + /** returns TRUE iff \a md is a member of this class or of the * the public/protected members of a base class */ @@ -501,7 +506,7 @@ class BaseClassList : public QList<BaseClassDef> if (c1==0 || c2==0) return FALSE; else - return stricmp(c1->name(),c2->name()); + return qstricmp(c1->name(),c2->name()); } }; diff --git a/src/classlist.cpp b/src/classlist.cpp index fec1cb8..da5bf5a 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -41,12 +41,12 @@ static int compItems(void *item1,void *item2) //printf("compItems: %d %s<->%s\n",b,c1->name().data(),c2->name().data()); if (b) { - return stricmp(c1->name(), + return qstricmp(c1->name(), c2->name()); } else { - return stricmp(c1->className(), + return qstricmp(c1->className(), c2->className()); } } diff --git a/src/classlist.h b/src/classlist.h index abe7064..adc781c 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index 767978c..d9ee4b8 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 968b017..bea301e 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2414,14 +2414,14 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" codifyLines(yytext); endFontClass(); g_name.resize(0);g_type.resize(0); - g_inForEachExpression = (strcmp(yytext,"for each")==0 || strcmp(yytext, "foreach")==0); + g_inForEachExpression = (qstrcmp(yytext,"for each")==0 || qstrcmp(yytext, "foreach")==0); BEGIN(FuncCall); } <Body>{FLOWKW}/([^a-z_A-Z0-9]) { startFontClass("keywordflow"); codifyLines(yytext); endFontClass(); - if (g_inFunctionTryBlock && (strcmp(yytext,"catch")==0 || strcmp(yytext,"finally")==0)) + if (g_inFunctionTryBlock && (qstrcmp(yytext,"catch")==0 || qstrcmp(yytext,"finally")==0)) { g_inFunctionTryBlock=FALSE; } @@ -2773,7 +2773,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } /* <ObjCMemberCall>{ID} { - if (strcmp(yytext,"self")==0 || strcmp(yytext,"super")==0) + if (qstrcmp(yytext,"self")==0 || qstrcmp(yytext,"super")==0) { // TODO: get proper base class for "super" g_theCallContext.setClass(getClass(g_curClassName)); @@ -2944,10 +2944,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } } <MemberCall2,FuncCall>{OPERATOR} { // operator - if (strcmp(yytext,"*") && - strcmp(yytext,"&") && - strcmp(yytext,"^") && - strcmp(yytext,"%")) // typically a pointer or reference + if (qstrcmp(yytext,"*") && + qstrcmp(yytext,"&") && + qstrcmp(yytext,"^") && + qstrcmp(yytext,"%")) // typically a pointer or reference { // not a * or &, or C++/CLI's ^ or % g_parmType.resize(0);g_parmName.resize(0); diff --git a/src/commentcnv.h b/src/commentcnv.h index 5277524..1c1fcb9 100644 --- a/src/commentcnv.h +++ b/src/commentcnv.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/commentcnv.l b/src/commentcnv.l index 9d99830..96a34d8 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -88,6 +88,7 @@ static bool g_pythonDocString; static GuardType guardType; // kind of guard for conditional section static SrcLangExt g_lang; +static bool isFixedForm; // For Fortran static void replaceCommentMarker(const char *s,int len) { @@ -270,8 +271,8 @@ void replaceComment(int offset); BEGIN(CComment); } } -<Scan>"!>"|"!<"|"!!" { - if (g_lang!=SrcLangExt_Fortran) +<Scan>![><!]/.*\n { + if (g_lang!=SrcLangExt_Fortran) { REJECT; } @@ -280,6 +281,52 @@ void replaceComment(int offset); copyToOutput(yytext,(int)yyleng); BEGIN(CComment); } + } +<Scan>[Cc\*][><!]/.*\n { + if (g_lang!=SrcLangExt_Fortran) + { + REJECT; + } + else + { + /* check for fixed format; we might have some conditional as part of multilene if like C<5 .and. & */ + if (isFixedForm && (g_col == 0)) + { + copyToOutput(yytext,(int)yyleng); + BEGIN(CComment); + } + else + { + REJECT; + } + } + } +<Scan>!.*\n { + if (g_lang!=SrcLangExt_Fortran) + { + REJECT; + } + else + { + copyToOutput(yytext,(int)yyleng); + } + } +<Scan>[Cc\*].*\n { + if (g_lang!=SrcLangExt_Fortran) + { + REJECT; + } + else + { + if (g_col == 0) + { + copyToOutput(yytext,(int)yyleng); + } + else + { + REJECT; + } + } } <Scan>"\"" { /* start of a string */ copyToOutput(yytext,(int)yyleng); @@ -294,7 +341,7 @@ void replaceComment(int offset); <Scan>\n { /* new line */ copyToOutput(yytext,(int)yyleng); } -<Scan>("//!"|"///")/.*\n[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */ +<Scan>("//!"|"///"[/]*)/.*\n[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */ if (g_mlBrief) { REJECT; // bail out if we do not need to convert @@ -357,7 +404,7 @@ void replaceComment(int offset); BEGIN(CComment); } } -<Scan>"!>"|"!<"|"!!" { +<Scan>![><!] { if (g_lang!=SrcLangExt_Fortran) { REJECT; @@ -402,7 +449,7 @@ void replaceComment(int offset); g_lastCommentContext = YY_START; BEGIN(Verbatim); } -<Scan>. { /* any other character */ +<Scan>. { /* any ather character */ copyToOutput(yytext,(int)yyleng); } <Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */ @@ -549,6 +596,11 @@ void replaceComment(int offset); } <CComment>\n { /* new line in comment */ copyToOutput(yytext,(int)yyleng); + /* in case of Fortran always end of comment */ + if (g_lang==SrcLangExt_Fortran) + { + BEGIN(Scan); + } } <CComment>"*"+"/" { /* end of C comment */ if (g_lang==SrcLangExt_Python) @@ -583,17 +635,6 @@ void replaceComment(int offset); BEGIN(Scan); } } -<CComment>"\n"/[ \t]*[^!] { /* end of Fortran comment */ - if (g_lang!=SrcLangExt_Fortran) - { - REJECT; - } - else - { - copyToOutput(yytext,(int)yyleng); - BEGIN(Scan); - } - } /* removed for bug 674842 (bug was introduced in rev 768) <CComment>"'" { g_charContext = YY_START; @@ -839,6 +880,45 @@ void replaceComment(int offset) } } +// simplified way to know if this is fixed form +// duplicate in fortrancode.l +static bool recognizeFixedForm(const char* contents) +{ + int column=0; + bool skipLine=FALSE; + + for(int i=0;;i++) { + column++; + + switch(contents[i]) { + case '\n': + column=0; + skipLine=FALSE; + break; + case ' ': + break; + case '\000': + return FALSE; + case 'C': + case 'c': + case '*': + if(column==1) return TRUE; + if(skipLine) break; + return FALSE; + case '!': + if(column>1 && column<7) return FALSE; + skipLine=TRUE; + break; + default: + if(skipLine) break; + if(column==7) return TRUE; + return FALSE; + } + } + return FALSE; +} + + /*! This function does three things: * -# It converts multi-line C++ style comment blocks (that are aligned) * to C style comment blocks (if MULTILINE_CPP_IS_BRIEF is set to NO). @@ -860,6 +940,13 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) g_lineNr = 1; g_condStack.clear(); g_condStack.setAutoDelete(TRUE); + + isFixedForm = FALSE; + if (g_lang==SrcLangExt_Fortran) + { + isFixedForm = recognizeFixedForm(inBuf->data()); + } + if (g_lang==SrcLangExt_Markdown) { BEGIN(CComment); diff --git a/src/commentscan.h b/src/commentscan.h index 9f90663..e296b89 100644 --- a/src/commentscan.h +++ b/src/commentscan.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/commentscan.l b/src/commentscan.l index 68f6b5f..249fec8 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1,6 +1,6 @@ /***************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -526,7 +526,7 @@ static void addXRefItem(const char *listName,const char *itemTitle, QListIterator<ListItemInfo> slii(*docEntry->sli); for (slii.toFirst();(lii=slii.current());++slii) { - if (strcmp(lii->type,listName)==0) + if (qstrcmp(lii->type,listName)==0) { //printf("found %s lii->type=%s\n",listName,lii->type); break; @@ -1074,7 +1074,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <Comment>{B}*{CMD}"~"[a-z_A-Z]* { // language switch command QCString langId = QString(yytext).stripWhiteSpace().data()+2; if (!langId.isEmpty() && - stricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)!=0) + qstricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)!=0) { // enable language specific section BEGIN(SkipLang); } @@ -1160,6 +1160,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <Comment>"--" { // ndash addOutput(insidePre || Doxygen::markdownSupport ? yytext : "–"); } +<Comment>"-#"{B}+ { // numbered item + addOutput(yytext); + } <Comment>("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis addOutput(yytext); } @@ -2057,7 +2060,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <SkipLang>[\\@]"~"[a-zA-Z]* { /* language switch */ QCString langId = &yytext[2]; if (langId.isEmpty() || - stricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)==0) + qstricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)==0) { // enable language specific section BEGIN(Comment); } @@ -2408,6 +2411,11 @@ static bool handleSubpage(const QCString &s) warn(yyFileName,yyLineNr, "warning: found \\subpage command in a comment block that is not marked as a page!"); } + if (g_spaceBeforeCmd) + { + addOutput(' '); + g_spaceBeforeCmd=FALSE; + } addOutput("@"+s+" "); BEGIN(SubpageLabel); return FALSE; @@ -2849,7 +2857,7 @@ static int findExistingGroup(int &groupId,const MemberGroupInfo *info) { if (g_compoundName==mi->compoundName && // same file or scope !mi->header.isEmpty() && // not a nameless group - stricmp(mi->header,info->header)==0 // same header name + qstricmp(mi->header,info->header)==0 // same header name ) { //printf("Found it!\n"); diff --git a/src/condparser.cpp b/src/condparser.cpp index 2cadc1e..1964eda 100644 --- a/src/condparser.cpp +++ b/src/condparser.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/condparser.h b/src/condparser.h index 74a05cf..a4dfee8 100644 --- a/src/condparser.h +++ b/src/condparser.h @@ -2,7 +2,7 @@ #define CONDPARSER_H /** - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/config.h b/src/config.h index 5ed8bc4..a33909c 100644 --- a/src/config.h +++ b/src/config.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/config.l b/src/config.l index 0422411..b32fd76 100644 --- a/src/config.l +++ b/src/config.l @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/config.xml b/src/config.xml index a75ff80..26496c9 100644 --- a/src/config.xml +++ b/src/config.xml @@ -1176,14 +1176,19 @@ When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed search data is written to a file for indexing by an external tool. With the SEARCHDATA_FILE tag the name of this file can be specified. ' defval='searchdata.xml' depends='SEARCHENGINE'/> + <option type='string' id='EXTERNAL_SEARCH_ID' docs=' +When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the +EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +projects and redirect the results back to the right project. +' defval='' dependes='SEARCHENGINE'/> <option type='list' id='EXTRA_SEARCH_MAPPINGS' docs=' -The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through other -doxygen projects that are not otherwise connected via tags files, but are -all added to the same search index. Each project needs to have a tag file set -via GENERATE_TAGFILE. The search mapping then maps the name of the tag file -to a relative location where the documentation can be found, similar to the -TAGFILES option but without actually processing the tag file. -The format is: EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... +The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +projects other than the one defined by this configuration file, but that are +all added to the same external search index. Each project needs to have a +unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id +of to a relative location where the documentation can be found. +The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... ' defval='0' depends='SEARCHENGINE'/> </group> <group name='LaTeX' docs='configuration options related to the LaTeX output'> diff --git a/src/configgen.py b/src/configgen.py index 5af201f..459ec4d 100755 --- a/src/configgen.py +++ b/src/configgen.py @@ -1,6 +1,6 @@ # python script to generate configoptions.cpp from config.xml # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/configoptions.cpp b/src/configoptions.cpp index 846142c..eef2272 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -1723,16 +1723,22 @@ void addConfigOptions(Config *cfg) cs->setWidgetType(ConfigString::File); cs->addDependency("SEARCHENGINE"); //---- + cs = cfg->addString( + "EXTERNAL_SEARCH_ID", + "When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the\n" + "EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is\n" + "useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple\n" + "projects and redirect the results back to the right project." + ); + //---- cl = cfg->addList( "EXTRA_SEARCH_MAPPINGS", - "The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through other\n" - "doxygen projects that are not otherwise connected via tags files, but are\n" - "all added to the same search index. Each project needs to have a tag file set\n" - "via GENERATE_TAGFILE. The search mapping then maps the name of the tag file\n" - "to a relative location where the documentation can be found,\n" - "similar to the\n" - "TAGFILES option but without actually processing the tag file.\n" - "The format is: EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ..." + "The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen\n" + "projects other than the one defined by this configuration file, but that are\n" + "all added to the same external search index. Each project needs to have a\n" + "unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id\n" + "of to a relative location where the documentation can be found.\n" + "The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ..." ); cl->addDependency("SEARCHENGINE"); //--------------------------------------------------------------------------- diff --git a/src/configoptions.h b/src/configoptions.h index 8bf94d5..179d751 100644 --- a/src/configoptions.h +++ b/src/configoptions.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/constexp.h b/src/constexp.h index 767ea66..60e4722 100644 --- a/src/constexp.h +++ b/src/constexp.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/constexp.l b/src/constexp.l index fda1f04..f72e99d 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/constexp.y b/src/constexp.y index c8b35e5..aed8be9 100644 --- a/src/constexp.y +++ b/src/constexp.y @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp index 69b8be4..7efb4f8 100644 --- a/src/cppvalue.cpp +++ b/src/cppvalue.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/cppvalue.h b/src/cppvalue.h index 7289ce0..3f3ac3a 100644 --- a/src/cppvalue.h +++ b/src/cppvalue.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/debug.cpp b/src/debug.cpp index da1233b..c962214 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/debug.h b/src/debug.h index c3d78de..bcac588 100644 --- a/src/debug.h +++ b/src/debug.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/declinfo.h b/src/declinfo.h index 9486bad..3d8cb87 100644 --- a/src/declinfo.h +++ b/src/declinfo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/declinfo.l b/src/declinfo.l index dd3f6f8..3e4ad4a 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/defargs.h b/src/defargs.h index 9c6f209..1dbabdb 100644 --- a/src/defargs.h +++ b/src/defargs.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/defargs.l b/src/defargs.l index ce870d9..fa945f6 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -408,7 +408,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" g_curArgTypeName+=*yytext; } -<ReadFuncArgDef,CopyArgString>"->"|">="|">>" { +<ReadFuncArgDef,CopyArgString>"<="|"->"|">="|">>"|"<<" { g_curArgDefValue+=yytext; } <ReadFuncArgDef,CopyArgString,CopyRawString>. { diff --git a/src/defgen.cpp b/src/defgen.cpp index fedb4a0..52f91c7 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/defgen.h b/src/defgen.h index 5b26cd0..290a415 100644 --- a/src/defgen.h +++ b/src/defgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/define.cpp b/src/define.cpp index e5dd154..c814e34 100644 --- a/src/define.cpp +++ b/src/define.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/define.h b/src/define.h index c5b5274..da3d956 100644 --- a/src/define.h +++ b/src/define.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -55,7 +55,7 @@ class DefineList : public QList<Define> ~DefineList() {} int compareItems(QCollection::Item i1,QCollection::Item i2) { - return stricmp(((Define *)i1)->name,((Define *)i2)->name); + return qstricmp(((Define *)i1)->name,((Define *)i2)->name); } }; @@ -68,7 +68,7 @@ class DefineName : public QList<Define> const char *nameString() const { return name; } int compareItems(QCollection::Item i1,QCollection::Item i2) { - return stricmp(((Define *)i1)->name,((Define *)i2)->name); + return qstricmp(((Define *)i1)->name,((Define *)i2)->name); } private: @@ -83,7 +83,7 @@ class DefineNameList : public QList<DefineName> ~DefineNameList() {} int compareItems(QCollection::Item i1,QCollection::Item i2) { - return stricmp(((DefineName *)i1)->nameString(), + return qstricmp(((DefineName *)i1)->nameString(), ((DefineName *)i2)->nameString()); } }; diff --git a/src/definition.cpp b/src/definition.cpp index 2833be7..1212a7b 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1008,11 +1008,12 @@ void Definition::setBodyDef(FileDef *fd) /*! Write code of this definition into the documentation */ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) { + static bool inlineSources = Config_getBool("INLINE_SOURCES"); makeResident(); ol.pushGeneratorState(); //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(), // m_startBodyLine,m_endBodyLine,m_bodyDef); - if (Config_getBool("INLINE_SOURCES") && + if (inlineSources && m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->endLine>=m_impl->body->startLine && m_impl->body->fileDef) { @@ -1031,7 +1032,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) if (definitionType()==TypeMember) thisMd = (MemberDef *)this; // vhdl parser can' t start at an arbitrary point in the source code - if(this->getLanguage()==SrcLangExt_VHDL) + if (getLanguage()==SrcLangExt_VHDL) { if (thisMd) VhdlDocGen::writeCodeFragment(ol,actualStart,codeFragment,thisMd); return; @@ -1048,7 +1049,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) actualEnd, // endLine TRUE, // inlineFragment thisMd, // memberDef - FALSE // show line numbers + TRUE // show line numbers ); ol.endCodeFragment(); } @@ -1404,7 +1405,7 @@ int Definition::_getXRefListId(const char *listName) const ListItemInfo *lii; for (slii.toFirst();(lii=slii.current());++slii) { - if (strcmp(lii->type,listName)==0) + if (qstrcmp(lii->type,listName)==0) { return lii->itemId; } @@ -1489,12 +1490,12 @@ QCString Definition::navigationPathAsString() const { if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle()) { - result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+ + result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+ ((const GroupDef*)this)->groupTitle()+"</a>"; } else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty()) { - result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+ + result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+ ((const PageDef*)this)->title()+"</a>"; } else if (definitionType()==Definition::TypeClass) @@ -1504,13 +1505,13 @@ QCString Definition::navigationPathAsString() const { name = name.left(name.length()-2); } - result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension; + result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension; if (!anchor().isEmpty()) result+="#"+anchor(); result+="\">"+name+"</a>"; } else { - result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+ + result+="<a class=\"el\" href=\"$relpath^"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+ locName+"</a>"; } } diff --git a/src/definition.h b/src/definition.h index 9d80431..9bbc85e 100644 --- a/src/definition.h +++ b/src/definition.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -364,7 +364,7 @@ class DefinitionList : public QList<Definition>, public DefinitionIntf DefType definitionType() const { return TypeSymbolList; } int compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((Definition *)item1)->name(), + return qstricmp(((Definition *)item1)->name(), ((Definition *)item2)->name() ); } diff --git a/src/diagram.cpp b/src/diagram.cpp index 78b9364..10b49b9 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/diagram.h b/src/diagram.h index 63481cd..ec08e5e 100644 --- a/src/diagram.h +++ b/src/diagram.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 6565393..6795e38 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -579,8 +579,8 @@ int FilePairDict::compareItems(QCollection::Item item1,QCollection::Item item2) { FilePair *left = (FilePair*)item1; FilePair *right = (FilePair*)item2; - int orderHi = stricmp(left->source()->name(),right->source()->name()); - int orderLo = stricmp(left->destination()->name(),right->destination()->name()); + int orderHi = qstricmp(left->source()->name(),right->source()->name()); + int orderLo = qstricmp(left->destination()->name(),right->destination()->name()); return orderHi==0 ? orderLo : orderHi; } @@ -629,7 +629,7 @@ bool DirDef::matchPath(const QCString &path,QStrList &l) while (s) { QCString prefix = s; - if (stricmp(prefix.left(path.length()),path)==0) // case insensitive compare + if (qstricmp(prefix.left(path.length()),path)==0) // case insensitive compare { return TRUE; } @@ -785,7 +785,7 @@ static void computeCommonDirPrefix() QCString dirName = dir->name(); if (dirName.length()>path.length()) { - if (strncmp(dirName,path,l)!=0) // dirName does not start with path + if (qstrncmp(dirName,path,l)!=0) // dirName does not start with path { int i=path.findRev('/',l-2); if (i==-1) // no unique prefix -> stop diff --git a/src/dirdef.h b/src/dirdef.h index a94f979..99e2137 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -161,7 +161,7 @@ class DirRelation inline int DirList::compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName()); + return qstricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName()); } /** A sorted dictionary of DirDef objects. */ @@ -171,7 +171,7 @@ class DirSDict : public SDict<DirDef> DirSDict(int size) : SDict<DirDef>(size) {} int compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName()); + return qstricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName()); } }; diff --git a/src/docparser.cpp b/src/docparser.cpp index c4f42f3..29b0030 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1517,6 +1517,39 @@ handlepara: return TRUE; } +//--------------------------------------------------------------------------- + +static int handleDocCopy(DocNode *parent,QList<DocNode> &children) +{ + int tok=doctokenizerYYlex(); + int cmdId = Mappers::cmdMapper->map(g_token->name); + if (tok!=TK_WHITESPACE) + { + warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: expected whitespace after %s command", + qPrint(g_token->name)); + return 0; + } + 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", qPrint(g_token->name)); + return 0; + } + 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),qPrint(g_token->name)); + return 0; + } + DocCopy *cpy = new DocCopy(parent,g_token->name, + cmdId==CMD_COPYDOC || cmdId==CMD_COPYBRIEF, + cmdId==CMD_COPYDOC || cmdId==CMD_COPYDETAILS); + cpy->parse(children); + delete cpy; + return 0; +} + //--------------------------------------------------------------------------- @@ -1687,6 +1720,10 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, { delete par; } + if (retval==RetVal_CopyDoc) + { + retval=handleDocCopy(parent,children); + } } while (retval==TK_NEWPARA); if (lastPar) lastPar->markLast(); @@ -3164,6 +3201,10 @@ int DocInternal::parse(int level) { warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid list item found",doctokenizerYYlineno); } + else if (retval==RetVal_CopyDoc) + { + retval=handleDocCopy(this,m_children); + } } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Subsection && @@ -5460,7 +5501,6 @@ int DocPara::handleCommand(const QCString &cmdName) 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"); doctokenizerYYsetStatePara(); - VhdlDocGen::createFlowChart(g_memberDef); } break; case CMD_ENDCODE: @@ -5522,34 +5562,7 @@ int DocPara::handleCommand(const QCString &cmdName) case CMD_COPYDOC: // fall through case CMD_COPYBRIEF: // fall through case CMD_COPYDETAILS: - { - int tok=doctokenizerYYlex(); - if (tok!=TK_WHITESPACE) - { - 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", 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),qPrint(cmdName)); - break; - } - DocCopy *cpy = new DocCopy(this,g_token->name, - cmdId==CMD_COPYDOC || cmdId==CMD_COPYBRIEF, - cmdId==CMD_COPYDOC || cmdId==CMD_COPYDETAILS); - //m_children.append(cpy); - cpy->parse(m_children); - delete cpy; - } + retval = RetVal_CopyDoc; break; case CMD_INCLUDE: handleInclude(cmdName,DocInclude::Include); @@ -6442,7 +6455,7 @@ reparsetoken: } // handle the command - retval=handleCommand(g_token->name.copy()); + retval=handleCommand(g_token->name); DBG(("handleCommand returns %x\n",retval)); // check the return value @@ -6613,12 +6626,16 @@ int DocSection::parse() { warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: Invalid list item found"); } + else if (retval==RetVal_CopyDoc) + { + retval=handleDocCopy(this,m_children); + } } while (retval!=0 && retval!=RetVal_Internal && retval!=RetVal_Section && retval!=RetVal_Subsection && retval!=RetVal_Subsubsection && - retval!=RetVal_Paragraph + retval!=RetVal_Paragraph ); if (lastPar) lastPar->markLast(); @@ -6829,6 +6846,10 @@ void DocRoot::parse() { warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: found paragraph command outside of subsubsection context!"); } + else if (retval==RetVal_CopyDoc) + { + retval=handleDocCopy(this,m_children); + } } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal); if (lastPar) lastPar->markLast(); diff --git a/src/docparser.h b/src/docparser.h index cd51522..7279d21 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docsets.cpp b/src/docsets.cpp index dc483d3..1ba865a 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/docsets.h b/src/docsets.h index 2fa0125..c5f0dc7 100644 --- a/src/docsets.h +++ b/src/docsets.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/doctokenizer.h b/src/doctokenizer.h index 5036f19..048558e 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -60,7 +60,8 @@ enum Tokens RetVal_Internal = 0x10011, RetVal_SwitchLang = 0x10012, RetVal_CloseXml = 0x10013, - RetVal_EndBlockQuote = 0x10014 + RetVal_EndBlockQuote = 0x10014, + RetVal_CopyDoc = 0x10015 }; /** @brief Data associated with a token used by the comment block parser. */ diff --git a/src/doctokenizer.l b/src/doctokenizer.l index d2b5123..6bc541e 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -353,7 +353,8 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&] FUNCCHAR [a-z_A-Z0-9,:\<\> \t\^\*\&\[\]] SCOPESEP "::"|"#"|"." TEMPLPART "<"{TEMPCHAR}*">" -SCOPEPRE {ID}{TEMPLPART}?{SCOPESEP} +ANONNS "anonymous_namespace{"[^}]*"}" +SCOPEPRE (({ID}{TEMPLPART}?)|{ANONNS}){SCOPESEP} SCOPEKEYS ":"({ID}":")* SCOPECPP {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")? SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}? @@ -379,7 +380,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" HTMLKEYW {HTMLKEYL}|{HTMLKEYU} -REFWORD2 ("#"|"::")?({ID}{TEMPLPART}?("."|"#"|"::"|"-"|"/"))*({ID}(":")?){FUNCARG}? +REFWORD2 ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}(":")?){FUNCARG}? REFWORD3 ({ID}":")*{ID}":"? REFWORD {LABELID}|{REFWORD2}|{REFWORD3} @@ -1091,13 +1092,13 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} BEGIN(St_SecSkip); } <St_SecSkip>{CMD}{ID} { - if (strcmp(yytext+1,g_endMarker)==0) + if (qstrcmp(yytext+1,g_endMarker)==0) { BEGIN(St_Sections); } } <St_SecSkip>"-->" { - if (strcmp(yytext,g_endMarker)==0) + if (qstrcmp(yytext,g_endMarker)==0) { BEGIN(St_Sections); } diff --git a/src/docvisitor.h b/src/docvisitor.h index 104dce0..312b05d 100644 --- a/src/docvisitor.h +++ b/src/docvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/dot.cpp b/src/dot.cpp index 0866768..f6d091a 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -573,7 +573,7 @@ static bool readSVGSize(const QCString &fileName,int *width,int *height) if (numBytes>0) { buf[numBytes]='\0'; - if (strncmp(buf,"<!--zoomable ",13)==0) + if (qstrncmp(buf,"<!--zoomable ",13)==0) { *width=-1; *height=-1; @@ -771,7 +771,7 @@ class DotNodeList : public QList<DotNode> ~DotNodeList() {} int compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label); + return qstricmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label); } }; @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 916c64d..f88972f 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -3263,12 +3263,17 @@ static void buildFunctionList(EntryNav *rootNav) // in case of template functions, we need to check if the // functions have the same number of template parameters bool sameNumTemplateArgs = TRUE; + bool matchingReturnTypes = TRUE; if (mdTempl!=0 && root->tArgLists) { if (mdTempl->count()!=root->tArgLists->getLast()->count()) { sameNumTemplateArgs = FALSE; } + if (md->typeString()!=removeRedundantWhiteSpace(root->type)) + { + matchingReturnTypes = FALSE; + } } bool staticsInDifferentFiles = @@ -3279,6 +3284,7 @@ static void buildFunctionList(EntryNav *rootNav) rnd ? rnd : Doxygen::globalScope,rfd,root->argList, FALSE) && sameNumTemplateArgs && + matchingReturnTypes && !staticsInDifferentFiles ) { @@ -4517,10 +4523,22 @@ static bool findClassRelation( usedName=biName; //printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data()); } - if (Config_getBool("SIP_SUPPORT")) bi->prot=Public; - cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec); - // add this class as super class to the base class - baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec); + static bool sipSupport = Config_getBool("SIP_SUPPORT"); + if (sipSupport) bi->prot=Public; + if (!cd->isSubClass(baseClass)) // check for recursion, see bug690787 + { + cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec); + // add this class as super class to the base class + baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec); + } + else + { + warn(root->fileName,root->startLine, + "Detected potential recursive class relation " + "between class %s and base class %s!", + cd->name().data(),baseClass->name().data() + ); + } } return TRUE; } @@ -5131,6 +5149,7 @@ static ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd, static bool findGlobalMember(EntryNav *rootNav, const QCString &namespaceName, + const char *type, const char *name, const char *tempArg, const char *, @@ -5138,8 +5157,8 @@ static bool findGlobalMember(EntryNav *rootNav, { Entry *root = rootNav->entry(); Debug::print(Debug::FindMembers,0, - "2. findGlobalMember(namespace=%s,name=%s,tempArg=%s,decl=%s)\n", - namespaceName.data(),name,tempArg,decl); + "2. findGlobalMember(namespace=%s,type=%s,name=%s,tempArg=%s,decl=%s)\n", + namespaceName.data(),type,name,tempArg,decl); QCString n=name; if (n.isEmpty()) return FALSE; if (n.find("::")!=-1) return FALSE; // skip undefined class members @@ -5150,7 +5169,7 @@ static bool findGlobalMember(EntryNav *rootNav, } if (mn) // function name defined { - Debug::print(Debug::FindMembers,0,"3. Found function scope\n"); + Debug::print(Debug::FindMembers,0,"3. Found symbol scope\n"); //int count=0; MemberNameIterator mni(*mn); MemberDef *md; @@ -5222,6 +5241,19 @@ static bool findGlobalMember(EntryNav *rootNav, matching = FALSE; } + // for template member we also need to check the return type + if (md->templateArguments()!=0 && root->tArgLists!=0) + { + //printf("Comparing return types '%s'<->'%s'\n", + // md->typeString(),type); + if (md->templateArguments()->count()!=root->tArgLists->last()->count() || + qstrcmp(md->typeString(),type)!=0) + { + //printf(" ---> no matching\n"); + matching = FALSE; + } + } + if (matching) // add docs to the member { Debug::print(Debug::FindMembers,0,"5. Match found\n"); @@ -5260,7 +5292,7 @@ static bool findGlobalMember(EntryNav *rootNav, ) { warn(root->fileName,root->startLine, - "warning: documented function `%s' was not declared or defined.",decl + "warning: documented symbol `%s' was not declared or defined.",decl ); } } @@ -5847,6 +5879,21 @@ static void findMember(EntryNav *rootNav, matching = FALSE; // don't match methods and attributes with the same name } + // for template member we also need to check the return type + if (md->templateArguments()!=0 && root->tArgLists!=0) + { + //printf("Comparing return types '%s'<->'%s' args %d<->%d\n", + // md->typeString(),funcType.data(), + // md->templateArguments()->count(),root->tArgLists->last()->count()); + if (md->templateArguments()->count()!=root->tArgLists->last()->count() || + qstrcmp(md->typeString(),funcType)) + { + //printf(" ---> no matching\n"); + matching = FALSE; + } + } + + Debug::print(Debug::FindMembers,0, "6. match results of matchArguments2 = %d\n",matching); @@ -6131,7 +6178,7 @@ static void findMember(EntryNav *rootNav, } else // unrelated function with the same name as a member { - if (!findGlobalMember(rootNav,namespaceName,funcName,funcTempList,funcArgs,funcDecl)) + if (!findGlobalMember(rootNav,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl)) { QCString fullFuncDecl=funcDecl.copy(); if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); @@ -6338,7 +6385,7 @@ static void findMember(EntryNav *rootNav, } if (root->relatesType == Duplicate) { - if (!findGlobalMember(rootNav,namespaceName,funcName,funcTempList,funcArgs,funcDecl)) + if (!findGlobalMember(rootNav,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl)) { QCString fullFuncDecl=funcDecl.copy(); if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE); @@ -6412,7 +6459,7 @@ localObjCMethod: } else // unrelated not overloaded member found { - bool globMem = findGlobalMember(rootNav,namespaceName,funcName,funcTempList,funcArgs,funcDecl); + bool globMem = findGlobalMember(rootNav,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl); if (className.isEmpty() && !globMem) { warn(root->fileName,root->startLine, @@ -6927,6 +6974,17 @@ static void addEnumValuesToEnums(EntryNav *rootNav) fmd->setAnchor(); md->insertEnumField(fmd); fmd->setEnumScope(md); + MemberName *mn=mnsd->find(root->name); + if (mn) + { + mn->append(fmd); + } + else + { + mn = new MemberName(root->name); + mn->append(fmd); + mnsd->append(root->name,mn); + } } e->releaseEntry(); } @@ -8573,7 +8631,7 @@ static void generateConfigFile(const char *configFile,bool shortList, { msg("\n\nConfiguration file `%s' created.\n\n",configFile); msg("Now edit the configuration file and enter\n\n"); - if (strcmp(configFile,"Doxyfile") || strcmp(configFile,"doxyfile")) + if (qstrcmp(configFile,"Doxyfile") || qstrcmp(configFile,"doxyfile")) msg(" doxygen %s\n\n",configFile); else msg(" doxygen\n\n"); @@ -8730,7 +8788,15 @@ static void parseFiles(Entry *root,EntryNav *rootNav) QCString fileName=*s; QCString extension; int ei = fileName.findRev('.'); - if (ei!=-1) extension=fileName.right(fileName.length()-ei); + if (ei!=-1) + { + extension=fileName.right(fileName.length()-ei); + } + else + { + extension = ".no_extension"; + } + ParserInterface *parser = Doxygen::parserManager->getParser(extension); QFileInfo fi(fileName); @@ -9223,7 +9289,7 @@ void dumpConfigAsXML() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2012\n\n",versionString); + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2013\n\n",versionString); msg("You can use doxygen in a number of ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); @@ -9255,7 +9321,7 @@ static void usage(const char *name) static const char *getArg(int argc,char **argv,int &optind) { char *s=0; - if (strlen(&argv[optind][2])>0) + if (qstrlen(&argv[optind][2])>0) s=&argv[optind][2]; else if (optind+1<argc && argv[optind+1][0]!='-') s=argv[++optind]; @@ -9434,7 +9500,7 @@ void readConfiguration(int argc, char **argv) case 'g': genConfig=TRUE; configName=getArg(argc,argv,optind); - if (strcmp(argv[optind+1],"-")==0) + if (optind+1<argc && qstrcmp(argv[optind+1],"-")==0) { configName="-"; optind++; } if (!configName) { configName="Doxyfile"; } @@ -9463,7 +9529,7 @@ void readConfiguration(int argc, char **argv) cleanUpDoxygen(); exit(1); } - if (stricmp(formatName,"rtf")==0) + if (qstricmp(formatName,"rtf")==0) { if (optind+1>=argc) { @@ -9491,7 +9557,7 @@ void readConfiguration(int argc, char **argv) cleanUpDoxygen(); exit(1); } - if (stricmp(formatName,"rtf")==0) + if (qstricmp(formatName,"rtf")==0) { if (optind+1>=argc) { @@ -9507,7 +9573,7 @@ void readConfiguration(int argc, char **argv) cleanUpDoxygen(); exit(1); } - else if (stricmp(formatName,"html")==0) + else if (qstricmp(formatName,"html")==0) { if (optind+4<argc || QFileInfo("Doxyfile").exists()) { @@ -9561,7 +9627,7 @@ void readConfiguration(int argc, char **argv) cleanUpDoxygen(); exit(0); } - else if (stricmp(formatName,"latex")==0) + else if (qstricmp(formatName,"latex")==0) { if (optind+4<argc) // use config file to get settings { @@ -9624,11 +9690,11 @@ void readConfiguration(int argc, char **argv) g_dumpConfigAsXML = TRUE; break; case '-': - if (strcmp(&argv[optind][2],"help")==0) + if (qstrcmp(&argv[optind][2],"help")==0) { usage(argv[0]); } - else if (strcmp(&argv[optind][2],"version")==0) + else if (qstrcmp(&argv[optind][2],"version")==0) { msg("%s\n",versionString); cleanUpDoxygen(); @@ -9699,7 +9765,7 @@ void readConfiguration(int argc, char **argv) else { QFileInfo fi(argv[optind]); - if (fi.exists() || strcmp(argv[optind],"-")==0) + if (fi.exists() || qstrcmp(argv[optind],"-")==0) { configName=argv[optind]; } @@ -10060,9 +10126,10 @@ void parseInput() int cacheSize = Config_getInt("SYMBOL_CACHE_SIZE"); if (cacheSize<0) cacheSize=0; if (cacheSize>9) cacheSize=9; - Doxygen::symbolCache = new ObjCache(16+cacheSize); // 16 -> room for 65536 elements, - // ~2.0 MByte "overhead" + //Doxygen::symbolCache = new ObjCache(16+cacheSize); // 16 -> room for 65536 elements, + // // ~2.0 MByte "overhead" //Doxygen::symbolCache = new ObjCache(1); // only to stress test cache behaviour + Doxygen::symbolCache = 0; //disable cache Doxygen::symbolStorage = new Store; // also scale lookup cache with SYMBOL_CACHE_SIZE diff --git a/src/doxygen.h b/src/doxygen.h index 9ead4c1..35c92ca 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 42ffaa0..3bd617e 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby @@ -26,7 +26,7 @@ win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk win32:TMAKE_CXXFLAGS += -DQT_NODLL -win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread +win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread -Wl,--as-needed -lole32 win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti INCLUDEPATH += ../qtools ../libmd5 . DESTDIR = ../bin diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp index df65a13..213b0fa 100644 --- a/src/eclipsehelp.cpp +++ b/src/eclipsehelp.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h index 3be7fc0..c21c4ae 100644 --- a/src/eclipsehelp.h +++ b/src/eclipsehelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/entry.cpp b/src/entry.cpp index cf3634b..06e1a5f 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/entry.h b/src/entry.h index 60ba372..dac1e78 100644 --- a/src/entry.h +++ b/src/entry.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/example.h b/src/example.h index 4bcaeb9..8a2b529 100644 --- a/src/example.h +++ b/src/example.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -40,7 +40,7 @@ class ExampleSDict : public SDict<Example> ~ExampleSDict() {} int compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((Example *)item1)->name,((Example *)item2)->name); + return qstricmp(((Example *)item1)->name,((Example *)item2)->name); } }; diff --git a/src/filedef.cpp b/src/filedef.cpp index 331c792..ccf419e 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/filedef.h b/src/filedef.h index adf0f49..1d037d5 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -236,7 +236,7 @@ class FileList : public QList<FileDef> { FileDef *md1 = (FileDef *)item1; FileDef *md2 = (FileDef *)item2; - return stricmp(md1->name(),md2->name()); + return qstricmp(md1->name(),md2->name()); } private: QCString m_pathName; @@ -251,7 +251,7 @@ class OutputNameList : public QList<FileList> { FileList *fl1 = (FileList *)item1; FileList *fl2 = (FileList *)item2; - return stricmp(fl1->path(),fl2->path()); + return qstricmp(fl1->path(),fl2->path()); } }; diff --git a/src/filename.cpp b/src/filename.cpp index 2b0dffe..e5c5ca5 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -102,7 +102,7 @@ int FileName::compareItems(QCollection::Item item1, QCollection::Item item2) { FileName *f1=(FileName *)item1; FileName *f2=(FileName *)item2; - return stricmp(f1->fileName(),f2->fileName()); + return qstricmp(f1->fileName(),f2->fileName()); } FileNameIterator::FileNameIterator(const FileName &fname) : @@ -135,8 +135,8 @@ int FileNameList::compareItems(QCollection::Item item1, QCollection::Item item2) //printf("FileNameList::compareItems `%s'<->`%s'\n", // f1->fileName(),f2->fileName()); return Config_getBool("FULL_PATH_NAMES") ? - stricmp(f1->fullName(),f2->fullName()) : - stricmp(f1->fileName(),f2->fileName()); + qstricmp(f1->fullName(),f2->fullName()) : + qstricmp(f1->fileName(),f2->fileName()); } FileNameListIterator::FileNameListIterator(const FileNameList &fnlist) : diff --git a/src/filename.h b/src/filename.h index e038659..1cd160c 100644 --- a/src/filename.h +++ b/src/filename.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/filestorage.h b/src/filestorage.h index ddffeda..a6ee5b4 100644 --- a/src/filestorage.h +++ b/src/filestorage.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/footer.html b/src/footer.html index 80222ad..d2aa9e6 100644 --- a/src/footer.html +++ b/src/footer.html @@ -5,14 +5,14 @@ $navpath <li class="footer">$generatedby <a href="http://www.doxygen.org/index.html"> - <img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li> + <img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li> </ul> </div> <!--END GENERATE_TREEVIEW--> <!--BEGIN !GENERATE_TREEVIEW--> <hr class="footer"/><address class="footer"><small> $generatedby  <a href="http://www.doxygen.org/index.html"> -<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/> +<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/> </a> $doxygenversion </small></address> <!--END !GENERATE_TREEVIEW--> diff --git a/src/footer_html.h b/src/footer_html.h index b193c41..2891692 100644 --- a/src/footer_html.h +++ b/src/footer_html.h @@ -5,14 +5,14 @@ " $navpath\n" " <li class=\"footer\">$generatedby\n" " <a href=\"http://www.doxygen.org/index.html\">\n" -" <img class=\"footer\" src=\"$relpath$doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n" +" <img class=\"footer\" src=\"$relpath^doxygen.png\" alt=\"doxygen\"/></a> $doxygenversion </li>\n" " </ul>\n" "</div>\n" "<!--END GENERATE_TREEVIEW-->\n" "<!--BEGIN !GENERATE_TREEVIEW-->\n" "<hr class=\"footer\"/><address class=\"footer\"><small>\n" "$generatedby  <a href=\"http://www.doxygen.org/index.html\">\n" -"<img class=\"footer\" src=\"$relpath$doxygen.png\" alt=\"doxygen\"/>\n" +"<img class=\"footer\" src=\"$relpath^doxygen.png\" alt=\"doxygen\"/>\n" "</a> $doxygenversion\n" "</small></address>\n" "<!--END !GENERATE_TREEVIEW-->\n" diff --git a/src/formula.cpp b/src/formula.cpp index a1f2328..ef2d5f2 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/formula.h b/src/formula.h index 553ee77..79821bf 100644 --- a/src/formula.h +++ b/src/formula.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fortrancode.h b/src/fortrancode.h index 45b3333..7f59920 100644 --- a/src/fortrancode.h +++ b/src/fortrancode.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fortrancode.l b/src/fortrancode.l index b598b73..cb8ad4e 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -53,6 +53,20 @@ #define YY_NEVER_INTERACTIVE 1 #define YY_NO_TOP_STATE 1 #define YY_NO_INPUT 1 + +/* + * For fixed formatted code position 6 is of importance (continuation character). + * The following variables and macros keep track of the column number + * YY_USER_ACTION is always called for each scan action + * YY_FTN_REST is used to handle end of lines and reset the column counter + * YY_FTN_REJECT resets the column counters when a pattern is rejected and thus rescanned. + */ +int yy_old_start = 0; +int yy_my_start = 0; +int yy_end = 1; +#define YY_USER_ACTION {yy_old_start = yy_my_start; yy_my_start = yy_end; yy_end += yyleng;} +#define YY_FTN_RESET {yy_old_start = 0; yy_my_start = 0; yy_end = 1;} +#define YY_FTN_REJECT {yy_end = yy_my_start; yy_my_start = yy_old_start; REJECT;} //-------------------------------------------------------------------------------- @@ -680,8 +694,8 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS_}COMPLEX|DOUBLE{BS_}PRECISION|{CHAR}) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" -ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|ELEMENTAL) -ACCESS_SPEC (PRIVATE|PUBLIC) +ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|ELEMENTAL) +ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC) /* Assume that attribute statements are almost the same as attributes. */ ATTR_STMT {ATTR_SPEC}|DIMENSION FLOW (DO|SELECT|CASE|WHERE|IF|THEN|ELSE|WHILE|FORALL|ELSEWHERE|ELSEIF|RETURN|CONTINUE|EXIT) @@ -729,6 +743,10 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA endFontClass(); } <Start>{FLOW}/[,( \t\n].* { + if (g_isFixedForm) + { + if ((yy_my_start == 1) && ((yytext[0] == 'c') || (yytext[0] == 'C'))) YY_FTN_REJECT; + } /* font class is defined e.g. in doxygen.css */ startFontClass("keywordflow"); codifyLines(yytext); @@ -777,7 +795,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA BEGIN(UseOnly); } <UseOnly>{BS},{BS} { codifyLines(yytext); } -<UseOnly>{BS}&{BS}"\n" { codifyLines(yytext); } +<UseOnly>{BS}&{BS}"\n" { codifyLines(yytext); YY_FTN_RESET} <UseOnly>{ID} { g_insideBody=TRUE; generateLink(*g_code, yytext); @@ -786,7 +804,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA } <Use,UseOnly>"\n" { unput(*yytext); - yy_pop_state(); + yy_pop_state();YY_FTN_RESET } /*-------- fortran module -----------------------------------------*/ @@ -797,7 +815,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA endFontClass(); yy_push_state(YY_START); BEGIN(ClassName); - if (!stricmp(yytext,"module")) currentModule="module"; + if (!qstricmp(yytext,"module")) currentModule="module"; } <ClassName>{ID} { if (currentModule == "module") @@ -810,11 +828,11 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA } <ClassName>\n { // interface may be without name yy_pop_state(); - REJECT; + YY_FTN_REJECT; } <Start>"end"({BS_}"module").* { // just reset currentModule, rest is done in following rule currentModule=0; - REJECT; + YY_FTN_REJECT; } /*-------- subprog definition -------------------------------------*/ <Start>({PREFIX}{BS_})?{TYPE_SPEC}{BS_}({PREFIX}{BS_})?{BS}/{SUBPROG}{BS_} { // TYPE_SPEC is for old function style function result @@ -839,6 +857,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA } <Subprog,Subprogend>"\n" { codifyLines(yytext); yy_pop_state(); + YY_FTN_RESET } <Start>^{BS}"end"{BS}("block"{BS}"data"|{SUBPROG}|"module"|"program"|"type"|"interface"){BS} { // Fortran subroutine or function ends //cout << "===> end function " << yytext << endl; @@ -926,11 +945,13 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA codifyLines(yytext); bracketCount = 0; yy_pop_state(); + YY_FTN_RESET } <Declaration>"\n" { // end declaration line codifyLines(yytext); bracketCount = 0; yy_pop_state(); + YY_FTN_RESET } /*-------- subprog calls -----------------------------------------*/ @@ -954,6 +975,14 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA /*-------- comments ---------------------------------------------------*/ <Start>\n?{BS}"!>"|"!<" { // start comment line or comment block + if (yytext[0] == '\n') + { + yy_old_start = 0; + yy_my_start = 1; + yy_end = yyleng; + } + // Actually we should see if ! on position 6, can be continuation + // but the chance is very unlikely, so no effort to solve it here yy_push_state(YY_START); BEGIN(DocBlock); docBlock=yytext; @@ -967,7 +996,12 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA <DocBlock>.* { // contents of current comment line docBlock+=yytext; } -<DocBlock>"\n"{BS}("!>"|"!<"|"!!") { //| comment block (next line is also comment line) +<DocBlock>"\n"{BS}("!>"|"!<"|"!!") { // comment block (next line is also comment line) + yy_old_start = 0; + yy_my_start = 1; + yy_end = yyleng; + // Actually we should see if ! on position 6, can be continuation + // but the chance is very unlikely, so no effort to solve it here docBlock+=yytext; } <DocBlock>"\n" { // comment block ends at the end of this line @@ -989,17 +1023,19 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA endFontClass(); } yy_pop_state(); + YY_FTN_RESET } <*>"!"[^><\n].*|"!"$ { // normal comment - if(YY_START == String) REJECT; // ignore in strings + if(YY_START == String) YY_FTN_REJECT; // ignore in strings + if (g_isFixedForm && yy_my_start == 6) YY_FTN_REJECT; startFontClass("comment"); codifyLines(yytext); endFontClass(); } <*>^[Cc*].* { // normal comment - if(! g_isFixedForm) REJECT; + if(! g_isFixedForm) YY_FTN_REJECT; startFontClass("comment"); codifyLines(yytext); @@ -1007,9 +1043,12 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA } /*------ preprocessor --------------------------------------------*/ -<Start>"#".*\n { startFontClass("preprocessor"); +<Start>"#".*\n { + if (g_isFixedForm && yy_my_start == 6) YY_FTN_REJECT; + startFontClass("preprocessor"); codifyLines(yytext); endFontClass(); + YY_FTN_RESET } /*------ variable references? -------------------------------------*/ @@ -1031,9 +1070,10 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA codifyLines(str); endFontClass(); str = ""; + YY_FTN_RESET } <String>\"|\' { // string ends with next quote without previous backspace - if(yytext[0]!=stringStartSymbol) REJECT; // single vs double quote + if(yytext[0]!=stringStartSymbol) YY_FTN_REJECT; // single vs double quote str+=yytext; startFontClass("stringliteral"); codifyLines(str); @@ -1043,7 +1083,8 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA <String>. {str+=yytext;} <*>\"|\' { /* string starts */ - /* if(YY_START == StrIgnore) REJECT; // ignore in simple comments */ + /* if(YY_START == StrIgnore) YY_FTN_REJECT; // ignore in simple comments */ + if (g_isFixedForm && yy_my_start == 6) YY_FTN_REJECT; yy_push_state(YY_START); stringStartSymbol=yytext[0]; // single or double quote BEGIN(String); @@ -1053,6 +1094,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA <*>\n { codifyLines(yytext); + YY_FTN_RESET } <*>. { g_code->codify(yytext); diff --git a/src/fortranscanner.h b/src/fortranscanner.h index d904b87..83f7c3e 100644 --- a/src/fortranscanner.h +++ b/src/fortranscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 3a7a8c1..d59b32b 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -74,7 +74,7 @@ enum InterfaceType { IF_NONE, IF_SPECIFIC, IF_GENERIC, IF_ABSTRACT }; // {{{ ----- Helper structs ----- //! Holds modifiers (ie attributes) for one symbol (variable, function, etc) struct SymbolModifiers { - enum Protection {NONE_P, PUBLIC, PRIVATE}; + enum Protection {NONE_P, PUBLIC, PRIVATE, PROTECTED}; enum Direction {NONE_D, IN, OUT, INOUT}; //!< This is only used with function return value. @@ -252,8 +252,8 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS_}COMPLEX|DOUBLE{BS_}PRECISION|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" -ATTR_SPEC (ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE) -ACCESS_SPEC (PRIVATE|PUBLIC) +ATTR_SPEC (ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE) +ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC) LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")" /* Assume that attribute statements are almost the same as attributes. */ ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC} @@ -545,6 +545,9 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA /*------- access specification --------------------------------------------------------------------------*/ +<ModuleBody>protected/{BS}(\n|"!") { defaultProtection = Protected; + current->protection = defaultProtection ; + } <ModuleBody>private/{BS}(\n|"!") { defaultProtection = Private; current->protection = defaultProtection ; } @@ -586,6 +589,10 @@ private { current->protection = Private; typeProtection = Private; } +protected { + current->protection = Protected; + typeProtection = Protected; + } {LANGUAGE_BIND_SPEC} { /* ignored for now */ } @@ -1527,6 +1534,10 @@ SymbolModifiers& SymbolModifiers::operator|=(QCString mdfString) { newMdf.protection = SymbolModifiers::PRIVATE; } + else if (mdfString=="protected") + { + newMdf.protection = SymbolModifiers::PROTECTED; + } else if (mdfString=="optional") { newMdf.optional = TRUE; @@ -1717,6 +1728,11 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs) if (!typeName.isEmpty()) typeName += ", "; typeName += "private"; } + else if (mdfs.protection == SymbolModifiers::PROTECTED) + { + if (!typeName.isEmpty()) typeName += ", "; + typeName += "protected"; + } return typeName; } @@ -1738,6 +1754,8 @@ static void applyModifiers(Entry *ent, SymbolModifiers& mdfs) ent->protection = Public; else if (mdfs.protection == SymbolModifiers::PRIVATE) ent->protection = Private; + else if (mdfs.protection == SymbolModifiers::PROTECTED) + ent->protection = Protected; } /*! Starts the new scope in fortran program. Consider using this function when diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 5727647..dd3c3d1 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * ftvhelp.cpp,v 1.0 2000/09/06 16:09:00 * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/ftvhelp.h b/src/ftvhelp.h index d3ba3b9..9794d8b 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 96f839e..ef73830 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -89,7 +89,7 @@ GroupDef::~GroupDef() void GroupDef::setGroupTitle( const char *t ) { - if ( t && strlen(t) ) + if ( t && qstrlen(t) ) { title = t; titleSet = TRUE; diff --git a/src/groupdef.h b/src/groupdef.h index 3978397..bd53ff5 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -161,7 +161,7 @@ class GroupSDict : public SDict<GroupDef> virtual ~GroupSDict() {} int compareItems(QCollection::Item item1,QCollection::Item item2) { - return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle()); + return qstrcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle()); } }; @@ -171,7 +171,7 @@ class GroupList : public QList<GroupDef> public: int compareItems(QCollection::Item item1,QCollection::Item item2) { - return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle()); + return qstrcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle()); } }; diff --git a/src/header.html b/src/header.html index 0a0194b..70305df 100644 --- a/src/header.html +++ b/src/header.html @@ -6,13 +6,13 @@ <meta name="generator" content="Doxygen $doxygenversion"/> <!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME--> <!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME--> -<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/> -<script type="text/javascript" src="$relpath$jquery.js"></script> -<script type="text/javascript" src="$relpath$dynsections.js"></script> +<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="$relpath^jquery.js"></script> +<script type="text/javascript" src="$relpath^dynsections.js"></script> $treeview $search $mathjax -<link href="$relpath$$stylesheet" rel="stylesheet" type="text/css" /> +<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" /> $extrastylesheet </head> <body> @@ -24,7 +24,7 @@ $extrastylesheet <tbody> <tr style="height: 56px;"> <!--BEGIN PROJECT_LOGO--> - <td id="projectlogo"><img alt="Logo" src="$relpath$$projectlogo"/></td> + <td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td> <!--END PROJECT_LOGO--> <!--BEGIN PROJECT_NAME--> <td style="padding-left: 0.5em;"> diff --git a/src/header_html.h b/src/header_html.h index 505960a..62960d6 100644 --- a/src/header_html.h +++ b/src/header_html.h @@ -6,13 +6,13 @@ "<meta name=\"generator\" content=\"Doxygen $doxygenversion\"/>\n" "<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->\n" "<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->\n" -"<link href=\"$relpath$tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" -"<script type=\"text/javascript\" src=\"$relpath$jquery.js\"></script>\n" -"<script type=\"text/javascript\" src=\"$relpath$dynsections.js\"></script>\n" +"<link href=\"$relpath^tabs.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" +"<script type=\"text/javascript\" src=\"$relpath^jquery.js\"></script>\n" +"<script type=\"text/javascript\" src=\"$relpath^dynsections.js\"></script>\n" "$treeview\n" "$search\n" "$mathjax\n" -"<link href=\"$relpath$$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n" +"<link href=\"$relpath^$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n" "$extrastylesheet\n" "</head>\n" "<body>\n" @@ -24,7 +24,7 @@ " <tbody>\n" " <tr style=\"height: 56px;\">\n" " <!--BEGIN PROJECT_LOGO-->\n" -" <td id=\"projectlogo\"><img alt=\"Logo\" src=\"$relpath$$projectlogo\"/></td>\n" +" <td id=\"projectlogo\"><img alt=\"Logo\" src=\"$relpath^$projectlogo\"/></td>\n" " <!--END PROJECT_LOGO-->\n" " <!--BEGIN PROJECT_NAME-->\n" " <td style=\"padding-left: 0.5em;\">\n" diff --git a/src/htags.cpp b/src/htags.cpp index 2acceb8..896f304 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htags.h b/src/htags.h index 4a164a6..474b098 100644 --- a/src/htags.h +++ b/src/htags.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlattrib.h b/src/htmlattrib.h index b391861..6e9b62d 100644 --- a/src/htmlattrib.h +++ b/src/htmlattrib.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 3c06837..3b3bb31 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -478,31 +478,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s) if (Config_getBool("DOT_CLEANUP")) file.remove(); } break; -#if 0 - case DocVerbatim::Vhdf: - if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator - { - QCString fname=FlowNode::convertNameToFileName(); - // fprintf(stderr,"\n create flow mem %s \n",fname.data()); - //m_t << "<div align=\"left\">" << endl; // TODO: use CSS - m_t << "<p>"; - m_t << "flowchart: " ; // TODO: translate me - m_t << "<a href=\""; - m_t << fname.data(); - m_t << ".svg\">"; - m_t << VhdlDocGen::getFlowMember()->name().data(); - m_t << "</a>"; - if (!s->text().isEmpty()) - { - m_t << "<br/>"; - m_t << s->text().data(); - } - m_t << "</p>"; - VhdlDocGen::setFlowMember(NULL); - } - break; -#endif - case DocVerbatim::Msc: + case DocVerbatim::Msc: { forceEndParagraph(s); @@ -1796,7 +1772,7 @@ void HtmlDocVisitor::visitPre(DocVhdlFlow *vf) if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator { forceEndParagraph(vf); - QCString fname=FlowNode::convertNameToFileName(); + QCString fname=FlowChart::convertNameToFileName(); m_t << "<p>"; m_t << "flowchart: " ; // TODO: translate me m_t << "<a href=\""; @@ -1880,6 +1856,7 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file, const QCString &relPath,const QCString &anchor, const QCString &tooltip) { + //printf("HtmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data()); if (!ref.isEmpty()) // link to entity imported via tag file { m_t << "<a class=\"elRef\" "; diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h index 150493b..3624224 100644 --- a/src/htmldocvisitor.h +++ b/src/htmldocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 90d9f84..f19f5d6 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -804,7 +804,7 @@ static void writeImgData(const char *dir,img_data_item *data) if (f.open(IO_WriteOnly)) { f.writeBlock((char*)data->content, - data->len>0 ? data->len : strlen((char*)data->content)); + data->len>0 ? data->len : qstrlen((char*)data->content)); } else { @@ -912,18 +912,18 @@ QCString substitute(const char *s,const char *src,const char *dst) { if (s==0 || src==0) return s; const char *p, *q; - int srcLen = strlen(src); - int dstLen = dst ? strlen(dst) : 0; + int srcLen = qstrlen(src); + int dstLen = dst ? qstrlen(dst) : 0; int resLen; if (srcLen!=dstLen) { int count; for (count=0, p=s; (q=strstr(p,src))!=0; p=q+srcLen) count++; - resLen = (int)(p-s)+strlen(p)+count*(dstLen-srcLen); + resLen = (int)(p-s)+qstrlen(p)+count*(dstLen-srcLen); } else // result has same size as s { - resLen = strlen(s); + resLen = qstrlen(s); } QCString result(resLen+1); char *r; @@ -935,7 +935,7 @@ QCString substitute(const char *s,const char *src,const char *dst) if (dst) memcpy(r,dst,dstLen); r+=dstLen; } - strcpy(r,p); + qstrcpy(r,p); //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); return result; } @@ -946,8 +946,8 @@ QCString clearBlock(const char *s,const char *begin,const char *end) { if (s==0 || begin==0 || end==0) return s; const char *p, *q; - int beginLen = strlen(begin); - int endLen = strlen(end); + int beginLen = qstrlen(begin); + int endLen = qstrlen(end); int resLen = 0; for (p=s; (q=strstr(p,begin))!=0; p=q+endLen) { @@ -959,7 +959,7 @@ QCString clearBlock(const char *s,const char *begin,const char *end) break; } } - resLen+=strlen(p); + resLen+=qstrlen(p); // resLen is the length of the string without the marked block QCString result(resLen+1); @@ -977,7 +977,7 @@ QCString clearBlock(const char *s,const char *begin,const char *end) break; } } - strcpy(r,p); + qstrcpy(r,p); return result; } //---------------------------------------------------------------------- @@ -1098,7 +1098,7 @@ static QCString substituteHtmlKeywords(const QCString &s, extraCssFile = Config_getString("HTML_EXTRA_STYLESHEET"); if (!extraCssFile.isEmpty()) { - extraCssText = "<link href=\"$relpath$"+stripPath(extraCssFile)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n"; + extraCssText = "<link href=\"$relpath^"+stripPath(extraCssFile)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n"; } if (timeStamp) { @@ -1110,9 +1110,9 @@ static QCString substituteHtmlKeywords(const QCString &s, if (treeView) { - treeViewCssJs = "<link href=\"$relpath$navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" - "<script type=\"text/javascript\" src=\"$relpath$resize.js\"></script>\n" - "<script type=\"text/javascript\" src=\"$relpath$navtree.js\"></script>\n" + treeViewCssJs = "<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" + "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n" + "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n" "<script type=\"text/javascript\">\n" " $(document).ready(initResizable);\n" " $(window).load(resizeHeight);\n" @@ -1121,8 +1121,8 @@ static QCString substituteHtmlKeywords(const QCString &s, if (searchEngine) { - searchCssJs = "<link href=\"$relpath$search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"; - searchCssJs += "<script type=\"text/javascript\" src=\"$relpath$search/search.js\"></script>\n"; + searchCssJs = "<link href=\"$relpath^search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"; + searchCssJs += "<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n"; if (!serverBasedSearch) { @@ -1196,7 +1196,8 @@ static QCString substituteHtmlKeywords(const QCString &s, result = substitute(result,"$mathjax",mathJaxJs); result = substitute(result,"$generatedby",generatedBy); result = substitute(result,"$extrastylesheet",extraCssText); - result = substitute(result,"$relpath$",relPath); //<-- must be last + result = substitute(result,"$relpath$",relPath); //<-- obsolete: for backwards compatibility only + result = substitute(result,"$relpath^",relPath); //<-- must be last // additional HTML only conditional blocks result = selectBlock(result,"DISABLE_INDEX",disableIndex); @@ -1361,7 +1362,7 @@ void HtmlCodeGenerator::writeCodeLink(const char *ref,const char *f, m_t << ">"; docify(name); m_t << "</a>"; - m_col+=strlen(name); + m_col+=qstrlen(name); } void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers) @@ -2926,7 +2927,7 @@ void HtmlGenerator::writeSplitBar(const char *name) void HtmlGenerator::writeNavigationPath(const char *s) { - t << substitute(s,"$relpath$",relPath); + t << substitute(s,"$relpath^",relPath); } void HtmlGenerator::startContents() @@ -3108,17 +3109,8 @@ void HtmlGenerator::writeExternalSearchPage() << "\"" << theTranslator->trSearchResults(2) << "\"];" << endl; t << "var serverUrl=\"" << Config_getString("SEARCHENGINE_URL") << "\";" << endl; t << "var tagMap = {" << endl; - // add standard tag file mappings - QDictIterator<QCString> it(Doxygen::tagDestinationDict); - QCString *dest; bool first=TRUE; - for (it.toFirst();(dest=it.current());++it) - { - if (!first) t << "," << endl; - t << " \"" << it.currentKey() << "\": \"" << *dest << "\""; - first=FALSE; - } - // add additional user specified mappings + // add search mappings QStrList &extraSearchMappings = Config_getList("EXTRA_SEARCH_MAPPINGS"); char *ml=extraSearchMappings.first(); while (ml) @@ -3129,7 +3121,7 @@ void HtmlGenerator::writeExternalSearchPage() { QCString tagName = mapLine.left(eqPos).stripWhiteSpace(); QCString destName = mapLine.right(mapLine.length()-eqPos-1).stripWhiteSpace(); - if (!tagName.isEmpty() && Doxygen::tagDestinationDict.find(tagName)==0) + if (!tagName.isEmpty()) { if (!first) t << "," << endl; t << " \"" << tagName << "\": \"" << destName << "\""; diff --git a/src/htmlgen.h b/src/htmlgen.h index 17f12fb..0328a9c 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 945a7c5..2146e2f 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -56,7 +56,7 @@ class IndexFieldSDict : public SDict<IndexField> ~IndexFieldSDict() {} int compareItems(QCollection::Item item1, QCollection::Item item2) { - return stricmp(((IndexField *)item1)->name,((IndexField *)item2)->name); + return qstricmp(((IndexField *)item1)->name,((IndexField *)item2)->name); } }; diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 4b8064d..8ccbf28 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/image.cpp b/src/image.cpp index 2293d1f..49485af 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/image.h b/src/image.h index 5fb98e6..d2311a1 100644 --- a/src/image.h +++ b/src/image.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/index.cpp b/src/index.cpp index 2f9b06a..7eed60d 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -125,7 +125,7 @@ class MemberIndexList : public QList<MemberDef> { MemberDef *md1=(MemberDef *)item1; MemberDef *md2=(MemberDef *)item2; - return stricmp(md1->name(),md2->name()); + return qstricmp(md1->name(),md2->name()); } }; @@ -1384,13 +1384,13 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(), cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd); if (addToIndex && - cd->partOfGroups()==0 && + /*cd->partOfGroups()==0 &&*/ (cd->getOuterScope()==0 || cd->getOuterScope()->definitionType()!=Definition::TypeClass ) ) { - addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor()); + addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),cd->partOfGroups()==0); } if (count>0) { @@ -1461,7 +1461,7 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv, file = nd->getOutputFileBase(); if (nd->getLanguage()==SrcLangExt_VHDL) // UGLY HACK { - file=file.replace(0,strlen("namespace"),"class"); + file=file.replace(0,qstrlen("namespace"),"class"); } } @@ -1537,7 +1537,7 @@ static void writeNamespaceIndex(OutputList &ol) ol.startIndexKey(); if (nd->getLanguage()==SrcLangExt_VHDL) { - ol.writeObjectLink(0, nd->getOutputFileBase().replace(0,strlen("namespace"),"class"),0,nd->displayName()); + ol.writeObjectLink(0, nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),0,nd->displayName()); } else { @@ -1722,7 +1722,7 @@ public: QCString n1 = c1->className(); QCString n2 = c2->className(); - return stricmp (n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2)); + return qstricmp (n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2)); } }; @@ -3907,35 +3907,38 @@ static void writeDirIndex(OutputList &ol) static void writeUserGroupStubPage(OutputList &ol,LayoutNavEntry *lne) { - ol.pushGeneratorState(); - ol.disableAllBut(OutputGenerator::Html); - startFile(ol,lne->baseFile(),0,lne->title(),HLI_UserGroup); - startTitle(ol,0); - ol.parseText(lne->title()); - endTitle(ol,0,0); - ol.startContents(); - QListIterator<LayoutNavEntry> li(lne->children()); - LayoutNavEntry *entry; - int count=0; - for (li.toFirst();(entry=li.current());++li) - { - if (entry->visible()) count++; - } - if (count>0) + if (lne->baseFile().left(9)=="usergroup") { - ol.writeString("<ul>\n"); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Html); + startFile(ol,lne->baseFile(),0,lne->title(),HLI_UserGroup); + startTitle(ol,0); + ol.parseText(lne->title()); + endTitle(ol,0,0); + ol.startContents(); + QListIterator<LayoutNavEntry> li(lne->children()); + LayoutNavEntry *entry; + int count=0; for (li.toFirst();(entry=li.current());++li) { - if (entry->visible()) + if (entry->visible()) count++; + } + if (count>0) + { + ol.writeString("<ul>\n"); + for (li.toFirst();(entry=li.current());++li) { - ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+ - fixSpaces(entry->title())+"</span></a></li>\n"); + if (entry->visible()) + { + ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+ + fixSpaces(entry->title())+"</span></a></li>\n"); + } } + ol.writeString("</ul>\n"); } - ol.writeString("</ul>\n"); + endFile(ol); + ol.popGeneratorState(); } - endFile(ol); - ol.popGeneratorState(); } //---------------------------------------------------------------------------- @@ -3945,13 +3948,14 @@ static void writeIndex(OutputList &ol) { static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + static QCString projectName = Config_getString("PROJECT_NAME"); // save old generator state ol.pushGeneratorState(); QCString projPrefix; - if (!Config_getString("PROJECT_NAME").isEmpty()) + if (!projectName.isEmpty()) { - projPrefix=Config_getString("PROJECT_NAME")+" "; + projPrefix=projectName+" "; } //-------------------------------------------------------------------- @@ -3979,8 +3983,8 @@ static void writeIndex(OutputList &ol) if (Doxygen::mainPage) { - if (/*Doxygen::mainPage->hasSubPages() || */ - (!Config_getString("PROJECT_NAME").isEmpty() && mainPageHasTitle()) + if ( + (!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0) ) // to avoid duplicate entries in the treeview { Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE); @@ -4014,7 +4018,7 @@ static void writeIndex(OutputList &ol) } else { - if (!Config_getString("PROJECT_NAME").isEmpty()) + if (!projectName.isEmpty()) { ol.startHeaderSection(); ol.startTitleHead(0); @@ -4391,18 +4395,40 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry { // prepend a ! or ^ marker to the URL to avoid tampering with it QCString url = correctURL(lne->url(),"!"); // add ! to relative URL - if (!url.isEmpty() && url.at(0)!='!') // absolute URL + bool isRelative=url.at(0)=='!'; + if (!url.isEmpty() && !isRelative) // absolute URL { url.prepend("^"); // prepend ^ to absolute URL } bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref"; - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef); + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative); } break; case LayoutNavEntry::UserGroup: if (addToIndex) { - Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE); + QCString url = correctURL(lne->url(),"!"); // add ! to relative URL + if (!url.isEmpty()) + { + if (url=="![none]") + { + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0,FALSE,FALSE); + } + else + { + bool isRelative=url.at(0)=='!'; + if (!isRelative) // absolute URL + { + url.prepend("^"); // prepend ^ to absolute URL + } + bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref"; + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative); + } + } + else + { + Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE); + } Doxygen::indexList->incContentsDepth(); needsClosing=TRUE; } diff --git a/src/index.h b/src/index.h index fa3c8fe..ae15f16 100644 --- a/src/index.h +++ b/src/index.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/language.cpp b/src/language.cpp index d7a95ca..00386e1 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -150,7 +150,7 @@ #endif #endif // !ENGLISH_ONLY -#define L_EQUAL(a) !stricmp(langName,a) +#define L_EQUAL(a) !qstricmp(langName,a) Translator *theTranslator=0; diff --git a/src/language.h b/src/language.h index 17f5800..9550cb9 100644 --- a/src/language.h +++ b/src/language.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index f3610a3..91f585c 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1665,7 +1665,16 @@ void LatexDocVisitor::startDotFile(const QCString &fileName, { m_t << "[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]"; } - m_t << "{" << baseName << "}"; + m_t << "{" << baseName; + //if (Config_getBool("USE_PDFLATEX")) + //{ + // m_t << ".pdf"; + //} + //else + //{ + // m_t << ".eps"; + //} + m_t << "}"; if (hasCaption) { @@ -1729,7 +1738,16 @@ void LatexDocVisitor::startMscFile(const QCString &fileName, { m_t << "[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]"; } - m_t << "{" << baseName << "}"; + m_t << "{" << baseName; + //if (Config_getBool("USE_PDFLATEX")) + //{ + // m_t << ".pdf"; + //} + //else + //{ + // m_t << ".eps"; + //} + m_t << "}"; if (hasCaption) { diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index 4745800..3fea33c 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 8a7555d..e06a3a2 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -983,12 +983,12 @@ void LatexGenerator::writeStyleSheetFile(QFile &f) t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); t << " doxygen"; //t << " " << theTranslator->trWrittenBy() << " "; - //t << "Dimitri van Heesch \\copyright~1997-2012"; + //t << "Dimitri van Heesch \\copyright~1997-2013"; writeDefaultStyleSheetPart2(t); t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); t << " doxygen"; //t << " << theTranslator->trWrittenBy() << " "; - //t << "Dimitri van Heesch \\copyright~1997-2012"; + //t << "Dimitri van Heesch \\copyright~1997-2013"; writeDefaultStyleSheetPart3(t); } @@ -1658,7 +1658,7 @@ void LatexGenerator::writeCodeLink(const char *ref,const char *f, { static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); - int l = strlen(name); + int l = qstrlen(name); if (col+l>80) { t << "\n "; @@ -2433,7 +2433,7 @@ void LatexGenerator::escapeLabelName(const char *s) if (s==0) return; const char *p=s; char c; - QCString result(strlen(s)+1); // worst case allocation + QCString result(qstrlen(s)+1); // worst case allocation int i; while ((c=*p++)) { @@ -2462,7 +2462,7 @@ void LatexGenerator::escapeMakeIndexChars(const char *s) if (s==0) return; const char *p=s; char c; - QCString result(strlen(s)+1); // worst case allocation + QCString result(qstrlen(s)+1); // worst case allocation int i; while ((c=*p++)) { diff --git a/src/latexgen.h b/src/latexgen.h index 76069d3..cbfdde6 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/layout.cpp b/src/layout.cpp index d1e02ac..93194c8 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -96,7 +96,8 @@ LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind, QCString LayoutNavEntry::url() const { QCString url = baseFile().stripWhiteSpace(); - if (kind()!=LayoutNavEntry::User) + if ((kind()!=LayoutNavEntry::User && kind()!=LayoutNavEntry::UserGroup) || + (kind()==LayoutNavEntry::UserGroup && url.left(9)=="usergroup")) { url+=Doxygen::htmlFileExtension; } @@ -1073,7 +1074,14 @@ class LayoutParser : public QXmlDefaultHandler } else if (kind==LayoutNavEntry::UserGroup) { - baseFile+=QCString().sprintf("%d",m_userGroupCount++); + if (!url.isEmpty()) + { + baseFile=url; + } + else + { + baseFile+=QCString().sprintf("%d",m_userGroupCount++); + } } // create new item and make it the new root m_rootNav = new LayoutNavEntry(m_rootNav,kind,kind==LayoutNavEntry::MainPage?TRUE:isVisible,baseFile,title,intro); diff --git a/src/layout.h b/src/layout.h index 830ee70..a40d0b0 100644 --- a/src/layout.h +++ b/src/layout.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxycfg.pro.in b/src/libdoxycfg.pro.in index 800c373..6a63828 100644 --- a/src/libdoxycfg.pro.in +++ b/src/libdoxycfg.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxycfg.t.in b/src/libdoxycfg.t.in index 29b1623..4f885a7 100644 --- a/src/libdoxycfg.t.in +++ b/src/libdoxycfg.t.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 39d303a..47aaa34 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/libdoxygen.t.in b/src/libdoxygen.t.in index e11e010..53628dd 100644 --- a/src/libdoxygen.t.in +++ b/src/libdoxygen.t.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2012 by Dimitri van Heesch. +# Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby diff --git a/src/lockingptr.h b/src/lockingptr.h index 5fc328d..024758f 100644 --- a/src/lockingptr.h +++ b/src/lockingptr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/logos.cpp b/src/logos.cpp index 120a449..6aea996 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/logos.h b/src/logos.h index 3050819..13406e1 100644 --- a/src/logos.h +++ b/src/logos.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/main.cpp b/src/main.cpp index dd1ea1e..09798ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 38a3ab3..db401bb 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h index d595644..cc4e85f 100644 --- a/src/mandocvisitor.h +++ b/src/mandocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mangen.cpp b/src/mangen.cpp index cea01ce..6d11df9 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/mangen.h b/src/mangen.h index f40d0c3..577e634 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/markdown.cpp b/src/markdown.cpp index 15b36a3..0f6a4fe 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -291,7 +291,7 @@ static int findEmphasisChar(const char *data, int size, char c, int c_size) if ((data[i]=='\\' || data[i]=='@') && // command data[i-1]!='\\' && data[i-1]!='@') // not escaped { - if (strncmp(&data[i+1],endBlockName,l)==0) + if (qstrncmp(&data[i+1],endBlockName,l)==0) { break; } @@ -960,7 +960,7 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int if ((data[i]=='\\' || data[i]=='@') && // command data[i-1]!='\\' && data[i-1]!='@') // not escaped { - if (strncmp(&data[i+1],endBlockName,l)==0) + if (qstrncmp(&data[i+1],endBlockName,l)==0) { //printf("found end at %d\n",i); out.addStr(data,i+1+l); @@ -1814,7 +1814,7 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size, data[end-1]!='\\' && data[end-1]!='@' ) { - if (strncmp(&data[end+1],endBlockName,l)==0) + if (qstrncmp(&data[end+1],endBlockName,l)==0) { if (pi!=-1) // output previous line if available { @@ -2212,10 +2212,10 @@ void MarkdownFileParser::parseInput(const char *fileName, current->lang = SrcLangExt_Markdown; current->fileName = fileName; current->docFile = fileName; - int len = strlen(fileBuf); + int len = qstrlen(fileBuf); BufStr input(len); BufStr output(len); - input.addArray(fileBuf,strlen(fileBuf)); + input.addArray(fileBuf,qstrlen(fileBuf)); input.addChar('\0'); convertCppComments(&input,&output,fileName); output.addChar('\0'); diff --git a/src/markdown.h b/src/markdown.h index f41de5e..a9f80ee 100644 --- a/src/markdown.h +++ b/src/markdown.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/marshal.h b/src/marshal.h index 3728339..49d58e4 100644 --- a/src/marshal.h +++ b/src/marshal.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 1482180..924b1e6 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -97,6 +97,39 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr return result; } +// ol.startMemberDocName has already been done before this is called. +// when this function returns TRUE, ol.endParameterList will be called. +// +// typical sequence: +// ol.startMemberDoc +// ol.startMemberDocName +// --- enter writeDefArgumentList +// ol.endMemberDocName +// ol.startParameterList +// ... +// ol.startParameterType(first=TRUE) +// ol.endParameterType +// ol.startParameterName +// ol.endParameterName(last==FALSE) +// ... +// ol.startParameterType(first=FALSE) +// ol.endParamtereType +// ol.startParameterName +// ol.endParameterName(last==TRUE) +// ... +// --- leave writeDefArgumentList with return value TRUE +// ol.endParameterList +// ol.endMemberDoc(hasArgs=TRUE) +// +// For an empty list the function should return FALSE, the sequence is +// ol.startMemberDoc +// ol.startMemberDocName +// --- enter writeDefArgumentList +// --- leave writeDefArgumentList with return value FALSE +// ol.endMemberDocName +// ol.endMemberDoc(hasArgs=FALSE); +// + static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, const QCString & /*scopeName*/,MemberDef *md) { @@ -112,7 +145,12 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, // simple argument list for tcl if (md->getLanguage()==SrcLangExt_Tcl) { + if (defArgList->count()==0) return FALSE; Argument *a=defArgList->first(); + ol.endMemberDocName(); + ol.startParameterList(FALSE); + ol.startParameterType(TRUE,0); + ol.endParameterType(); ol.startParameterName(FALSE); while (a) { @@ -126,8 +164,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, } a=defArgList->next(); } - ol.endParameterName(FALSE,FALSE,FALSE); - ol.endMemberDocName(); + ol.endParameterName(TRUE,FALSE,FALSE); return TRUE; } @@ -1733,6 +1770,7 @@ void MemberDef::writeDeclaration(OutputList &ol, { ol.startTextLink(0,anchor()); } + ol.parseText(theTranslator->trMore()); ol.endTextLink(); //ol.startEmphasis(); ol.popGeneratorState(); @@ -2874,7 +2912,7 @@ void MemberDef::writeMemberDocSimple(OutputList &ol, Definition *container) const char **p = prefixes; while (*p) { - int l=strlen(*p); + int l=qstrlen(*p); if (ts.left(l)==*p) { ol.writeString(*p); diff --git a/src/memberdef.h b/src/memberdef.h index 8727302..47c79bd 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/membergroup.cpp b/src/membergroup.cpp index e7ce2b5..61907e5 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/membergroup.h b/src/membergroup.h index 84b7d32..64a521b 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 5a36ef8..3235b6c 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -67,7 +67,7 @@ int MemberList::compareItems(QCollection::Item item1, QCollection::Item item2) else if (ord2 > ord1) return 1; } - int cmp = stricmp(c1->name(),c2->name()); + int cmp = qstricmp(c1->name(),c2->name()); return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine(); } @@ -926,7 +926,7 @@ int MemberSDict::compareItems(QCollection::Item item1, QCollection::Item item2) MemberDef *c1=(MemberDef *)item1; MemberDef *c2=(MemberDef *)item2; //printf("MemberSDict::compareItems(%s,%s)\n",c1->name().data(),c2->name().data()); - int cmp = stricmp(c1->name(),c2->name()); + int cmp = qstricmp(c1->name(),c2->name()); if (cmp) { return cmp; diff --git a/src/memberlist.h b/src/memberlist.h index a047300..e0d948f 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/membername.cpp b/src/membername.cpp index 324db7f..58eaf8c 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -39,9 +39,9 @@ int MemberName::compareItems(QCollection::Item item1, QCollection::Item item2) FileDef *f1=m1->getFileDef(); FileDef *f2=m2->getFileDef(); if (c1 && c2) - return strcmp(c1->name(),c2->name()); + return qstrcmp(c1->name(),c2->name()); else if (f1 && f2) - return strcmp(f1->name(),f2->name()); + return qstrcmp(f1->name(),f2->name()); else return 0; } @@ -61,9 +61,9 @@ int MemberNameInfo::compareItems(QCollection::Item item1, QCollection::Item item FileDef *f1=m1->memberDef->getFileDef(); FileDef *f2=m2->memberDef->getFileDef(); if (c1 && c2) - return strcmp(c1->name(),c2->name()); + return qstrcmp(c1->name(),c2->name()); else if (f1 && f2) - return strcmp(f1->name(),f2->name()); + return qstrcmp(f1->name(),f2->name()); else return 0; } @@ -76,7 +76,7 @@ int MemberNameSDict::compareItems(QCollection::Item item1, QCollection::Item ite { MemberName *n1=(MemberName *)item1; MemberName *n2=(MemberName *)item2; - return stricmp(n1->memberName()+getPrefixIndex(n1->memberName()), + return qstricmp(n1->memberName()+getPrefixIndex(n1->memberName()), n2->memberName()+getPrefixIndex(n2->memberName()) ); } diff --git a/src/membername.h b/src/membername.h index 2abcbf3..0004aea 100644 --- a/src/membername.h +++ b/src/membername.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -94,7 +94,7 @@ class MemberNameInfoSDict : public SDict<MemberNameInfo> MemberNameInfoSDict(int size) : SDict<MemberNameInfo>(size) {} ~MemberNameInfoSDict() {} int compareItems(QCollection::Item item1,QCollection::Item item2) - { return stricmp( + { return qstricmp( ((MemberNameInfo *)item1)->memberName(), ((MemberNameInfo *)item2)->memberName() ); diff --git a/src/message.cpp b/src/message.cpp index ed438bb..60cb861 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/message.h b/src/message.h index 46b736c..acdbaff 100644 --- a/src/message.h +++ b/src/message.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/msc.cpp b/src/msc.cpp index fadbc0c..e87c16f 100644 --- a/src/msc.cpp +++ b/src/msc.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -50,7 +50,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName,const QCString rel int numBytes = f.readLine(buf,maxLineLen); buf[numBytes-1]='\0'; //printf("ReadLine `%s'\n",buf); - if (strncmp(buf,"rect",4)==0) + if (qstrncmp(buf,"rect",4)==0) { // obtain the url and the coordinates in the order used by graphviz-1.5 sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2); @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index c57c7ca..b7a6397 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/namespacedef.h b/src/namespacedef.h index 8458a78..9bc4fea 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -130,7 +130,7 @@ class NamespaceList : public QList<NamespaceDef> ~NamespaceList() {} int compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((NamespaceDef *)item1)->name(), + return qstricmp(((NamespaceDef *)item1)->name(), ((NamespaceDef *)item2)->name() ); } @@ -160,7 +160,7 @@ class NamespaceSDict : public SDict<NamespaceDef> ~NamespaceSDict() {} int compareItems(QCollection::Item item1,QCollection::Item item2) { - return stricmp(((NamespaceDef *)item1)->name(), + return qstricmp(((NamespaceDef *)item1)->name(), ((NamespaceDef *)item2)->name() ); } diff --git a/src/objcache.cpp b/src/objcache.cpp index 4258397..989811a 100644 --- a/src/objcache.cpp +++ b/src/objcache.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -19,6 +19,9 @@ #include <assert.h> #include <qglobal.h> #include "objcache.h" +#if !defined(_OS_WIN32_) +#include <stdint.h> +#endif //---------------------------------------------------------------------- @@ -189,7 +192,7 @@ unsigned int ObjCache::hash(void *addr) else { // Thomas Wang's 32 bit Mix Function - unsigned long key = (unsigned long)addr; + uintptr_t key = (uintptr_t)addr; key += ~(key << 15); key ^= (key >> 10); key += (key << 3); diff --git a/src/objcache.h b/src/objcache.h index 71e7178..d93c1f6 100644 --- a/src/objcache.h +++ b/src/objcache.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 13b6e62..89686e0 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputgen.h b/src/outputgen.h index 8d67e3d..0fc7351 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 5ea2a21..d51b548 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/outputlist.h b/src/outputlist.h index 23221d3..3ce6fe9 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 7fc4639..d553570 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -179,10 +179,10 @@ void PageDef::writeDocumentation(OutputList &ol) if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { - bool found=FALSE; + bool found = name()=="citelist"; QDictIterator<RefList> rli(*Doxygen::xrefLists); RefList *rl; - for (rli.toFirst();(rl=rli.current());++rli) + for (rli.toFirst();(rl=rli.current()) && !found;++rli) { if (rl->listName()==name()) { diff --git a/src/pagedef.h b/src/pagedef.h index b73ed3b..4670ecd 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -84,7 +84,7 @@ class PageSDict : public SDict<PageDef> virtual ~PageSDict() {} int compareItems(QCollection::Item i1,QCollection::Item i2) { - return stricmp(((PageDef *)i1)->name(),((PageDef *)i2)->name()); + return qstricmp(((PageDef *)i1)->name(),((PageDef *)i2)->name()); } }; diff --git a/src/parserintf.h b/src/parserintf.h index 7211274..fa9184c 100644 --- a/src/parserintf.h +++ b/src/parserintf.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 2a80f8f..9da834d 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * Authors: Dimitri van Heesch, Miguel Lobo. * * Permission to use, copy, modify, and distribute this software and its diff --git a/src/perlmodgen.h b/src/perlmodgen.h index 4307d9b..7f593b2 100644 --- a/src/perlmodgen.h +++ b/src/perlmodgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/portable.cpp b/src/portable.cpp index 554bb0b..2083cbf 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -190,15 +190,15 @@ void portable_setenv(const char *name,const char *value) #else register char **ep = 0; register size_t size; - const size_t namelen=strlen(name); - const size_t vallen=strlen(value) + 1; + const size_t namelen=qstrlen(name); + const size_t vallen=qstrlen(value) + 1; size = 0; if (environ!=0) { for (ep = environ; *ep; ++ep) { - if (!strncmp (*ep, name, (uint)namelen) && + if (!qstrncmp (*ep, name, (uint)namelen) && (*ep)[namelen] == '=') break; else @@ -244,7 +244,7 @@ void portable_setenv(const char *name,const char *value) } else /* replace existing string */ { - size_t len = strlen (*ep); + size_t len = qstrlen (*ep); if (len + 1 < namelen + 1 + vallen) { /* The existing string is too short; malloc a new one. */ @@ -277,12 +277,12 @@ void portable_unsetenv(const char *variable) return; // not properly formatted } - len = strlen(variable); + len = qstrlen(variable); ep = environ; while (*ep != NULL) { - if (!strncmp(*ep, variable, (uint)len) && (*ep)[len]=='=') + if (!qstrncmp(*ep, variable, (uint)len) && (*ep)[len]=='=') { /* Found it. Remove this pointer by moving later ones back. */ char **dp = ep; @@ -304,7 +304,9 @@ const char *portable_getenv(const char *variable) portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence) { -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(__MINGW32__) + return fseeko64(f,offset,whence); +#elif defined(_WIN32) && !defined(__CYGWIN__) return _fseeki64(f,offset,whence); #else return fseeko(f,offset,whence); @@ -313,7 +315,9 @@ portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence) portable_off_t portable_ftell(FILE *f) { -#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(__MINGW32__) + return ftello64(f); +#elif defined(_WIN32) && !defined(__CYGWIN__) return _ftelli64(f); #else return ftello(f); @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1200,7 +1200,7 @@ QCString removeIdsAndMarkers(const char *s) } else if (c=='d' && !inNum) // identifier starting with a `d' { - if (strncmp(p,"defined ",8)==0 || strncmp(p,"defined(",8)==0) + if (qstrncmp(p,"defined ",8)==0 || qstrncmp(p,"defined(",8)==0) // defined keyword { p+=7; // skip defined @@ -1481,7 +1481,6 @@ static inline void outputArray(const char *a,int len) static void readIncludeFile(const QCString &inc) { static bool searchIncludes = Config_getBool("SEARCH_INCLUDES"); - if (!searchIncludes) return; // do not read include files uint i=0; // find the start of the include file name @@ -1516,7 +1515,6 @@ static void readIncludeFile(const QCString &inc) // absIncFileName avoids difficulties for incFileName starting with "../" (bug 641336) QCString absIncFileName = incFileName; { - static bool searchIncludes = Config_getBool("SEARCH_INCLUDES"); QFileInfo fi(g_yyFileName); if (fi.exists()) { diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index 1138e8b..cb3daaa 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pycode.h b/src/pycode.h index e7c1b8b..7389985 100644 --- a/src/pycode.h +++ b/src/pycode.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pycode.l b/src/pycode.l index df99758..ef4bb2a 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pyscanner.h b/src/pyscanner.h index ad7cfaa..8a6971f 100644 --- a/src/pyscanner.h +++ b/src/pyscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/pyscanner.l b/src/pyscanner.l index 4e031bb..a2dc878 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1155,36 +1155,38 @@ STARTDOCSYMS "##" <VariableDec>{ "=" { // the assignment operator //printf("====== VariableDec at line %d\n",yyLineNr); + current->initializer = yytext; + current->initializer += " "; } {B} { // spaces } {INTNUMBER} { // integer value current->type = "int"; - current->initializer = yytext; + current->initializer += yytext; BEGIN(VariableEnd); } {FLOATNUMBER} { // floating point value current->type = "float"; - current->initializer = yytext; + current->initializer += yytext; BEGIN(VariableEnd); } {STRINGPREFIX}?"'" { // string current->type = "string"; - current->initializer = yytext; + current->initializer += yytext; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN( SingleQuoteString ); } {STRINGPREFIX}?"\"" { // string current->type = "string"; - current->initializer = yytext; + current->initializer += yytext; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN( DoubleQuoteString ); } {TRIDOUBLEQUOTE} { // start of a comment block current->type = "string"; - current->initializer = yytext; + current->initializer += yytext; g_doubleQuote=TRUE; g_copyString=¤t->initializer; g_stringContext=VariableEnd; @@ -1193,7 +1195,7 @@ STARTDOCSYMS "##" {TRISINGLEQUOTE} { // start of a comment block current->type = "string"; - current->initializer = yytext; + current->initializer += yytext; g_doubleQuote=FALSE; g_copyString=¤t->initializer; g_stringContext=VariableEnd; @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/reflist.cpp b/src/reflist.cpp index 8f103d7..70bd9ba 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/reflist.h b/src/reflist.h index a4a450e..3124582 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -48,7 +48,7 @@ class SortedRefItems : public SDict<RefItem> { RefItem *r1 = (RefItem*)item1; RefItem *r2 = (RefItem*)item2; - return stricmp(r1->title,r2->title); + return qstricmp(r1->title,r2->title); } }; diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index d77a3d6..8d9cfc2 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h index 2ad0d23..eb841e5 100644 --- a/src/rtfdocvisitor.h +++ b/src/rtfdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index b51245c..4561cd2 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2013 by Parker Waechter & Dimitri van Heesch. * * Style sheet additions by Alexander Bartolich * diff --git a/src/rtfgen.h b/src/rtfgen.h index 784cfcc..82f42a3 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2013 by Parker Waechter & Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/rtfstyle.cpp b/src/rtfstyle.cpp index 1c565e1..2bede42 100644 --- a/src/rtfstyle.cpp +++ b/src/rtfstyle.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -394,9 +394,9 @@ bool StyleData::setStyle(const char* s, const char* styleName) } else if (*end == '\\') { - if (0 == strncmp(end, "\\snext", 6)) + if (0 == qstrncmp(end, "\\snext", 6)) break; - if (0 == strncmp(end, "\\sbasedon", 9)) + if (0 == qstrncmp(end, "\\sbasedon", 9)) break; if (0 != any_clause.match(end, 0, &len)) break; diff --git a/src/rtfstyle.h b/src/rtfstyle.h index ef7cb9a..52488f1 100644 --- a/src/rtfstyle.h +++ b/src/rtfstyle.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/scanner.h b/src/scanner.h index 7e3b2a3..5c226a1 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/scanner.l b/src/scanner.l index 8efca45..3ed0e70 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -216,6 +216,9 @@ static void initParser() insideCode=FALSE; insideCli=Config_getBool("CPP_CLI_SUPPORT"); previous = 0; + firstTypedefEntry = 0; + tempEntry = 0; + memspecEntry =0; } static void initEntry() @@ -1198,7 +1201,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" roundCount=1; BEGIN( SkipRound ); } - else if (strncmp(yytext,"@property",9)==0) // ObjC 2.0 property + else if (qstrncmp(yytext,"@property",9)==0) // ObjC 2.0 property { current->mtype = mtype = Property; current->spec|=Entry::Readable | Entry::Writable | Entry::Assign; @@ -1255,17 +1258,17 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" { // skip annotation } - else if (strcmp(yytext,"@property")==0) // ObjC 2.0 property + else if (qstrcmp(yytext,"@property")==0) // ObjC 2.0 property { current->mtype = mtype = Property; current->spec|=Entry::Writable | Entry::Readable; current->protection = Public ; } - else if (strcmp(yytext,"@synthesize")==0) + else if (qstrcmp(yytext,"@synthesize")==0) { BEGIN( ObjCSkipStatement ); } - else if (strcmp(yytext,"@dynamic")==0) + else if (qstrcmp(yytext,"@dynamic")==0) { BEGIN( ObjCSkipStatement ); } @@ -2091,56 +2094,56 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } <FindMembers,FindMemberName>{SCOPENAME} { lineCount(); - if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0) + if (insideIDL && yyleng==9 && qstrcmp(yytext,"cpp_quote")==0) { BEGIN(CppQuote); } - else if ((insideIDL || insideJava || insideD) && yyleng==6 && strcmp(yytext,"import")==0) + else if ((insideIDL || insideJava || insideD) && yyleng==6 && qstrcmp(yytext,"import")==0) { if (insideIDL) BEGIN(NextSemi); else // insideJava or insideD BEGIN(JavaImport); } - else if (insidePHP && strcmp(yytext,"use")==0) + else if (insidePHP && qstrcmp(yytext,"use")==0) { BEGIN(PHPUse); } - else if (insideJava && strcmp(yytext,"package")==0) + else if (insideJava && qstrcmp(yytext,"package")==0) { lineCount(); BEGIN(PackageName); } - else if (insideIDL && strcmp(yytext,"case")==0) + else if (insideIDL && qstrcmp(yytext,"case")==0) { BEGIN(IDLUnionCase); } - else if (insideTryBlock && strcmp(yytext,"catch")==0) + else if (insideTryBlock && qstrcmp(yytext,"catch")==0) { insideTryBlock=FALSE; BEGIN(TryFunctionBlock); } - else if (insideJS && strcmp(yytext,"var")==0) + else if (insideJS && qstrcmp(yytext,"var")==0) { // javascript variable current->type="var"; } - else if (insideJS && strcmp(yytext,"function")==0) + else if (insideJS && qstrcmp(yytext,"function")==0) { // javascript function current->type="function"; } - else if (insideCS && strcmp(yytext,"this")==0) + else if (insideCS && qstrcmp(yytext,"this")==0) { // C# indexer addType( current ) ; current->name="this"; BEGIN(CSIndexer); } - else if (insideCpp && strcmp(yytext,"static_assert")==0) + else if (insideCpp && qstrcmp(yytext,"static_assert")==0) { // C++11 static_assert BEGIN(StaticAssert); } - else if (insideCpp && strcmp(yytext,"decltype")==0) + else if (insideCpp && qstrcmp(yytext,"decltype")==0) { // C++11 decltype(x) current->type+=yytext; @@ -2153,23 +2156,23 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" addType( current ) ; } bool javaLike = insideJava || insideCS || insideD || insidePHP || insideJS; - if (javaLike && strcmp(yytext,"public")==0) + if (javaLike && qstrcmp(yytext,"public")==0) { current->protection = Public; } - else if (javaLike && strcmp(yytext,"protected")==0) + else if (javaLike && qstrcmp(yytext,"protected")==0) { current->protection = Protected; } - else if (javaLike && strcmp(yytext,"internal")==0) + else if (javaLike && qstrcmp(yytext,"internal")==0) { current->protection = Package; } - else if (javaLike && strcmp(yytext,"private")==0) + else if (javaLike && qstrcmp(yytext,"private")==0) { current->protection = Private; } - else if (javaLike && strcmp(yytext,"static")==0) + else if (javaLike && qstrcmp(yytext,"static")==0) { if (YY_START==FindMembers) current->name = yytext; @@ -4264,7 +4267,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } */ <FuncQual>[{:;,] { - if ( strcmp(yytext,";")==0 && + if ( qstrcmp(yytext,";")==0 && insidePHP && !containsWord(current->type,"function") ) { @@ -4446,7 +4449,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" lineCount(); } <FuncQual>{ID} { // typically a K&R style C function - if (insideCS && strcmp(yytext,"where")==0) + if (insideCS && qstrcmp(yytext,"where")==0) { // type contraint for a method delete current->typeConstr; @@ -4979,6 +4982,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" current->name = yytext; current->name=current->name.left(current->name.length()-1).stripWhiteSpace(); //printf("template class declaration for %s!\n",current->name.data()); + QCString rn = current_root->name.copy(); + //printf("cn=`%s' rn=`%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef); + if (!current->name.isEmpty() && !rn.isEmpty()) + { + prependScope(); + } current_root->addSubEntry(current); current = new Entry; } @@ -5026,7 +5035,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" BEGIN( ClassVar ); } <ClassVar>{SCOPENAME}{BN}*/"(" { - if (insideIDL && strncmp(yytext,"switch",6)==0 && !isId(yytext[6])) + if (insideIDL && qstrncmp(yytext,"switch",6)==0 && !isId(yytext[6])) { // Corba IDL style union roundCount=0; @@ -5069,13 +5078,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } } <ClassVar>{ID} { - if (insideIDL && strcmp(yytext,"switch")==0) + if (insideIDL && qstrcmp(yytext,"switch")==0) { // Corba IDL style union roundCount=0; BEGIN(SkipUnionSwitch); } - else if ((insideJava || insidePHP || insideJS) && (strcmp(yytext,"implements")==0 || strcmp(yytext,"extends")==0)) + else if ((insideJava || insidePHP || insideJS) && (qstrcmp(yytext,"implements")==0 || qstrcmp(yytext,"extends")==0)) { current->type.resize(0); baseProt=Public; @@ -5083,7 +5092,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" baseName.resize(0); BEGIN( BasesProt ) ; } - else if (insideCS && strcmp(yytext,"where")==0) // C# type contraint + else if (insideCS && qstrcmp(yytext,"where")==0) // C# type contraint { delete current->typeConstr; current->typeConstr = new ArgumentList; @@ -5091,15 +5100,15 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" lastCSConstraint = YY_START; BEGIN( CSConstraintName ); } - else if (insideCli && strcmp(yytext,"abstract")==0) + else if (insideCli && qstrcmp(yytext,"abstract")==0) { current->spec|=Entry::Abstract; } - else if (insideCli && strcmp(yytext,"sealed")==0) + else if (insideCli && qstrcmp(yytext,"sealed")==0) { current->spec|=Entry::Sealed; } - else if (strcmp(yytext,"final")==0) + else if (qstrcmp(yytext,"final")==0) { current->spec|=Entry::Final; } diff --git a/src/searchindex.cpp b/src/searchindex.cpp index fef0f13..681fe96 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -414,7 +414,7 @@ struct SearchDocEntry QCString type; QCString name; QCString args; - QCString tagFile; + QCString extId; QCString url; GrowBuf importantText; GrowBuf normalText; @@ -519,11 +519,11 @@ static QCString definitionToName(Definition *ctx) void SearchIndexExternal::setCurrentDoc(Definition *ctx,const char *anchor,bool isSourceFile) { - QCString tagFile = stripPath(Config_getString("GENERATE_TAGFILE")); + QCString extId = stripPath(Config_getString("EXTERNAL_SEARCH_ID")); QCString baseName = isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase(); QCString url = baseName + Doxygen::htmlFileExtension; if (anchor) url+=QCString("#")+anchor; - QCString key = tagFile+";"+url; + QCString key = extId+";"+url; p->current = p->docEntries.find(key); if (!p->current) @@ -535,7 +535,7 @@ void SearchIndexExternal::setCurrentDoc(Definition *ctx,const char *anchor,bool { e->args = ((MemberDef*)ctx)->argsString(); } - e->tagFile = tagFile; + e->extId = extId; e->url = url; p->current = e; p->docEntries.append(key,e); @@ -573,9 +573,9 @@ void SearchIndexExternal::write(const char *fileName) { t << " <field name=\"args\">" << convertToXML(doc->args) << "</field>" << endl; } - if (!doc->tagFile.isEmpty()) + if (!doc->extId.isEmpty()) { - t << " <field name=\"tag\">" << convertToXML(doc->tagFile) << "</field>" << endl; + t << " <field name=\"tag\">" << convertToXML(doc->extId) << "</field>" << endl; } t << " <field name=\"url\">" << convertToXML(doc->url) << "</field>" << endl; t << " <field name=\"keywords\">" << convertToXML(doc->importantText.get()) << "</field>" << endl; @@ -649,7 +649,7 @@ class SearchIndexList : public SDict< QList<Definition> > QList<Definition> *md2=(QList<Definition> *)item2; QCString n1 = md1->first()->localName(); QCString n2 = md2->first()->localName(); - return stricmp(n1.data(),n2.data()); + return qstricmp(n1.data(),n2.data()); } }; diff --git a/src/searchindex.h b/src/searchindex.h index ddfe384..2ce80e8 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/section.h b/src/section.h index d3dfc7e..486656d 100644 --- a/src/section.h +++ b/src/section.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/sortdict.h b/src/sortdict.h index 02f1f7b..14a221b 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/store.cpp b/src/store.cpp index 521aa9b..7e5118a 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/store.h b/src/store.h index 816ce46..d075dc0 100644 --- a/src/store.h +++ b/src/store.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 42dcf68..1e0ef4f 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tagreader.h b/src/tagreader.h index 427f674..7b29b01 100644 --- a/src/tagreader.h +++ b/src/tagreader.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/tclscanner.h b/src/tclscanner.h index 24bf40b..f06f3de 100644 --- a/src/tclscanner.h +++ b/src/tclscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * Copyright (C) 2010-2011 by Rene Zaumseil * * Permission to use, copy, modify, and distribute this software and its diff --git a/src/tclscanner.l b/src/tclscanner.l index c3d5df0..e8bf77d 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -80,34 +80,34 @@ // - Tcl_Interp removed // - changes are marked with RZ // #define's to adapt the code: -#define CONST const -#define UCHAR (unsigned char) -#define TCL_ERROR 1 -#define TCL_OK 0 -#define ckalloc malloc -#define ckfree free +#define CONST const +#define UCHAR (unsigned char) +#define TCL_ERROR 1 +#define TCL_OK 0 +#define ckalloc malloc +#define ckfree free #define TclCopyAndCollapse(size,src,dest) memcpy(dest,src,size); *(dest+size)=0 int TclFindElement( - CONST char *list, /* Points to the first byte of a string - * containing a Tcl list with zero or more - * elements (possibly in braces). */ - int listLength, /* Number of bytes in the list's string. */ - CONST char **elementPtr, /* Where to put address of first significant - * character in first element of list. */ - CONST char **nextPtr, /* Fill in with location of character just - * after all white space following end of - * argument (next arg or end of list). */ - int *sizePtr, /* If non-zero, fill in with size of - * element. */ - int *bracePtr) /* If non-zero, fill in with non-zero/zero to - * indicate that arg was/wasn't in braces. */ + CONST char *list, /* Points to the first byte of a string + * containing a Tcl list with zero or more + * elements (possibly in braces). */ + int listLength, /* Number of bytes in the list's string. */ + CONST char **elementPtr, /* Where to put address of first significant + * character in first element of list. */ + CONST char **nextPtr, /* Fill in with location of character just + * after all white space following end of + * argument (next arg or end of list). */ + int *sizePtr, /* If non-zero, fill in with size of + * element. */ + int *bracePtr) /* If non-zero, fill in with non-zero/zero to + * indicate that arg was/wasn't in braces. */ { CONST char *p = list; - CONST char *elemStart; /* Points to first byte of first element. */ - CONST char *limit; /* Points just after list's last byte. */ - int openBraces = 0; /* Brace nesting level during parse. */ + CONST char *elemStart; /* Points to first byte of first element. */ + CONST char *limit; /* Points just after list's last byte. */ + int openBraces = 0; /* Brace nesting level during parse. */ int inQuotes = 0; - int size = 0; /* lint. */ + int size = 0; /* lint. */ //RZ int numChars; /* @@ -122,7 +122,7 @@ int TclFindElement( p++; } if (p == limit) - { /* no element found */ + { /* no element found */ elemStart = limit; goto done; } @@ -157,54 +157,54 @@ int TclFindElement( */ case '{': - if (openBraces != 0) - { - openBraces++; - } - break; + if (openBraces != 0) + { + openBraces++; + } + break; - /* - * Close brace: if element is in braces, keep nesting count and - * quit when the last close brace is seen. - */ + /* + * Close brace: if element is in braces, keep nesting count and + * quit when the last close brace is seen. + */ case '}': - if (openBraces > 1) - { - openBraces--; - } - else if (openBraces == 1) - { - size = (int)(p - elemStart); - p++; - if ((p >= limit) || isspace(UCHAR(*p))) - { /* INTL: ISO space. */ - goto done; - } - - /* - * Garbage after the closing brace; return an error. - */ - - return TCL_ERROR; - } - break; - - /* - * Backslash: skip over everything up to the end of the backslash - * sequence. - */ + if (openBraces > 1) + { + openBraces--; + } + else if (openBraces == 1) + { + size = (int)(p - elemStart); + p++; + if ((p >= limit) || isspace(UCHAR(*p))) + { /* INTL: ISO space. */ + goto done; + } + + /* + * Garbage after the closing brace; return an error. + */ + + return TCL_ERROR; + } + break; + + /* + * Backslash: skip over everything up to the end of the backslash + * sequence. + */ case '\\': - //RZ Tcl_UtfBackslash(p, &numChars, NULL); - //RZ p += (numChars - 1); - p++; //RZ - break; + //RZ Tcl_UtfBackslash(p, &numChars, NULL); + //RZ p += (numChars - 1); + p++; //RZ + break; - /* - * Space: ignore if element is in braces or quotes; otherwise - * terminate element. - */ + /* + * Space: ignore if element is in braces or quotes; otherwise + * terminate element. + */ case ' ': case '\f': @@ -212,33 +212,33 @@ int TclFindElement( case '\r': case '\t': case '\v': - if ((openBraces == 0) && !inQuotes) - { - size = (int)(p - elemStart); - goto done; - } - break; + if ((openBraces == 0) && !inQuotes) + { + size = (int)(p - elemStart); + goto done; + } + break; - /* - * Double-quote: if element is in quotes then terminate it. - */ + /* + * Double-quote: if element is in quotes then terminate it. + */ case '"': - if (inQuotes) - { - size = (int)(p - elemStart); - p++; - if ((p >= limit) || isspace(UCHAR(*p))) - { /* INTL: ISO space */ - goto done; - } - - /* - * Garbage after the closing quote; return an error. - */ - return TCL_ERROR; - } - break; + if (inQuotes) + { + size = (int)(p - elemStart); + p++; + if ((p >= limit) || isspace(UCHAR(*p))) + { /* INTL: ISO space */ + goto done; + } + + /* + * Garbage after the closing quote; return an error. + */ + return TCL_ERROR; + } + break; } p++; } @@ -275,11 +275,11 @@ done: } int Tcl_SplitList( - CONST char *list, /* Pointer to string with list structure. */ - int *argcPtr, /* Pointer to location to fill in with the - * number of elements in the list. */ - CONST char ***argvPtr) /* Pointer to place to store pointer to array - * of pointers to list elements. */ + CONST char *list, /* Pointer to string with list structure. */ + int *argcPtr, /* Pointer to location to fill in with the + * number of elements in the list. */ + CONST char ***argvPtr) /* Pointer to place to store pointer to array + * of pointers to list elements. */ { CONST char **argv, *l, *element; char *p; @@ -295,7 +295,7 @@ int Tcl_SplitList( for (size = 2, l = list; *l != 0; l++) { if (isspace(UCHAR(*l))) - { /* INTL: ISO space. */ + { /* INTL: ISO space. */ size++; /* @@ -304,18 +304,18 @@ int Tcl_SplitList( while (1) { - char next = *(l + 1); - - if (next == '\0') - { - break; - } - ++l; - if (isspace(UCHAR(next))) - { /* INTL: ISO space. */ - continue; - } - break; + char next = *(l + 1); + + if (next == '\0') + { + break; + } + ++l; + if (isspace(UCHAR(next))) + { /* INTL: ISO space. */ + continue; + } + break; } } } @@ -328,7 +328,7 @@ int Tcl_SplitList( CONST char *prevList = list; result = TclFindElement(list, length, &element, &list, - &elSize, &brace); + &elSize, &brace); length -= (int)(list - prevList); if (result != TCL_OK) { @@ -439,10 +439,10 @@ static struct QCString string_comment; // contain current comment QCString string_last; // contain last read word or part of word QCString string; // temporary string value - Entry* entry_main; // top level entry - Entry* entry_file; // entry of current file - Entry* entry_current; // currently used entry - Entry* entry_inside; // contain entry of current scan context + Entry* entry_main; // top level entry + Entry* entry_file; // entry of current file + Entry* entry_current; // currently used entry + Entry* entry_inside; // contain entry of current scan context QStringList list_commandwords; // list of command words QList<tcl_scan> scan; // stack of scan contexts QAsciiDict<Entry> ns; // all read namespace entries @@ -481,7 +481,7 @@ Entry* tcl_entry_new() myEntry->lang = SrcLangExt_Tcl; initGroupInfo(myEntry); // collect entries - if (tcl.code==NULL) + if (!tcl.code) { tcl.entry.insert(0,myEntry); } @@ -508,7 +508,7 @@ static void tcl_name(const QCString &ns0, const QCString &name0, QCString &ns, Q QCString myNm; int myStart; - if (strncmp(name0.data(),"::",2)==0) + if (qstrncmp(name0.data(),"::",2)==0) { myNm = name0.mid(2); } @@ -629,7 +629,7 @@ static int tcl_keyword(QCString str) //! End codifying with special font class. static void tcl_font_end() { - if (tcl.code==NULL) return; + if (!tcl.code) return; if (tcl.code_font) { tcl.code->endFontClass(); @@ -640,8 +640,8 @@ static void tcl_font_end() //! Codify 'str' with special font class 's'. static void tcl_codify(const char *s,char *str) { - if (tcl.code==NULL||str==NULL) return; - if (s && strcmp(s,"NULL")!=0) + if (!tcl.code || !str) return; + if (s && qstrcmp(s,"NULL")!=0) { tcl_font_end(); tcl.code->startFontClass(s); @@ -659,20 +659,19 @@ static void tcl_codify(const char *s,char *str) tcl.code_line++; *(p-1)='\0'; tcl.code->codify(sp); - //tcl_font_end(); + if (tcl.code_font) + { + tcl.code->endFontClass(); + } tcl.code->endCodeLine(); + tcl.code->startCodeLine(tcl.code_linenumbers); if (tcl.code_linenumbers) { - if (tcl.code_font!=NULL) - { - tcl.code->endFontClass(); - tcl.code->writeLineNumber(0,0,0,tcl.code_line); - tcl.code->startFontClass(tcl.code_font); - } - else - { - tcl.code->writeLineNumber(0,0,0,tcl.code_line); - } + tcl.code->writeLineNumber(0,0,0,tcl.code_line); + } + if (tcl.code_font) + { + tcl.code->startFontClass(tcl.code_font); } } else @@ -706,7 +705,7 @@ static void tcl_codify(const char *s,const QString &str) //! Codify 'str' with special font class 's'. static void tcl_codify(const char *s,const QCString &str) { - if (tcl.code==NULL) return; + if (!tcl.code) return; tcl_codify(s,str.data()); } @@ -716,11 +715,11 @@ static void tcl_codify_cmd(const char *s,int i) } //----------------------------------------------------------------------------- -#undef YY_INPUT -#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); //----------------------------------------------------------------------------- %} -ws ([ \t]|\\\n) +ws ([ \t]|\\\n) %option yylineno %option noyywrap @@ -1247,8 +1246,8 @@ tcl_inf("(\\\n) ?%s?\n",tcl.string_last.data()); { case '{':// {{x}} myLevel--; - if (myLevel==0 && tcl.code==NULL) - { + if (myLevel==0 && !tcl.code) + { myWhite=1; } break; @@ -1287,7 +1286,7 @@ tcl_inf("(\\\n) ?%s?\n",tcl.string_last.data()); case '{': break; case '[': - myLevel--; + myLevel--; break; case '"': case '.': @@ -1340,7 +1339,7 @@ tcl_inf("(%d) ?%s?\n",what,tcl.string_last.data()); yyless(0); tcl_inf("(.%d) ?%s?\n",what,tcl.string_last.data()); return; - } + } else { myLevel--; @@ -1464,24 +1463,24 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment); myPos0=myPos; myLine0=myLine; while (parseCommentBlock(tcl.this_parser, &myEntry0, myDoc, tcl.file_name, - myLine, FALSE, tcl.config_autobrief, FALSE, myProt, myPos, myNew)) + myLine, FALSE, tcl.config_autobrief, FALSE, myProt, myPos, myNew)) { if (myNew) { // we need a new entry in this case myNew=0; myEntry = tcl_entry_new(); parseCommentBlock(tcl.this_parser, myEntry, myDoc, tcl.file_name, - myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); - tcl.entry_inside->addSubEntry(myEntry); + myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); + tcl.entry_inside->addSubEntry(myEntry); } else { // we can add to current entry in this case - if (myEntry1==NULL) + if (!myEntry1) { myEntry1=tcl_entry_namespace(tcl.scan.at(0)->ns); } parseCommentBlock(tcl.this_parser, myEntry1, myDoc, tcl.file_name, - myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); + myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); } myPos0=myPos; myLine0=myLine; @@ -1491,35 +1490,35 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment); myNew=0; myEntry = tcl_entry_new(); parseCommentBlock(tcl.this_parser, myEntry, myDoc, tcl.file_name, - myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); - tcl.entry_inside->addSubEntry(myEntry); + myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); + tcl.entry_inside->addSubEntry(myEntry); } else { // we can add to current entry - if (myEntry1==NULL) + if (!myEntry1) { myEntry1=tcl_entry_namespace(tcl.scan.at(0)->ns); } parseCommentBlock(tcl.this_parser, myEntry1, myDoc, tcl.file_name, - myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); + myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew); } } else { // new entry tcl.entry_current = tcl_entry_new(); while (parseCommentBlock(tcl.this_parser, tcl.entry_current, myDoc, - tcl.file_name, myLine, FALSE, tcl.config_autobrief, FALSE, - myProt, myPos, myNew)) + tcl.file_name, myLine, FALSE, tcl.config_autobrief, FALSE, + myProt, myPos, myNew)) { if (myNew) { - tcl.entry_inside->addSubEntry(tcl.entry_current); - tcl.entry_current = tcl_entry_new(); + tcl.entry_inside->addSubEntry(tcl.entry_current); + tcl.entry_current = tcl_entry_new(); } else { - tcl.entry_current->section = tcl.entry_inside->section; - tcl.entry_current->name = tcl.entry_inside->name; + tcl.entry_current->section = tcl.entry_inside->section; + tcl.entry_current->name = tcl.entry_inside->name; } } if (myNew) @@ -1554,7 +1553,7 @@ D QStringList myArgs; QString myArglist=""; - if (tcl.entry_current->argList==NULL) + if (!tcl.entry_current->argList) { tcl.entry_current->argList=new ArgumentList; } @@ -1571,7 +1570,7 @@ D myArg->defval= (*myArgs1.at(1)).utf8(); if (myArg->defval.isEmpty()) { - myArg->defval = " "; + myArg->defval = " "; } myArglist += "?" + QCString(myArg->name) + "? "; } @@ -1604,7 +1603,7 @@ static void tcl_codify_link(QCString name) MemberNameIterator mi(*mn); for (mi.toFirst();(md=mi.current());++mi) { - fn.insert(md->qualifiedName(),md); + fn.insert(md->qualifiedName(),md); } } for (fni.toFirst();(mn=fni.current());++fni) @@ -1612,7 +1611,7 @@ static void tcl_codify_link(QCString name) MemberNameIterator fi(*mn); for (fi.toFirst();(md=fi.current());++fi) { - fn.insert(md->qualifiedName(),md); + fn.insert(md->qualifiedName(),md); } } } @@ -1645,14 +1644,14 @@ static void tcl_codify_link(QCString name) if (myDef != NULL) // documented command { tcl.code->writeCodeLink(myDef->getReference().data(), - myDef->getOutputFileBase().data(), - myDef->anchor().data(), - name, - myDef->qualifiedName().data()); + myDef->getOutputFileBase().data(), + myDef->anchor().data(), + name, + myDef->qualifiedName().data()); if (tcl.memberdef) { - myDef->addSourceReferencedBy(tcl.memberdef); - tcl.memberdef->addSourceReferences(myDef); + myDef->addSourceReferencedBy(tcl.memberdef); + tcl.memberdef->addSourceReferences(myDef); } } else if (tcl_keyword(myName)) // check keyword @@ -1675,7 +1674,7 @@ D tcl_codify_cmd(NULL,1); tcl_scan *myScan=tcl.scan.at(0); myScan = tcl_scan_start('?',*tcl.list_commandwords.at(2), - myScan->ns,myScan->entry_cl,myScan->entry_fn); + myScan->ns,myScan->entry_cl,myScan->entry_fn); for (unsigned int i = 3;i<tcl.list_commandwords.count();i++) { myScan->after << type[i] << tcl.list_commandwords[i]; @@ -1690,7 +1689,7 @@ D tcl_codify_cmd(NULL,1); tcl_scan *myScan=tcl.scan.at(0); myScan = tcl_scan_start('?',*tcl.list_commandwords.at(2), - myScan->ns,myScan->entry_cl,myScan->entry_fn); + myScan->ns,myScan->entry_cl,myScan->entry_fn); myScan->after << "NULL" << tcl.list_commandwords[3]; myScan->after << "script" << tcl.list_commandwords[4]; myScan->after << "NULL" << tcl.list_commandwords[5]; @@ -1713,7 +1712,7 @@ D } tcl_scan *myScan=tcl.scan.at(0); myScan = tcl_scan_start('?',*tcl.list_commandwords.at(tcl.list_commandwords.count()-1), - myScan->ns,myScan->entry_cl,myScan->entry_fn); + myScan->ns,myScan->entry_cl,myScan->entry_fn); } ///! Handle internal tcl commands. @@ -1725,7 +1724,7 @@ D tcl_codify_cmd(NULL,1); tcl_scan *myScan=tcl.scan.at(0); myScan = tcl_scan_start('?',*tcl.list_commandwords.at(2), - myScan->ns,myScan->entry_cl,myScan->entry_fn); + myScan->ns,myScan->entry_cl,myScan->entry_fn); myScan->after << "NULL" << tcl.list_commandwords[3]; myScan->after << "script" << tcl.list_commandwords[4]; } @@ -1756,32 +1755,32 @@ D for (i=0;i<myName.length();i++) { QChar c = myName[i]; - if (myCmd) - { - if (c==' '||c=='\t'||c=='\n'||c==']') - {//end of command - tcl_codify_link(myStr); - myStr=""; - myCmd=0; - } - myStr+=c; - } - else - { - myStr+=c; - if (c=='[') - {//start of command - for (;i<myName.length();i++) + if (myCmd) + { + if (c==' '||c=='\t'||c=='\n'||c==']') + {//end of command + tcl_codify_link(myStr); + myStr=""; + myCmd=0; + } + myStr+=c; + } + else + { + myStr+=c; + if (c=='[') + {//start of command + for (;i<myName.length();i++) { c = myName[i+1]; - if (c!=' ' && c!='\t' && c!='\n') break; - myStr+=c; + if (c!=' ' && c!='\t' && c!='\n') break; + myStr+=c; } tcl_codify(NULL,myStr); - myStr=""; - myCmd=1; - } - } + myStr=""; + myCmd=1; + } + } } tcl_codify(NULL,myStr); } @@ -1825,7 +1824,7 @@ D myEntry = tcl.entry_current; tcl.fn.insert(myName,myEntry); myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(6), - myEntryNs->name,NULL,myEntry); + myEntryNs->name,NULL,myEntry); } //! Handle \c itcl::body statements and \c oo::define method and method inside \c itcl::class statements. @@ -1867,7 +1866,7 @@ D tcl.fn.insert(myName,tcl.entry_current); myEntry = tcl.entry_current; myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(6), - myNs, myEntryCl, myEntry); + myNs, myEntryCl, myEntry); } //! Handle \c constructor statements inside class definitions. @@ -1904,7 +1903,7 @@ D myEntry = tcl.entry_current; tcl.fn.insert(myName,myEntry); myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(4), - myNs, myEntryCl, myEntry); + myNs, myEntryCl, myEntry); } //! Handle \c destructor statements inside class definitions. @@ -1938,7 +1937,7 @@ D myEntry = tcl.entry_current; tcl.fn.insert(myName,myEntry); myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(2), - myNs, myEntryCl, myEntry); + myNs, myEntryCl, myEntry); } //! Handle \c namespace statements. @@ -2006,7 +2005,7 @@ D tcl.cl.insert(myName,tcl.entry_current); myEntryCl = tcl.entry_current; myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(4), - myName, myEntryCl, NULL); + myName, myEntryCl, NULL); } //! Handle \c oo::class statements. @@ -2039,7 +2038,7 @@ D tcl.cl.insert(myName,tcl.entry_current); myEntryCl = tcl.entry_current; myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(6), - myName, myEntryCl, NULL); + myName, myEntryCl, NULL); } //! Handle \c oo::define statements. @@ -2205,11 +2204,11 @@ tcl_inf("->\n"); { tcl_scan *myScan = tcl.scan.at(0); myScan = tcl_scan_start(tcl.word_is,*tcl.list_commandwords.at(0), - myScan->ns,myScan->entry_cl,myScan->entry_fn); + myScan->ns,myScan->entry_cl,myScan->entry_fn); myProt = tcl.protection; goto command_end; } - myStr = (*tcl.list_commandwords.at(0)).utf8(); + myStr = (*tcl.list_commandwords.at(0)).utf8(); // remove leading "::" and apply TCL_SUBST if (myStr.left(2)=="::") myStr = myStr.mid(2); if (tcl.config_subst.contains(myStr)) @@ -2296,7 +2295,7 @@ tcl_inf("->\n"); if (tcl.list_commandwords.count() < 3) {myLine=__LINE__;goto command_warn;} if (tcl.scan.at(0)->entry_fn == NULL) {// only parsed outside functions - tcl_command_VARIABLE(tcl.scan.at(0)->entry_cl!=NULL&&tcl.scan.at(0)->entry_cl->name!=""); + tcl_command_VARIABLE(tcl.scan.at(0)->entry_cl && tcl.scan.at(0)->entry_cl->name!=""); goto command_text; } } @@ -2312,7 +2311,7 @@ tcl_inf("->\n"); if (myStr=="inherit" || myStr=="superclass") { if (tcl.list_commandwords.count() < 3) {myLine=__LINE__;goto command_warn;} - if (tcl.scan.at(0)->entry_cl!=NULL&&tcl.scan.at(0)->entry_cl->name!="") + if (tcl.scan.at(0)->entry_cl && tcl.scan.at(0)->entry_cl->name!="") { for (unsigned int i = 2; i < tcl.list_commandwords.count(); i = i + 2) { @@ -2354,46 +2353,46 @@ if expr1 ?then? body1 elseif expr2 ?then? body2 elseif ... ?else? ?bodyN? if (myStr=="then") { myState='t'; - myType << "keyword" << "NULL"; + myType << "keyword" << "NULL"; } else { myState='b'; - myType << "script" << "NULL"; + myType << "script" << "NULL"; } } else if (myState=='t') { myState='b'; - myType << "script" << "NULL"; + myType << "script" << "NULL"; } else if (myState=='b') { if (myStr=="elseif") { myState='i'; - myType << "keyword" << "NULL"; + myType << "keyword" << "NULL"; } else if (myStr=="else" && i==tcl.list_commandwords.count()-3) { - myState = 'b'; - myType << "keyword" << "NULL" << "script"; - i = tcl.list_commandwords.count(); + myState = 'b'; + myType << "keyword" << "NULL" << "script"; + i = tcl.list_commandwords.count(); } else if (i==tcl.list_commandwords.count()-1) { - myState = 'b'; - myType << "script"; - i = tcl.list_commandwords.count(); - } + myState = 'b'; + myType << "script"; + i = tcl.list_commandwords.count(); + } else { - myLine=__LINE__;goto command_warn; + myLine=__LINE__;goto command_warn; } } else if (myState=='i') { myState='x'; - myType << "script" << "NULL"; + myType << "script" << "NULL"; } } if (myState != 'b') {myLine=__LINE__;goto command_warn;} @@ -2472,20 +2471,20 @@ tcl_inf("TCL_SUBST: use '%s'\n",s); tcl.string_command=""; tcl.string_commentline=""; tcl.string_commentcodify=""; - tcl.string_comment = ""; - tcl.string_last = ""; - tcl.entry_main = NULL; - tcl.entry_file = NULL; - tcl.entry_current = NULL; - tcl.entry_inside = NULL; + tcl.string_comment = ""; + tcl.string_last = ""; + tcl.entry_main = NULL; + tcl.entry_file = NULL; + tcl.entry_current = NULL; + tcl.entry_inside = NULL; tcl.list_commandwords.clear(); tcl.scan.clear(); tcl.ns.clear(); tcl.cl.clear(); tcl.fn.clear(); - yylineno = 1; - tcl.protection = Public; - tcl.memberdef = NULL; + yylineno = 1; + tcl.protection = Public; + tcl.memberdef = NULL; } //! Start parsing. @@ -2563,7 +2562,7 @@ void TclLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf, int startLine, int endLine, bool inlineFragment, - MemberDef *memberDef, + MemberDef *memberDef, bool showLineNumbers, Definition *searchCtx ) @@ -2633,6 +2632,7 @@ tcl_inf("%s (%d,%d) %d %d\n",myStr.ascii(),startLine,endLine,isExampleBlock,inli yylineno=startLine; tcl.code_linenumbers = showLineNumbers; tcl.code_line=yylineno; + tcl.code->startCodeLine(tcl.code_linenumbers); if (tcl.code_linenumbers) { tcl.code->writeLineNumber(0,0,0,tcl.code_line); @@ -2641,6 +2641,7 @@ tcl_inf("%s (%d,%d) %d %d\n",myStr.ascii(),startLine,endLine,isExampleBlock,inli tcl.this_parser = NULL; tcl.entry_main = tcl_entry_new(); tcl_parse(myNs,myCls); + tcl.code->endCodeLine(); tcl.scan.clear(); tcl.ns.clear(); tcl.cl.clear(); diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp index 33cb3f4..bc45de2 100644 --- a/src/textdocvisitor.cpp +++ b/src/textdocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h index b6c50e0..81fd9e8 100644 --- a/src/textdocvisitor.h +++ b/src/textdocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator.h b/src/translator.h index f96962e..41d3461 100644 --- a/src/translator.h +++ b/src/translator.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -335,7 +335,62 @@ class Translator // new since 1.2.6 ////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ virtual QCString trRTFansicp() = 0; + + /*! Character sets + * <pre> + * 0 â ANSI + * 1 â Default + * 2 â Symbol + * 3 â Invalid + * 77 â Mac + * 128 â Shift Jis + * 129 â Hangul + * 130 â Johab + * 134 â GB2312 + * 136 â Big5 + * 161 â Greek + * 162 â Turkish + * 163 â Vietnamese + * 177 â Hebrew + * 178 â Arabic + * 179 â Arabic Traditional + * 180 â Arabic user + * 181 â Hebrew user + * 186 â Baltic + * 204 â Russian + * 222 â Thai + * 238 â Eastern European + * 254 â PC 437 + * 255 â OEM + * </pre> + */ virtual QCString trRTFCharSet() = 0; virtual QCString trRTFGeneralIndex() = 0; diff --git a/src/translator_am.h b/src/translator_am.h index e1b88f1..5264a21 100644 --- a/src/translator_am.h +++ b/src/translator_am.h @@ -2,7 +2,7 @@ *
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
diff --git a/src/translator_ar.h b/src/translator_ar.h index 6738537..818cef8 100644 --- a/src/translator_ar.h +++ b/src/translator_ar.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1251,7 +1251,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6 */ virtual QCString trRTFCharSet() { - return "0"; + return "178"; } /*! Used as header RTF general index */ diff --git a/src/translator_br.h b/src/translator_br.h index 7a0fb76..f4c0c20 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_ca.h b/src/translator_ca.h index da76896..521037e 100644 --- a/src/translator_ca.h +++ b/src/translator_ca.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_cn.h b/src/translator_cn.h index 197cfe4..ac9dca4 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_cz.h b/src/translator_cz.h index c317cae..d8d9428 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_de.h b/src/translator_de.h index 47fec53..415bf77 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_dk.h b/src/translator_dk.h index bf02402..4611b1a 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_en.h b/src/translator_en.h index bc51760..ccddccb 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_eo.h b/src/translator_eo.h index b4a077c..a4f60a1 100644 --- a/src/translator_eo.h +++ b/src/translator_eo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_es.h b/src/translator_es.h index bdddeba..745498b 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_fa.h b/src/translator_fa.h index e74e123..647ae28 100644 --- a/src/translator_fa.h +++ b/src/translator_fa.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1212,7 +1212,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5 */ virtual QCString trRTFCharSet() { - return "0"; + return "178"; } /*! Used as header RTF general index */ diff --git a/src/translator_fi.h b/src/translator_fi.h index fdf4b94..cfe933d 100644 --- a/src/translator_fi.h +++ b/src/translator_fi.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_fr.h b/src/translator_fr.h index 05bd4d8..482667e 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_gr.h b/src/translator_gr.h index 95072a3..8457f4c 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1183,11 +1183,10 @@ class TranslatorGreek : public Translator /*! Used as ansicpg for RTF fcharset - * \see trRTFansicp() for a table of possible values. */ virtual QCString trRTFCharSet() { - return "0"; + return "161"; } /*! Used as header RTF general index */ diff --git a/src/translator_hr.h b/src/translator_hr.h index 6c22919..0c33407 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_hu.h b/src/translator_hu.h index 3bed223..17d588e 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -1,8 +1,6 @@ /****************************************************************************** * - * - * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_id.h b/src/translator_id.h index cf9a475..3afbe50 100644 --- a/src/translator_id.h +++ b/src/translator_id.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_it.h b/src/translator_it.h index 701c7ec..53c9cb7 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_je.h b/src/translator_je.h index 09bb066..c6bfdcb 100644 --- a/src/translator_je.h +++ b/src/translator_je.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_jp.h b/src/translator_jp.h index 8278abe..8f080a4 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_ke.h b/src/translator_ke.h index 4874a5c..f089d38 100644 --- a/src/translator_ke.h +++ b/src/translator_ke.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_kr.h b/src/translator_kr.h index 3158405..043323c 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -1,8 +1,6 @@ /****************************************************************************** * - * - * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_lt.h b/src/translator_lt.h index 6dd1832..166ecbd 100644 --- a/src/translator_lt.h +++ b/src/translator_lt.h @@ -1,8 +1,6 @@ /****************************************************************************** * - * - * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1196,7 +1194,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6 */ virtual QCString trRTFansicp() { - return "1252"; + return "1257"; } @@ -1205,7 +1203,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6 */ virtual QCString trRTFCharSet() { - return "0"; + return "186"; } /*! Used as header RTF general index */ diff --git a/src/translator_mk.h b/src/translator_mk.h index b5d8dcb..f162def 100644 --- a/src/translator_mk.h +++ b/src/translator_mk.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1190,7 +1190,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFansicp() { - return "1252"; + return "1251"; } @@ -1199,7 +1199,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFCharSet() { - return "238"; + return "204"; } /*! Used as header RTF general index */ diff --git a/src/translator_nl.h b/src/translator_nl.h index db724db..3c1cb8e 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_no.h b/src/translator_no.h index cffaa09..536eb95 100644 --- a/src/translator_no.h +++ b/src/translator_no.h @@ -1,8 +1,6 @@ /****************************************************************************** * - * - * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_pl.h b/src/translator_pl.h index a6e25c2..49ce796 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_pt.h b/src/translator_pt.h index e7510d9..08d228f 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_ro.h b/src/translator_ro.h index 42f0224..c0a4c3d 100644 --- a/src/translator_ro.h +++ b/src/translator_ro.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_ru.h b/src/translator_ru.h index e7f7d95..8e2fc6f 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_sc.h b/src/translator_sc.h index 2ea2091..bf04fc9 100644 --- a/src/translator_sc.h +++ b/src/translator_sc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1217,7 +1217,7 @@ class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFansicp() { - return "1252"; + return "1251"; } @@ -1226,7 +1226,7 @@ class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFCharSet() { - return "0"; + return "204"; } /*! Used as header RTF general index */ diff --git a/src/translator_si.h b/src/translator_si.h index 8be0cd4..f1dc23f 100644 --- a/src/translator_si.h +++ b/src/translator_si.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_sk.h b/src/translator_sk.h index df3feea..9418576 100644 --- a/src/translator_sk.h +++ b/src/translator_sk.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1172,7 +1172,7 @@ class TranslatorSlovak : public Translator /*! Used as ansicpg for RTF fcharset */ virtual QCString trRTFCharSet() { - return "3"; + return "238"; } /*! Used as header RTF general index */ diff --git a/src/translator_sr.h b/src/translator_sr.h index b12f87c..a9ce978 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_sv.h b/src/translator_sv.h index d6eeff7..7b25d6a 100644 --- a/src/translator_sv.h +++ b/src/translator_sv.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_tr.h b/src/translator_tr.h index 4370400..efb0d14 100644 --- a/src/translator_tr.h +++ b/src/translator_tr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_tw.h b/src/translator_tw.h index 002c8a0..3edd462 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_ua.h b/src/translator_ua.h index 022100d..0b65aea 100644 --- a/src/translator_ua.h +++ b/src/translator_ua.h @@ -1,8 +1,6 @@ /****************************************************************************** * - * - * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translator_vi.h b/src/translator_vi.h index d7984a9..592c005 100644 --- a/src/translator_vi.h +++ b/src/translator_vi.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -1210,7 +1210,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFansicp() { - return "1252"; + return "1258"; } @@ -1219,7 +1219,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 */ virtual QCString trRTFCharSet() { - return "0"; + return "163"; } /*! Used as header RTF general index */ diff --git a/src/translator_za.h b/src/translator_za.h index b3084c6..fb02744 100644 --- a/src/translator_za.h +++ b/src/translator_za.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/translatordecoder.h b/src/translatordecoder.h index 7261ee9..f6ba8dd 100644 --- a/src/translatordecoder.h +++ b/src/translatordecoder.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/types.h b/src/types.h index 9bc5827..2db4b5d 100644 --- a/src/types.h +++ b/src/types.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/util.cpp b/src/util.cpp index 0d48f96..8e26261 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -278,7 +278,7 @@ static QCString stripFromPath(const QCString &path,QStrList &l) { QCString prefix = s; if (prefix.length() > length && - stricmp(path.left(prefix.length()),prefix)==0) // case insensitive compare + qstricmp(path.left(prefix.length()),prefix)==0) // case insensitive compare { length = prefix.length(); potential = path.right(path.length()-prefix.length()); @@ -2449,8 +2449,8 @@ 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 " - "inheritance relation! Please send a bug report to dimitri@stack.nl\n",cd->name().data()); + err("warning: class %s seem to have a recursive " + "inheritance relation!\n",cd->name().data()); return -1; } int m=maxInheritanceDepth; @@ -2889,11 +2889,11 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, stripIrrelevantConstVolatile(dstAType); // strip typename keyword - if (strncmp(srcAType,"typename ",9)==0) + if (qstrncmp(srcAType,"typename ",9)==0) { srcAType = srcAType.right(srcAType.length()-9); } - if (strncmp(dstAType,"typename ",9)==0) + if (qstrncmp(dstAType,"typename ",9)==0) { dstAType = dstAType.right(dstAType.length()-9); } @@ -3802,7 +3802,7 @@ static void findMembersWithSpecificName(MemberName *mn, { bool match=TRUE; ArgumentList *argList=0; - if (args && !md->isDefine() && strcmp(args,"()")!=0) + if (args && !md->isDefine() && qstrcmp(args,"()")!=0) { argList=new ArgumentList; LockingPtr<ArgumentList> mdAl = md->argumentList(); @@ -3964,7 +3964,7 @@ bool getDefs(const QCString &scName, { delete argList; argList=0; } - if (mdist==maxInheritanceDepth && args && strcmp(args,"()")==0) + if (mdist==maxInheritanceDepth && args && qstrcmp(args,"()")==0) // no exact match found, but if args="()" an arbitrary member will do { //printf(" >Searching for arbitrary member\n"); @@ -4022,7 +4022,7 @@ bool getDefs(const QCString &scName, MemberListIterator mmli(*mn); MemberDef *mmd, *fuzzy_mmd = 0; ArgumentList *argList = 0; - bool hasEmptyArgs = args && strcmp(args, "()") == 0; + bool hasEmptyArgs = args && qstrcmp(args, "()") == 0; if (args) stringToArgumentList(args, argList = new ArgumentList); @@ -4098,7 +4098,7 @@ bool getDefs(const QCString &scName, { // namespace is found bool match=TRUE; ArgumentList *argList=0; - if (args && strcmp(args,"()")!=0) + if (args && qstrcmp(args,"()")!=0) { argList=new ArgumentList; LockingPtr<ArgumentList> mmdAl = mmd->argumentList(); @@ -4120,7 +4120,7 @@ bool getDefs(const QCString &scName, } } } - if (!found && args && !strcmp(args,"()")) + if (!found && args && !qstrcmp(args,"()")) // no exact match found, but if args="()" an arbitrary // member will do { @@ -4171,7 +4171,7 @@ bool getDefs(const QCString &scName, findMembersWithSpecificName(mn,args,FALSE,currentFile,checkCV,forceTagFile,members); } //printf("found %d members\n",members.count()); - if (members.count()!=1 && args && !strcmp(args,"()")) + if (members.count()!=1 && args && !qstrcmp(args,"()")) { // no exact match found, but if args="()" an arbitrary // member will do @@ -4295,10 +4295,18 @@ bool resolveRef(/* in */ const char *scName, bool checkScope ) { + //printf("resolveRef(scope=%s,name=%s,inSeeBlock=%d)\n",scName,name,inSeeBlock); QCString tsName = name; //bool memberScopeFirst = tsName.find('#')!=-1; QCString fullName = substitute(tsName,"#","::"); - fullName = removeRedundantWhiteSpace(substitute(fullName,".","::")); + if (fullName.find("anonymous_namespace{")==-1) + { + fullName = removeRedundantWhiteSpace(substitute(fullName,".","::")); + } + else + { + fullName = removeRedundantWhiteSpace(fullName); + } int bracePos=fullName.findRev('('); // reverse is needed for operator()(...) int endNamePos=bracePos!=-1 ? bracePos : fullName.length(); @@ -4559,6 +4567,7 @@ bool resolveLink(/* in */ const char *scName, ClassDef *cd; DirDef *dir; NamespaceDef *nd; + SectionInfo *si=0; bool ambig; if (linkRef.isEmpty()) // no reference name! { @@ -4569,7 +4578,6 @@ bool resolveLink(/* in */ const char *scName, GroupDef *gd = pd->getGroupDef(); if (gd) { - SectionInfo *si=0; if (!pd->name().isEmpty()) si=Doxygen::sectionDict->find(pd->name()); *resContext=gd; if (si) resAnchor = si->label; @@ -4580,6 +4588,12 @@ bool resolveLink(/* in */ const char *scName, } return TRUE; } + else if ((si=Doxygen::sectionDict->find(linkRef))) + { + *resContext=si->definition; + resAnchor = si->label; + return TRUE; + } else if ((pd=Doxygen::exampleSDict->find(linkRef))) // link to an example { *resContext=pd; @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/version.h b/src/version.h index 4752520..9d523c1 100644 --- a/src/version.h +++ b/src/version.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/vhdlcode.l b/src/vhdlcode.l index b3d24d1..5806149 100644 --- a/src/vhdlcode.l +++ b/src/vhdlcode.l @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 0a0141f..3024747 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -27,6 +27,11 @@ #include <qcstring.h> #include <qfileinfo.h> #include <qstringlist.h> + +#ifdef DEBUGFLOW +#include <qmap.h> +#endif + /* --------------------------------------------------------------- */ // local includes @@ -95,12 +100,11 @@ const MemberDef* VhdlDocGen::getFlowMember() //-------------------------------------------------------------------------------------------------- static void codify(FTextStream &t,const char *str) { - if (str) { const char *p=str; char c; - while (*p) + while (*p) { c=*p++; switch(c) @@ -330,7 +334,7 @@ static void writeColumn(FTextStream &t,MemberDef *md,bool start) QCString toolTip; static QRegExp reg("[%]"); - bool bidir=(md!=0 &&( stricmp(md->typeString(),"inout")==0)); + bool bidir=(md!=0 &&( qstricmp(md->typeString(),"inout")==0)); if (md) { @@ -766,7 +770,7 @@ MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,MemberList for (fmni.toFirst();(md=fmni.current());++fmni) { - if (stricmp(key.data(),md->name().data())==0) + if (qstricmp(key,md->name())==0) { return md; } @@ -1003,9 +1007,9 @@ void VhdlDocGen::findAllArchitectures(QList<QCString>& qll,const ClassDef *cd) { QStringList ql=QStringList::split("-",jj,FALSE); QCString temp=ql[1].utf8(); - if (stricmp(cd->className().data(),temp.data())==0) + if (qstricmp(cd->className(),temp)==0) { - QCString *cl=new QCString(jj.data()); + QCString *cl=new QCString(jj); qll.insert(0,cl); } } @@ -1057,12 +1061,9 @@ void VhdlDocGen::writeVhdlLink(const ClassDef* ccd ,OutputList& ol,QCString& typ ol.lineBreak(); } -bool VhdlDocGen::compareString(const QCString& s1,const QCString& s2) +int VhdlDocGen::compareString(const QCString& s1,const QCString& s2) { - QCString str1=s1.stripWhiteSpace(); - QCString str2=s2.stripWhiteSpace(); - - return stricmp(str1.data(),str2.data()); + return qstricmp(s1.stripWhiteSpace(),s2.stripWhiteSpace()); } @@ -1078,7 +1079,7 @@ void VhdlDocGen::prepareComment(QCString& qcs) { index=qcs.find(s,0,TRUE); if (index<0) break; - qcs=qcs.remove(index,strlen(s)); + qcs=qcs.remove(index,qstrlen(s)); } qcs=qcs.stripWhiteSpace(); } @@ -1460,8 +1461,10 @@ void VhdlDocGen::writeProcedureProto(OutputList& ol,const ArgumentList* al,const } VhdlDocGen::startFonts(nn,"vhdlchar",ol); // write name - if (stricmp(arg->attrib.data(),arg->type.data()) != 0) + if (qstricmp(arg->attrib,arg->type) != 0) + { VhdlDocGen::startFonts(arg->attrib.lower(),"stringliteral",ol); // write in|out + } ol.docify(" "); VhdlDocGen::formatString(arg->type,ol,mdef); sem=TRUE; @@ -1761,27 +1764,27 @@ static void setGlobalType(MemberList *ml) { QCString l=mdd->typeString(); - if (strcmp(mdd->argsString(),"package")==0) + if (qstrcmp(mdd->argsString(),"package")==0) { mdd->setMemberSpecifiers(VhdlDocGen::INSTANTIATION); } - else if (strcmp(mdd->argsString(),"configuration")==0) + else if (qstrcmp(mdd->argsString(),"configuration")==0) { mdd->setMemberSpecifiers(VhdlDocGen::CONFIG); } - else if (strcmp(mdd->typeString(),"library")==0) + else if (qstrcmp(mdd->typeString(),"library")==0) { mdd->setMemberSpecifiers(VhdlDocGen::LIBRARY); } - else if (strcmp(mdd->typeString(),"use")==0) + else if (qstrcmp(mdd->typeString(),"use")==0) { mdd->setMemberSpecifiers(VhdlDocGen::USE); } - else if (stricmp(mdd->typeString(),"misc")==0) + else if (qstricmp(mdd->typeString(),"misc")==0) { mdd->setMemberSpecifiers(VhdlDocGen::MISCELLANEOUS); } - else if (stricmp(mdd->typeString(),"ucf_const")==0) + else if (qstricmp(mdd->typeString(),"ucf_const")==0) { mdd->setMemberSpecifiers(VhdlDocGen::UCF_CONST); } @@ -2005,7 +2008,7 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, QCString nn; //VhdlDocGen::adjustRecordMember(mdef); if (gd) gd=0; - switch(mm) + switch (mm) { case VhdlDocGen::MISCELLANEOUS: VhdlDocGen::writeCodeFragment(mdef,ol); @@ -2182,17 +2185,13 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, bRec=largs.stripPrefix("record") ; bUnit=largs.stripPrefix("units") ; ol.startBold(); - if (bRec) - ol.docify("record: "); - if (bUnit) - ol.docify("units: "); + if (bRec) ol.docify("record: "); + if (bUnit) ol.docify("units: "); writeLink(mdef,ol); ol.insertMemberAlign(); - if (!bRec) - VhdlDocGen::formatString(ltype,ol,mdef); + if (!bRec) VhdlDocGen::formatString(ltype,ol,mdef); if (bUnit) ol.lineBreak(); - if (bRec || bUnit) - writeRecorUnit(largs,ol,mdef); + if (bRec || bUnit) writeRecorUnit(largs,ol,mdef); ol.endBold(); break; @@ -2381,7 +2380,6 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol, bool VhdlDocGen::writeClassType( ClassDef *& cd, OutputList &ol ,QCString & cname) { - int id=cd->protection(); QCString qcs = VhdlDocGen::trTypeString(id+2); cname=VhdlDocGen::getClassName(cd); @@ -2620,7 +2618,7 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b QCString comment("#!"); QCString brief; - while(!ucFile.isEmpty()) + while (!ucFile.isEmpty()) { int i=ucFile.find("\n"); if (i<0) break; @@ -2642,7 +2640,9 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b { int i=temp.find("-name"); if (i>0) + { temp=temp.remove(0,i+5); + } temp.stripPrefix("set_location_assignment"); @@ -2673,7 +2673,7 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr QRegExp sp("\\s"); QRegExp reg("[\\s=]"); QCString n; - // bool bo=(stricmp(type,qcs.data())==0); + // bool bo=(qstricmp(type,qcs.data())==0); VhdlDocGen::deleteAllChars(qcs,';'); qcs=qcs.stripWhiteSpace(); @@ -2742,9 +2742,13 @@ static void writeUCFLink(const MemberDef* mdef,OutputList &ol) } if (mdef->name().contains("dummy")==0) + { VhdlDocGen::writeLink(mdef,ol); + } if (equ) + { ol.insertMemberAlign(); + } ol.docify(" "); VhdlDocGen::formatString(largs,ol,mdef); } @@ -2773,10 +2777,10 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne) if (Config_getBool("HAVE_DOT") && Config_getEnum("DOT_IMAGE_FORMAT")=="svg") { - QCString ov = theTranslator->trDesignOverview(); - QCString ofile("vhdl_design_overview"); - LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,TRUE,ofile,ov,""); - kk->addChild(oo); + QCString ov = theTranslator->trDesignOverview(); + QCString ofile("vhdl_design_overview"); + LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,TRUE,ofile,ov,""); + kk->addChild(oo); } while (fn) @@ -2819,7 +2823,9 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch) arch= ql[2].utf8(); ql=QStringList::split(exp,arch,FALSE); if (ql.count()>1) // expression + { arch=""; + } } return label; // label } @@ -2835,16 +2841,22 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch) QStringList ql=QStringList::split(exp,entity,FALSE); if (ql.contains("open")) + { return "open"; + } label=ql[0].utf8(); entity = ql[1].utf8(); if ((index=entity.findRev("."))>=0) + { entity.remove(0,index+1); + } if (ql.count()==3) + { arch=ql[2].utf8(); + } return label; } @@ -2858,8 +2870,10 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch) ClassDef *cd; for (;(cd=cli.current());++cli) { - if(stricmp(className,cd->name().data())==0) - return cd; + if (qstricmp(className,cd->name().data())==0) + { + return cd; + } } return 0; } @@ -2878,16 +2892,16 @@ void assignBinding(VhdlConfNode * conf) { QList<Entry> instList= getVhdlInstList(); QListIterator<Entry> eli(instList); - Entry *cur; - ClassDef *archClass,*entClass; + Entry *cur=0; + ClassDef *archClass=0,*entClass=0; QCString archName,entityName; QCString arcBind,entBind; - + bool others,all; entBind=conf->binding; QCString conf2=VhdlDocGen::parseForBinding(entBind,arcBind); - - if(stricmp(conf2.data(),"configuration")==0) + + if (conf2=="configuration") { QList<VhdlConfNode> confList = getVhdlConfiguration(); VhdlConfNode* vconf; @@ -2909,17 +2923,20 @@ void assignBinding(VhdlConfNode * conf) } } if (!found) + { err("error: %s%s",conf->binding.data()," could not be found"); + } //return; }// if - else{ // find entity work.entname(arch?) + else + { // find entity work.entname(arch?) QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0); QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1); a=e+"::"+a; archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data()); entClass= VhdlDocGen::findVhdlClass(e.data()); //Doxygen::classSDict->find(e.data()); } - + QCString label=conf->compSpec.lower(); //label.prepend("|"); @@ -2933,52 +2950,54 @@ void assignBinding(VhdlConfNode * conf) QCString allOt=VhdlDocGen::getIndexWord(conf->arch.data(),0); all=allOt.lower()=="all" ; others= allOt.lower()=="others"; - + for (;(cur=eli.current());++eli){ - + if (cur->exception.lower()==label || conf->isInlineConf) { QCString sign,archy; if (all || others) archy=VhdlDocGen::getIndexWord(conf->arch.data(),1); - else + else archy=conf->arch; - - - QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower(); - QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower(); - QStringList ql=QStringList::split(",",inst1); - for(uint j=0;j<ql.count();j++) - { - QCString archy1,sign1; - if(all || others) - { - archy1=VhdlDocGen::getIndexWord(conf->arch.data(),1); - sign1=cur->type; - } - else - { - archy1=comp+":"+ql[j].utf8(); - sign1=cur->type+":"+cur->name; - } - - if (archy1==sign1.lower() && !cur->stat) + QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower(); + QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower(); + + QStringList ql=QStringList::split(",",inst1); + + for(uint j=0;j<ql.count();j++) { - // fprintf(stderr," \n label [%s] [%s] [%s]",cur->exception.data(),cur->type.data(),cur->name.data()); - ClassDef *ent= VhdlDocGen::findVhdlClass(entBind.data());//Doxygen::classSDict->find(entBind.data()); - - if (entClass==0 || ent==0) - continue; - - addInstance(ent,archClass,entClass,cur); - cur->stat=TRUE; - break; - } - }// for - } + QCString archy1,sign1; + if(all || others) + { + archy1=VhdlDocGen::getIndexWord(conf->arch.data(),1); + sign1=cur->type; + } + else + { + archy1=comp+":"+ql[j].utf8(); + sign1=cur->type+":"+cur->name; + } + + if (archy1==sign1.lower() && !cur->stat) + { + // fprintf(stderr," \n label [%s] [%s] [%s]",cur->exception.data(),cur->type.data(),cur->name.data()); + ClassDef *ent= VhdlDocGen::findVhdlClass(entBind.data());//Doxygen::classSDict->find(entBind.data()); + + if (entClass==0 || ent==0) + { + continue; + } + + addInstance(ent,archClass,entClass,cur); + cur->stat=TRUE; + break; + } + }// for + } }//for }//assignBinding @@ -3031,8 +3050,6 @@ void VhdlDocGen::computeVhdlComponentRelations() entity=cur->type; } - - ClassDef *classEntity= VhdlDocGen::findVhdlClass(entity.data());//Doxygen::classSDict->find(entity); inst=VhdlDocGen::getIndexWord(cur->args.data(),0); ClassDef *cd=Doxygen::classSDict->find(inst); @@ -3050,23 +3067,23 @@ void VhdlDocGen::computeVhdlComponentRelations() static void addInstance(ClassDef* classEntity, ClassDef* ar, ClassDef *cd , Entry *cur,ClassDef* /*archBind*/) +{ + + QCString bName,n1; + if (ar==0) return; + + if (classEntity==0) { - - QCString bName,n1; - if (ar==0) return; + //add component inst + n1=cur->type; + goto ferr; + } - if(classEntity==0) - { - //add component inst - n1=cur->type; - goto ferr; - } - if (classEntity==cd) return; - bName=classEntity->name(); - // fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name); - n1=classEntity->name().data(); + bName=classEntity->name(); + // fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name); + n1=classEntity->name().data(); if (!cd->isBaseClass(classEntity, true, 0)) { @@ -3111,17 +3128,17 @@ ferr: md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine); FileDef *fd=ar->getFileDef(); md->setBodyDef(fd); - - QCString info="Info: Elaborating entity "+n1; - fd=ar->getFileDef(); - info+=" for hierarchy "; - QRegExp epr("[|]"); - QCString label=cur->type+":"+cur->write+":"+cur->name; - label.replace(epr,":"); - info+=label; - fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data()); - ar->insertMember(md); - + + QCString info="Info: Elaborating entity "+n1; + fd=ar->getFileDef(); + info+=" for hierarchy "; + QRegExp epr("[|]"); + QCString label=cur->type+":"+cur->write+":"+cur->name; + label.replace(epr,":"); + info+=label; + fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data()); + ar->insertMember(md); + } @@ -3273,6 +3290,8 @@ static MemberDef* findMemFlow(const MemberDef* mdef) void VhdlDocGen::createFlowChart(const MemberDef *mdef) { + if (mdef==0) return; + QCString codeFragment; MemberDef* mm=0; if((mm=findMemFlow(mdef))!=0) @@ -3282,7 +3301,9 @@ void VhdlDocGen::createFlowChart(const MemberDef *mdef) return; } else + { mdList.append(mdef); + } //fprintf(stderr,"\n create flow mem %s %p\n",mdef->name().data(),mdef); @@ -3296,7 +3317,6 @@ void VhdlDocGen::createFlowChart(const MemberDef *mdef) VhdlDocGen::setFlowMember(mdef); Entry root; pIntf->parseInput("",codeFragment.data(),&root); - } bool VhdlDocGen::isConstraint(const MemberDef *mdef) @@ -3358,42 +3378,142 @@ bool VhdlDocGen::isMisc(const MemberDef *mdef) //############################## Flowcharts ################################################# +#define STARTL (FlowChart::WHILE_NO | FlowChart::IF_NO | \ + FlowChart::FOR_NO | FlowChart::CASE_NO | \ + FlowChart::LOOP_NO | WHEN_NO) +#define DECLN (FlowChart::WHEN_NO | \ + FlowChart::ELSIF_NO | FlowChart::IF_NO | \ + FlowChart::FOR_NO | FlowChart::WHILE_NO | \ + FlowChart::CASE_NO | FlowChart::LOOP_NO ) +#define STARTFIN (FlowChart::START_NO | FlowChart::END_NO) +#define LOOP (FlowChart::FOR_NO | FlowChart::WHILE_NO | \ + FlowChart::LOOP_NO ) +#define ENDCL (FlowChart::END_CASE | FlowChart::END_LOOP) +#define EEND (FlowChart::ENDIF_NO | FlowChart::ELSE_NO ) +#define IFF (FlowChart::ELSIF_NO | FlowChart::IF_NO) +#define EXITNEXT (FlowChart::EXIT_NO | FlowChart::NEXT_NO ) +#define EMPTY (EEND | FlowChart::ELSIF_NO) +#define EE (FlowChart::ELSE_NO | FlowChart::ELSIF_NO) +#define EMPTNODE (ENDCL | EEND | FlowChart::ELSIF_NO) +#define FLOWLEN (flowList.count()-1) + +static int ifcounter=0; +static int nodeCounter=0; + +struct +{ + // link colors + const char *textNodeLink; + const char *yesNodeLink; + const char *noNodeLink; + + // node colors + const char* comment; + const char* decisionNode; + const char* varNode; + const char *startEndNode; + const char* textNode; +} flowCol = +{ "green", // textNodeLink + "red", // yesNodeLink + "black", // noNodeLink + "khaki", // comment + "0.7 0.3 1.0", // decisionNode + "lightyellow", // varNode + "white", // startEndNode + "lightcyan" // textNode +}; + +QList<FlowChart> FlowChart::flowList; -#define STARTL (FlowNode::WHILE_NO | FlowNode::IF_NO | \ - FlowNode::FOR_NO | FlowNode::CASE_NO | \ - FlowNode::LOOP_NO ) -#define DECLN (FlowNode::NEXT_WHEN_NO | FlowNode::WHEN_NO | \ - FlowNode::ELSIF_NO | FlowNode::IF_NO | \ - FlowNode::FOR_NO | FlowNode::WHILE_NO | \ - FlowNode::CASE_NO | FlowNode::LOOP_NO ) -#define STARTFIN (FlowNode::START_NO | FlowNode::END_NO) -#define LOOP (FlowNode::FOR_NO | FlowNode::WHILE_NO | \ - FlowNode::LOOP_NO ) -#define ENDCL (FlowNode::END_CASE | FlowNode::END_LOOP) -#define EEND (FlowNode::ENDIF_NO | FlowNode::ELSE_NO) -#define IFF (FlowNode::ELSIF_NO | FlowNode::IF_NO) -#define EWHEN (FlowNode::NEXT_WHEN_NO) -#define EMPTY (EEND | FlowNode::ELSIF_NO) - -int FlowNode::ifcounter=0; -int FlowNode::nodeCounter=0; -int FlowNode::imageCounter=0; -int FlowNode::caseCounter=0; -QList<FlowNode> FlowNode::flowList; - -void FlowNode::colTextNodes() +#ifdef DEBUGFLOW +static QMap<QCString,int> keyMap; +#endif + +void FlowChart::printNode(const FlowChart* flo) +{ + if (flo==0) return; + QCString ui="-"; + QCString q,t; + QRegExp ep("[\t\n\r]"); + + ui.fill('-',255); + + if (flo->type & STARTL) + { + if (flo->stamp>0) + { + q=ui.left(2*flo->stamp); + } + else + { + q=" "; + } + QCString nn=flo->exp.stripWhiteSpace(); + printf("\nYES: %s%s[%d,%d]",q.data(),nn.data(),flo->stamp,flo->id); + } + else + { + if (flo->type & COMMENT_NO) + { + t=flo->label; + } + else + { + t=flo->text; + } + t=t.replace(ep,""); + if (t.isEmpty()) + { + t=" "; + } + if (flo->stamp>0) + { + q=ui.left(2*flo->stamp); + } + else + { + q=" "; + } + if (flo->type & EMPTNODE) + { + printf("\n NO: %s%s[%d,%d]",q.data(),FlowChart::getNodeType(flo->type),flo->stamp,flo->id); + } + else if (flo->type & COMMENT_NO) + { + printf("\n NO: %s%s[%d,%d]",t.data(),FlowChart::getNodeType(flo->type),flo->stamp,flo->id); + } + else + { + printf("\n NO: %s%s[%d,%d]",q.data(),t.data(),flo->stamp,flo->id); + } + } +} + +void FlowChart::printFlowTree() +{ + uint size=flowList.count(); + for (uint j=0;j<size;j++) + { + printNode(flowList.at(j)); + } +} + +void FlowChart::colTextNodes() { QCString text; - FlowNode *flno; + FlowChart *flno; bool found=FALSE; for (uint j=0;j<flowList.count();j++) { - FlowNode *flo=flowList.at(j); - if (flo->type==TEXT_NO) + FlowChart *flo=flowList.at(j); + if (flo->type&TEXT_NO) { text+=flo->text+'\n'; if (!found) + { flno=flo; + } if (found) { flno->text+=flo->text; @@ -3410,14 +3530,14 @@ void FlowNode::colTextNodes() // if..elseif without text for (uint j=0;j<flowList.count()-1;j++) { - FlowNode *flo=flowList.at(j); + FlowChart *flo=flowList.at(j); int kind=flo->type; - if ( kind & IFF || flo->type==ELSE_NO) + if ( (kind & IFF) || (flo->type & ELSE_NO)) { - FlowNode *ftemp=flowList.at(j+1); + FlowChart *ftemp=flowList.at(j+1); if (ftemp->type & EMPTY) { - FlowNode *fNew = new FlowNode(TEXT_NO,"empty ",0); + FlowChart *fNew = new FlowChart(TEXT_NO,"empty ",0); fNew->stamp=flo->stamp; flowList.insert(j+1,fNew); } @@ -3426,14 +3546,14 @@ void FlowNode::colTextNodes() }// colTextNode -QCString FlowNode::getNodeName(int n) +QCString FlowChart::getNodeName(int n) { QCString node; node.setNum(n); return node.prepend("node"); } -void FlowNode::delFlowList() +void FlowChart::delFlowList() { ifcounter=0; nodeCounter=0; @@ -3441,14 +3561,123 @@ void FlowNode::delFlowList() for (uint j=0;j <size ;j++) { - FlowNode *fll=flowList.at(j); + FlowChart *fll=flowList.at(j); delete fll; } flowList.clear(); } +void FlowChart::alignCommentNode(FTextStream &t,QCString com) +{ + uint max=0; + QCString s; + QStringList ql=QStringList::split("\n",com); + for (uint j=0;j<ql.count();j++) + { + s=(QCString)ql[j].utf8(); + if (max<s.length()) max=s.length(); + } + + s=ql.last().utf8(); + int diff=max-s.length(); + + QCString n(1); + if (diff>0) + { + n.fill(' ',2*diff); + n.append("."); + s+=n; + ql.remove(ql.last()); + ql.append(s); + } + + for (uint j=0;j<ql.count();j++) + { + s=(QCString)ql[j].utf8(); + if (j<ql.count()-1) + { + s+="\n"; + } + FlowChart::codify(t,s.data()); + } +} + + +void FlowChart::buildCommentNodes(FTextStream & t) +{ + uint size=flowList.count(); + bool begin=false; + + for (uint j=0;j < size-1 ;j++) + { + FlowChart *fll=flowList.at(j); + if (fll->type & COMMENT_NO) + { + FlowChart* to=flowList.at(j+1); + if (to->type & COMMENT_NO) + { + fll->label+="\n"; + QCString temp=fll->label+to->label; + to->label=temp; + flowList.remove(j); + size--; + if (j>0) j--; + } + } + }// for + + for (uint j=0;j <flowList.count() ;j++) + { + FlowChart *fll=flowList.at(j); + + if (fll->type & BEGIN_NO) + { + begin = true; + continue; + } + + if (fll->type & COMMENT_NO) + { + FlowChart* to; + if (!begin) + { + // comment between function/process .. begin is linked to start node + to=flowList.at(0); + } + else + { + to=flowList.at(j+1); + } + t << getNodeName(fll->id); + t << "[shape=none, label=<\n"; + t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n "; + t << "<TR><TD BGCOLOR=\""; + t << flowCol.comment; + t << "\" > "; + + FlowChart::alignCommentNode(t,fll->label); + t << " </TD></TR></TABLE>>];"; + writeEdge(t,fll->id,to->id,2); + } + }// for + + // delete comment nodes; + size=flowList.count(); + for (uint j=0;j < size;j++) + { + FlowChart *fll=flowList.at(j); + if (fll->type & (COMMENT_NO | BEGIN_NO)) + { + flowList.remove(j); + delete fll; + fll=0; + size--; + if (j>0) j--; + } + }// for; +} -void FlowNode::codify(FTextStream &t,const char *str) +void FlowChart::codify(FTextStream &t,const char *str) { if (str) { @@ -3471,31 +3700,38 @@ void FlowNode::codify(FTextStream &t,const char *str) } }//codify -FlowNode::~FlowNode() +FlowChart::~FlowChart() { } -FlowNode::FlowNode(int typ,const char * t,const char* ex,const char* label) +FlowChart::FlowChart(int typ,const char * t,const char* ex,const char* lab) { + stamp=ifcounter; + if (typ & STARTL) { ifcounter++; } - stamp=FlowNode::ifcounter; text=t; exp=ex; type=typ; - this->label=label; + label=lab; + if (typ & (ELSE_NO | ELSIF_NO)) + { + stamp--; + } - if (typ==START_NO || typ==END_NO || typ==VARIABLE_NO) + if (typ & (START_NO | END_NO | VARIABLE_NO)) + { stamp=-1; + } - id=++nodeCounter; + id=nodeCounter++; } -void FlowNode::addFlowNode(int type,const char* text,const char* exp, const char *label) +void FlowChart::addFlowChart(int type,const char* text,const char* exp, const char *label) { static QRegExp reg("[;]"); static QRegExp reg1("[\"]"); @@ -3512,122 +3748,92 @@ void FlowNode::addFlowNode(int type,const char* text,const char* exp, const char } if (exp) + { expression=expression.replace(reg1,"\\\""); + } + + FlowChart *fl=new FlowChart(type,typeString.data(),expression.data(),label); - FlowNode *fl=new FlowNode(type,typeString.data(),expression.data(),label); - if (type==START_NO) +#ifdef DEBUGFLOW + VhdlContainer* vc= getVhdlCont(); + fl->line=vc->yyLineNr; +#endif + + if (type & (START_NO | VARIABLE_NO)) + { flowList.prepend(fl); - else if (type==VARIABLE_NO) - flowList.insert(1,fl); + } else + { flowList.append(fl); + } } -void FlowNode::moveToPrevLevel() +void FlowChart::moveToPrevLevel() { if (!VhdlDocGen::getFlowMember()) return; ifcounter--; } -void FlowNode::setLabel(const char* t) -{ - FlowNode *fll=flowList.last(); - fll->label=t; - assert(fll->type & LOOP); - -} - -void FlowNode::printFlowList() -{ - uint size=FlowNode::flowList.count(); - for (uint j=0;j<size;j++) - { - FlowNode *fll=flowList.at(j); - QCString ty=getNodeType(fll->type); - - printf("============================================"); - if (!fll->text.isEmpty()) - { - printf("\n (%d) NODE:type %s text %s stamp:%d\n",fll->id,ty.data(),fll->text.data(),fll->stamp); - } - else - { - printf("\n (%d) NODE:type %s exp %s stamp:%d [%s]\n",fll->id,ty.data(),fll->exp.data(),fll->stamp,fll->label.data()); - } - - printf("============================================"); - }// for -} - - -QCString FlowNode::convertNameToFileName() +QCString FlowChart::convertNameToFileName() { - static QRegExp exp ("[#&*+-/<=>|$?^]"); + static QRegExp exp ("[^][a-z_A-Z0-9]"); QCString temp,qcs; const MemberDef* md=VhdlDocGen::getFlowMember(); - temp.sprintf("%p",md); - qcs=md->name(); + temp.sprintf("%p",md); + qcs=md->name(); -//long pp=(long)&temp; - - // string literal - VhdlDocGen::deleteAllChars(qcs,'"'); - - // functions like "<=", ">" - int u=qcs.find(exp,0); - - if (u>=0) + if (qcs.find(exp,0)>=0) { qcs.prepend("Z"); qcs=qcs.replace(exp,"_"); } - // temp=temp.setNum(1); return qcs+temp; } -const char* FlowNode::getNodeType(int c) +const char* FlowChart::getNodeType(int c) { switch(c) { - case FlowNode::IF_NO: return "if "; - case FlowNode::ELSIF_NO: return "elsif "; - case FlowNode::ELSE_NO: return "else "; - case FlowNode::CASE_NO: return "case "; - case FlowNode::WHEN_NO: return "when "; - case FlowNode::EXIT_NO: return "exit "; - case FlowNode::END_NO: return "end "; - case FlowNode::TEXT_NO: return "text "; - case FlowNode::START_NO: return "start "; - case FlowNode::ENDIF_NO: return "endif "; - case FlowNode::FOR_NO: return "for "; - case FlowNode::WHILE_NO: return "while "; - case FlowNode::END_LOOP: return "end_loop "; - case FlowNode::END_CASE: return "end_case "; - case FlowNode::VARIABLE_NO: return "variable_decl "; - case FlowNode::RETURN_NO: return "return "; - case FlowNode::LOOP_NO: return "infinte loop "; - case FlowNode::NEXT_NO: return "next "; - case FlowNode::EXIT_WHEN_NO: return "exit_when "; - case FlowNode::NEXT_WHEN_NO: return "next_when "; - case FlowNode::EMPTY_NO: return "empty "; + case IF_NO: return "if "; + case ELSIF_NO: return "elsif "; + case ELSE_NO: return "else "; + case CASE_NO: return "case "; + case WHEN_NO: return "when "; + case EXIT_NO: return "exit "; + case END_NO: return "end "; + case TEXT_NO: return "text "; + case START_NO: return "start "; + case ENDIF_NO: return "endif "; + case FOR_NO: return "for "; + case WHILE_NO: return "while "; + case END_LOOP: return "end_loop "; + case END_CASE: return "end_case "; + case VARIABLE_NO: return "variable_decl "; + case RETURN_NO: return "return "; + case LOOP_NO: return "infinte loop "; + case NEXT_NO: return "next "; + case COMMENT_NO: return "comment "; + case EMPTY_NO: return "empty "; + case BEGIN_NO: return "<begin> "; default: return "--failure--"; } } -void FlowNode::createSVG() +void FlowChart::createSVG() { QCString qcs("/"); QCString ov = Config_getString("HTML_OUTPUT"); - FlowNode::imageCounter++; - qcs+=FlowNode::convertNameToFileName()+".svg"; + qcs+=FlowChart::convertNameToFileName()+".svg"; //const MemberDef *m=VhdlDocGen::getFlowMember(); - //fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",VhdlDocGen::trTypeString(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); + //if (m) + // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",VhdlDocGen::trTypeString(m->getMemberSpecifiers()),m->name().data(),m->getFileDef()->name().data()); QCString dir=" -o "+ov+qcs; ov+="/flow_design.dot"; @@ -3640,8 +3846,7 @@ void FlowNode::createSVG() } } - -void FlowNode::startDot(FTextStream &t) +void FlowChart::startDot(FTextStream &t) { t << " digraph G { \n"; t << "rankdir=TB \n"; @@ -3649,12 +3854,12 @@ void FlowNode::startDot(FTextStream &t) t << "stylesheet=\"doxygen.css\"\n"; } -void FlowNode::endDot(FTextStream &t) +void FlowChart::endDot(FTextStream &t) { t << " } \n"; } -void FlowNode::writeFlowNode() +void FlowChart::writeFlowChart() { // assert(VhdlDocGen::flowMember); @@ -3670,24 +3875,30 @@ void FlowNode::writeFlowNode() } colTextNodes(); - // printFlowList( ); - FlowNode::startDot(t); + +#ifdef DEBUGFLOW + printFlowTree(); +#endif + + startDot(t); + buildCommentNodes(t); + uint size=flowList.count(); for (uint j=0;j <size ;j++) { - FlowNode *fll=flowList.at(j); + FlowChart *fll=flowList.at(j); writeShape(t,fll); } writeFlowLinks(t); - FlowNode::endDot(t); + FlowChart::endDot(t); delFlowList(); f.close(); - FlowNode::createSVG(); -}// writeFlowNode + FlowChart::createSVG(); +}// writeFlowChart -void FlowNode::writeShape(FTextStream &t,const FlowNode* fl) +void FlowChart::writeShape(FTextStream &t,const FlowChart* fl) { if (fl->type & EEND) return; QCString var; @@ -3706,10 +3917,37 @@ void FlowNode::writeShape(FTextStream &t,const FlowNode* fl) t<<getNodeName(fl->id).data(); QCString q=getNodeType(fl->type); + +#ifdef DEBUGFLOW + QCString qq(getNodeName(fl->id).data()); + keyMap.insert(qq,fl->id); +#endif + bool dec=(fl->type & DECLN); + bool exit=(fl->type & EXITNEXT); + if (exit && !fl->exp.isEmpty()) + { + dec=TRUE; + } if (dec) { - t << " [shape=diamond,style=filled,color=\".7 .3 1.0\",label=\" "+fl->exp+var+"\"]\n"; + t << " [shape=diamond,style=filled,color=\""; + t << flowCol.decisionNode; + t << "\",label=\" "; + QCString kl; + if (exit) kl=fl->text+" "; + + if (fl->label) + { + kl+=fl->label+":"+fl->exp+var; + } + else + { + kl+=fl->exp+var; + } + + FlowChart::alignCommentNode(t,kl); + t << "\"]\n"; } else if (fl->type & ENDCL) { @@ -3718,22 +3956,27 @@ void FlowNode::writeShape(FTextStream &t,const FlowNode* fl) } else if (fl->type & STARTFIN) { - static QRegExp reg1("[\"]"); QCString val=fl->text; - val=val.replace(reg1,"\\\""); t << "[shape=box , style=rounded label=<\n"; t << "<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" >\n "; - t << "<TR><TD BGCOLOR=\"white\" > "; - FlowNode::codify(t,val.data()); + t << "<TR><TD BGCOLOR=\""; + t<< flowCol.startEndNode; + t<< "\"> "; + FlowChart::alignCommentNode(t,val); t << " </TD></TR></TABLE>>];"; } else { if (fl->text.isEmpty()) return; - bool var=(fl->type & FlowNode::VARIABLE_NO) ; + bool var=(fl->type & FlowChart::VARIABLE_NO); QCString repl("<BR ALIGN=\"LEFT\"/>"); QCString q=fl->text; + if (exit) + { + q+=" "+fl->label; + } + int z=q.findRev("\n"); if (z==(int)q.length()-1) @@ -3744,371 +3987,359 @@ void FlowNode::writeShape(FTextStream &t,const FlowNode* fl) t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n "; if (var) { - t << "<TR><TD BGCOLOR=\"lightyellow\" > "; + t << "<TR><TD BGCOLOR=\"" << flowCol.varNode << "\" > "; } else { - t << "<TR><TD BGCOLOR=\"lightcyan\" > "; + t << "<TR><TD BGCOLOR=\"" << flowCol.textNode << "\" > "; } - FlowNode::codify(t,q.data()); + FlowChart::alignCommentNode(t,q); t << " </TD></TR></TABLE>>];"; } } -void FlowNode::writeEdge(FTextStream &t,const FlowNode* fl_from,const FlowNode* fl_to,int i) +void FlowChart::writeEdge(FTextStream &t,const FlowChart* fl_from,const FlowChart* fl_to,int i) { - checkNode(fl_to); - writeEdge(t,fl_from->id,fl_to->id,i); + bool b=fl_from->type & STARTL; + bool c=fl_to->type & STARTL; + +#ifdef DEBUGFLOW + QCString s1(getNodeName(fl_from->id).data()); + QCString s2(getNodeName(fl_to->id).data()); + QMap<QCString, int>::Iterator it = keyMap.find(s1); + QMap<QCString, int>::Iterator it1 = keyMap.find(s2); + // checks if the link is connected to a valid node + assert(it.key()); + assert(it1.key()); +#endif + + writeEdge(t,fl_from->id,fl_to->id,i,b,c); } -void FlowNode::writeEdge(FTextStream &t,int fl_from,int fl_to,int i) +void FlowChart::writeEdge(FTextStream &t,int fl_from,int fl_to,int i,bool bFrom,bool bTo) { QCString label,col; if (i==0) { - col="red"; + col=flowCol.yesNodeLink; label="yes"; } else if (i==1) { - col="black"; + col=flowCol.noNodeLink; label="no"; } else { - col="green"; + col=flowCol.textNodeLink; label=""; } - t<<"edge [color=\""+col+"\",label=\""+label+"\"]\n"; - t<<getNodeName(fl_from).data(); - t<<"->"; - t<<getNodeName(fl_to).data(); - t<<"\n"; + t << "edge [color=\""+col+"\",label=\""+label+"\"]\n"; + t << getNodeName(fl_from).data(); + if (bFrom) t << ":s"; + t << "->"; + t << getNodeName(fl_to).data(); + if (bTo) t << ":n"; + t << "\n"; } - -void FlowNode::checkNode(const FlowNode* /*flo*/) +void FlowChart::alignFuncProc( QCString & q,const ArgumentList* al,bool isFunc) { - // assert(!(flo->type & IDLE)); -} + if (al==0) return; -void FlowNode::checkNode(int /*z*/) -{ - // FlowNode *flo=flowList.at(z); - //assert(!(flo->type & IDLE)); -} + ArgumentListIterator ali(*al); + int index=ali.count(); + if (index==0) return; -int FlowNode::getNextNode(int index) -{ - for (uint j=index+1;j<flowList.count();j++) + int len=q.length()+VhdlDocGen::getFlowMember()->name().length(); + QCString prev,temp; + prev.fill(' ',len+1); + + Argument *arg; + bool first=TRUE; + q+="\n"; + for (;(arg=ali.current());++ali) { - FlowNode *flo=flowList.at(j); - int kind=flo->type; - if (kind & FlowNode::ENDIF_NO) - { - continue; - } + QCString attl=arg->defval+" "; + attl+=arg->name+" "; - if (kind==ELSE_NO || kind==ELSIF_NO) + if (!isFunc) { - j=findNode(j,flo->stamp,FlowNode::ENDIF_NO); + attl+=arg->attrib+" "; } else { - return j; + attl+=" in "; } - } + attl+=arg->type; + if (--index) attl+=",\n"; else attl+="\n"; + + attl.prepend(prev.data()); + temp+=attl; + first=FALSE; + } - return flowList.count()-1; + q+=temp; } -int FlowNode::findNode(int index,int type) +int FlowChart::findNextLoop(int index,int stamp) { for (uint j=index+1;j<flowList.count();j++) { - FlowNode *flo=flowList.at(j); - if (flo->type==type) + FlowChart *flo=flowList.at(j); + if (flo->stamp==stamp) + { + continue; + } + if (flo->type&END_LOOP) { return j; } } return flowList.count()-1; -}// findNode +} + +int FlowChart::findPrevLoop(int index,int stamp,bool endif) +{ + for (uint j=index;j>0;j--) + { + FlowChart *flo=flowList.at(j); + if (flo->type & LOOP) + { + if (flo->stamp==stamp && endif) + { + return j; + } + else + { + if (flo->stamp<stamp) + { + return j; + } + } + } + } + return flowList.count()-1; +} +int FlowChart::findLabel(int index,QCString &label) +{ + for (uint j=index;j>0;j--) + { + FlowChart *flo=flowList.at(j); + if ((flo->type & LOOP) && !flo->label.isEmpty() && qstricmp(flo->label,label)==0) + { + return j; + } + } + err("could not find label: ",label.data()); + return 0; +} -int FlowNode::findNode(int index,int stamp,int type) +int FlowChart::findNode(int index,int stamp,int type) { for (uint j=index+1;j<flowList.count();j++) { - FlowNode *flo=flowList.at(j); + FlowChart *flo=flowList.at(j); if (flo->type==type && flo->stamp==stamp) { return j; } } - return flowList.count()-1; + return 0; }// findNode -int FlowNode::getNoLink(const FlowNode* fl,uint index) +int FlowChart::getNextNode(int index,int stamp) { - for (uint j=index+1;j<flowList.count();j++) { - FlowNode *flo=FlowNode::flowList.at(j); - if (flo->type==IF_NO && flo->stamp==fl->stamp) + FlowChart *flo=flowList.at(j); + int kind=flo->type; + int s=flo->stamp; + if (s>stamp) { - return j; + continue; } - - if (flo->type==ELSE_NO && flo->stamp==fl->stamp) + if (kind & ENDIF_NO) { - return j+1; + if (s<stamp && stamp>0) + { + stamp--; + continue; + } } - - if (flo->type==ELSIF_NO && flo->stamp==fl->stamp) + if (kind & (ELSE_NO | ELSIF_NO)) { - return j; + if (s<stamp && stamp>0) + { + stamp--; + } + j=findNode(j,stamp,ENDIF_NO); + continue; } - - if ((flo->type & ENDIF_NO) && flo->stamp==fl->stamp) + if (kind & WHEN_NO) { - return getNextNode(j); + if (s<stamp && stamp>0) + { + stamp--; + } + return findNode(j,stamp-1,END_CASE); } - + return j; } - return flowList.count()-1;// end process + return FLOWLEN; } -int FlowNode::getTextLink(const FlowNode* /*fl*/,uint index) +int FlowChart::getNextIfLink(const FlowChart* fl,uint index) { - assert(FlowNode::flowList.count()>index); + int stamp=fl->stamp; + uint start = index+1; + int endifNode = findNode(start,stamp,ENDIF_NO); + int elseifNode = findNode(start,stamp,ELSIF_NO); + int elseNode = findNode(start,stamp,ELSE_NO); - uint i=index+1; + assert(endifNode>-1); - FlowNode *flo=flowList.at(i); - if (flo->type==IF_NO) + if (elseifNode>0 && elseifNode<endifNode) { - return i; + return elseifNode; } - if (FlowNode::caseCounter) - { - return FlowNode::findNode(index,END_CASE); - } - else + if (elseNode>0 && elseNode<endifNode) { - i = FlowNode::getNextNode(index); + return elseNode+1; } - if (i>0) return i; - - return flowList.count()-1;// end process -} - -int FlowNode::findNextLoop(int index,int stamp) -{ - for (uint j=index+1;j<FlowNode::flowList.count();j++) - { - FlowNode *flo=FlowNode::flowList.at(j); - if (flo->type==END_LOOP && flo->stamp==stamp) - { - return j; - } - } - return flowList.count()-1; -} - -int FlowNode::findPrevLoop(int index,int stamp) -{ - for (uint j=index;j>0;j--) - { - FlowNode *flo=flowList.at(j); - if (flo->type & LOOP) - { - if ( flo->stamp==stamp) - { - return j; - } - } - } - err("end loop without loop"); - assert(FALSE); - return flowList.count()-1; -} - - -int FlowNode::findLabel(int index,QCString & label) -{ - for (uint j=index;j>0;j--) - { - FlowNode *flo=flowList.at(j); - if ((flo->type & LOOP) && !flo->label.isEmpty() && stricmp(flo->label.data(),label.data())==0) - { - return findNode(j,flo->stamp,END_LOOP); - } - } - return 0; + stamp=flowList.at(endifNode)->stamp; + return getNextNode(endifNode,stamp); } - -void FlowNode::writeFlowLinks(FTextStream &t) +void FlowChart::writeFlowLinks(FTextStream &t) { - uint size=flowList.count(); if (size<2) return; - // start link + // write start link writeEdge(t,flowList.at(0),flowList.at(1),2); for (uint j=0;j<size;j++) { - FlowNode *fll=flowList.at(j); + FlowChart *fll=flowList.at(j); int kind=fll->type; - if (kind==ELSE_NO || kind==ENDIF_NO) + int stamp=fll->stamp; + if (kind & EEND) { continue; } - if (kind==IF_NO) + if (kind & IFF) { writeEdge(t,fll,flowList.at(j+1),0); - int z=getNoLink(fll,j); + int z=getNextIfLink(fll,j); + // assert(z>-1); writeEdge(t,fll,flowList.at(z),1); } - - if (kind==ELSIF_NO) + else if (kind & LOOP_NO) { - writeEdge(t,fll,flowList.at(j+1),0); - int z=getNoLink(fll,j); - writeEdge(t,fll,flowList.at(z),1); + writeEdge(t,fll,flowList.at(j+1),2); + continue; } - - if ((kind & LOOP) && kind!=LOOP_NO) + else if (kind & (CASE_NO | FOR_NO | WHILE_NO)) { - writeEdge(t,fll,flowList.at(j+1),0); - int z=findNode(j,fll->stamp,END_LOOP); - z = getNextNode(z); - writeEdge(t,fll,flowList.at(z),1); - } + if (kind & CASE_NO) + { + writeEdge(t,fll,flowList.at(j+1),2); + continue; + } + else + { + writeEdge(t,fll,flowList.at(j+1),0); + } - if (kind==LOOP_NO) - { - writeEdge(t,fll,flowList.at(j+1),0); - } + kind=END_LOOP; + int z=findNode(j+1,fll->stamp,kind); + z=getNextNode(z,flowList.at(z)->stamp); - if (kind==TEXT_NO || kind==VARIABLE_NO) + // assert(z>-1); + writeEdge(t,fll,flowList.at(z),1); + continue; + } + else if (kind & (TEXT_NO | VARIABLE_NO)) { - int z=getTextLink(fll,j); + int z=getNextNode(j,stamp); writeEdge(t,fll,flowList.at(z),2); } - - if (kind==WHEN_NO) + else if (kind & WHEN_NO) { writeEdge(t,fll,flowList.at(j+1),0); - int z=flowList.count()-1; - int u=findNode(j,fll->stamp,WHEN_NO); - if (u<z) - writeEdge(t,fll,FlowNode::flowList.at(u),1); - else { - z=findNode(j,fll->stamp,END_CASE); - writeEdge(t,fll,FlowNode::flowList.at(z),1); - } - } - - if (kind==CASE_NO) - { - writeEdge(t,fll,flowList.at(j+1),2); - caseCounter++; - } + int u=findNode(j,stamp,WHEN_NO); + int v=findNode(j,stamp-1,END_CASE); - if (kind==RETURN_NO) - { - writeEdge(t,fll,FlowNode::flowList.at(size-1),2); - } - - if (kind==EXIT_NO) - { - int z; - if (!fll->label.isEmpty()) + if (u>0 && u<v) { - z=findLabel(j,fll->label); - z=getNextNode(z); - //assert(z!=0); + writeEdge(t,fll,flowList.at(u),1); } else { - z =findNextLoop(j,fll->stamp); - z=getNextNode(z); + writeEdge(t,fll,flowList.at(v),1); } - writeEdge(t,fll,flowList.at(z),2); } - - if (kind==END_CASE) + else if (kind & END_CASE) { - int z=FlowNode::getNextNode(j); + int z=FlowChart::getNextNode(j,fll->stamp); writeEdge(t,fll,flowList.at(z),2); - caseCounter--; } - - if (kind==END_LOOP) + else if (kind & END_LOOP) { - int z=findPrevLoop(j,fll->stamp); + int z=findPrevLoop(j,fll->stamp,true); writeEdge(t,fll,flowList.at(z),2); } - - if (kind & EWHEN) + else if (kind & RETURN_NO) { - writeEdge(t,fll,flowList.at(j+1),0); - int z=getNextNode(j+1); - writeEdge(t,fll,flowList.at(z),1); + writeEdge(t,fll,FlowChart::flowList.at(size-1),2); } - - if (kind & NEXT_NO) + else if (kind & (EXIT_NO | NEXT_NO)) { - int z=findNode(j,fll->stamp,END_LOOP); - writeEdge(t,fll,flowList.at(z),1); + int z; + bool b = kind==NEXT_NO; + if (fll->exp) + { + writeEdge(t,fll,flowList.at(j+1),1); + } + if (!fll->label.isEmpty()) + { + z=findLabel(j,fll->label); + if (b) + { + writeEdge(t,fll,flowList.at(z),0); + } + else + { + z=findNode(z,flowList.at(z)->stamp,END_LOOP); + z=getNextNode(z,flowList.at(z)->stamp); + writeEdge(t,fll,flowList.at(z),0); + } + continue; + } + else + { + if (b) + { + z=findPrevLoop(j,fll->stamp); + writeEdge(t,fll,flowList.at(z),0); + continue; + } + else + { + z =findNextLoop(j,fll->stamp-1); + } + z=getNextNode(z,flowList.at(z)->stamp); + } + writeEdge(t,fll,flowList.at(z),0); } } //for } //writeFlowLinks -void FlowNode::alignFuncProc( QCString & q,const ArgumentList* al,bool isFunc) -{ - if (al==0) return; - - ArgumentListIterator ali(*al); - int index=ali.count(); - if (index==0) return; - - int len=q.length()+VhdlDocGen::getFlowMember()->name().length(); - QCString prev,temp; - prev.fill(' ',len+1); - - Argument *arg; - q+="\n"; - for (;(arg=ali.current());++ali) - { - QCString attl=arg->defval+" "; - attl+=arg->name+" "; - - if (!isFunc) - { - attl+=arg->attrib+" "; - } - else - { - attl+=" in "; - } - - attl+=arg->type; - - if (--index) attl+=",\n"; else attl+="\n"; - - attl.prepend(prev.data()); - temp+=attl; - } - q+=temp; -} - diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index b26cd63..e6a720c 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -116,8 +116,8 @@ class VhdlDocGen static MemberDef* findFunction(const QList<Argument> &ql, const QCString& name, const QCString& package, bool type); - static bool compareString(const QCString& s1, - const QCString& s2); + static int compareString(const QCString& s1, + const QCString& s2); static QCString getClassTitle(const ClassDef*); static void writeInlineClassLink(const ClassDef*, OutputList &ol); @@ -259,11 +259,12 @@ class VhdlDocGen static void writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef); }; +//#define DEBUGFLOW -class FlowNode +class FlowChart { public: - enum nodeType { + enum nodeTypes { IF_NO = 1<<1, ELSIF_NO = 1<<2, ELSE_NO = 1<<3, @@ -282,9 +283,9 @@ class FlowNode RETURN_NO = 1<<16, LOOP_NO = 1<<17, NEXT_NO = 1<<18, - EXIT_WHEN_NO = 1<<19, - NEXT_WHEN_NO = 1<<20, - EMPTY_NO = 1<<21 + EMPTY_NO = 1<<19, + COMMENT_NO = 1<<20, + BEGIN_NO = 1<<21 }; //---------- create svg ------------------------------------------------------------- @@ -292,53 +293,50 @@ class FlowNode static void startDot(FTextStream &t); static void endDot(FTextStream &t); static void codify(FTextStream &t,const char *str); - static void writeShape(FTextStream &t,const FlowNode* fl); - static void writeEdge(FTextStream &t,int fl_from,int fl_to,int i); - static void writeEdge(FTextStream &t,const FlowNode* fl_from,const FlowNode* fl_to,int i); - //static void writeEndNode(FTextStream &t,const FlowNode* fl); + static void writeShape(FTextStream &t,const FlowChart* fl); + static void writeEdge(FTextStream &t,int fl_from,int fl_to,int i,bool bFrom=FALSE,bool bTo=FALSE); + static void writeEdge(FTextStream &t,const FlowChart* fl_from,const FlowChart* fl_to,int i); static void writeFlowLinks(FTextStream &t); - //static void writeStartNode(FTextStream &t,const FlowNode* fl); - static void checkNode(int); - static void checkNode(const FlowNode*); static QCString getNodeName(int n); static void colTextNodes(); - static int getTextLink(const FlowNode* fl,uint index); - static int getNoLink(const FlowNode*,uint); - static int getNextNode(int); + static int getNextTextLink(const FlowChart* fl,uint index); + static int getNextIfLink(const FlowChart*,uint); + static int getNextNode(int,int); static int findNode(int index,int stamp,int type); static int findNode(int index,int type); static int findNextLoop(int j,int stamp); - static int findPrevLoop(int j,int stamp); + static int findPrevLoop(int j,int stamp,bool endif=FALSE); static int findLabel(int j,QCString &); static void delFlowList(); static const char* getNodeType(int c); - static void addFlowNode(int type,const char* text,const char* exp,const char * label=NULL); + static void addFlowChart(int type,const char* text,const char* exp,const char * label=NULL); static void moveToPrevLevel(); - static void printFlowList(); - static void setLabel(const char* text); static int getTimeStamp(); - static void printNodeList(); - static void writeFlowNode(); + static void writeFlowChart(); static void alignFuncProc(QCString & q,const ArgumentList* al,bool isFunc); static QCString convertNameToFileName(); + static void printNode(const FlowChart* n); + static void printFlowTree(); + static void buildCommentNodes(FTextStream &t); + static void alignCommentNode(FTextStream &t,QCString com); - static QList<FlowNode> flowList; - static int ifcounter; - static int nodeCounter; - static int imageCounter; - static int caseCounter; + static QList<FlowChart> flowList; - FlowNode(int typ,const char* t,const char* ex,const char* label=NULL); - ~FlowNode(); + FlowChart(int typ,const char* t,const char* ex,const char* label=0); + ~FlowChart(); private: int id; int stamp; int type; +#ifdef DEBUGFLOW + int line; +#endif + QCString label; QCString text; QCString exp; diff --git a/src/vhdlparser.y b/src/vhdlparser.y index a525666..776ac7e 100644 --- a/src/vhdlparser.y +++ b/src/vhdlparser.y @@ -1,3 +1,17 @@ +/****************************************************************************** + * + * Copyright (C) 1997-2013 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ /********************************************************************************************* * The original was a VHDL parser description to be used with GMD Compiler @@ -121,7 +135,7 @@ static void addProto(const char *s1,const char *s2,const char *s3, static void createFunction(const QCString &impure,int spec, const QCString &fname); -static void createFlow(QCString s); +static void createFlow(); void newVhdlEntry() { @@ -400,7 +414,7 @@ physical_literal_1 : /* empty */ { $$=""; } physical_literal_no_default : t_AbstractLit t_Identifier { $$=$1+" "+$2; } idf_list : t_Identifier { $$=$1; } - | idf_list t_Comma t_Identifier { $$=$1+","+$3} + | idf_list t_Comma t_Identifier { $$=$1+","+$3; } ; /*------------------------------------------ @@ -487,7 +501,7 @@ entity_decl_2 : /* empty */ { $$=""; } | t_PORT { currP=VhdlDocGen::PORT; } interf_list t_Semicolon { currP=0; } ; entity_decl_1 : /* empty */ { $$=""; } - | t_GENERIC { currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC} interf_list t_Semicolon{ currP=0;parse_sec=0; } + | t_GENERIC { currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC; } interf_list t_Semicolon{ currP=0;parse_sec=0; } | t_GENERIC error t_Semicolon{ currP=0; } ; @@ -601,24 +615,24 @@ common_decltve_item_1: package_body common_decltve_item_1: subprogram_instantiation_decl -common_decltve_item: type_decl{$$=$1;} -common_decltve_item: subtype_decl{$$=$1;} -common_decltve_item: constant_decl{ $$=$1;} -common_decltve_item: file_decl{$$=$1;} -common_decltve_item: alias_decl{$$=$1;} -common_decltve_item: subprog_decl{$$=$1;} -common_decltve_item: use_clause {$$=$1;} +common_decltve_item: type_decl{ $$=$1; } +common_decltve_item: subtype_decl{ $$=$1; } +common_decltve_item: constant_decl{ $$=$1; } +common_decltve_item: file_decl{ $$=$1; } +common_decltve_item: alias_decl{ $$=$1; } +common_decltve_item: subprog_decl{ $$=$1; } +common_decltve_item: use_clause { $$=$1; } -entity_decltve_item: common_decltve_item {$$=$1;} -entity_decltve_item: subprog_body {$$=$1;} -entity_decltve_item: attribute_decl {$$=$1;} -entity_decltve_item: attribute_spec {$$=$1;} -entity_decltve_item: disconnection_spec {$$=$1;} -entity_decltve_item: signal_decl {$$=$1;} -entity_decltve_item: variable_decl {$$=$1;} -entity_decltve_item: group_template_declaration {$$=$1;} -entity_decltve_item: group_declaration {$$=$1;} -entity_decltve_item: common_decltve_item_1 {$$="";} +entity_decltve_item: common_decltve_item { $$=$1; } +entity_decltve_item: subprog_body { $$=$1; } +entity_decltve_item: attribute_decl { $$=$1; } +entity_decltve_item: attribute_spec { $$=$1; } +entity_decltve_item: disconnection_spec { $$=$1; } +entity_decltve_item: signal_decl { $$=$1; } +entity_decltve_item: variable_decl { $$=$1; } +entity_decltve_item: group_template_declaration { $$=$1; } +entity_decltve_item: group_declaration { $$=$1; } +entity_decltve_item: common_decltve_item_1 { $$=""; } block_decltve_item: common_decltve_item @@ -632,8 +646,8 @@ block_decltve_item: signal_decl block_decltve_item: variable_decl block_decltve_item: group_template_declaration block_decltve_item: group_declaration -block_decltve_item: common_decltve_item_1 {$$="";} -block_decltve_item: tool_directive {$$="";} +block_decltve_item: common_decltve_item_1 { $$=""; } +block_decltve_item: tool_directive { $$=""; } block_declarative_part: block_decltve_item | block_declarative_part block_decltve_item @@ -661,16 +675,16 @@ package_body_decltve_item: attribute_decl package_body_decltve_item: attribute_spec package_body_decltve_item: common_decltve_item_1 -subprog_decltve_item: common_decltve_item {$$=$1;} -subprog_decltve_item: subprog_body {$$="";} -subprog_decltve_item: attribute_decl {$$=$1;} -subprog_decltve_item: attribute_spec {$$=$1;} -subprog_decltve_item: variable_decl {$$=$1;} +subprog_decltve_item: common_decltve_item { $$=$1; } +subprog_decltve_item: subprog_body { $$=""; } +subprog_decltve_item: attribute_decl { $$=$1; } +subprog_decltve_item: attribute_spec { $$=$1; } +subprog_decltve_item: variable_decl { $$=$1; } subprog_decltve_item: group_template_declaration -subprog_decltve_item: group_declaration {$$="";} -subprog_decltve_item: common_decltve_item_1 {$$="";} +subprog_decltve_item: group_declaration { $$=""; } +subprog_decltve_item: common_decltve_item_1 { $$=""; } -procs_decltve_item: subprog_decltve_item {$$=$1;} +procs_decltve_item: subprog_decltve_item { $$=$1; } config_decltve_item: attribute_spec { $$=$1; } config_decltve_item: use_clause { $$=$1; } @@ -736,11 +750,19 @@ subprog_spec_2: subprog_spec_22 subprog_spec_1: subprog_spec_2 -subprog_body: subprog_spec t_IS subprog_body_1 t_BEGIN seq_stats t_END subprog_body_2 t_Semicolon +subprog_body: subprog_spec t_IS subprog_body_1 { - tempEntry->endBodyLine=s_str.yyLineNr; - createFlow($3); - currP=0; + if ($3.data()) + { + FlowChart::addFlowChart(FlowChart::VARIABLE_NO,$3,0); + } + FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0); + } + t_BEGIN seq_stats t_END subprog_body_2 t_Semicolon + { + tempEntry->endBodyLine=s_str.yyLineNr; + createFlow(); + currP=0; } subprog_body: subprog_spec t_IS error t_END subprog_body_2 t_Semicolon { @@ -754,11 +776,11 @@ subprog_body_2: t_PROCEDURE t_Identifier subprog_body_2: t_FUNCTION t_Identifier subprog_body_2: t_FUNCTION t_STRING -subprog_body_1: /* empty */ {$$="";} +subprog_body_1: /* empty */ { $$=""; } //subprog_body_1 : subprogram_instantiation_decl -subprog_body_1: subprog_body_1 subprog_body_3 {$$=$1+$2; } +subprog_body_1: subprog_body_1 subprog_body_3 { $$=$1+$2; } -subprog_body_3: subprog_decltve_item { $$=$1; } +subprog_body_3: subprog_decltve_item { $$=$1; } /*-------------------------------------------------- -- Interface Lists and Associaton Lists @@ -881,19 +903,19 @@ shift_op: t_SLL { $$="sll"; } | t_ROR { $$="ror"; } | t_ROL { $$="rol"; } ; -and_relation: relation shift_op relation {$$= $1+$2+$3; } -and_relation: relation t_AND relation {$$= $1+" and "+$3; } -and_relation: relation t_XOR relation {$$= $1+" xor "+$3; } -and_relation: relation t_OR relation {$$= $1+" or "+$3; } -and_relation: relation t_NOR relation {$$= $1+" nor "+$3; } -and_relation: relation t_XNOR relation {$$= $1+"xnor"+$3; } -and_relation: relation t_NAND relation {$$= $1+"nand"+$3; } -and_relation: and_relation t_NAND relation {$$= $1+"nand"+$3; } -and_relation: and_relation t_NOR relation{$$= $1+"nor"+$3; } -and_relation: and_relation t_XNOR relation {$$= $1+"nand"+$3; } -and_relation: and_relation t_AND relation {$$= $1+" and "+$3; } -and_relation: and_relation t_OR relation {$$= $1+" or "+$3; } -and_relation: and_relation t_XOR relation {$$= $1+" xor "+$3; } +and_relation: relation shift_op relation { $$= $1+$2+$3; } +and_relation: relation t_AND relation { $$= $1+" and "+$3; } +and_relation: relation t_XOR relation { $$= $1+" xor "+$3; } +and_relation: relation t_OR relation { $$= $1+" or "+$3; } +and_relation: relation t_NOR relation { $$= $1+" nor "+$3; } +and_relation: relation t_XNOR relation { $$= $1+"xnor"+$3; } +and_relation: relation t_NAND relation { $$= $1+"nand"+$3; } +and_relation: and_relation t_NAND relation { $$= $1+"nand"+$3; } +and_relation: and_relation t_NOR relation{ $$= $1+"nor"+$3; } +and_relation: and_relation t_XNOR relation { $$= $1+"nand"+$3; } +and_relation: and_relation t_AND relation { $$= $1+" and "+$3; } +and_relation: and_relation t_OR relation { $$= $1+" or "+$3; } +and_relation: and_relation t_XOR relation { $$= $1+" xor "+$3; } /* ;relation : unary_operator primary */ @@ -908,25 +930,25 @@ relation: t_Minus primary t_DoubleStar primary { $$=$2+" ** "+$4; } /* relation : relation binary_operator primary */ -relation: relation t_MOD relation { $$=$1+" mod "+$3; } -relation: relation t_REM relation { $$=$1+" rem "+$3; } -relation: relation t_Ampersand relation { $$=$1+" & "+$3; } -relation: relation t_Star relation { $$=$1+" * "+$3; } -relation: relation t_Plus relation { $$=$1+" + "+$3; } -relation: relation t_Minus relation { $$=$1+" - "+$3; } -relation: relation t_LESym relation { $$=$1+" <= "+$3; } -relation: relation t_GESym relation { $$=$1+" >= "+$3; } -relation: relation t_LTSym relation { $$=$1+" < "+$3; } -relation: relation t_GTSym relation { $$=$1+" > "+$3; } -relation: relation t_EQSym relation { $$=$1+" == "+$3; } -relation: relation t_NESym relation { $$=$1+" != "+$3; } -relation: relation t_Slash relation { $$=$1+" /"+$3; } -relation: relation t_QNEQU relation { $$=$1+" ?/="+$3; } -relation: relation t_QEQU relation { $$=$1+" ?="+$3; } -relation: relation t_QL relation { $$=$1+" ?<"+$3; } -relation: relation t_QG relation { $$=$1+" ?>"+$3; } -relation: relation t_QLT relation { $$=$1+" ?<="+$3; } -relation: relation t_QGT relation { $$=$1+" ?>="+$3; } +relation: relation t_MOD relation { $$=$1+" mod "+$3; } +relation: relation t_REM relation { $$=$1+" rem "+$3; } +relation: relation t_Ampersand relation { $$=$1+" & "+$3; } +relation: relation t_Star relation { $$=$1+" * "+$3; } +relation: relation t_Plus relation { $$=$1+" + "+$3; } +relation: relation t_Minus relation { $$=$1+" - "+$3; } +relation: relation t_LESym relation { $$=$1+" <= "+$3; } +relation: relation t_GESym relation { $$=$1+" >= "+$3; } +relation: relation t_LTSym relation { $$=$1+" < "+$3; } +relation: relation t_GTSym relation { $$=$1+" > "+$3; } +relation: relation t_EQSym relation { $$=$1+" == "+$3; } +relation: relation t_NESym relation { $$=$1+" != "+$3; } +relation: relation t_Slash relation { $$=$1+" / "+$3; } +relation: relation t_QNEQU relation { $$=$1+" ?/= "+$3; } +relation: relation t_QEQU relation { $$=$1+" ?= "+$3; } +relation: relation t_QL relation { $$=$1+" ?< "+$3; } +relation: relation t_QG relation { $$=$1+" ?> "+$3; } +relation: relation t_QLT relation { $$=$1+" ?<= "+$3; } +relation: relation t_QGT relation { $$=$1+" ?>= "+$3; } simple_exp: t_Minus term { $$ = "-"+$2; } | t_Plus term { $$ = "+"+$2; } @@ -1072,7 +1094,7 @@ physical_type_definition_2: secondary_unit_decl { $$=$1+"#"; } base_unit_decl: t_Identifier t_Semicolon { $$=$1; } -secondary_unit_decl: t_Identifier t_EQSym physical_literal t_Semicolon { $$=$1+"="+$3 } +secondary_unit_decl: t_Identifier t_EQSym physical_literal t_Semicolon { $$=$1+"="+$3; } unconstrained_array_definition: t_ARRAY t_LeftParen index_subtype_definition unconstrained_array_definition_1 t_RightParen t_OF @@ -1084,8 +1106,8 @@ unconstrained_array_definition: t_ARRAY t_LeftParen } unconstrained_array_definition_1: { $$=""; } -unconstrained_array_definition_1: unconstrained_array_definition_1 unconstrained_array_definition_2 { $$=$1+" "+$2 } -unconstrained_array_definition_2: t_Comma index_subtype_definition { $$=", "+$2 } +unconstrained_array_definition_1: unconstrained_array_definition_1 unconstrained_array_definition_2 { $$=$1+" "+$2; } +unconstrained_array_definition_2: t_Comma index_subtype_definition { $$=", "+$2; } index_subtype_definition: mark t_RANGE t_Box { $$=$1+" range<> "; } @@ -1247,14 +1269,14 @@ file_decl_1: /* empty */ { $$=""; } file_decl_1: mode { $$=$1; } disconnection_spec: t_DISCONNECT signal_list t_Colon mark t_AFTER expr t_Semicolon - { $$="disconnect "+$2+":"+$4+" after "+$6;} + { $$="disconnect "+$2+":"+$4+" after "+$6; } -signal_list: name signal_list_1 { $$=$1+$2;} -signal_list: t_OTHERS { $$="others";} -signal_list: t_ALL { $$="all";} -signal_list_1: /* empty */ { $$="";} -signal_list_1: signal_list_1 signal_list_2 { $$=$1+$2;} -signal_list_2: t_Comma name {$$=" , "+$2;} +signal_list: name signal_list_1 { $$=$1+$2; } +signal_list: t_OTHERS { $$="others"; } +signal_list: t_ALL { $$="all"; } +signal_list_1: /* empty */ { $$=""; } +signal_list_1: signal_list_1 signal_list_2 { $$=$1+$2; } +signal_list_2: t_Comma name { $$=" , "+$2; } /*-------------------------------------------------- -- Attribute Declarations and Specifications @@ -1273,7 +1295,7 @@ attribute_spec: t_ATTRIBUTE t_Identifier t_OF entity_spec t_IS expr t_Semicolon $$="attribute "+att+";"; } -entity_spec : entity_name_list signature t_Colon entity_class { $$=$1+$2+":"+$4;} +entity_spec : entity_name_list signature t_Colon entity_class { $$=$1+$2+":"+$4; } entity_name_list: designator entity_name_list_1 { $$=$1+" "+$2; } entity_name_list: t_OTHERS { $$="others"; } @@ -1309,8 +1331,8 @@ entity_class: t_PROPERTY { $$="property"; } if_generation_scheme: if_scheme { $$=$1; } -if_scheme: t_IF expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2 {$$="";} -if_scheme: t_IF lable expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2 {$$="";} +if_scheme: t_IF expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2 { $$=""; } +if_scheme: t_IF lable expr t_GENERATE generate_statement_body if_scheme_1 if_scheme_2 { $$=""; } if_scheme_2: /* empty */ { $$=""; } if_scheme_2: t_ELSE t_GENERATE generate_statement_body { $$="else generate "+$3; } @@ -1320,79 +1342,81 @@ if_scheme_1: if_scheme_1 if_scheme_3 { $$=$1+$2; } if_scheme_3: t_ELSIF expr t_GENERATE generate_statement_body { $$="elsif "+$2+" generate "+$4; } if_scheme_3: t_ELSIF lable expr t_GENERATE generate_statement_body { $$="elsif "+$2+$3+" generate "+$5; } -generation_scheme: for_scheme {$$=$1;} +generation_scheme: for_scheme { $$=$1; } -iteration_scheme: for_scheme {$$=$1;} -iteration_scheme: while_scheme {$$=$1;} +iteration_scheme: for_scheme { $$=$1; } +iteration_scheme: while_scheme { $$=$1; } for_scheme: t_FOR t_Identifier t_IN discrete_range { - if(!lab.isEmpty()) - $$=lab+" :for "+$2+" in "+$4; - else - $$=" for "+$2+" in "+$4; - FlowNode::addFlowNode(FlowNode::FOR_NO,0,$$,lab.data()); - lab.resize(0); + if (!lab.isEmpty()) + { + $$=lab+" :for "+$2+" in "+$4; + } + else + { + $$=" for "+$2+" in "+$4; + } + FlowChart::addFlowChart(FlowChart::FOR_NO,0,$$,lab.data()); + lab.resize(0); } for_scheme: t_FOR lable t_Identifier t_IN discrete_range - { - $$=lab+" for "+$2+$3+" in "+$5; - FlowNode::addFlowNode(FlowNode::FOR_NO,0,$$,lab.data()); - lab=""; - } + { + $$=lab+" for "+$2+$3+" in "+$5; + FlowChart::addFlowChart(FlowChart::FOR_NO,0,$$,lab.data()); + lab=""; + } while_scheme: t_WHILE expr { - $$=" while "+$2; - FlowNode::addFlowNode(FlowNode::WHILE_NO,0,$$,lab.data()); - lab=""; - } + $$=" while "+$2; + FlowChart::addFlowChart(FlowChart::WHILE_NO,0,$$,lab.data()); + lab=""; + } /*-------------------------------------------------- -- Concurrent Statements ----------------------------------------------------*/ -concurrent_stats: concurrent_stats_1 {$$=$1;} -concurrent_stats_1: /* empty */ {$$="";} -concurrent_stats_1: concurrent_stats_1 concurrent_stats_2 {$$=$1+$2;} -concurrent_stats_2: concurrent_stat {$$=$1;} - -concurrent_stat : block_stat {$$=$1;} - | concurrent_assertion_stat {$$=$1;} - | concurrent_procedure_call {$$=$1;} - | concurrent_signal_assign_stat {$$=$1;} - | comp_inst_stat - { - QCString li=$1; - $$=$1; - - } - | generate_stat {$$=$1;} +concurrent_stats: concurrent_stats_1 { $$=$1; } +concurrent_stats_1: /* empty */ { $$=""; } +concurrent_stats_1: concurrent_stats_1 concurrent_stats_2 { $$=$1+$2; } +concurrent_stats_2: concurrent_stat { $$=$1; } + +concurrent_stat : block_stat { $$=$1; } + | concurrent_assertion_stat { $$=$1; } + | concurrent_procedure_call { $$=$1; } + | concurrent_signal_assign_stat { $$=$1; } + | comp_inst_stat { + QCString li=$1; + $$=$1; + } + | generate_stat { $$=$1; } | procs_stat -block_stat: t_Identifier t_Colon t_BLOCK {pushLabel(genLabels,$1); }block_stat_0 block_stat_1 block_stat_2 +block_stat: t_Identifier t_Colon t_BLOCK { pushLabel(genLabels,$1); } block_stat_0 block_stat_1 block_stat_2 block_stat_3 block_stat_4 t_BEGIN concurrent_stats t_END t_BLOCK block_stat_5 t_Semicolon { $$=$1+":block"; //+$4+$5+$6+$7+$8+"begin "+$10+" block "+$13; genLabels=popLabel(genLabels); } -block_stat_5: /* empty */ {$$="";} -block_stat_5: t_Identifier {$$=$1;} -block_stat_4: /* empty */ {$$=""; } -block_stat_4: block_stat_4 block_stat_6 {$$=$1+$2;} -block_stat_6: block_decltve_item {$$=$1;} -block_stat_3: /* empty */ {$$="";} -block_stat_3: t_PORT interf_list t_Semicolon block_stat_7 {$$="port "+$2+";"+$4; } -//block_sta_7: /* empty */ {$$="";} -block_stat_7: t_PORT t_MAP association_list t_Semicolon {$$="port map "+$3; } -block_stat_2: /* empty */ {$$="";} -block_stat_2: t_GENERIC interf_list t_Semicolon block_stat_8 {$$="generic "+$2+";"+$4; } -block_stat_8: /* empty */ {$$="";} -block_stat_8: t_GENERIC t_MAP association_list t_Semicolon {$$="generic map "+$3; } -block_stat_1: /* empty */ {$$="";} -block_stat_1: t_LeftParen expr t_RightParen block_stat_0 {$$="("+$2+")"+$4; } -block_stat_0: /* empty */ {$$=""; } -block_stat_0: t_IS {$$=" is ";} +block_stat_5: /* empty */ { $$=""; } +block_stat_5: t_Identifier { $$=$1; } +block_stat_4: /* empty */ { $$=""; } +block_stat_4: block_stat_4 block_stat_6 { $$=$1+$2; } +block_stat_6: block_decltve_item { $$=$1; } +block_stat_3: /* empty */ { $$=""; } +block_stat_3: t_PORT interf_list t_Semicolon block_stat_7 { $$="port "+$2+";"+$4; } +//block_sta_7: /* empty */ { $$=""; } +block_stat_7: t_PORT t_MAP association_list t_Semicolon { $$="port map "+$3; } +block_stat_2: /* empty */ { $$=""; } +block_stat_2: t_GENERIC interf_list t_Semicolon block_stat_8 { $$="generic "+$2+";"+$4; } +block_stat_8: /* empty */ { $$=""; } +block_stat_8: t_GENERIC t_MAP association_list t_Semicolon { $$="generic map "+$3; } +block_stat_1: /* empty */ { $$=""; } +block_stat_1: t_LeftParen expr t_RightParen block_stat_0 { $$="("+$2+")"+$4; } +block_stat_0: /* empty */ { $$=""; } +block_stat_0: t_IS { $$=" is "; } dot_name: t_Identifier { $$=$1; } | dot_name t_Dot t_Identifier { $$=$1+"."+$3; } @@ -1407,93 +1431,93 @@ vcomp_stat: t_CONFIGURATION { $$="configurátion";yyLineNr=s_str.iLine; } vcomp_stat: t_ENTITY { $$="entity";yyLineNr=s_str.iLine; } vcomp_stat: t_COMPONENT { $$="component";yyLineNr=s_str.iLine; } -comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon - { - addCompInst($1.lower().data(),$3.lower().data(),0,yyLineNr);$$=""; +comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon + { + addCompInst($1.lower().data(),$3.lower().data(),0,yyLineNr);$$=""; + } +comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_PORT t_MAP association_list t_Semicolon + { + addCompInst($1.lower().data(),$3.lower().data(),0,yyLineNr);$$="222"; } -comp_inst_stat: t_Identifier t_Colon name { yyLineNr=s_str.iLine; } t_PORT t_MAP association_list t_Semicolon - { - addCompInst($1.lower().data(),$3.lower().data(),0,yyLineNr);$$="222"; - } -comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_PORT t_MAP association_list t_Semicolon - { - addCompInst($1.lower().data(),$4.lower().data(),$3.data(),yyLineNr);$$=""; - } -comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon - { - addCompInst($1.lower().data(),$4.lower().data(),$3.lower().data(),yyLineNr);$$=""; - } -comp_inst_stat_1: /* empty {$$="";} */ -comp_inst_stat_1: t_PORT t_MAP association_list // {$$="port map"+$3;} +comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_PORT t_MAP association_list t_Semicolon + { + addCompInst($1.lower().data(),$4.lower().data(),$3.data(),yyLineNr);$$=""; + } +comp_inst_stat: t_Identifier t_Colon vcomp_stat mark_comp t_GENERIC t_MAP association_list comp_inst_stat_1 t_Semicolon + { + addCompInst($1.lower().data(),$4.lower().data(),$3.lower().data(),yyLineNr);$$=""; + } +comp_inst_stat_1: /* empty { $$=""; } */ +comp_inst_stat_1: t_PORT t_MAP association_list // { $$="port map"+$3; } -concurrent_assertion_stat: t_Identifier t_Colon assertion_stat {$$=$1+":"+$3;} -concurrent_assertion_stat: assertion_stat {$$=$1; } +concurrent_assertion_stat: t_Identifier t_Colon assertion_stat { $$=$1+":"+$3; } +concurrent_assertion_stat: assertion_stat { $$=$1; } -concurrent_assertion_stat: t_Identifier t_Colon t_POSTPONED assertion_stat {$$=$1+":"+"postponed "+$4; } -concurrent_assertion_stat: t_POSTPONED assertion_stat {$$="postponed "+$2; } +concurrent_assertion_stat: t_Identifier t_Colon t_POSTPONED assertion_stat { $$=$1+":"+"postponed "+$4; } +concurrent_assertion_stat: t_POSTPONED assertion_stat { $$="postponed "+$2; } -concurrent_procedure_call: t_Identifier t_Colon procedure_call_stat {$$=$1+":"+$3; } -concurrent_procedure_call: procedure_call_stat {$$=$1;} +concurrent_procedure_call: t_Identifier t_Colon procedure_call_stat { $$=$1+":"+$3; } +concurrent_procedure_call: procedure_call_stat { $$=$1; } -concurrent_procedure_call: t_Identifier t_Colon t_POSTPONED procedure_call_stat {$$=$1+":"+"postponed "+$4; } -concurrent_procedure_call: t_POSTPONED procedure_call_stat {$$="postponed "+$2; } +concurrent_procedure_call: t_Identifier t_Colon t_POSTPONED procedure_call_stat { $$=$1+":"+"postponed "+$4; } +concurrent_procedure_call: t_POSTPONED procedure_call_stat { $$="postponed "+$2; } -concurrent_signal_assign_stat: t_Identifier t_Colon condal_signal_assign {$$=$1+":"+$3; } -concurrent_signal_assign_stat: condal_signal_assign {$$=$1;} +concurrent_signal_assign_stat: t_Identifier t_Colon condal_signal_assign { $$=$1+":"+$3; } +concurrent_signal_assign_stat: condal_signal_assign { $$=$1; } -concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED condal_signal_assign {$$=$1+":"+"postponed "+$4; } -concurrent_signal_assign_stat: t_POSTPONED condal_signal_assign {$$="postponed "+$2; } +concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED condal_signal_assign { $$=$1+":"+"postponed "+$4; } +concurrent_signal_assign_stat: t_POSTPONED condal_signal_assign { $$="postponed "+$2; } -concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED sel_signal_assign {$$=$1+":"+"postponed "+$4; } -concurrent_signal_assign_stat: t_POSTPONED sel_signal_assign {$$="postponed "+$2; } +concurrent_signal_assign_stat: t_Identifier t_Colon t_POSTPONED sel_signal_assign { $$=$1+":"+"postponed "+$4; } +concurrent_signal_assign_stat: t_POSTPONED sel_signal_assign { $$="postponed "+$2; } -concurrent_signal_assign_stat: t_Identifier t_Colon sel_signal_assign {$$=$1+":"+$3; } -concurrent_signal_assign_stat: sel_signal_assign {$$=$1; } +concurrent_signal_assign_stat: t_Identifier t_Colon sel_signal_assign { $$=$1+":"+$3; } +concurrent_signal_assign_stat: sel_signal_assign { $$=$1; } -condal_signal_assign: target t_LESym opts condal_wavefrms t_Semicolon {$$=$1+"<="+$3+$4; } +condal_signal_assign: target t_LESym opts condal_wavefrms t_Semicolon { $$=$1+"<="+$3+$4; } -condal_wavefrms: wavefrm {$$=$1;} -condal_wavefrms: wavefrm t_WHEN expr {$$=$1+" when "+$3;} -condal_wavefrms: wavefrm t_WHEN expr t_ELSE condal_wavefrms {$$=$1+" when "+$3+"else"+$5;} +condal_wavefrms: wavefrm { $$=$1; } +condal_wavefrms: wavefrm t_WHEN expr { $$=$1+" when "+$3; } +condal_wavefrms: wavefrm t_WHEN expr t_ELSE condal_wavefrms { $$=$1+" when "+$3+"else"+$5; } -wavefrm: wavefrm_element wavefrm_1 {$$=$1+$2;} -wavefrm: t_UNAFFECTED {$$="unaffected";} -wavefrm_1: /* empty */ {$$="";} -wavefrm_1: wavefrm_1 wavefrm_2 {$$=$1+$2;} -wavefrm_2: t_Comma wavefrm_element {$$=","+$2;} +wavefrm: wavefrm_element wavefrm_1 { $$=$1+$2; } +wavefrm: t_UNAFFECTED { $$="unaffected"; } +wavefrm_1: /* empty */ { $$=""; } +wavefrm_1: wavefrm_1 wavefrm_2 { $$=$1+$2; } +wavefrm_2: t_Comma wavefrm_element { $$=","+$2; } -wavefrm_element: expr wavefrm_element_1 {$$=$1+$2;} -wavefrm_element_1: /* empty */ {$$="";} -wavefrm_element_1: t_AFTER expr {$$="after "+$2;} -wavefrm_element_1: t_NULL wavefrm_element_2 {$$=" null "+$2;} -wavefrm_element_1: t_NULL {$$=" null ";} -wavefrm_element_2: t_AFTER expr {$$="after "+$2;} +wavefrm_element: expr wavefrm_element_1 { $$=$1+$2; } +wavefrm_element_1: /* empty */ { $$=""; } +wavefrm_element_1: t_AFTER expr { $$="after "+$2; } +wavefrm_element_1: t_NULL wavefrm_element_2 { $$=" null "+$2; } +wavefrm_element_1: t_NULL { $$=" null "; } +wavefrm_element_2: t_AFTER expr { $$="after "+$2; } -target: name {$$=$1;} -target: aggregate {$$=$1;} +target: name { $$=$1; } +target: aggregate { $$=$1; } -opts: opts_1 opts_2 {$$=$1+$2;} +opts: opts_1 opts_2 { $$=$1+$2; } -opts_2: /* empty */ {$$="";} -opts_2: t_TRANSPORT {$$="transport ";} -opts_2: t_REJECT expr t_INERTIAL {$$="transport"+$2+" intertial ";} -opts_2: t_INERTIAL {$$=" intertial ";} +opts_2: /* empty */ { $$=""; } +opts_2: t_TRANSPORT { $$="transport "; } +opts_2: t_REJECT expr t_INERTIAL { $$="transport"+$2+" intertial "; } +opts_2: t_INERTIAL { $$=" intertial "; } -opts_1: /* empty */ {$$="";} -opts_1: t_GUARDED {$$=" guarded ";} +opts_1: /* empty */ { $$=""; } +opts_1: t_GUARDED { $$=" guarded "; } sel_signal_assign: t_WITH expr t_SELECT target t_LESym opts sel_wavefrms t_Semicolon - {$$="with "+$2+" select "+$4+"<="+$6+$7;} + { $$="with "+$2+" select "+$4+"<="+$6+$7; } -sel_wavefrms: sel_wavefrms_1 wavefrm t_WHEN choices {$$=$1+$2;} -sel_wavefrms_1: /* empty */ {$$="";} -sel_wavefrms_1: sel_wavefrms_1 sel_wavefrms_2 {$$=$1+$2;} -sel_wavefrms_2: wavefrm t_WHEN choices t_Comma {$$=$1+" when "+$3;} +sel_wavefrms: sel_wavefrms_1 wavefrm t_WHEN choices { $$=$1+$2; } +sel_wavefrms_1: /* empty */ { $$=""; } +sel_wavefrms_1: sel_wavefrms_1 sel_wavefrms_2 { $$=$1+$2; } +sel_wavefrms_2: wavefrm t_WHEN choices t_Comma { $$=$1+" when "+$3; } -gen_stat1: /* empty */ {$$="";} - | block_declarative_part t_BEGIN {$$=$1+" begin ";} - | t_BEGIN {$$="begin ";} +gen_stat1: /* empty */ { $$=""; } + | block_declarative_part t_BEGIN { $$=$1+" begin "; } + | t_BEGIN { $$="begin "; } // problem with double end // end; @@ -1512,7 +1536,7 @@ opstat: t_END generate_stat_1 t_Semicolon {genLabels=popLabel(genLabel generate_stat: t_Identifier t_Colon { pushLabel(genLabels,$1); } - if_generation_scheme opstat // t_END generate_stat_1 t_Semicolon { genLabels=popLabel(genLabels);} + if_generation_scheme opstat // t_END generate_stat_1 t_Semicolon { genLabels=popLabel(genLabels); } generate_stat: t_Identifier t_Colon case_scheme generate_stat_1: t_GENERATE { $$=""; } @@ -1552,7 +1576,7 @@ procs_stat1: procs_stat1_5 tempEntry=current; currP=0; createFunction(currName,VhdlDocGen::PROCESS,$4.data()); - createFlow($5); + createFlow(); currName=""; } procs_stat1: error t_END procs_stat1_3 t_Semicolon { currP=0; } @@ -1566,8 +1590,8 @@ procs_stat1_5: t_POSTPONED { $$="postponed"; } procs_stat1_6: /* empty */ { $$=""; } procs_stat1_6: t_Identifier { $$=$1; } -procs_stat1_2: /* empty */ {$$="";} -procs_stat1_2: t_IS {$$="";} +procs_stat1_2: /* empty */ { $$=""; } +procs_stat1_2: t_IS { $$=""; } procs_stat1_2: procs_stat1_2 procs_stat1_4 { $$+=$2; } procs_stat1_4: procs_decltve_item { $$=$1; } procs_stat1_1: /* empty */ { $$=""; } @@ -1583,202 +1607,188 @@ sensitivity_list_2: t_Comma name { $$=","+$2; } -- Sequential Statements ----------------------------------------------------*/ -seq_stats: seq_stats_1 {$$=$1;} -seq_stats_1: /* empty */ {$$="";} -seq_stats_1: seq_stats_1 seq_stats_2 {$$=$1+$2;} -seq_stats_2: seq_stat {$$=$1;} - -seq_stat: assertion_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: lable assertion_stat {$$=$1+$2; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: case_stat {$$=$1;} -seq_stat: exit_stat { - $$=$1; - } -seq_stat: if_stat {$$="";} -seq_stat: loop_stat {$$=$1;} -seq_stat: next_stat { - $$=$1; - } -seq_stat: null_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: procedure_call_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: return_stat {$$=$1; FlowNode::addFlowNode(FlowNode::RETURN_NO,$$.data(),0);} -seq_stat: lable signal_assign_stat {$$=$1+$2;} -seq_stat: signal_assign_stat - { - $$=$1; - FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0); - } -seq_stat: variable_assign_stat { $$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: wait_stat {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: lable wait_stat {$$=$1+$2; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} -seq_stat: report_statement {$$=$1; FlowNode::addFlowNode(FlowNode::TEXT_NO,$$.data(),0);} - -report_statement: loop_stat_1 t_REPORT expr assertion_stat_2 t_Semicolon {$$=$1+"report "+$3+$4+";"; } - -assertion_stat: t_ASSERT expr assertion_stat_1 assertion_stat_2 t_Semicolon {$$="assert "+$2+$3+$4+";";} -assertion_stat_2: /* empty */ {$$="";} -assertion_stat_2 : t_SEVERITY expr {$$=" serverity "+$2;} -assertion_stat_1 : /* empty */ {$$="";} -assertion_stat_1 : t_REPORT expr {$$=" report "+$2;} - -choice_stat : /* empty */ {$$="";} -choice_stat : t_Q {$$="?";} - -choice_stat_1: /* empty */ {$$="";} -choice_stat_1 : t_Q {$$="?";} -choice_stat_1 : t_Identifier {$$=$1;} +seq_stats: seq_stats_1 { $$=$1; } +seq_stats_1: /* empty */ { $$=""; } +seq_stats_1: seq_stats_1 seq_stats_2 { $$=$1+$2; } +seq_stats_2: seq_stat { $$=$1; } +seq_stat: assertion_stat { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: lable assertion_stat { $$=$1+$2; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: case_stat { $$=$1; } +seq_stat: exit_stat { $$=$1; } +seq_stat: if_stat { $$=""; } +seq_stat: loop_stat { $$=$1; } +seq_stat: next_stat { $$=$1; } +seq_stat: null_stat { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: procedure_call_stat { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: return_stat { $$=$1; FlowChart::addFlowChart(FlowChart::RETURN_NO,$$.data(),0); } +seq_stat: lable signal_assign_stat { $$=$1+$2; } +seq_stat: signal_assign_stat { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: variable_assign_stat { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: wait_stat { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: lable wait_stat { $$=$1+$2; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } +seq_stat: report_statement { $$=$1; FlowChart::addFlowChart(FlowChart::TEXT_NO,$$.data(),0); } + +report_statement: loop_stat_1 t_REPORT expr assertion_stat_2 t_Semicolon { $$=$1+"report "+$3+$4+";"; } + +assertion_stat: t_ASSERT expr assertion_stat_1 assertion_stat_2 t_Semicolon { $$="assert "+$2+$3+$4+";"; } +assertion_stat_2: /* empty */ { $$=""; } +assertion_stat_2 : t_SEVERITY expr { $$=" serverity "+$2; } +assertion_stat_1 : /* empty */ { $$=""; } +assertion_stat_1 : t_REPORT expr { $$=" report "+$2; } + +choice_stat : /* empty */ { $$=""; } +choice_stat : t_Q { $$="?"; } + +choice_stat_1: /* empty */ { $$=""; } +choice_stat_1 : t_Q { $$="?"; } +choice_stat_1 : t_Identifier { $$=$1; } case_stat : t_CASE choice_stat expr { QCString ca="case "+$2+$3; - FlowNode::addFlowNode(FlowNode::CASE_NO,0,ca); + FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca); } - t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon - { - FlowNode::addFlowNode(FlowNode::END_CASE,"end case",0); - FlowNode::moveToPrevLevel(); - } + t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon + { + FlowChart::moveToPrevLevel(); + FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0); + } case_stat : lable t_CASE choice_stat expr { - QCString ca="case "+$3+$4; - FlowNode::addFlowNode(FlowNode::CASE_NO,0,ca); + QCString ca="case "+$3+$4; + FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca); } - t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon - { - FlowNode::addFlowNode(FlowNode::END_CASE,0,0); - FlowNode::moveToPrevLevel(); - } + t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon + { + FlowChart::addFlowChart(FlowChart::END_CASE,0,0); + FlowChart::moveToPrevLevel(); + } -case_stat : t_CASE error t_END t_CASE choice_stat_1 t_Semicolon {$$="";} -case_stat_1 : /* empty */ {$$="";} -case_stat_1 : case_stat_1 case_stat_2 {$$=$1+$2;} -case_stat_2 : case_stat_alternative {$$=$1;} +case_stat : t_CASE error t_END t_CASE choice_stat_1 t_Semicolon { $$=""; } +case_stat_1 : /* empty */ { $$=""; } +case_stat_1 : case_stat_1 case_stat_2 { $$=$1+$2; } +case_stat_2 : case_stat_alternative { $$=$1; } case_stat_alternative : t_WHEN choices t_Arrow - { - QCString t="when "; - t+=$2+"=> "; - FlowNode::addFlowNode(FlowNode::WHEN_NO,0,t); + { + QCString t="when "; + t+=$2+"=> "; + FlowChart::addFlowChart(FlowChart::WHEN_NO,0,t); } -seq_stats {$$="";} - + seq_stats { $$=""; FlowChart::moveToPrevLevel(); } - -if_stat : t_IF expr t_THEN +if_stat: t_IF expr t_THEN { - $2.prepend("if "); - FlowNode::addFlowNode(FlowNode::IF_NO,0,$2); + $2.prepend("if "); + FlowChart::addFlowChart(FlowChart::IF_NO,0,$2); } seq_stats if_stat_1 if_stat_2 t_END t_IF t_Semicolon { - FlowNode::addFlowNode(FlowNode::ENDIF_NO,0,0); - FlowNode::moveToPrevLevel(); + FlowChart::moveToPrevLevel(); + FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0); } -if_stat_2 : /* empty */ {$$=""; } +if_stat_2 : /* empty */ { $$=""; } if_stat_2 : t_ELSE - { - FlowNode::addFlowNode(FlowNode::ELSE_NO,0,0); - } seq_stats {$$=""; } + { + FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0); + } + seq_stats + { + $$=""; FlowChart::moveToPrevLevel(); + } -if_stat_1 : /* empty */ {$$=""; } -if_stat_1 : if_stat_1 if_stat_3 {$$=$1+$2; } +if_stat_1 : /* empty */ { $$=""; } +if_stat_1 : if_stat_1 if_stat_3 { $$=$1+$2; } if_stat_3 : t_ELSIF expr t_THEN { - $2.prepend("elsif "); - FlowNode::addFlowNode(FlowNode::ELSIF_NO,0,$2.data()); - } seq_stats {$$="";} + $2.prepend("elsif "); + FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,$2.data()); + } seq_stats { $$=""; } loop_stat: loop_stat_1 loop_stat_2 t_LOOP seq_stats t_END t_LOOP loop_stat_3 t_Semicolon - { - - $$=$1+$2+" loop "+$4+" end loop" +$7; - QCString endLoop="end loop" + $7; - FlowNode::addFlowNode(FlowNode::END_LOOP,endLoop.data(),0); - FlowNode::moveToPrevLevel(); - } + { + $$=$1+$2+" loop "+$4+" end loop" +$7; + QCString endLoop="end loop" + $7; + FlowChart::moveToPrevLevel(); + FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop.data(),0); + } -loop_stat_3: /* empty */ {$$=""; } -loop_stat_3: t_Identifier {$$=$1; } -loop_stat_2: /* empty */ { - $$=""; - FlowNode::addFlowNode(FlowNode::LOOP_NO,0,"infinite loop"); - } +loop_stat_3: /* empty */ { $$=""; } +loop_stat_3: t_Identifier { $$=$1; } +loop_stat_2: /* empty */ { $$=""; + FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite loop"); + } loop_stat_2: iteration_scheme -loop_stat_1: /* empty */ {$$=""; } -loop_stat_1: t_Identifier t_Colon {$$=$1+":";lab=$1;} +loop_stat_1: /* empty */ { $$=""; } +loop_stat_1: t_Identifier t_Colon { $$=$1+":";lab=$1; } exit_stat : loop_stat_1 t_EXIT exit_stat_1 exit_stat_2 t_Semicolon { - $$=$1+"exit "+$3+";"; - if($4.data()) - FlowNode::addFlowNode(FlowNode::EXIT_WHEN_NO,0,$4.data(),0); - - FlowNode::addFlowNode(FlowNode::EXIT_NO,$$.data(),0,$3.data()); - } -exit_stat_2 : /* empty */ {$$="";} -exit_stat_2 : t_WHEN expr {$$="when "+$2;} -exit_stat_1 : /* empty */ {$$="";} -exit_stat_1 : t_Identifier {$$=$1;lab=$$;} + FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",$4.data(),$3.data()); + lab.resize(0); + } +exit_stat_2 : /* empty */ { $$=""; } +exit_stat_2 : t_WHEN expr { $$="when "+$2; } +exit_stat_1 : /* empty */ { $$=""; } +exit_stat_1 : t_Identifier { $$=$1;lab=$$; } next_stat: loop_stat_1 t_NEXT next_stat_1 next_stat_2 t_Semicolon - { - $$=$1+"next "+$3+";" ; - if($4.data()) - FlowNode::addFlowNode(FlowNode::EXIT_WHEN_NO,0,$4.data(),0); - FlowNode::addFlowNode(FlowNode::NEXT_NO,$$.data(),0,$3.data()); - } + { + FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",$4.data(),$3.data()); + lab.resize(0); + } -next_stat_2: /* empty */ {$$=""; } -next_stat_2: t_WHEN expr {$$="when "+$2; } -next_stat_1: /* empty */ {$$=""; } -next_stat_1: t_Identifier {$$=$1;lab=$$; } +next_stat_2: /* empty */ { $$=""; } +next_stat_2: t_WHEN expr { $$="when "+$2; } +next_stat_1: /* empty */ { $$=""; } +next_stat_1: t_Identifier { $$=$1;lab=$$; } -null_stat: t_NULL t_Semicolon {$$="null"; $$+=";";} +null_stat: t_NULL t_Semicolon { $$="null"; $$+=";"; } procedure_call_stat: name t_Semicolon { - $$=$1+";"; + $$=$1+";"; } -return_stat: t_RETURN return_stat_1 t_Semicolon {$$="return "+$2+";" ;} -return_stat_1: /* empty */ {$$=""; } -return_stat_1: expr {$$=$1; } +return_stat: t_RETURN return_stat_1 t_Semicolon { $$="return "+$2+";" ; } +return_stat_1: /* empty */ { $$=""; } +return_stat_1: expr { $$=$1; } -signal_assign_stat: target t_LESym wavefrm t_Semicolon {$$=$1+" <="+$3+";" ;} - | target t_LESym delay_mechanism wavefrm t_Semicolon {$$=$1+ "<= "+$3+$4 +";";} - | target t_LESym t_FORCE inout_stat expr t_Semicolon {$$=$1+ "<= "+ " force "+$4+";" ;} - | target t_LESym t_RELEASE inout_stat t_Semicolon {$$=$1+ "<= "+" release "+$4 +";";} - | selected_signal_assignment {$$=$1; } - | conditional_signal_assignment {$$=$1; } +signal_assign_stat: target t_LESym wavefrm t_Semicolon { $$=$1+" <="+$3+";" ; } + | target t_LESym delay_mechanism wavefrm t_Semicolon { $$=$1+ "<= "+$3+$4 +";"; } + | target t_LESym t_FORCE inout_stat expr t_Semicolon { $$=$1+ "<= "+ " force "+$4+";" ; } + | target t_LESym t_RELEASE inout_stat t_Semicolon { $$=$1+ "<= "+" release "+$4 +";"; } + | selected_signal_assignment { $$=$1; } + | conditional_signal_assignment { $$=$1; } ; -variable_assign_stat: variable_assign_stat_1 t_Semicolon {$$=$1+";"; } - | conditional_variable_assignment {$$=$1; } - | lable selected_variable_assignment {$$=$1; } - | selected_variable_assignment {$$=$1; } +variable_assign_stat: variable_assign_stat_1 t_Semicolon { $$=$1+";"; } + | conditional_variable_assignment { $$=$1; } + | lable selected_variable_assignment { $$=$1; } + | selected_variable_assignment { $$=$1; } lable: t_Identifier t_Colon { $$=$1+":"; } -variable_assign_stat_1: target t_VarAsgn expr {$$=$1+":="+$3; } -variable_assign_stat_1: lable target t_VarAsgn expr {$$=$1+$2+":="+$4; } +variable_assign_stat_1: target t_VarAsgn expr { $$=$1+":="+$3; } +variable_assign_stat_1: lable target t_VarAsgn expr { $$=$1+$2+":="+$4; } wait_stat: t_WAIT wait_stat_1 wait_stat_2 wait_stat_3 t_Semicolon { $$="wait "+$2+$3+$4+";"; } -wait_stat_3: /* empty */ {$$=""; } -wait_stat_3: t_FOR expr {$$="for "+$2; } -wait_stat_2: /* empty */ {$$=""; } -wait_stat_2: t_UNTIL expr {$$=" until "+$2; } -wait_stat_1: /* empty */ {$$=""; } -wait_stat_1: t_ON sensitivity_list {$$=" on "+$2; } +wait_stat_3: /* empty */ { $$=""; } +wait_stat_3: t_FOR expr { $$="for "+$2; } +wait_stat_2: /* empty */ { $$=""; } +wait_stat_2: t_UNTIL expr { $$=" until "+$2; } +wait_stat_1: /* empty */ { $$=""; } +wait_stat_1: t_ON sensitivity_list { $$=" on "+$2; } /*-------------------------------------------------- @@ -1803,7 +1813,7 @@ comp_decl_2: t_PORT interf_list t_Semicolon { $$=$2; } comp_decl_1: /* empty */ { $$=""; } comp_decl_1: t_GENERIC interf_list t_Semicolon { $$=$2; } -block_config: t_FOR block_spec block_config_1 block_config_2 { levelCounter--;} t_END t_FOR t_Semicolon +block_config: t_FOR block_spec block_config_1 block_config_2 { levelCounter--; } t_END t_FOR t_Semicolon { } @@ -1879,11 +1889,11 @@ inst_list: t_OTHERS { $$="others"; } binding_indic : entity_aspect binding_indic_1 binding_indic_2 { $$=$1; } -binding_indic_2: {$$="";} -binding_indic_2: t_PORT t_MAP association_list {$$="port map "+$3;} +binding_indic_2: { $$=""; } +binding_indic_2: t_PORT t_MAP association_list { $$="port map "+$3; } -binding_indic_1: {$$="";} -binding_indic_1: t_GENERIC t_MAP association_list {$$="generic map "+$3;} +binding_indic_1: { $$=""; } +binding_indic_1: t_GENERIC t_MAP association_list { $$="generic map "+$3; } entity_aspect: t_ENTITY name { $$="entity "+$2; } @@ -1915,7 +1925,7 @@ group_template_declaration : t_GROUP t_Identifier t_IS t_LeftParen entity_cl group_template_declaration: t_GROUP t_Identifier t_IS t_LeftParen error t_Semicolon t_RightParen{ $$=""; } -entity_class_entry : entity_class tbox {$$=$1+$2;} +entity_class_entry : entity_class tbox { $$=$1+$2; } tbox : /* empty */ { $$=""; } tbox : t_Box { $$="<>"; } @@ -2063,8 +2073,8 @@ when_stats: when_stats_1 ttend: t_END t_Semicolon ttend: t_END t_Identifier t_Semicolon -conditional_signal_assignment: conditional_waveform_assignment {$$="";} -conditional_signal_assignment: conditional_force_assignment {$$="";} +conditional_signal_assignment: conditional_waveform_assignment { $$=""; } +conditional_signal_assignment: conditional_force_assignment { $$=""; } conditional_waveform_assignment: target t_LESym wavefrm_element t_WHEN expr else_wave_list t_Semicolon conditional_waveform_assignment: target t_LESym delay_mechanism wavefrm_element t_WHEN expr else_wave_list t_Semicolon @@ -2078,8 +2088,8 @@ else_wave_list: t_ELSE expr conditional_force_assignment: target t_LESym t_FORCE inout_stat expr t_WHEN expr else_stat t_Semicolon conditional_force_assignment: target t_LESym t_FORCE inout_stat expr t_WHEN expr t_Semicolon -selected_signal_assignment : selected_waveform_assignment {$$="";} -selected_signal_assignment : selected_force_assignment {$$="";} +selected_signal_assignment : selected_waveform_assignment { $$=""; } +selected_signal_assignment : selected_force_assignment { $$=""; } selected_waveform_assignment: t_WITH expr t_SELECT choice_stat target t_LESym delay_stat sel_wave_list @@ -2095,13 +2105,13 @@ sel_wave_list_1: wavefrm_element t_WHEN choices t_Semicolon selected_force_assignment: t_WITH expr t_SELECT choice_stat target t_LESym t_FORCE inout_stat sel_var_list -inout_stat: /* empty */ {$$="";} -inout_stat: t_IN {$$=" in ";} -inout_stat: t_OUT {$$="out";} +inout_stat: /* empty */ { $$=""; } +inout_stat: t_IN { $$=" in "; } +inout_stat: t_OUT { $$="out"; } -delay_mechanism : t_TRANSPORT { $$=" transport ";} - | t_REJECT expr t_INERTIAL { $$=" reject "+$2+"inertial ";} - | t_INERTIAL { $$=" inertial ";} +delay_mechanism : t_TRANSPORT { $$=" transport "; } + | t_REJECT expr t_INERTIAL { $$=" reject "+$2+"inertial "; } + | t_INERTIAL { $$=" inertial "; } conditional_variable_assignment : variable_assign_stat_1 t_WHEN expr else_stat t_Semicolon conditional_variable_assignment : variable_assign_stat_1 t_WHEN expr t_Semicolon @@ -2110,7 +2120,7 @@ else_stat: t_ELSE expr t_WHEN expr else_stat: else_stat t_ELSE expr t_WHEN expr else_stat: t_ELSE expr -selected_variable_assignment: t_WITH expr t_SELECT choice_stat select_name t_VarAsgn sel_var_list {$$="";} +selected_variable_assignment: t_WITH expr t_SELECT choice_stat select_name t_VarAsgn sel_var_list { $$=""; } sel_var_list: expr t_WHEN choices t_Comma sel_var_list sel_var_list: sel_var_list_1 @@ -2554,7 +2564,7 @@ static void newEntry() initEntry(current); } -void createFlow(QCString val) +void createFlow() { if (!VhdlDocGen::getFlowMember()) { @@ -2565,13 +2575,13 @@ void createFlow(QCString val) if (currP==VhdlDocGen::FUNCTION) { q=":function( "; - FlowNode::alignFuncProc(q,tempEntry->argList,true); + FlowChart::alignFuncProc(q,tempEntry->argList,true); q+=")"; } else if (currP==VhdlDocGen::PROCEDURE) { q=":procedure ("; - FlowNode::alignFuncProc(q,tempEntry->argList,false); + FlowChart::alignFuncProc(q,tempEntry->argList,false); q+=")"; } else @@ -2582,12 +2592,7 @@ void createFlow(QCString val) q.prepend(VhdlDocGen::getFlowMember()->name().data()); - FlowNode::addFlowNode(FlowNode::START_NO,q,0); - - if (!val.isEmpty()) - { - FlowNode::addFlowNode(FlowNode::VARIABLE_NO,val,0); - } + FlowChart::addFlowChart(FlowChart::START_NO,q,0); if (currP==VhdlDocGen::FUNCTION) { @@ -2602,9 +2607,9 @@ void createFlow(QCString val) ret="end process "; } - FlowNode::addFlowNode(FlowNode::END_NO,ret,0); - // FlowNode::printFlowList(); - FlowNode::writeFlowNode(); + FlowChart::addFlowChart(FlowChart::END_NO,ret,0); + // FlowChart::printFlowList(); + FlowChart::writeFlowChart(); currP=0; } diff --git a/src/vhdlscanner.h b/src/vhdlscanner.h index c1192cf..676f881 100644 --- a/src/vhdlscanner.h +++ b/src/vhdlscanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l index 898713e..54ad209 100644 --- a/src/vhdlscanner.l +++ b/src/vhdlscanner.l @@ -532,6 +532,13 @@ BR [ \t\n\r] { REJECT; } + else if (qcs.stripPrefix("--#")) + { + if (VhdlDocGen::getFlowMember()) + { + FlowChart::addFlowChart(FlowChart::COMMENT_NO,0,0,qcs.data()); + } + } } . { /* unknown characters */ } diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 05da2a0..23382e8 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -835,7 +835,10 @@ void XmlDocVisitor::visitPost(DocLink *) void XmlDocVisitor::visitPre(DocRef *ref) { if (m_hide) return; - if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor()); + if (!ref->file().isEmpty()) + { + startLink(ref->ref(),ref->file(),ref->isSubPage() ? QCString() : ref->anchor()); + } if (!ref->hasLinkText()) filter(ref->targetTitle()); } @@ -1056,6 +1059,7 @@ void XmlDocVisitor::filter(const char *str) void XmlDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) { + //printf("XmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data()); m_t << "<ref refid=\"" << file; if (!anchor.isEmpty()) m_t << "_1" << anchor; m_t << "\" kindref=\""; diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h index 77242a1..42290cc 100644 --- a/src/xmldocvisitor.h +++ b/src/xmldocvisitor.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 07ea086..b04fb5a 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -306,7 +306,7 @@ class XMLCodeGenerator : public CodeOutputInterface m_normalHLNeedStartTag=FALSE; } writeXMLLink(m_t,ref,file,anchor,name,tooltip); - col+=strlen(name); + col+=qstrlen(name); } void startCodeLine(bool) { @@ -1842,10 +1842,26 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) t << " <compoundname>" << convertToXML(pd->name()) << "</compoundname>" << endl; - SectionInfo *si = Doxygen::sectionDict->find(pd->name()); - if (si) + if (pd==Doxygen::mainPage) // main page is special { - t << " <title>" << convertToXML(si->title) << "</title>" << endl; + QCString title; + if (!pd->title().isEmpty() && pd->title().lower()!="notitle") + { + title = filterTitle(Doxygen::mainPage->title()); + } + else + { + title = Config_getString("PROJECT_NAME"); + } + t << " <title>" << convertToXML(title) << "</title>" << endl; + } + else + { + SectionInfo *si = Doxygen::sectionDict->find(pd->name()); + if (si) + { + t << " <title>" << convertToXML(si->title) << "</title>" << endl; + } } writeInnerPages(pd->getSubPages(),t); t << " <detaileddescription>" << endl; @@ -1923,7 +1939,7 @@ void generateXML() err("Cannot open file %s for writing!\n",fileName.data()); return; } - f.writeBlock(index_xsd,strlen(index_xsd)); + f.writeBlock(index_xsd,qstrlen(index_xsd)); f.close(); fileName=outputDirectory+"/compound.xsd"; @@ -1933,7 +1949,7 @@ void generateXML() err("Cannot open file %s for writing!\n",fileName.data()); return; } - f.writeBlock(compound_xsd,strlen(compound_xsd)); + f.writeBlock(compound_xsd,qstrlen(compound_xsd)); f.close(); fileName=outputDirectory+"/index.xml"; diff --git a/src/xmlgen.h b/src/xmlgen.h index 9193956..b89b10f 100644 --- a/src/xmlgen.h +++ b/src/xmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2012 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby |