summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2004-10-10 19:13:27 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2004-10-10 19:13:27 (GMT)
commit50828c3c773e8095785c010c1aad3891076742f4 (patch)
treea1de4b4e9cdb500ec50176a1d5a70efafc4eb88f
parent89f2e4c8f026df987fab492c050e43011ef96871 (diff)
downloadDoxygen-50828c3c773e8095785c010c1aad3891076742f4.zip
Doxygen-50828c3c773e8095785c010c1aad3891076742f4.tar.gz
Doxygen-50828c3c773e8095785c010c1aad3891076742f4.tar.bz2
Release-1.3.9.1
-rw-r--r--Doxyfile1
-rw-r--r--INSTALL4
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--doc/faq.doc21
-rw-r--r--doc/translator.py51
-rw-r--r--doc/translator_report.txt19
-rw-r--r--packages/rpm/doxygen.spec2
-rw-r--r--src/code.l38
-rw-r--r--src/definition.cpp4
-rw-r--r--src/doxygen.cpp91
-rw-r--r--src/htmlgen.cpp4
-rw-r--r--src/namespacedef.cpp23
-rw-r--r--src/namespacedef.h3
-rw-r--r--src/pre.l7
-rw-r--r--src/tagreader.cpp81
-rw-r--r--src/util.cpp45
-rw-r--r--wintools/Doxygen.dsp10
18 files changed, 269 insertions, 141 deletions
diff --git a/Doxyfile b/Doxyfile
index c7da9e2..181117b 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -83,7 +83,6 @@ EXCLUDE = src/code.cpp \
src/tag.cpp \
src/doctokenizer.cpp \
src/logos.cpp \
- src/doxysearch.cpp \
src/suffixtree.cpp \
src/suffixtree.h \
src/searchindex.cpp \
diff --git a/INSTALL b/INSTALL
index 5e1a6b0..592b16b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.3.9
+DOXYGEN Version 1.3.9.1
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (05 October 2004)
+Dimitri van Heesch (10 October 2004)
diff --git a/README b/README
index 20f8995..a7742db 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.3.9
+DOXYGEN Version 1.3.9.1
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 October 2004)
+Dimitri van Heesch (dimitri@stack.nl) (10 October 2004)
diff --git a/VERSION b/VERSION
index d4c4950..c4d3ba9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.9
+1.3.9.1
diff --git a/doc/faq.doc b/doc/faq.doc
index af779ae..8bfc3ae 100644
--- a/doc/faq.doc
+++ b/doc/faq.doc
@@ -211,11 +211,11 @@ If you don't mind spending some time on it, there are several options:
"input buffer overflow, can't enlarge buffer because scanner uses REJECT"</b>
This error happens when doxygen lexical scanner has a rule that matches
-more than 16K of input characters in one go. I've seen this happening
-on a very large generated file (\>16K lines), where the built-in preprocessor
-converted it into an empty file (with \>16K of newlines). Another case
+more than 256K of input characters in one go. I've seen this happening
+on a very large generated file (\>256K lines), where the built-in preprocessor
+converted it into an empty file (with \>256K of newlines). Another case
where this might happen is if you have lines in your code with more than
-16K characters.
+256K characters.
If you have run into such a case and want me to fix it, you
should send me a code fragment that triggers the message. To work around
@@ -263,6 +263,19 @@ namespace std {
I'm still looking for someone who can provide me with definitions
for all (relevant) STL classes.
+<li><b>Can I configure doxygen from the command line?</b>
+
+Not via command line options, but doxygen can read from <code>stdin</code>,
+so you can pipe things through it. Here's an example how to override an option
+in a configuration file from the command line (assuming a unix environment):
+
+\verbatim
+( cat Doxyfile ; echo "PROJECT_NUMBER=1.0" ) | doxygen -
+\endverbatim
+
+If multiple options with the same name are specified then doxygen will use
+the last one. To append to an existing option you can use the += operator.
+
<li><b>How did doxygen get its name?</b>
Doxygen got its name from playing with the words
diff --git a/doc/translator.py b/doc/translator.py
index 81c2fe6..a3f7c93 100644
--- a/doc/translator.py
+++ b/doc/translator.py
@@ -10,7 +10,7 @@
translator report only for some languages, pass their codes as arguments
to the script. In that case, the language.doc will not be generated.
Example:
-
+
python translator.py en nl cz
Originally, the script was written in Perl and was known as translator.pl.
@@ -44,6 +44,7 @@
explicitly via script arguments.
2004/07/26 - Better reporting of not-needed adapters.
2004/10/04 - Reporting of not called translator methods added.
+ 2004/10/05 - Modified to check only doxygen/src sources for the previous report.
"""
from __future__ import generators
@@ -1204,7 +1205,7 @@ class TrManager:
# script, of the translator.h, of the translator_adapter.h (see the
# self.__build() for the last two) of all the translator_xx.h files
# and of the template for generating the documentation. So, this
- # time can compared with modification time of the generated
+ # time can be compared with modification time of the generated
# documentation to decide, whether the doc should be re-generated.
self.lastModificationTime = os.path.getmtime(self.script)
@@ -1361,26 +1362,24 @@ class TrManager:
def __getNoTrSourceFilesLst(self):
"""Returns the list of sources to be checked.
- All .cpp files and also .h files that do not declare and define
+ All .cpp files and also .h files that do not declare or define
the translator methods are included in the list. The file names
- are searched in doxygen directory recursively."""
- lst = []
- for path, dirs, files in os.walk(self.doxy_path):
-
- # Files in doxygen/src should be processed first.
- if path == self.doxy_path:
- dirs.remove('src')
- dirs.insert(0, 'src')
+ are searched in doxygen/src directory.
+ """
+ srcdir = os.path.join(self.doxy_path, 'src')
+ files = []
+ for item in os.listdir(srcdir):
+ # Split the bare name to get the extension.
+ name, ext = os.path.splitext(item)
+ ext = ext.lower()
- # Search for names with .cpp extension (case independent)
- # and append them to the output list.
- for fname in files:
- name, ext = os.path.splitext(fname)
- ext = ext.lower()
- if ext == '.cpp' or (ext == '.h' and name.find('translator') == -1):
- lst.append(os.path.join(path, fname))
-
- return lst
+ # Include only .cpp and .h files (case independent) and exclude
+ # the files where the checked identifiers are defined.
+ if ext == '.cpp' or (ext == '.h' and name.find('translator') == -1):
+ fname = os.path.join(srcdir, item)
+ assert os.path.isfile(fname) # assumes no directory with the ext
+ files.append(fname) # full name
+ return files
def __removeUsedInFiles(self, fname, dic):
@@ -1562,12 +1561,12 @@ class TrManager:
if not self.script_argLst:
dic = self.__checkForNotUsedTrMethods()
if dic:
- s = '''WARNING FOR DEVELOPERS: The following translator
- methods are declared in the Translator class but their
- identifiers do not appear in source files. The situation
- should be checked. The .cpp files and .h files excluding
- the 'translator*.h' files were simply searched for
- occurence of the method identifiers:'''
+ s = '''WARNING: The following translator methods are declared
+ in the Translator class but their identifiers do not appear
+ in source files. The situation should be checked. The .cpp
+ files and .h files excluding the '*translator*' files
+ in doxygen/src directory were simply searched for occurence
+ of the method identifiers:'''
f.write('\n' + '=' * 70 + '\n')
f.write(fill(s) + '\n\n')
diff --git a/doc/translator_report.txt b/doc/translator_report.txt
index 2c73b00..9a6959f 100644
--- a/doc/translator_report.txt
+++ b/doc/translator_report.txt
@@ -65,6 +65,25 @@ version of the translator for the language:
TranslatorKoreanEn implements 5 methods
======================================================================
+WARNING: The following translator methods are declared in the
+Translator class but their identifiers do not appear in source files.
+The situation should be checked. The .cpp files and .h files excluding
+the '*translator*' files in doxygen/src directory were simply searched
+for occurence of the method identifiers:
+
+ QCString trBugsAndLimitations()
+ QCString trEnumerationValueDocumentation()
+ QCString trField(bool, bool)
+ QCString trHeaderFiles()
+ QCString trHeaderFilesDescription()
+ QCString trInterfaces()
+ QCString trNoDescriptionAvailable()
+ QCString trPackageDocumentation()
+ QCString trReimplementedForInternalReasons()
+ QCString trSources()
+
+
+======================================================================
Details for translators (classes sorted alphabetically):
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index ab7eccd..20c6268 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,6 +1,6 @@
Summary: A documentation system for C/C++.
Name: doxygen
-Version: 1.3.9
+Version: 1.3.9.1
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
diff --git a/src/code.l b/src/code.l
index fd47652..cefd8bb 100644
--- a/src/code.l
+++ b/src/code.l
@@ -843,18 +843,18 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
}
}
-static bool getLink(const char *className,
- const char *memberName,
- BaseCodeDocInterface &ol,
- const char *text=0)
+static bool getLinkInScope(const QCString &c, // scope
+ const QCString &m, // member
+ const char *memberText, // exact text
+ BaseCodeDocInterface &ol,
+ const char *text
+ )
{
MemberDef *md;
ClassDef *cd;
FileDef *fd;
NamespaceDef *nd;
GroupDef *gd;
- QCString m=removeRedundantWhiteSpace(memberName);
- QCString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
md->isLinkable())
@@ -894,14 +894,34 @@ static bool getLink(const char *className,
writeMultiLineCodeLink(ol,md->getReference(),
md->getOutputFileBase(),
md->anchor(),
- text ? text : memberName);
- addToSearchIndex(text ? text : memberName);
+ text ? text : memberText);
+ addToSearchIndex(text ? text : memberText);
return TRUE;
}
}
return FALSE;
}
+static bool getLink(const char *className,
+ const char *memberName,
+ BaseCodeDocInterface &ol,
+ const char *text=0)
+{
+ QCString m=removeRedundantWhiteSpace(memberName);
+ QCString c=className;
+ if (!getLinkInScope(c,m,memberName,ol,text))
+ {
+ if (!g_curClassName.isEmpty())
+ {
+ if (!c.isEmpty()) c.prepend("::");
+ c.prepend(g_curClassName);
+ return getLinkInScope(c,m,memberName,ol,text);
+ }
+ return FALSE;
+ }
+ return TRUE;
+}
+
static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const char *memName)
{
if (mcd)
@@ -1761,7 +1781,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
BEGIN( Body );
}
<ClassName,ClassVar>[*&]+ {
- g_type=g_curClassName;
+ g_type=g_curClassName.copy();
g_name.resize(0);
g_code->codify(yytext);
BEGIN( Body ); // variable of type struct *
diff --git a/src/definition.cpp b/src/definition.cpp
index 57d585e..4470bf2 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -164,7 +164,9 @@ void Definition::writeDocAnchorsToTagFile()
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) Doxygen::tagFile << " ";
- Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
+ Doxygen::tagFile << " <docanchor file=\""
+ << si->fileName << "\">" << si->label
+ << "</docanchor>" << endl;
}
}
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 00d4dde..57ad6a8 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1021,11 +1021,13 @@ static void buildNamespaceList(Entry *root)
else // fresh namespace
{
QCString tagName;
+ QCString tagFileName;
if (root->tagInfo)
{
tagName=root->tagInfo->tagName;
+ tagFileName=root->tagInfo->fileName;
}
- NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,fullName,tagName);
+ NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,fullName,tagName,tagFileName);
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
@@ -1143,8 +1145,7 @@ static void findUsingDirectives(Entry *root)
}
else // unknown namespace, but add it anyway.
{
- NamespaceDef *nd=new NamespaceDef(
- root->fileName,root->startLine,name);
+ NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,name);
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
@@ -4241,6 +4242,49 @@ static bool findGlobalMember(Entry *root,
return TRUE;
}
+static QCString substituteTemplatesInString(
+ const QList<ArgumentList> &srcTempArgLists,
+ const QList<ArgumentList> &dstTempArgLists,
+ const QCString &src
+ )
+{
+ QCString dst;
+ QRegExp re(idMask);
+ //printf("type=%s\n",sa->type.data());
+
+ int i,p=0,l;
+ while ((i=re.match(src,p,&l))!=-1) // for each word in srcType
+ {
+ bool found=FALSE;
+ dst+=src.mid(p,i-p);
+ QCString name=src.mid(i,l);
+
+ QListIterator<ArgumentList> srclali(srcTempArgLists);
+ QListIterator<ArgumentList> dstlali(dstTempArgLists);
+ for (;srclali.current() && !found;++srclali,++dstlali)
+ {
+ ArgumentListIterator tsali(*srclali.current());
+ ArgumentListIterator tdali(*dstlali.current());
+ Argument *tsa =0,*tda=0;
+
+ for (tsali.toFirst();(tsa=tsali.current()) && !found;++tsali)
+ {
+ tda = tdali.current();
+ if (tda && name==tsa->name)
+ {
+ name=tda->name; // substitute
+ found=TRUE;
+ }
+ if (tda) ++tdali;
+ }
+ }
+ dst+=name;
+ p=i+l;
+ }
+ dst+=src.right(src.length()-p);
+ return dst;
+}
+
static void substituteTemplatesInArgList(
const QList<ArgumentList> &srcTempArgLists,
const QList<ArgumentList> &dstTempArgLists,
@@ -4253,51 +4297,22 @@ static void substituteTemplatesInArgList(
for (sali.toFirst();(sa=sali.current());++sali) // for each member argument
{
- QCString srcType = sa->type;
- QRegExp re(idMask);
- //printf("type=%s\n",sa->type.data());
-
- int i,p=0,l;
- QCString dstType;
- while ((i=re.match(srcType,p,&l))!=-1) // for each word in srcType
- {
- bool found=FALSE;
- dstType+=srcType.mid(p,i-p);
- QCString name=srcType.mid(i,l);
-
- QListIterator<ArgumentList> srclali(srcTempArgLists);
- QListIterator<ArgumentList> dstlali(dstTempArgLists);
- for (;srclali.current() && !found;++srclali,++dstlali)
- {
- ArgumentListIterator tsali(*srclali.current());
- ArgumentListIterator tdali(*dstlali.current());
- Argument *tsa =0,*tda=0;
-
- for (tsali.toFirst();(tsa=tsali.current()) && !found;++tsali)
- {
- tda = tdali.current();
- if (tda && name==tsa->name)
- {
- name=tda->name; // substitute
- found=TRUE;
- }
- if (tda) ++tdali;
- }
- }
- dstType+=name;
- p=i+l;
- }
- dstType+=srcType.right(srcType.length()-p);
+ QCString dstType = substituteTemplatesInString(
+ srcTempArgLists,dstTempArgLists,sa->type);
+ QCString dstArray = substituteTemplatesInString(
+ srcTempArgLists,dstTempArgLists,sa->array);
if (da==0)
{
da=new Argument(*sa);
dst->append(da);
da->type=dstType;
+ da->array=dstArray;
da=0;
}
else
{
da->type=dstType;
+ da->type=dstArray;
da=dst->next();
}
}
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 87b168d..8223562 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1145,7 +1145,7 @@ void HtmlGenerator::startParameterType(bool first,const char *key)
t << " <td class=\"md\" nowrap align=\"right\">";
if (key) t << key;
t << "</td>" << endl;
- t << " <td></td>" << endl;
+ t << " <td class=\"md\"></td>" << endl;
t << " <td class=\"md\" nowrap>";
}
}
@@ -1185,7 +1185,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList,bool closeBracket)
t << "</td>" << endl;
t << " </tr>" << endl;
t << " <tr>" << endl;
- t << " <td></td>" << endl;
+ t << " <td class=\"md\"></td>" << endl;
t << " <td class=\"md\">";
if (closeBracket) t << ")";
t << "&nbsp;</td>" << endl;
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index ee4c48b..77779be 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -29,11 +29,19 @@
#include "searchindex.h"
NamespaceDef::NamespaceDef(const char *df,int dl,
- const char *name,const char *lref) :
+ const char *name,const char *lref,
+ const char *fName) :
Definition(df,dl,name)
{
- fileName="namespace";
- fileName+=name;
+ if (fName)
+ {
+ fileName = stripExtension(fName);
+ }
+ else
+ {
+ fileName="namespace";
+ fileName+=name;
+ }
classSDict = new ClassSDict(17);
namespaceSDict = new NamespaceSDict(17);
m_innerCompounds = new SDict<Definition>(257);
@@ -414,7 +422,14 @@ void NamespaceDef::addUsingDeclaration(Definition *d)
QCString NamespaceDef::getOutputFileBase() const
{
- return convertNameToFile(fileName);
+ if (isReference())
+ {
+ return fileName;
+ }
+ else
+ {
+ return convertNameToFile(fileName);
+ }
}
Definition *NamespaceDef::findInnerCompound(const char *n)
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 51d30d2..4432539 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -38,7 +38,8 @@ class NamespaceDef : public Definition
{
public:
NamespaceDef(const char *defFileName,int defLine,
- const char *name,const char *ref=0);
+ const char *name,const char *ref=0,
+ const char *refFile=0);
~NamespaceDef();
DefType definitionType() { return TypeNamespace; }
QCString getOutputFileBase() const;
diff --git a/src/pre.l b/src/pre.l
index a01b06f..8266c1c 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -856,9 +856,15 @@ QCString removeIdsAndMarkers(const char *s)
}
p++;
}
+ else // oops, not comment but division
+ {
+ result+=pc;
+ goto nextChar;
+ }
}
else
{
+nextChar:
result+=c;
char lc=tolower(c);
if (!isId(lc) && lc!='.' && lc!='-' && lc!='+') inNum=FALSE;
@@ -1507,6 +1513,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Guard>"defined"/{B}+ {
BEGIN(DefinedExpr1);
}
+<Guard>{ID} { g_guardExpr+=yytext; }
<Guard>. { g_guardExpr+=*yytext; }
<Guard>\n {
outputChar('\n');
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index b629373..1b971a2 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -35,6 +35,22 @@
#include "defargs.h"
//#include "reflist.h"
+/*! Information about an linkable anchor */
+class TagAnchorInfo
+{
+ public:
+ TagAnchorInfo(const QString &f,const QString &l) : label(l), fileName(f) {}
+ QString label;
+ QString fileName;
+};
+
+class TagAnchorInfoList : public QList<TagAnchorInfo>
+{
+ public:
+ TagAnchorInfoList() : QList<TagAnchorInfo>() { setAutoDelete(TRUE); }
+ virtual ~TagAnchorInfoList() {}
+};
+
/*! Container for member specific info that can be read from a tagfile */
class TagMemberInfo
{
@@ -45,7 +61,7 @@ class TagMemberInfo
QString anchor;
QString arglist;
QString kind;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
Protection prot;
Specifier virt;
bool isStatic;
@@ -60,7 +76,7 @@ class TagClassInfo
~TagClassInfo() { delete bases; delete templateArguments; }
QString name;
QString filename;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
QList<BaseInfo> *bases;
QList<TagMemberInfo> members;
QList<QString> *templateArguments;
@@ -75,7 +91,7 @@ class TagNamespaceInfo
TagNamespaceInfo() { members.setAutoDelete(TRUE); }
QString name;
QString filename;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
QStringList classList;
};
@@ -87,7 +103,7 @@ class TagPackageInfo
TagPackageInfo() { members.setAutoDelete(TRUE); }
QString name;
QString filename;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
QStringList classList;
};
@@ -110,7 +126,7 @@ class TagFileInfo
QString name;
QString path;
QString filename;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
QStringList classList;
QStringList namespaceList;
@@ -125,7 +141,7 @@ class TagGroupInfo
QString name;
QString title;
QString filename;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
QStringList subgroupList;
QStringList classList;
@@ -142,7 +158,7 @@ class TagPageInfo
QString name;
QString title;
QString filename;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
};
/*! Container for directory specific info that can be read from a tagfile */
@@ -154,7 +170,7 @@ class TagDirInfo
QString path;
QStringList subdirList;
QStringList fileList;
- QStrList docAnchors;
+ TagAnchorInfoList docAnchors;
};
/*! Tag file parser.
@@ -317,8 +333,8 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curMember = new TagMemberInfo;
m_curMember->kind = attrib.value("kind");
- QString protStr = attrib.value("protection");
- QString virtStr = attrib.value("virtualness");
+ QString protStr = attrib.value("protection");
+ QString virtStr = attrib.value("virtualness");
QString staticStr = attrib.value("static");
if (protStr=="protected")
{
@@ -364,14 +380,14 @@ class TagFileParser : public QXmlDefaultHandler
{
switch(m_state)
{
- case InClass: m_curClass->docAnchors.append(m_curString); break;
- case InFile: m_curFile->docAnchors.append(m_curString); break;
- case InNamespace: m_curNamespace->docAnchors.append(m_curString); break;
- case InGroup: m_curGroup->docAnchors.append(m_curString); break;
- case InPage: m_curPage->docAnchors.append(m_curString); break;
- case InMember: m_curMember->docAnchors.append(m_curString); break;
- case InPackage: m_curPackage->docAnchors.append(m_curString); break;
- case InDir: m_curDir->docAnchors.append(m_curString); break;
+ case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InFile: m_curFile->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InNamespace: m_curNamespace->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InGroup: m_curGroup->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InPage: m_curPage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
default: err("Error: Unexpected tag `member' found\n"); break;
}
}
@@ -424,6 +440,11 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curString = "";
}
+ void startDocAnchor(const QXmlAttributes& attrib )
+ {
+ m_fileName = attrib.value("file");
+ m_curString = "";
+ }
void endType()
{
if (m_state==InMember)
@@ -640,7 +661,7 @@ class TagFileParser : public QXmlDefaultHandler
m_startElementHandlers.insert("file", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("dir", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue));
- m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startStringValue));
+ m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startDocAnchor));
m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement));
m_startElementHandlers.insert("templarg", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("type", new StartElementHandler(this,&TagFileParser::startStringValue));
@@ -708,7 +729,7 @@ class TagFileParser : public QXmlDefaultHandler
private:
void buildMemberList(Entry *ce,QList<TagMemberInfo> &members);
- void addDocAnchors(Entry *e,QStrList &l);
+ void addDocAnchors(Entry *e,const TagAnchorInfoList &l);
QList<TagClassInfo> m_tagFileClasses;
QList<TagFileInfo> m_tagFileFiles;
QList<TagNamespaceInfo> m_tagFileNamespaces;
@@ -729,6 +750,7 @@ class TagFileParser : public QXmlDefaultHandler
TagIncludeInfo *m_curIncludes;
QCString m_curString;
QString m_tagName;
+ QString m_fileName;
State m_state;
QStack<State> m_stateStack;
};
@@ -932,24 +954,25 @@ void TagFileParser::dump()
}
}
-void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
+void TagFileParser::addDocAnchors(Entry *e,const TagAnchorInfoList &l)
{
- char *s=l.first();
- while (s)
+ QListIterator<TagAnchorInfo> tli(l);
+ TagAnchorInfo *ta;
+ for (tli.toFirst();(ta=tli.current());++tli)
{
- QCString *anchorName = new QCString(s);
- if (Doxygen::sectionDict.find(*anchorName)==0)
+ if (Doxygen::sectionDict.find(ta->label)==0)
{
- SectionInfo *si=new SectionInfo(e->fileName,*anchorName,*anchorName,
+ //printf("New sectionInfo file=%s anchor=%s\n",
+ // ta->fileName.data(),ta->label.data());
+ SectionInfo *si=new SectionInfo(ta->fileName,ta->label,ta->label,
SectionInfo::Anchor,m_tagName);
- Doxygen::sectionDict.insert(*anchorName,si);
+ Doxygen::sectionDict.insert(ta->label,si);
e->anchors->append(si);
}
else
{
- err("Duplicate anchor %s found\n",anchorName->data());
+ err("Duplicate anchor %s found\n",ta->label.data());
}
- s=l.next();
}
}
diff --git a/src/util.cpp b/src/util.cpp
index fba7edb..10d3ea2 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -128,23 +128,31 @@ int iSystem(const char *command,const char *args,bool isBatchFile)
{
QTime time;
time.start();
+
+ if (command==0) return 1;
+
+ QCString fullCmd=command;
+ fullCmd=fullCmd.stripWhiteSpace();
+ if (fullCmd.at(0)!='"' && fullCmd.find(' ')!=-1)
+ {
+ // add quotes around command as it contains spaces and is not quoted already
+ fullCmd="\""+fullCmd+"\"";
+ }
+ fullCmd += " ";
+ fullCmd += args;
+ //printf("iSystem: Executing %s\n",fullCmd.data());
+
#if !defined(_WIN32) || defined(__CYGWIN__)
isBatchFile=isBatchFile;
/*! taken from the system() manpage on my Linux box */
int pid,status=0;
- if (command==0) return 1;
#ifdef _OS_SOLARIS // for Solaris we use vfork since it is more memory efficient
// on Solaris fork() duplicates the memory usage
// so we use vfork instead
- char buf[4096];
- strcpy(buf,command);
- strcat(buf," ");
- strcat(buf,args);
-
// spawn shell
if ((pid=vfork())<0)
{
@@ -152,7 +160,7 @@ int iSystem(const char *command,const char *args,bool isBatchFile)
}
else if (pid==0)
{
- execl("/bin/sh","sh","-c",buf,(char*)0);
+ execl("/bin/sh","sh","-c",fullCmd.data(),(char*)0);
_exit(127);
}
else
@@ -175,14 +183,10 @@ int iSystem(const char *command,const char *args,bool isBatchFile)
if (pid==-1) return -1;
if (pid==0)
{
- char buf[4096];
- strcpy(buf,command);
- strcat(buf," ");
- strcat(buf,args);
const char * argv[4];
argv[0] = "sh";
argv[1] = "-c";
- argv[2] = buf;
+ argv[2] = fullCmd.data();
argv[3] = 0;
execve("/bin/sh",(char * const *)argv,environ);
exit(127);
@@ -204,9 +208,6 @@ int iSystem(const char *command,const char *args,bool isBatchFile)
#else // Win32 specific
if (isBatchFile)
{
- QCString fullCmd = command;
- fullCmd += " ";
- fullCmd += args;
return system(fullCmd);
}
else
@@ -1107,7 +1108,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
bestTemplSpec.resize(0);
}
else if (distance==minDistance &&
- fileScope &&
+ fileScope && bestMatch &&
fileScope->getUsedNamespaces() &&
d->getOuterScope()->definitionType()==Definition::TypeNamespace &&
bestMatch->getOuterScope()==Doxygen::globalScope
@@ -1143,10 +1144,14 @@ ClassDef *getResolvedClassRec(Definition *scope,
{
QCString spec;
minDistance=distance;
- bestMatch = newResolveTypedef(fileScope,md,&spec);
- //printf(" bestTypeDef=%p spec=%s\n",md,spec.data());
- bestTypedef = md;
- bestTemplSpec = spec;
+ ClassDef *cd = newResolveTypedef(fileScope,md,&spec);
+ if (cd) // shouldn't be 0, but could in some weird cases
+ {
+ //printf(" bestTypeDef=%p spec=%s\n",md,spec.data());
+ bestMatch = cd;
+ bestTypedef = md;
+ bestTemplSpec = spec;
+ }
}
}
}
diff --git a/wintools/Doxygen.dsp b/wintools/Doxygen.dsp
index f401208..96b6f50 100644
--- a/wintools/Doxygen.dsp
+++ b/wintools/Doxygen.dsp
@@ -23,6 +23,8 @@ CFG=Doxygen - Win32 Debug
# Begin Project
# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
@@ -151,6 +153,10 @@ SOURCE=..\src\diagram.cpp
# End Source File
# Begin Source File
+SOURCE=..\src\dirdef.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\src\docparser.cpp
# End Source File
# Begin Source File
@@ -415,6 +421,10 @@ SOURCE=..\src\diagram.h
# End Source File
# Begin Source File
+SOURCE=..\src\dirdef.h
+# End Source File
+# Begin Source File
+
SOURCE=..\src\docparser.h
# End Source File
# Begin Source File