summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doxyfile78
-rw-r--r--INSTALL4
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--doc/diagrams.doc3
-rw-r--r--src/classdef.h2
-rw-r--r--src/classlist.cpp29
-rw-r--r--src/code.l4
-rw-r--r--src/config.l63
-rw-r--r--src/docparser.cpp9
-rw-r--r--src/docparser.h6
-rw-r--r--src/doxygen.cpp16
-rw-r--r--src/doxygen.h1
-rw-r--r--src/filedef.cpp5
-rw-r--r--src/htmldocvisitor.cpp3
-rw-r--r--src/index.cpp16
-rw-r--r--src/latexdocvisitor.cpp9
-rw-r--r--src/message.cpp2
-rw-r--r--src/outputlist.cpp62
-rw-r--r--src/perlmodgen.cpp2
-rw-r--r--src/scanner.l125
-rw-r--r--src/util.cpp53
-rw-r--r--src/xmlgen.cpp12
23 files changed, 318 insertions, 192 deletions
diff --git a/Doxyfile b/Doxyfile
index 7706aa5..aaebebe 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,44 +1,55 @@
-# Doxyfile 1.2.12-20011209
+# Doxyfile 1.3.5
#---------------------------------------------------------------------------
-# General configuration options
+# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = Doxygen
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doxygen_docs
OUTPUT_LANGUAGE = English
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
+USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = $(PWD)/
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = YES
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
-STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = NO
-SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = YES
-INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
+SORT_BRIEF_DOCS = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
-ALIASES =
+GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
@@ -46,6 +57,7 @@ SHOW_USED_FILES = YES
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
@@ -65,7 +77,7 @@ EXCLUDE = src/code.cpp \
src/pre.cpp \
src/scanner.cpp \
src/tag.cpp \
- src/doctokenizer.cpp \
+ src/doctokenizer.cpp \
src/logos.cpp \
src/doxysearch.cpp \
src/suffixtree.cpp \
@@ -73,6 +85,7 @@ EXCLUDE = src/code.cpp \
src/searchindex.cpp \
src/searchindex.h \
src/commentcnv.cpp
+EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
@@ -85,8 +98,10 @@ FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
@@ -98,11 +113,14 @@ IGNORE_PREFIX =
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT =
+HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
@@ -115,6 +133,8 @@ TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
@@ -122,6 +142,7 @@ LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
@@ -142,11 +163,22 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
@@ -159,32 +191,36 @@ PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::addtions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html
GENERATE_TAGFILE =
ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
+HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
+UML_LOOK = NO
TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = NO
+CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 0
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
+# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = YES
diff --git a/INSTALL b/INSTALL
index 3a53bbe..c8cfd36 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.3.5-20040105
+DOXYGEN Version 1.3.5-20040125
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (05 January 2004)
+Dimitri van Heesch (25 January 2004)
diff --git a/README b/README
index d03e231..36cacfc 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.3.5_20040105
+DOXYGEN Version 1.3.5_20040125
Please read INSTALL for compilation instructions.
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (05 January 2004)
+Dimitri van Heesch (dimitri@stack.nl) (25 January 2004)
diff --git a/VERSION b/VERSION
index d0ecafe..ec52481 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.5-20040105
+1.3.5-20040125
diff --git a/doc/diagrams.doc b/doc/diagrams.doc
index 3e8f86b..fe31a4d 100644
--- a/doc/diagrams.doc
+++ b/doc/diagrams.doc
@@ -52,6 +52,9 @@
class \c A has a member variable \c m_a of type class \c B, then
\c A has an arrow to \c B with \c m_a as label).
</ul>
+ <li>if \ref cfg_call_graph "CALL_GRAPH" is set to YES, a
+ graphical call graph is drawn for each function showing the
+ functions that the function directly or indirectly calls.
</ul>
The elements in the class diagrams in HTML and RTF
diff --git a/src/classdef.h b/src/classdef.h
index fbd4cf7..ae42993 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -302,6 +302,8 @@ class ClassDef : public Definition
* \param fName the file name as found in the tag file.
* This overwrites the file that doxygen normally
* generates based on the compound type & name.
+ * \param isSymbol If TRUE this class name is added as a publicly
+ * visible (and referencable) symbol.
*/
ClassDef(const char *fileName,int startLine,
const char *name,CompoundType ct,
diff --git a/src/classlist.cpp b/src/classlist.cpp
index c9fc0d1..7a52556 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -30,26 +30,29 @@ ClassList::~ClassList()
{
}
-int ClassList::compareItems(GCI item1, GCI item2)
+static int compItems(void *item1,void *item2)
{
ClassDef *c1=(ClassDef *)item1;
ClassDef *c2=(ClassDef *)item2;
- //return stricmp(c1->localName().data()+getPrefixIndex(c1->localName()),
- // c2->localName().data()+getPrefixIndex(c2->localName())
- // );
- return stricmp(c1->className().data()+getPrefixIndex(c1->className()),
- c2->className().data()+getPrefixIndex(c2->className()));
+ int p1=0,p2=0;
+ static bool b = Config_getBool("SORT_BY_SCOPE_NAME");
+ if (!b)
+ {
+ p1=getPrefixIndex(c1->className());
+ p2=getPrefixIndex(c2->className());
+ }
+ return stricmp(c1->className().data()+p1,
+ c2->className().data()+p2);
+}
+
+int ClassList::compareItems(GCI item1, GCI item2)
+{
+ return compItems(item1,item2);
}
int ClassSDict::compareItems(GCI item1, GCI item2)
{
- ClassDef *c1=(ClassDef *)item1;
- ClassDef *c2=(ClassDef *)item2;
- //return stricmp(c1->localName().data()+getPrefixIndex(c1->localName()),
- // c2->localName().data()+getPrefixIndex(c2->localName())
- // );
- return stricmp(c1->className().data()+getPrefixIndex(c1->className()),
- c2->className().data()+getPrefixIndex(c2->className()));
+ return compItems(item1,item2);
}
ClassListIterator::ClassListIterator(const ClassList &cllist) :
diff --git a/src/code.l b/src/code.l
index 44f5d21..2f3b501 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1074,7 +1074,7 @@ static int yyread(char *buf,int max_size)
B [ \t]
BN [ \t\n\r]
-ID [a-z_A-Z][a-z_A-Z0-9]*
+ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME ((({ID}{TEMPLIST}?){BN}*"::"{BN}*)*)((~{BN}*)?{ID})
@@ -1543,7 +1543,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
endFontClass();
}
-<Body>"this->" { g_code->codify(yytext); }
+<Body>"$"?"this->" { g_code->codify(yytext); }
<Body>"."|"->" {
g_code->codify(yytext);
g_memCallContext = YY_START;
diff --git a/src/config.l b/src/config.l
index 7b097f6..3e11d90 100644
--- a/src/config.l
+++ b/src/config.l
@@ -897,33 +897,40 @@ void Config::check()
// expand the relative stripFromPath values
QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH");
char *sfp = stripFromPath.first();
- while (sfp)
+ if (sfp==0) // by default use the current path
{
- register char *p = sfp;
- if (p)
+ stripFromPath.append(QDir::currentDirPath()+"/");
+ }
+ else
+ {
+ while (sfp)
{
- char c;
- while ((c=*p))
+ register char *p = sfp;
+ if (p)
{
- if (c=='\\') *p='/';
- p++;
+ char c;
+ while ((c=*p))
+ {
+ if (c=='\\') *p='/';
+ p++;
+ }
}
- }
- QCString path = sfp;
- if (path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':'))
- {
- QFileInfo fi(path);
- if (fi.exists() && fi.isDir())
+ QCString path = sfp;
+ if (path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':'))
{
- int i = stripFromPath.at();
- stripFromPath.remove();
- if (stripFromPath.at()==i) // did not remove last item
- stripFromPath.insert(i,fi.absFilePath()+"/");
- else
- stripFromPath.append(fi.absFilePath()+"/");
+ QFileInfo fi(path);
+ if (fi.exists() && fi.isDir())
+ {
+ int i = stripFromPath.at();
+ stripFromPath.remove();
+ if (stripFromPath.at()==i) // did not remove last item
+ stripFromPath.insert(i,fi.absFilePath()+"/");
+ else
+ stripFromPath.append(fi.absFilePath()+"/");
+ }
}
+ sfp = stripFromPath.next();
}
- sfp = stripFromPath.next();
}
@@ -1475,7 +1482,9 @@ void Config::create()
"If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n"
"can be used to strip a user-defined part of the path. Stripping is \n"
"only done if one of the specified strings matches the left-hand part of \n"
- "the path. It is allowed to use relative paths in the argument list.\n"
+ "the path. It is allowed to use relative paths in the argument list. \n"
+ "If left blank the directory from which doxygen is run is used as the \n"
+ "path to strip. \n"
);
cl->addDependency("FULL_PATH_NAMES");
cb = addBool(
@@ -1683,6 +1692,18 @@ void Config::create()
FALSE
);
cb = addBool(
+ "SORT_BY_SCOPE_NAME",
+ "If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be \n"
+ "sorted by fully-qualified names, including namespaces. If set to \n"
+ "NO (the default), the class list will be sorted only by class name, \n"
+ "not including the namespace part. \n"
+ "Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.\n"
+ "Note: This option applies only to the class list, not to the \n"
+ "alphabetical list.\n",
+ FALSE
+ );
+
+ cb = addBool(
"GENERATE_TODOLIST",
"The GENERATE_TODOLIST tag can be used to enable (YES) or \n"
"disable (NO) the todo list. This list is created by putting \\todo \n"
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 8bc853e..80bea8d 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -699,7 +699,8 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
Definition *compound=0;
MemberDef *member=0;
QString name = linkToText(g_token->name,TRUE);
- if (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member))
+ if (!g_insideHtmlLink &&
+ resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member))
{
//printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member->isLinkable());
if (member) // member link
@@ -3998,7 +3999,11 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
}
else if (opt->name=="href") // <a href=url>..</a> tag
{
- DocHRef *href = new DocHRef(this,opt->value);
+ // copy attributes
+ HtmlAttribList attrList = tagHtmlAttribs;
+ // and remove the href attribute
+ attrList.remove(opt);
+ DocHRef *href = new DocHRef(this,attrList,opt->value);
m_children.append(href);
g_insideHtmlLink=TRUE;
retval = href->parse();
diff --git a/src/docparser.h b/src/docparser.h
index d4c20f6..8742ed5 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -691,16 +691,18 @@ class DocLanguage : public CompAccept<DocLanguage>, public DocNode
class DocHRef : public CompAccept<DocHRef>, public DocNode
{
public:
- DocHRef(DocNode *parent,const QString &url) :
- m_parent(parent), m_url(url) {}
+ DocHRef(DocNode *parent,const HtmlAttribList &attribs,const QString &url) :
+ m_parent(parent), m_attribs(attribs), m_url(url) {}
int parse();
QString url() const { return m_url; }
Kind kind() const { return Kind_HRef; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHRef>::accept(this,v); }
+ const HtmlAttribList &attribs() const { return m_attribs; }
private:
DocNode * m_parent;
+ HtmlAttribList m_attribs;
QString m_url;
};
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 872517a..640ce0f 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -117,6 +117,7 @@ double Doxygen::sysElapsedTime = 0.0;
QTime Doxygen::runningTime;
SearchIndex * Doxygen::searchIndex=0;
SDict<DefinitionList> *Doxygen::symbolMap;
+bool Doxygen::outputToWizard=FALSE;
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
@@ -7039,9 +7040,12 @@ static int readDir(QFileInfo *fi,
if (exclDict==0 || exclDict->find(cfi->absFilePath())==0)
{ // file should not be excluded
//printf("killDict->find(%s)\n",cfi->absFilePath().data());
- if ((!cfi->exists() || !cfi->isReadable()) && errorIfNotExist)
+ if (!cfi->exists() || !cfi->isReadable())
{
- err("Error: source %s is not a readable file or directory... skipping.\n",cfi->absFilePath().data());
+ if (errorIfNotExist)
+ {
+ err("Error: source %s is not a readable file or directory... skipping.\n",cfi->absFilePath().data());
+ }
}
else if (cfi->isFile() &&
(!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
@@ -7159,9 +7163,12 @@ static int readFileOrDirectory(const char *s,
{
if (exclDict==0 || exclDict->find(fi.absFilePath())==0)
{
- if ((!fi.exists() || !fi.isReadable()) && errorIfNotExist)
+ if (!fi.exists() || !fi.isReadable())
{
- err("Error: source %s is not a readable file or directory... skipping.\n",s);
+ if (errorIfNotExist)
+ {
+ err("Error: source %s is not a readable file or directory... skipping.\n",s);
+ }
}
else if (!Config_getBool("EXCLUDE_SYMLINKS") || !fi.isSymLink())
{
@@ -7542,6 +7549,7 @@ void readConfiguration(int argc, char **argv)
break;
case 'b':
setvbuf(stdout,NULL,_IONBF,0);
+ Doxygen::outputToWizard=TRUE;
break;
case 'h':
case '?':
diff --git a/src/doxygen.h b/src/doxygen.h
index 48c9154..f593470 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -100,6 +100,7 @@ class Doxygen
static QTime runningTime;
static SearchIndex *searchIndex;
static SDict<DefinitionList> *symbolMap;
+ static bool outputToWizard;
};
void initDoxygen();
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 10851a1..c8e3839 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -38,8 +38,9 @@ class DevNullCodeDocInterface : public BaseCodeDocInterface
{
public:
virtual void codify(const char *) {}
- virtual void writeCodeLink(const char *,const char *,
- const char *,const char *) {}
+ virtual void writeCodeLink(const char *ref,const char *file,
+ const char *anchor,const char *name)
+ { ref=ref; file=file; anchor=anchor; name=name; }
virtual void writeLineNumber(const char *,const char *,
const char *,int) {}
virtual void startCodeLine() {}
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 287831e..03ca662 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -660,7 +660,8 @@ void HtmlDocVisitor::visitPost(DocInternal *)
void HtmlDocVisitor::visitPre(DocHRef *href)
{
if (m_hide) return;
- m_t << "<a href=\"" << href->url() << "\">";
+ m_t << "<a href=\"" << href->url() << "\""
+ << htmlAttribsToString(href->attribs()) << ">";
}
void HtmlDocVisitor::visitPost(DocHRef *)
diff --git a/src/index.cpp b/src/index.cpp
index 9a4966b..fa080ac 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -3018,6 +3018,16 @@ void writeGroupIndex(OutputList &ol)
//----------------------------------------------------------------------------
+static bool mainPageHasTitle()
+{
+ if (Doxygen::mainPage==0) return FALSE;
+ if (Doxygen::mainPage->title().isEmpty()) return FALSE;
+ if (Doxygen::mainPage->title().lower()=="notitle") return FALSE;
+ return TRUE;
+}
+
+//----------------------------------------------------------------------------
+
void writeIndex(OutputList &ol)
{
// save old generator state
@@ -3040,11 +3050,11 @@ void writeIndex(OutputList &ol)
Doxygen::mainPage ? Doxygen::mainPage->getDefLine() : 1;
QCString title;
- if (!Doxygen::mainPage || Doxygen::mainPage->title().isEmpty())
+ if (!mainPageHasTitle())
{
title = theTranslator->trMainPage();
}
- else if (Doxygen::mainPage)
+ else
{
title = substitute(Doxygen::mainPage->title(),"%","");
}
@@ -3149,7 +3159,7 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage)
{
ol.startIndexSection(isMainPage);
- if (!Doxygen::mainPage->title().isEmpty())
+ if (mainPageHasTitle())
{
ol.parseDoc(defFileName,defLine,Doxygen::mainPage,0,Doxygen::mainPage->title(),FALSE,FALSE);
}
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 16998c9..17fc3cc 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -294,7 +294,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
void LatexDocVisitor::visit(DocAnchor *anc)
{
if (m_hide) return;
- m_t << "\\label{" << anc->anchor() << "}" << endl;
+ m_t << "\\label{" << anc->file() << "_" << anc->anchor() << "}" << endl;
if (!anc->file().isEmpty() && Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hypertarget{" << anc->file() << "_" << anc->anchor()
@@ -526,7 +526,7 @@ void LatexDocVisitor::visitPre(DocSection *s)
}
m_t << "\\" << getSectionName(s->level()) << "{";
filter(s->title());
- m_t << "}\\label{" << s->anchor() << "}" << endl;
+ m_t << "}\\label{" << s->file() << "_" << s->anchor() << "}" << endl;
}
void LatexDocVisitor::visitPost(DocSection *)
@@ -810,7 +810,7 @@ void LatexDocVisitor::visitPre(DocSecRefItem *)
void LatexDocVisitor::visitPost(DocSecRefItem *ref)
{
if (m_hide) return;
- m_t << "}{\\ref{" << ref->anchor() << "}}{}" << endl;
+ m_t << "}{\\ref{" << ref->file() << "_" << ref->anchor() << "}}{}" << endl;
}
void LatexDocVisitor::visitPre(DocSecRefList *)
@@ -976,7 +976,8 @@ void LatexDocVisitor::endLink(const QString &ref,const QString &file,const QStri
m_t << "}";
if (ref.isEmpty() && !Config_getBool("PDF_HYPERLINKS"))
{
- m_t << "{\\rm ("; filter(theTranslator->trPageAbbreviation());
+ m_t << "{\\rm (";
+ filter(theTranslator->trPageAbbreviation());
m_t << "\\,\\pageref{" << file;
if (!anchor.isEmpty()) m_t << "_" << anchor;
m_t << "})}";
diff --git a/src/message.cpp b/src/message.cpp
index e049523..8f85b8c 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -113,7 +113,7 @@ void msg(const char *fmt, ...)
static void do_warn(const char *tag, const char *file, int line, const char *fmt, va_list args)
{
if (!Config_getBool(tag)) return; // warning type disabled
- char text[4096];
+ char text[40960];
vsprintf(text, fmt, args);
if (file==0) file="<unknown>";
switch(warnFormatOrder)
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 5ea69f2..1629a52 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -36,64 +36,17 @@ OutputList::OutputList(bool)
outputs->setAutoDelete(TRUE);
}
-//OutputList::OutputList(const OutputList *olist)
-//{
-// //printf("OutputList::OutputList() deep copy\n");
-// outputs = new QList<OutputGenerator>;
-// outputs->setAutoDelete(TRUE);
-//
-// QList<OutputGenerator> *ol=olist->outputs;
-// OutputGenerator *og=ol->first();
-// while (og)
-// {
-// OutputGenerator *ogc=og->copy();
-// outputs->append(ogc);
-// if (og->isEnabled()) ogc->enable(); else ogc->disable();
-// og=ol->next();
-// }
-// //printf("OutputList::OutputList dst=%d res=%d\n",ol->count(),outputs->count());
-//}
-
OutputList::~OutputList()
{
//printf("OutputList::~OutputList()\n");
delete outputs;
}
-//OutputList &OutputList::operator=(const OutputList &olist)
-//{
-// if (this!=&olist)
-// {
-// QList<OutputGenerator> *ol=olist.outputs;
-// OutputGenerator *ogsrc=ol->first();
-// OutputGenerator *ogdst=outputs->first();
-// //printf("OutputList::operator= src=%d dst=%d\n",outputs->count(),ol->count());
-// while (ogdst)
-// {
-// ogdst=ogsrc->copy();
-// ogsrc=ol->next();
-// ogdst=outputs->next();
-// }
-// }
-// return *this;
-//}
-
void OutputList::add(const OutputGenerator *og)
{
if (og) outputs->append(og);
}
-//HtmlGenerator *OutputList::getHtmlGenerator()
-//{
-// OutputGenerator *og=outputs->first();
-// while (og)
-// {
-// if (og->get(OutputGenerator::Html)) return (HtmlGenerator *)og;
-// og=outputs->next();
-// }
-// return 0; // should not happen!
-//}
-
void OutputList::disableAllBut(OutputGenerator::OutputType o)
{
OutputGenerator *og=outputs->first();
@@ -156,21 +109,6 @@ bool OutputList::isEnabled(OutputGenerator::OutputType o)
return result;
}
-//OutputList &OutputList::operator+=(const OutputList &outputList)
-//{
-// OutputList *ol=(OutputList *)&outputList;
-// OutputGenerator *ogsrc=ol->outputs->first();
-// OutputGenerator *ogdst=outputs->first();
-// //printf("OutputList::operator+= src=%d dst=%d\n",outputs->count(),ol->outputs->count());
-// while (ogdst && ogsrc)
-// {
-// ogdst->append(ogsrc);
-// ogsrc=ol->outputs->next();
-// ogdst=outputs->next();
-// }
-// return *this;
-//}
-
void OutputList::pushGeneratorState()
{
OutputGenerator *og=outputs->first();
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index fedb290..8072a53 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -1921,7 +1921,7 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd)
GroupDef *sgd;
for (gli.toFirst();(sgd=gli.current());++gli)
m_output.openHash()
- .addFieldQuotedString("title", gd->groupTitle())
+ .addFieldQuotedString("title", sgd->groupTitle())
.closeHash();
m_output.closeList();
}
diff --git a/src/scanner.l b/src/scanner.l
index e4ac633..beb2ac6 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -500,12 +500,85 @@ static bool checkForKnRstyleC()
return TRUE;
}
+static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
+{
+ int si = current->args.length();
+ if (oldStyleArgType.isEmpty()) // new argument
+ {
+ static QRegExp re("([^)]*)");
+ int bi1 = current->args.findRev(re);
+ int bi2 = bi1!=-1 ? current->args.findRev(re,bi1-1) : -1;
+ char c;
+ if (bi1!=-1 && bi2!=-1) // found something like "int (*func)(int arg)"
+ {
+ int s=bi2+1;
+ oldStyleArgType = current->args.left(s);
+ int i=s;
+ while (i<si && ((c=current->args.at(i))=='*' || isspace(c))) i++;
+ oldStyleArgType += current->args.mid(s,i-s);
+ s=i;
+ while (i<si && isId(current->args.at(i))) i++;
+ oldStyleArgName = current->args.mid(s,i-s);
+ oldStyleArgType+=current->args.mid(i);
+ }
+ else if (bi1!=-1) // redundant braces like in "int (*var)"
+ {
+ int s=bi1;
+ oldStyleArgType = current->args.left(s);
+ s++;
+ int i=s+1;
+ while (i<si && ((c=current->args.at(i))=='*' || isspace(c))) i++;
+ oldStyleArgType += current->args.mid(s,i-s);
+ s=i;
+ while (i<si && isId(current->args.at(i))) i++;
+ oldStyleArgName = current->args.mid(s,i-s);
+ }
+ else // normal "int *var"
+ {
+ int l=si,i=l-1,j;
+ char c;
+ // look for start of name in "type *name"
+ while (i>=0 && isId(current->args.at(i))) i--;
+ j=i+1;
+ // look for start of *'s
+ while (i>=0 && ((c=current->args.at(i))=='*' || isspace(c))) i--;
+ i++;
+ if (i!=l)
+ {
+ oldStyleArgType=current->args.left(i);
+ oldStyleArgPtr=current->args.mid(i,j-i);
+ oldStyleArgName=current->args.mid(j).stripWhiteSpace();
+ }
+ else
+ {
+ oldStyleArgName=current->args.copy().stripWhiteSpace();
+ }
+ }
+ }
+ else // continuation like *arg2 in "int *args,*arg2"
+ {
+ int l=si,j=0;
+ char c;
+ while (j<l && ((c=current->args.at(j))=='*' || isspace(c))) j++;
+ if (j>0)
+ {
+ oldStyleArgPtr=current->args.left(j);
+ oldStyleArgName=current->args.mid(j).stripWhiteSpace();
+ }
+ else
+ {
+ oldStyleArgName=current->args.copy().stripWhiteSpace();
+ }
+ }
+ //fprintf(stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data());
+}
+
/*! Update the argument \a name with additional \a type info. For K&R style
* function the type is found \e after the argument list, so this routine
* in needed to fix up.
*/
-void addKnRArgInfo(const QCString &type,const QCString &name,
- const QCString &brief,const QCString &docs)
+static void addKnRArgInfo(const QCString &type,const QCString &name,
+ const QCString &brief,const QCString &docs)
{
if (current->argList==0) return;
ArgumentListIterator ali(*current->argList);
@@ -564,7 +637,7 @@ BS ^(({B}*"//")?)(({B}*"*"+)?){B}*
FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
FILEECHAR [a-z_A-Z0-9\-\+]
FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+"\"")
-ID [a-z_A-Z][a-z_A-Z0-9]*
+ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
@@ -2850,7 +2923,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<FuncQual>{ID} { // typically a K&R style C function
if (checkForKnRstyleC())
{
- fprintf(stderr,"===> got a K&R style function\n");
+ //fprintf(stderr,"===> got a K&R style function\n");
current->args = yytext;
oldStyleArgType.resize(0);
BEGIN(OldStyleArgs);
@@ -2863,41 +2936,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<OldStyleArgs>[,;] {
QCString oldStyleArgPtr;
QCString oldStyleArgName;
- if (oldStyleArgType.isEmpty())
- {
- int l=current->args.length(),i=l-1,j;
- char c;
- while (i>=0 && isId(current->args.at(i))) i--;
- j=i+1;
- while (i>=0 && ((c=current->args.at(i))=='*' || isspace(c))) i--;
- i++;
- if (i!=l)
- {
- oldStyleArgType=current->args.left(i);
- oldStyleArgPtr=current->args.mid(i,j-i);
- oldStyleArgName=current->args.mid(j).stripWhiteSpace();
- }
- else
- {
- oldStyleArgName=current->args.copy().stripWhiteSpace();
- }
- }
- else
- {
- int l=current->args.length(),j=0;
- char c;
- while (j<l && ((c=current->args.at(j))=='*' || isspace(c))) j++;
- if (j>0)
- {
- oldStyleArgPtr=current->args.left(j);
- oldStyleArgName=current->args.mid(j).stripWhiteSpace();
- }
- else
- {
- oldStyleArgName=current->args.copy().stripWhiteSpace();
- }
- }
- fprintf(stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data());
+ splitKnRArg(oldStyleArgPtr,oldStyleArgName);
QCString doc,brief;
if (current->doc!=docBackup)
{
@@ -2909,7 +2948,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
brief=current->brief.copy();
current->brief=briefBackup;
}
- addKnRArgInfo(oldStyleArgType+oldStyleArgPtr,oldStyleArgName,brief,doc);
+ addKnRArgInfo(oldStyleArgType+oldStyleArgPtr,
+ oldStyleArgName,brief,doc);
current->args.resize(0);
if (*yytext==';') oldStyleArgType.resize(0);
}
@@ -4404,7 +4444,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<SkipVerbatim><<EOF>> {
warn(yyFileName,yyLineNr,
- "Warning: reached end of file while inside a @%s block; check for missing @end%s!",g_skipBlockName.data(),g_skipBlockName.data()
+ "Warning: reached end of file while inside a @%s block; check for missing @end%s tag!",g_skipBlockName.data(),g_skipBlockName.data()
);
yyterminate();
}
@@ -4452,7 +4492,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<SkipCode><<EOF>> {
warn(yyFileName,yyLineNr,
- "Warning: reached end of file while inside a %s block; check for missing end tag!",
+ "Warning: reached end of file while inside a @%s block; check for missing @end%s tag!",
+ g_skipBlockName.data(),
g_skipBlockName.data()
);
yyterminate();
diff --git a/src/util.cpp b/src/util.cpp
index 94180f2..ff0ec8d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -847,15 +847,53 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
Definition *newScope = followPath(scope,fileScope,explicitScopePart);
if (newScope) // explicitScope is inside scope => newScope is the result
{
- //printf("scope traversal successful!\n");
+ //printf("scope traversal successful %s<->%s!\n",item->getOuterScope()->name().data(),newScope->name().data());
if (item->getOuterScope()==newScope)
{
//printf("> found it\n");
}
else
{
- // repeat for the parent scope
int i=-1;
+ if (newScope->definitionType()==Definition::TypeNamespace)
+ {
+ // this part deals with the case where item is a class
+ // A::B::C but is explicit referenced as A::C, where B is imported
+ // in A via a using directive.
+ //printf("newScope is a namespace: %s!\n",newScope->name().data());
+ NamespaceDef *nscope = (NamespaceDef*)newScope;
+ ClassSDict *cl = nscope->getUsedClasses();
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ i = isAccessibleFrom(scope,fileScope,item,cd->name());
+ if (i!=-1)
+ {
+ //printf("> found via explicit scope of used class\n");
+ goto done;
+ }
+ }
+ }
+ NamespaceSDict *nl = nscope->getUsedNamespaces();
+ if (nl)
+ {
+ NamespaceSDict::Iterator nli(*nl);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ i = isAccessibleFrom(scope,fileScope,item,nd->name());
+ if (i!=-1)
+ {
+ //printf("> found via explicit scope of used namespace\n");
+ goto done;
+ }
+ }
+ }
+ }
+ // repeat for the parent scope
if (scope!=Doxygen::globalScope)
{
i = isAccessibleFrom(scope->getOuterScope(),fileScope,item,explicitScopePart);
@@ -1381,17 +1419,24 @@ QCString argListToString(ArgumentList *al)
result+="(";
while (a)
{
+ QCString type1 = a->type, type2;
+ int i=type1.find(")("); // hack to deal with function pointers
+ if (i!=-1)
+ {
+ type2=type1.mid(i);
+ type1=type1.left(i);
+ }
if (!a->attrib.isEmpty())
{
result+=a->attrib+" ";
}
if (!a->name.isEmpty() || !a->array.isEmpty())
{
- result+= a->type+" "+a->name+a->array;
+ result+= type1+" "+a->name+type2+a->array;
}
else
{
- result+= a->type;
+ result+= type1+type2;
}
if (!a->defval.isEmpty())
{
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 5f014ec..f28bf7a 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1467,8 +1467,16 @@ static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample)
t << " <title>" << convertToXML(si->title) << "</title>" << endl;
}
t << " <detaileddescription>" << endl;
- writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
- pd->documentation()+"\n\\include "+pd->name());
+ if (isExample)
+ {
+ writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
+ pd->documentation()+"\n\\include "+pd->name());
+ }
+ else
+ {
+ writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
+ pd->documentation());
+ }
t << " </detaileddescription>" << endl;
t << " </compounddef>" << endl;