summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL4
-rw-r--r--README4
-rwxr-xr-xconfigure2
-rw-r--r--doc/commands.doc2
-rw-r--r--doc/config.doc13
-rw-r--r--examples/example.tag7
-rw-r--r--qtools/Doxyfile4
-rw-r--r--qtools/qcache.h4
-rw-r--r--qtools/qgcache.cpp10
-rw-r--r--qtools/qgcache.h2
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/commentscan.l13
-rw-r--r--src/config.xml14
-rw-r--r--src/configoptions.cpp18
-rw-r--r--src/doxygen.cpp54
-rw-r--r--src/doxygen.css6
-rw-r--r--src/doxygen.h2
-rw-r--r--src/doxygen_css.h6
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/htmlgen.cpp4
-rw-r--r--src/index.cpp6
-rw-r--r--src/index.h2
-rw-r--r--src/memberdef.cpp11
-rw-r--r--src/msc.cpp2
-rw-r--r--src/objcache.cpp24
-rw-r--r--src/objcache.h26
-rw-r--r--src/pre.l15
-rw-r--r--src/pyscanner.l10
-rw-r--r--src/scanner.l2
-rw-r--r--src/util.cpp14
30 files changed, 210 insertions, 77 deletions
diff --git a/INSTALL b/INSTALL
index 95047af..0d5d47b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.7.6
+DOXYGEN Version 1.7.6.1
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (03 December 2011)
+Dimitri van Heesch (10 December 2011)
diff --git a/README b/README
index c1dd455..f625b3b 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.7.6
+DOXYGEN Version 1.7.6.1
Please read INSTALL for compilation instructions.
@@ -26,4 +26,4 @@ forum.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (03 December 2011)
+Dimitri van Heesch (dimitri@stack.nl) (10 December 2011)
diff --git a/configure b/configure
index 31e9607..2653c4b 100755
--- a/configure
+++ b/configure
@@ -17,7 +17,7 @@
doxygen_version_major=1
doxygen_version_minor=7
-doxygen_version_revision=6
+doxygen_version_revision=6.1
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=NO
diff --git a/doc/commands.doc b/doc/commands.doc
index 72ec29f..f2c3ddd 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -1017,7 +1017,7 @@ Section indicators
\par Example:
\verbinclude author.cpp
\htmlonly
- Click <a href="$(DOXYGEN_DOCDIR)/examples/author/html/class_windows_n_t.html">here</a>
+ Click <a href="$(DOXYGEN_DOCDIR)/examples/author/html/class_some_nice_class.html">here</a>
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
diff --git a/doc/config.doc b/doc/config.doc
index bf81121..677b991 100644
--- a/doc/config.doc
+++ b/doc/config.doc
@@ -196,6 +196,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_latex_output LATEX_OUTPUT
\refitem cfg_latex_source_code LATEX_SOURCE_CODE
\refitem cfg_layout_file LAYOUT_FILE
+\refitem cfg_lookup_cache_size LOOKUP_CACHE_SIZE
\refitem cfg_macro_expansion MACRO_EXPANSION
\refitem cfg_makeindex_cmd_name MAKEINDEX_CMD_NAME
\refitem cfg_man_extension MAN_EXTENSION
@@ -644,6 +645,18 @@ combination with \ref cfg_separate_member_pages "SEPARATE_MEMBER_PAGES".
\f$2^{(16+\mbox{SYMBOL\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0,
corresponding to a cache size of \f$2^{16} = 65536\f$ symbols.
+\anchor cfg_lookup_cache_size
+<dt>\c LOOKUP_CACHE_SIZE <dd>
+ \addindex LOOKUP_CACHE_SIZE
+ Similar to the \c SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
+ set using \c LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
+ their name and scope. Since this can be an expensive process and often the
+ same symbol appear multiple times in the code, doxygen keeps a cache of
+ pre-resolved symbols. If the cache is too small doxygen will become slower.
+ If the cache is too large, memory is wasted. The cache size is given by this
+ formula: \f$2^{(16+\mbox{LOOKUP\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0,
+ corresponding to a cache size of \f$2^{16} = 65536\f$ symbols.
+
</dl>
\section config_build Build related options
diff --git a/examples/example.tag b/examples/example.tag
index 593dc85..a38ab5c 100644
--- a/examples/example.tag
+++ b/examples/example.tag
@@ -3,5 +3,12 @@
<compound kind="class">
<name>Test</name>
<filename>class_test.html</filename>
+ <member kind="function">
+ <type>void</type>
+ <name>example</name>
+ <anchorfile>class_test.html</anchorfile>
+ <anchor>a47b775f65718978f1ffcd96376f8ecfa</anchor>
+ <arglist>()</arglist>
+ </member>
</compound>
</tagfile>
diff --git a/qtools/Doxyfile b/qtools/Doxyfile
index c57b15f..ddf9909 100644
--- a/qtools/Doxyfile
+++ b/qtools/Doxyfile
@@ -164,8 +164,8 @@ QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = YES
ECLIPSE_DOC_ID = org.doxygen.qtools
-DISABLE_INDEX = YES
-GENERATE_TREEVIEW = YES
+DISABLE_INDEX = NO
+GENERATE_TREEVIEW = NO
ENUM_VALUES_PER_LINE = 4
USE_INLINE_TREES = YES
TREEVIEW_WIDTH = 250
diff --git a/qtools/qcache.h b/qtools/qcache.h
index f15345e..e1f13d6 100644
--- a/qtools/qcache.h
+++ b/qtools/qcache.h
@@ -73,6 +73,8 @@ public:
type *operator[]( const QString &k ) const
{ return (type *)QGCache::find_string(k);}
void statistics() const { QGCache::statistics(); }
+ int hits() const { return QGCache::hits(); }
+ int misses() const { return QGCache::misses(); }
private:
void deleteItem( Item d ) { if ( del_item ) delete (type *)d; }
};
@@ -107,6 +109,8 @@ public:
type *operator[]( const char *k ) const
{ return (type *)QGCache::find_other(k);}
void statistics() const { QGCache::statistics(); }
+ int hits() const { return QGCache::hits(); }
+ int misses() const { return QGCache::misses(); }
private:
void deleteItem( Item d ) { if ( del_item ) delete (type *)d; }
};
diff --git a/qtools/qgcache.cpp b/qtools/qgcache.cpp
index 89282c7..e5dd8de 100644
--- a/qtools/qgcache.cpp
+++ b/qtools/qgcache.cpp
@@ -655,6 +655,16 @@ void QGCache::statistics() const
#endif
}
+int QGCache::hits() const
+{
+ return lruList->hits;
+}
+
+int QGCache::misses() const
+{
+ return lruList->finds - lruList->hits;
+}
+
/*****************************************************************************
QGCacheIterator member functions
diff --git a/qtools/qgcache.h b/qtools/qgcache.h
index 5c3e126..2f35c41 100644
--- a/qtools/qgcache.h
+++ b/qtools/qgcache.h
@@ -83,6 +83,8 @@ protected:
QCollection::Item find_other( const char *key, bool ref=TRUE ) const;
void statistics() const;
+ int hits() const;
+ int misses() const;
private:
bool makeRoomFor( int cost, int priority = -1 );
diff --git a/src/classdef.cpp b/src/classdef.cpp
index cc9a617..a0b1527 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -957,9 +957,9 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol)
{
ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
ol.startDescForItem();
- ol.startParagraph();
+ //ol.startParagraph();
writeExample(ol,m_impl->exampleSDict);
- ol.endParagraph();
+ //ol.endParagraph();
ol.endDescForItem();
ol.endSimpleSect();
}
diff --git a/src/commentscan.l b/src/commentscan.l
index 8ea61ce..cb295d1 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -402,6 +402,8 @@ static int g_condCount;
static int g_sectionLevel;
static int g_commentCount;
+static bool g_spaceBeforeCmd;
+static bool g_spaceBeforeIf;
//-----------------------------------------------------------------------------
@@ -955,6 +957,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// the {B}* in the front was added for bug620924
QCString cmdName = QCString(yytext).stripWhiteSpace().data()+1;
DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName);
+ g_spaceBeforeCmd = yytext[0]==' ' || yytext[0]=='\t';
if (cmdPtr) // special action is required
{
if (cmdPtr->endsBrief)
@@ -1675,9 +1678,15 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(*yytext);
}
<GuardParamEnd>{B}*{DOCNL} {
+ g_spaceBeforeIf=FALSE;
BEGIN(Comment);
}
<GuardParamEnd>{B}* {
+ if (g_spaceBeforeIf) // needed for 665313 in combation with bug620924
+ {
+ addOutput(" ");
+ }
+ g_spaceBeforeIf=FALSE;
BEGIN(Comment);
}
<GuardParamEnd>. {
@@ -2323,6 +2332,7 @@ static bool handleIf(const QCString &)
{
enabledSectionFound=FALSE;
guardType = Guard_If;
+ g_spaceBeforeIf = g_spaceBeforeCmd;
BEGIN(GuardParam);
return FALSE;
}
@@ -2331,6 +2341,7 @@ static bool handleIfNot(const QCString &)
{
enabledSectionFound=FALSE;
guardType = Guard_IfNot;
+ g_spaceBeforeIf = g_spaceBeforeCmd;
BEGIN(GuardParam);
return FALSE;
}
@@ -2557,6 +2568,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
briefEndsAtDot = isAutoBriefOn;
g_condCount = 0;
g_sectionLevel = 0;
+ g_spaceBeforeCmd = FALSE;
+ g_spaceBeforeIf = FALSE;
if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments
{
diff --git a/src/config.xml b/src/config.xml
index 50867b2..dc79fc7 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -323,7 +323,17 @@ performance by keeping more symbols in memory. Note that the value works on
a logarithmic scale so increasing the size by one will roughly double the
memory usage. The cache size is given by this formula:
2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-corresponding to a cache size of 2^16 = 65536 symbols
+corresponding to a cache size of 2^16 = 65536 symbols.
+' minval='0' maxval='9' defval='0'/>
+ <option type='int' id='LOOKUP_CACHE_SIZE' docs='
+Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
+set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
+their name and scope. Since this can be an expensive process and often the
+same symbol appear multiple times in the code, doxygen keeps a cache of
+pre-resolved symbols. If the cache is too small doxygen will become slower.
+If the cache is too large, memory is wasted. The cache size is given by this
+formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
+corresponding to a cache size of 2^16 = 65536 symbols.
' minval='0' maxval='9' defval='0'/>
</group>
<group name='Build' docs='Build related configuration options'>
@@ -535,7 +545,7 @@ containing the references data. This must be a list of .bib files. The
.bib extension is automatically appended if omitted. Using this command
requires the bibtex tool to be installed. See also
http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
+of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
feature you need bibtex and perl available in the search path.
' defval=''/>
</group>
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index 79c4aa9..0fd507b 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -451,7 +451,20 @@ void addConfigOptions(Config *cfg)
"a logarithmic scale so increasing the size by one will roughly double the\n"
"memory usage. The cache size is given by this formula:\n"
"2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\n"
- "corresponding to a cache size of 2^16 = 65536 symbols",
+ "corresponding to a cache size of 2^16 = 65536 symbols.",
+ 0,9,0
+ );
+ //----
+ ci = cfg->addInt(
+ "LOOKUP_CACHE_SIZE",
+ "Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be\n"
+ "set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given\n"
+ "their name and scope. Since this can be an expensive process and often the\n"
+ "same symbol appear multiple times in the code, doxygen keeps a cache of\n"
+ "pre-resolved symbols. If the cache is too small doxygen will become slower.\n"
+ "If the cache is too large, memory is wasted. The cache size is given by this\n"
+ "formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,\n"
+ "corresponding to a cache size of 2^16 = 65536 symbols.",
0,9,0
);
//---------------------------------------------------------------------------
@@ -770,7 +783,8 @@ void addConfigOptions(Config *cfg)
".bib extension is automatically appended if omitted. Using this command\n"
"requires the bibtex tool to be installed. See also\n"
"http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n"
- "of the bibliography can be controlled using LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the search path."
+ "of the bibliography can be controlled using LATEX_BIB_STYLE. To use this\n"
+ "feature you need bibtex and perl available in the search path."
);
cl->setWidgetType(ConfigList::File);
//---------------------------------------------------------------------------
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 478c6f0..b790410 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -134,7 +134,7 @@ SearchIndex * Doxygen::searchIndex=0;
QDict<DefinitionIntf> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0;
-QCache<LookupInfo> Doxygen::lookupCache(50000,50000);
+QCache<LookupInfo> *Doxygen::lookupCache;
DirSDict *Doxygen::directories;
SDict<DirRelation> Doxygen::dirRelations(257);
ParserManager *Doxygen::parserManager = 0;
@@ -7881,13 +7881,13 @@ static void flushCachedTemplateRelations()
// as there can be new template instances in the inheritance path
// to this class. Optimization: only remove those classes that
// have inheritance instances as direct or indirect sub classes.
- QCacheIterator<LookupInfo> ci(Doxygen::lookupCache);
+ QCacheIterator<LookupInfo> ci(*Doxygen::lookupCache);
LookupInfo *li=0;
for (ci.toFirst();(li=ci.current());++ci)
{
if (li->classDef)
{
- Doxygen::lookupCache.remove(ci.currentKey());
+ Doxygen::lookupCache->remove(ci.currentKey());
}
}
// remove all cached typedef resolutions whose target is a
@@ -7937,13 +7937,13 @@ static void flushUnresolvedRelations()
// class B : public A {};
// class C : public B::I {};
//
- QCacheIterator<LookupInfo> ci(Doxygen::lookupCache);
+ QCacheIterator<LookupInfo> ci(*Doxygen::lookupCache);
LookupInfo *li=0;
for (ci.toFirst();(li=ci.current());++ci)
{
if (li->classDef==0 && li->typeDef==0)
{
- Doxygen::lookupCache.remove(ci.currentKey());
+ Doxygen::lookupCache->remove(ci.currentKey());
}
}
@@ -9393,7 +9393,6 @@ void initDoxygen()
Doxygen::sectionDict.setAutoDelete(TRUE);
Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE);
- Doxygen::lookupCache.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE);
Doxygen::citeDict = new CiteDict(256);
}
@@ -9453,6 +9452,18 @@ void cleanUpDoxygen()
// dynamic first
}
+static int computeIdealCacheParam(uint v)
+{
+ //printf("computeIdealCacheParam(v=%u)\n",v);
+
+ int r=0;
+ while (v!=0) v>>=1,r++;
+ // r = log2(v)
+
+ // convert to a valid cache size value
+ return QMAX(0,QMIN(r-16,9));
+}
+
void readConfiguration(int argc, char **argv)
{
/**************************************************************************
@@ -10106,6 +10117,14 @@ void parseInput()
//Doxygen::symbolCache = new ObjCache(1); // only to stress test cache behaviour
Doxygen::symbolStorage = new Store;
+ // also scale lookup cache with SYMBOL_CACHE_SIZE
+ cacheSize = Config_getInt("LOOKUP_CACHE_SIZE");
+ if (cacheSize<0) cacheSize=0;
+ if (cacheSize>9) cacheSize=9;
+ uint lookupSize = 65536 << cacheSize;
+ Doxygen::lookupCache = new QCache<LookupInfo>(lookupSize,lookupSize);
+ Doxygen::lookupCache->setAutoDelete(TRUE);
+
#ifdef HAS_SIGNALS
signal(SIGINT, stopDoxygen);
#endif
@@ -10328,7 +10347,7 @@ void parseInput()
// calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelations(), that's why
// we need to clear the cache here
- Doxygen::lookupCache.clear();
+ Doxygen::lookupCache->clear();
// we don't need the list of using declaration anymore
g_usingDeclarations.clear();
@@ -10840,6 +10859,27 @@ void generateOutput()
QDir::setCurrent(oldDir);
}
+ int cacheParam;
+ msg("symbol cache used %d/%d hits=%d misses=%d\n",
+ Doxygen::symbolCache->count(),
+ Doxygen::symbolCache->size(),
+ Doxygen::symbolCache->hits(),
+ Doxygen::symbolCache->misses());
+ cacheParam = computeIdealCacheParam(Doxygen::symbolCache->misses());
+ if (cacheParam>Config_getInt("SYMBOL_CACHE_SIZE"))
+ {
+ msg("Note: based on cache misses the ideal setting for SYMBOL_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
+ }
+ msg("lookup cache used %d/%d hits=%d misses=%d\n",
+ Doxygen::lookupCache->count(),
+ Doxygen::lookupCache->size(),
+ Doxygen::lookupCache->hits(),
+ Doxygen::lookupCache->misses());
+ cacheParam = computeIdealCacheParam(Doxygen::lookupCache->misses()*2/3); // part of the cache is flushed, hence the 2/3 correction factor
+ if (cacheParam>Config_getInt("LOOKUP_CACHE_SIZE"))
+ {
+ msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
+ }
if (Debug::isFlagSet(Debug::Time))
{
diff --git a/src/doxygen.css b/src/doxygen.css
index 6c75976..b3365a7 100644
--- a/src/doxygen.css
+++ b/src/doxygen.css
@@ -3,7 +3,7 @@
body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 13px;
- line-height: 1.5;
+ line-height: 1.3;
}
/* @group Heading Levels */
@@ -122,11 +122,11 @@ a.el {
a.elRef {
}
-a.code {
+a.code, a.code:visited {
color: #4665A2;
}
-a.codeRef {
+a.codeRef, a.codeRef:visited {
color: #4665A2;
}
diff --git a/src/doxygen.h b/src/doxygen.h
index c7664c0..0722513 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -118,7 +118,7 @@ class Doxygen
static QDict<DefinitionIntf> *symbolMap;
static bool outputToWizard;
static QDict<int> *htmlDirMap;
- static QCache<LookupInfo> lookupCache;
+ static QCache<LookupInfo> *lookupCache;
static DirSDict *directories;
static SDict<DirRelation> dirRelations;
static ParserManager *parserManager;
diff --git a/src/doxygen_css.h b/src/doxygen_css.h
index bdc0ada..4466e07 100644
--- a/src/doxygen_css.h
+++ b/src/doxygen_css.h
@@ -3,7 +3,7 @@
"body, table, div, p, dl {\n"
" font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;\n"
" font-size: 13px;\n"
-" line-height: 1.5;\n"
+" line-height: 1.3;\n"
"}\n"
"\n"
"/* @group Heading Levels */\n"
@@ -122,11 +122,11 @@
"a.elRef {\n"
"}\n"
"\n"
-"a.code {\n"
+"a.code, a.code:visited {\n"
" color: #4665A2; \n"
"}\n"
"\n"
-"a.codeRef {\n"
+"a.codeRef, a.codeRef:visited {\n"
" color: #4665A2; \n"
"}\n"
"\n"
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 57c8451..52c5f0c 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -800,7 +800,7 @@ void FileDef::writeSource(OutputList &ol)
else
{
startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
- !generateTreeView,getOutputFileBase());
+ FALSE,getOutputFileBase());
startTitle(ol,getSourceFileBase());
ol.parseText(title);
endTitle(ol,getSourceFileBase(),0);
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index c9318fa..24bf523 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -2707,7 +2707,7 @@ void HtmlGenerator::startContents()
void HtmlGenerator::endContents()
{
- t << "</div>" << endl;
+ t << "</div><!-- contents -->" << endl;
}
void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli)
@@ -2927,7 +2927,7 @@ void HtmlGenerator::endTitleHead(const char *,const char *)
void HtmlGenerator::endHeaderSection()
{
- t << "</div>" << endl;
+ t << "</div><!--header-->" << endl;
}
void HtmlGenerator::startInlineHeader()
diff --git a/src/index.cpp b/src/index.cpp
index 3310357..adb82f3 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -303,14 +303,14 @@ void startFile(OutputList &ol,const char *name,const char *manName,
}
}
-void endFile(OutputList &ol,bool skipNavIndex)
+void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
if (!skipNavIndex)
{
- ol.endContents();
+ if (!skipEndContents) ol.endContents();
ol.writeSearchInfo();
if (generateTreeView)
{
@@ -331,7 +331,7 @@ void endFileWithNavPath(Definition *d,OutputList &ol)
{
d->writeNavigationPath(ol);
}
- endFile(ol,generateTreeView);
+ endFile(ol,generateTreeView,TRUE);
}
//----------------------------------------------------------------------
diff --git a/src/index.h b/src/index.h
index b49bb1b..8f88484 100644
--- a/src/index.h
+++ b/src/index.h
@@ -257,7 +257,7 @@ void endTitle(OutputList &ol,const char *fileName,const char *name);
void startFile(OutputList &ol,const char *name,const char *manName,
const char *title,HighlightedItem hli=HLI_None,
bool additionalIndices=FALSE,const char *altSidebarName=0);
-void endFile(OutputList &ol,bool skipNavIndex=FALSE);
+void endFile(OutputList &ol,bool skipNavIndex=FALSE,bool skipEndContents=FALSE);
void endFileWithNavPath(Definition *d,OutputList &ol);
void initClassMemberIndices();
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 1439d0b..355870f 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1741,8 +1741,11 @@ bool MemberDef::isDetailedSectionLinkable() const
m_impl->type=="friend union"
)
);
+
- return ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden()) /*|| inAnonymousScope*/);
+ bool result = ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden()));
+ //printf("%s::isDetailedSectionLinkable: %d\n",name().data(),result);
+ return result;
}
bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
@@ -1757,8 +1760,10 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter &&
!isReference();
- //printf("MemberDef::isDetailedSectionVisible() %d\n",visible);
- return visible || simpleFilter;
+ bool result = visible || simpleFilter;
+ //printf("%s::isDetailedSectionVisble: %d groupFilter=%d fileFilter=%d\n",
+ // name().data(),result,groupFilter,fileFilter);
+ return result;
}
/*! Writes the "detailed documentation" section of this member to
diff --git a/src/msc.cpp b/src/msc.cpp
index de28a6f..cce6178 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -191,7 +191,7 @@ void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile,
QCString mapName = baseName+".map";
QCString mapFile = inFile+".map";
t << "<img src=\"" << relPath << baseName << ".png\" alt=\""
- << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
+ << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl;
QCString imap = getMscImageMapFromFile(inFile,outDir,relPath,context);
t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl;
}
diff --git a/src/objcache.cpp b/src/objcache.cpp
index d16e57c..23c14ec 100644
--- a/src/objcache.cpp
+++ b/src/objcache.cpp
@@ -22,16 +22,10 @@
//----------------------------------------------------------------------
-#ifdef CACHE_STATS
-int ObjCache::misses = 0;
-int ObjCache::hits = 0;
-#endif
-
-//----------------------------------------------------------------------
-
ObjCache::ObjCache(unsigned int logSize)
: m_head(-1), m_tail(-1), //m_numEntries(0),
- m_size(1<<logSize), m_freeHashNodes(0), m_freeCacheNodes(0), m_lastHandle(-1)
+ m_size(1<<logSize), m_count(0), m_freeHashNodes(0), m_freeCacheNodes(0),
+ m_lastHandle(-1)
{
int i;
m_cache = new CacheNode[m_size];
@@ -42,6 +36,8 @@ ObjCache::ObjCache(unsigned int logSize)
m_hash[i].nextHash = i+1;
m_cache[i].next = i+1;
}
+ m_misses = 0;
+ m_hits = 0;
}
ObjCache::~ObjCache()
@@ -61,9 +57,7 @@ int ObjCache::add(void *obj,void **victim)
{
//printf("moveToFront=%d\n",hnode->index);
moveToFront(hnode->index);
-#ifdef CACHE_STATS
- hits++;
-#endif
+ m_hits++;
}
else // object not in the cache.
{
@@ -86,6 +80,7 @@ int ObjCache::add(void *obj,void **victim)
m_cache[m_head].prev = index;
}
m_head = index;
+ m_count++;
}
else // cache full -> replace element in the cache
{
@@ -99,9 +94,7 @@ int ObjCache::add(void *obj,void **victim)
hnode = hashInsert(obj);
hnode->index = m_head;
*victim = lruObj;
-#ifdef CACHE_STATS
- misses++;
-#endif
+ m_misses++;
}
return m_head;
}
@@ -121,6 +114,7 @@ void ObjCache::del(int index)
m_cache[index].prev=-1;
m_cache[index].next = m_freeCacheNodes;
m_freeCacheNodes = index;
+ m_count--;
}
#ifdef CACHE_DEBUG
@@ -151,7 +145,7 @@ void ObjCache::printLRU()
#define cache_stats_printf printf
void ObjCache::printStats()
{
- cache_stats_printf("ObjCache: hits=%d misses=%d hit ratio=%f\n",hits,misses,hits*100.0/(hits+misses));
+ cache_stats_printf("ObjCache: hits=%d misses=%d hit ratio=%f\n",m_hits,m_misses,m_hits*100.0/(m_hits+m_misses));
}
#endif
diff --git a/src/objcache.h b/src/objcache.h
index 5e0a3e0..c89ec2c 100644
--- a/src/objcache.h
+++ b/src/objcache.h
@@ -71,9 +71,9 @@ class ObjCache
*/
void use(int handle)
{
- hits++;
if (handle==m_lastHandle) return;
m_lastHandle = handle;
+ m_hits++;
moveToFront(handle);
}
@@ -87,6 +87,22 @@ class ObjCache
/*! Print miss/hits statistics */
void printStats();
+ /*! total size of the cache */
+ int size() const { return m_size; }
+
+ /*! number of elements in the cache */
+ int count() const { return m_count; }
+
+ int hits() const
+ {
+ return m_hits;
+ }
+ int misses() const
+ {
+ return m_misses;
+ }
+
+
private:
void moveToFront(int index);
unsigned int hash(void *addr);
@@ -99,14 +115,12 @@ class ObjCache
int m_head;
int m_tail;
int m_size;
+ int m_count;
int m_freeHashNodes;
int m_freeCacheNodes;
int m_lastHandle;
-
-#ifdef CACHE_STATS
- static int misses;
- static int hits;
-#endif
+ int m_misses;
+ int m_hits;
};
#endif // OBJCACHE_H
diff --git a/src/pre.l b/src/pre.l
index a75a51c..20a9938 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -139,19 +139,19 @@ class DefineManager
{
if (fileName==0) return;
//printf("DefineManager::addDefine(%s,%s)\n",fileName,def->name.data());
- DefinesPerFile *dpf = m_fileMap.find(fileName);
- if (dpf==0)
- {
- dpf = new DefinesPerFile;
- }
- dpf->addDefine(def);
-
Define *d = m_contextDefines.find(def->name);
if (d!=0) // redefine
{
m_contextDefines.remove(d->name);
}
m_contextDefines.insert(def->name,def);
+
+ DefinesPerFile *dpf = m_fileMap.find(fileName);
+ if (dpf==0)
+ {
+ dpf = new DefinesPerFile;
+ }
+ dpf->addDefine(def);
}
void addInclude(const char *fromFileName,const char *toFileName)
{
@@ -1468,6 +1468,7 @@ static void readIncludeFile(const QCString &inc)
}
//printf( "absIncFileName = %s\n", absIncFileName.data() );
}
+ s=includePath.next();
}
}
//printf( "absIncFileName = %s\n", absIncFileName.data() );
diff --git a/src/pyscanner.l b/src/pyscanner.l
index a255538..3d6e158 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -135,6 +135,7 @@ static void initEntry()
current->lang = SrcLangExt_Python;
current->setParent(current_root);
initGroupInfo(current);
+ gstat = FALSE;
}
static void newEntry()
@@ -333,6 +334,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
static void endOfDef(int correction=0)
{
+ //printf("endOfDef at=%d\n",yyLineNr);
if (bodyEntry)
{
bodyEntry->endBodyLine = yyLineNr-correction;
@@ -388,13 +390,15 @@ static void searchFoundDef()
current->protection = protection = Public;
current->lang = SrcLangExt_Python;
current->virt = Normal;
- current->stat = FALSE;
+ current->stat = gstat;
current->mtype = mtype = Method;
current->type.resize(0);
current->name.resize(0);
current->args.resize(0);
current->argList->clear();
g_packageCommentAllowed = FALSE;
+ gstat=FALSE;
+ //printf("searchFoundDef at=%d\n",yyLineNr);
}
static void searchFoundClass()
@@ -583,7 +587,9 @@ STARTDOCSYMS "##"
g_packageCommentAllowed = FALSE;
BEGIN( DoubleQuoteString );
}
-
+ "@staticmethod" {
+ gstat=TRUE;
+ }
{POUNDCOMMENT} { // normal comment
g_packageCommentAllowed = FALSE;
}
diff --git a/src/scanner.l b/src/scanner.l
index 05b6fc9..49495f3 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -2460,7 +2460,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
initEntry();
BEGIN(FindMembers);
}
- else if (*yytext==';' || lastInitializerContext==FindFields)
+ else if (*yytext==';' || (lastInitializerContext==FindFields && initBracketCount==0)) // initBracketCount==0 was added for bug 665778
{
unput(*yytext);
BEGIN(lastInitializerContext);
diff --git a/src/util.cpp b/src/util.cpp
index 5618078..66f29ab 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -492,7 +492,7 @@ static QDict<MemberDef> g_resolvedTypedefs;
static QDict<Definition> g_visitedNamespaces;
// forward declaration
-ClassDef *getResolvedClassRec(Definition *scope,
+static ClassDef *getResolvedClassRec(Definition *scope,
FileDef *fileScope,
const char *n,
MemberDef **pTypeDef,
@@ -1276,7 +1276,7 @@ static void getResolvedSymbol(Definition *scope,
* match against the input name. Can recursively call itself when
* resolving typedefs.
*/
-ClassDef *getResolvedClassRec(Definition *scope,
+static ClassDef *getResolvedClassRec(Definition *scope,
FileDef *fileScope,
const char *n,
MemberDef **pTypeDef,
@@ -1374,7 +1374,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
}
*p='\0';
- LookupInfo *pval=Doxygen::lookupCache.find(key);
+ LookupInfo *pval=Doxygen::lookupCache->find(key);
//printf("Searching for %s result=%p\n",key.data(),pval);
if (pval)
{
@@ -1393,7 +1393,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
else // not found yet; we already add a 0 to avoid the possibility of
// endless recursion.
{
- Doxygen::lookupCache.insert(key,new LookupInfo);
+ Doxygen::lookupCache->insert(key,new LookupInfo);
}
ClassDef *bestMatch=0;
@@ -1439,7 +1439,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
//printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n",
// bestMatch,bestResolvedType.data());
- pval=Doxygen::lookupCache.find(key);
+ pval=Doxygen::lookupCache->find(key);
if (pval)
{
pval->classDef = bestMatch;
@@ -1449,7 +1449,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
}
else
{
- Doxygen::lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec,bestResolvedType));
+ Doxygen::lookupCache->insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec,bestResolvedType));
}
//printf("] bestMatch=%s distance=%d\n",
// bestMatch?bestMatch->name().data():"<none>",minDistance);
@@ -7203,7 +7203,7 @@ QCString langToString(SrcLangExt lang)
/** Returns the scope separator to use given the programming language \a lang */
QCString getLanguageSpecificSeparator(SrcLangExt lang)
{
- if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp || lang==SrcLangExt_VHDL)
+ if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp || lang==SrcLangExt_VHDL || lang==SrcLangExt_Python)
{
return ".";
}