summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL4
-rw-r--r--Makefile.in34
-rw-r--r--README4
-rwxr-xr-xconfigure45
-rw-r--r--doc/install.doc2
-rw-r--r--packages/rpm/build.sh21
-rw-r--r--packages/rpm/doxygen-nodoxywizard.spec.in85
-rw-r--r--packages/rpm/doxygen.spec150
-rw-r--r--packages/rpm/doxygen.spec.in104
-rw-r--r--src/code.l20
-rw-r--r--src/docparser.cpp2
-rw-r--r--src/doxygen.cpp250
-rw-r--r--src/doxygen.h1
-rw-r--r--src/htmlgen.cpp2
-rw-r--r--src/htmlhelp.cpp8
-rw-r--r--src/namespacedef.cpp14
-rw-r--r--src/pre.l2
-rw-r--r--src/scanner.l50
18 files changed, 498 insertions, 300 deletions
diff --git a/INSTALL b/INSTALL
index 513c952..18aef08 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.4.5-20051109
+DOXYGEN Version 1.4.5-20051127
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (09 November 2005)
+Dimitri van Heesch (27 November 2005)
diff --git a/Makefile.in b/Makefile.in
index 84783ea..719cc00 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -105,5 +105,39 @@ src/version.cpp: Makefile
addon/doxywizard/version.cpp: Makefile
echo "char versionString[]=\"$(VERSION)\";" > addon/doxywizard/version.cpp
+DISTDIR = doxygen-`echo $(VERSION) | tr - _`
+rpm: dist
+ gzip -df $(DISTDIR).src.tar.gz
+ mkdir $(DISTDIR)
+ mkdir $(DISTDIR)/packages
+ mkdir $(DISTDIR)/packages/rpm
+ cp packages/rpm/doxygen.spec $(DISTDIR)/packages/rpm
+ tar -rvf $(DISTDIR).src.tar $(DISTDIR)/packages/rpm/doxygen.spec
+ rm -rf $(DISTDIR)
+ gzip -9v $(DISTDIR).src.tar
+ rpmbuild -ta $(DISTDIR).src.tar.gz
+
+rpmsrc: dist
+ gzip -df $(DISTDIR).src.tar.gz
+ mkdir $(DISTDIR)
+ mkdir $(DISTDIR)/packages
+ mkdir $(DISTDIR)/packages/rpm
+ cp packages/rpm/doxygen.spec $(DISTDIR)/packages/rpm
+ tar -rvf $(DISTDIR).src.tar $(DISTDIR)/packages/rpm/doxygen.spec
+ rm -rf $(DISTDIR)
+ gzip -9v $(DISTDIR).src.tar
+ rpmbuild -ts $(DISTDIR).src.tar.gz
+
+rpmbinary: dist
+ gzip -df $(DISTDIR).src.tar.gz
+ mkdir $(DISTDIR)
+ mkdir $(DISTDIR)/packages
+ mkdir $(DISTDIR)/packages/rpm
+ cp packages/rpm/doxygen.spec $(DISTDIR)/packages/rpm
+ tar -rvf $(DISTDIR).src.tar $(DISTDIR)/packages/rpm/doxygen.spec
+ rm -rf $(DISTDIR)
+ gzip -9v $(DISTDIR).src.tar
+ rpmbuild -tb $(DISTDIR).src.tar.gz
+
FORCE:
diff --git a/README b/README
index 7b3b640..1849bb3 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.4.5_20051109
+DOXYGEN Version 1.4.5_20051127
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) (09 November 2005)
+Dimitri van Heesch (dimitri@stack.nl) (27 November 2005)
diff --git a/configure b/configure
index 7678075..fd666b9 100755
--- a/configure
+++ b/configure
@@ -15,6 +15,13 @@
#
# shell script to configure doxygen
+doxygen_version_major=1
+doxygen_version_minor=4
+doxygen_version_revision=5
+
+#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
+doxygen_version_mmn=20051127
+
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
f_debug=NO
@@ -397,6 +404,17 @@ echo "using $f_perl";
# -----------------------------------------------------------------------------
+#
+# Make VERSION file
+#
+echo " Creating VERSION file."
+# Output should be something like 1.4.5-20051010
+if test "$doxygen_version_mmn" = NO; then
+ echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > VERSION
+else
+ echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision-$doxygen_version_mmn" > VERSION
+fi
+
test -f .makeconfig && rm .makeconfig
test -f .tmakeconfig && rm .tmakeconfig
@@ -434,6 +452,33 @@ EOF
fi
+# Make doxygen.spec...
+#
+echo " Created doxygen.spec file, for rpm generation."
+
+echo "%define version $doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > spec.tmp
+if test "$doxygen_version_mmn" = NO; then
+ echo "%define revision 1" >> spec.tmp
+ echo "%define mmn 1" >> spec.tmp
+else
+ echo "%define revision $doxygen_version_mmn" >> spec.tmp
+ echo "%define mmn $doxygen_version_mmn" >> spec.tmp
+fi
+
+mkdir -p packages
+mkdir -p packages/rpm
+
+if test "$f_wizard" = YES; then
+ cat spec.tmp ./packages/rpm/doxygen.spec.in > ./packages/rpm/doxygen.spec
+else
+ cat spec.tmp ./packages/rpm/doxygen-nodoxywizard.spec.in > ./packages/rpm/doxygen.spec
+fi
+
+rm -f spec.tmp
+
+
+# make .tmakeconfig
+#
touch .tmakeconfig
if test "$f_shared" = NO; then
if test "$f_platform" = "osf1-cxx" -o "$f_platform" = "irix-n32"; then
diff --git a/doc/install.doc b/doc/install.doc
index 8fb1f6a..1003df4 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -173,7 +173,7 @@ Compilation is now done by performing the following steps:
Use <code>make install_docs</code> to install the
documentation and examples into <code>\<docdir\>/doxygen</code>.
- <code>\<prefix\></code> defaults to <code>/usr</code> but can be changed with
+ <code>\<prefix\></code> defaults to <code>/usr/local</code> but can be changed with
the <code>--prefix</code> option of the configure script.
The default <code>\<docdir\></code> directory is
<code>\<prefix\>/share/doc/packages</code> and can be changed with
diff --git a/packages/rpm/build.sh b/packages/rpm/build.sh
deleted file mode 100644
index 64ab34b..0000000
--- a/packages/rpm/build.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-set -e
-
-[ $(whoami) == "root" ] || {
-echo "Don't I need to be root to make RPM packages ?"
-}
-
-RPMBUILDPLACE=/usr/src/RPM/
-
-cp doxygen.spec $RPMBUILDPLACE/SPECS
-
-ls *.patch && {
-cp *.patch $RPMBUILDPLACE/SOURCES
-}
-
-cp ../../../doxygen*.gz $RPMBUILDPLACE/SOURCES
-
-urpmi --auto rpm-build libqt3-devel flex tetex-latex dvips
-
-rpm -ba SPECS/doxygen.spec
diff --git a/packages/rpm/doxygen-nodoxywizard.spec.in b/packages/rpm/doxygen-nodoxywizard.spec.in
new file mode 100644
index 0000000..99cdbc3
--- /dev/null
+++ b/packages/rpm/doxygen-nodoxywizard.spec.in
@@ -0,0 +1,85 @@
+%define name doxygen
+
+%define contentdir /var/www
+%define suexec_caller doxygen
+%define buildroot /var/tmp/%{name}-%{version}-%{revision}root
+
+Summary: A documentation system for C/C++.
+Name: doxygen
+Version: %{version}
+Release: %{revision}
+URL: http://www.stack.nl/~dimitri/doxygen/index.html
+Vendor: Dimitri van Heesch
+License: GNU General Public License
+Group: Development/Tools
+Source: %{name}-%{version}_%{revision}.src.tar.gz
+BuildRoot: %{buildroot}
+BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl, /usr/bin/latex, /usr/bin/dvips
+Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv, libstdc++ >= 2.96
+Provides: doxygen = %{mmn}
+#Obsoletes: doxygen-20050927
+
+%description
+Doxygen can generate an online class browser (in HTML) and/or a
+reference manual (in LaTeX) from a set of documented source files. The
+documentation is extracted directly from the sources. Doxygen can
+also be configured to extract the code structure from undocumented
+source files.
+
+%package manual
+Group: Documentation
+Summary: Documentation for doxygen.
+Provides: doxygenmanual = %{mmn}
+#Obsoletes:
+
+%description manual
+This contains the manpages for doxygen. The information can also be
+found at http://www.doxygen.org/.
+
+%prep
+%setup -q -n %{name}-%{version}_%{revision}
+./configure --prefix $RPM_BUILD_ROOT/usr
+
+%build
+make %{?_smp_mflags}
+make pdf %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make install
+mkdir -p $RPM_BUILD_ROOT/usr/share/doxygen
+cp -f ./latex/*.pdf $RPM_BUILD_ROOT/usr/share/doxygen
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+
+%doc README LICENSE LANGUAGE.HOWTO examples
+
+%{_bindir}/doxygen
+%{_bindir}/doxytag
+
+%files manual
+%defattr(-,root,root)
+/usr/share/doxygen/*.pdf
+%doc /usr/man/man1/doxy*
+
+%changelog
+* Fri Oct 21 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.5
+- made .spec file compatible with tmake
+
+* Mon Oct 10 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.5
+- fixed versioning bugs.
+
+* Tue Oct 4 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.5
+- added obsoletes and proides sections.
+
+* Sun Sep 20 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.4
+- modified rpm spec file for Fedora Core acceptance criteria.
+
+* Sun Aug 7 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.4
+- created initial rpm spec file for doxygen-1.4.4
+
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
deleted file mode 100644
index b27d9d7..0000000
--- a/packages/rpm/doxygen.spec
+++ /dev/null
@@ -1,150 +0,0 @@
-Summary: A documentation system for C/C++.
-Name: doxygen
-Version: 1.4.2
-Release: 1
-Epoch: 1
-Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
-Group: Development/Tools
-License: GPL
-Url: http://www.stack.nl/~dimitri/doxygen/index.html
-Prefix: %{_prefix}
-BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl, /usr/bin/latex, /usr/bin/dvips
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-
-%description
-Doxygen can generate an online class browser (in HTML) and/or a
-reference manual (in LaTeX) from a set of documented source files. The
-documentation is extracted directly from the sources. Doxygen can
-also be configured to extract the code structure from undocumented
-source files.
-
-%package doxywizard
-Summary: A GUI for creating and editing configuration files.
-Group: User Interface/X
-Requires: %{name} = %{version}
-BuildPrereq: qt3-devel => 2.3.0, flex
-Requires: qt >= 2.3.0
-
-%description doxywizard
-Doxywizard is a GUI for creating and editing configuration files that
-are used by doxygen.
-
-%prep
-%setup -q
-
-%build
-QTDIR="" && . /etc/profile.d/qt*.sh
-export OLD_PO_FILE_INPUT=yes
-
-./configure --prefix %{_prefix} --shared --release --with-doxywizard
-make all docs
-
-%install
-rm -rf ${RPM_BUILD_ROOT}
-
-export OLD_PO_FILE_INPUT=yes
-make install INSTALL=$RPM_BUILD_ROOT%{_prefix}
-
-%clean
-rm -rf ${RPM_BUILD_ROOT}
-
-%files
-%defattr(-,root,root)
-%doc LANGUAGE.HOWTO README examples html
-%{_bindir}/doxygen
-%{_bindir}/doxytag
-%doc /usr/man/man1/*
-
-%files doxywizard
-%defattr(-,root,root)
-%{_bindir}/doxywizard
-
-%changelog
-* Sun Jan 06 2002 Than Ngo <than@redhat.com> 1.2.13.1-1
-- update to 1.2.13.1
-
-* Sun Dec 30 2001 Jeff Johnson <jbj@redhat.com> 1.2.13-1
-- update to 1.2.13
-
-* Sun Nov 18 2001 Than Ngo <than@redhat.com> 1.2.12-1
-- update to 1.2.12
-- s/Copyright/License
-
-* Wed Sep 12 2001 Tim Powers <timp@redhat.com>
-- rebuild with new gcc and binutils
-
-* Wed Jun 13 2001 Than Ngo <than@redhat.com>
-- update tp 1.2.8.1
-- make doxywizard as separat package
-- fix to use install as default
-
-* Tue Jun 05 2001 Than Ngo <than@redhat.com>
-- update to 1.2.8
-
-* Tue May 01 2001 Than Ngo <than@redhat.com>
-- update to 1.2.7
-- clean up specfile
-- patch to use RPM_OPT_FLAG
-
-* Wed Mar 14 2001 Jeff Johnson <jbj@redhat.com>
-- update to 1.2.6
-
-* Wed Feb 28 2001 Trond Eivind Glomsrød <teg@redhat.com>
-- rebuild
-
-* Tue Dec 26 2000 Than Ngo <than@redhat.com>
-- update to 1.2.4
-- remove excludearch ia64
-- bzip2 sources
-
-* Mon Dec 11 2000 Than Ngo <than@redhat.com>
-- rebuild with the fixed fileutils
-
-* Mon Oct 30 2000 Jeff Johnson <jbj@redhat.com>
-- update to 1.2.3.
-
-* Sun Oct 8 2000 Jeff Johnson <jbj@redhat.com>
-- update to 1.2.2.
-- enable doxywizard.
-
-* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
-- 1.2.1 is latest stable, so we upgrade before Winston is released.
-
-* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
-- automatic rebuild
-
-* Tue Jul 4 2000 Jakub Jelinek <jakub@redhat.com>
-- Rebuild with new C++
-
-* Fri Jun 30 2000 Florian La Roche <laroche@redhat.de>
-- fix QTDIR detection
-
-* Fri Jun 09 2000 Preston Brown <pbrown@redhat.com>
-- compile on x86 w/o optimization, revert when compiler fixed!!
-
-* Wed Jun 07 2000 Preston Brown <pbrown@redhat.com>
-- use newer RPM macros
-
-* Tue Jun 6 2000 Jeff Johnson <jbj@redhat.com>
-- add to distro.
-
-* Tue May 9 2000 Tim Powers <timp@redhat.com>
-- rebuilt for 7.0
-
-* Wed Feb 2 2000 Bernhard Rosenkraenzer <bero@redhat.com>
-- recompile with current Qt (2.1.0/1.45)
-
-* Wed Jan 5 2000 Jeff Johnson <jbj@redhat.com>
-- update to 1.0.0.
-- recompile with qt-2.0.1 if available.
-- relocatable package.
-
-* Mon Nov 8 1999 Tim Powers <timp@redhat.com>
--updated to 0.49-991106
-
-* Tue Jul 13 1999 Tim Powers <timp@redhat.com>
-- updated source
-- cleaned up some stuff in the spec file
-
-* Thu Apr 22 1999 Jeff Johnson <jbj@redhat.com>
-- Create Power Tools 6.0 package.
diff --git a/packages/rpm/doxygen.spec.in b/packages/rpm/doxygen.spec.in
new file mode 100644
index 0000000..5b10029
--- /dev/null
+++ b/packages/rpm/doxygen.spec.in
@@ -0,0 +1,104 @@
+%define name doxygen
+
+%define contentdir /var/www
+%define suexec_caller doxygen
+%define buildroot /var/tmp/%{name}-%{version}-%{revision}root
+
+Summary: A documentation system for C/C++.
+Name: doxygen
+Version: %{version}
+Release: %{revision}
+URL: http://www.stack.nl/~dimitri/doxygen/index.html
+Vendor: Dimitri van Heesch
+License: GNU General Public License
+Group: Development/Tools
+Source: %{name}-%{version}_%{revision}.src.tar.gz
+BuildRoot: %{buildroot}
+BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl, /usr/bin/latex, /usr/bin/dvips
+Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv, libstdc++ >= 2.96
+Provides: doxygen = %{mmn}
+#Obsoletes: doxygen-20050927
+
+%description
+Doxygen can generate an online class browser (in HTML) and/or a
+reference manual (in LaTeX) from a set of documented source files. The
+documentation is extracted directly from the sources. Doxygen can
+also be configured to extract the code structure from undocumented
+source files.
+
+%package doxywizard
+Group: Development/Libraries
+Summary: GUI Interface for doxygen.
+Requires: doxygen = %{mmn}
+Requires: qt >= 3.3
+Provides: doxywizard = %{mmn}
+# Obsoletes:
+
+%description doxywizard
+Doxygen can generate an online class browser (in HTML) and/or a
+reference manual (in LaTeX) from a set of documented source files. The
+documentation is extracted directly from the sources. Doxygen can
+also be configured to extract the code structure from undocumented
+source files.
+
+This is the GUI interface for doxygen. It requires qt and X11 to
+install.
+
+%package manual
+Group: Documentation
+Summary: Documentation for doxygen.
+Provides: doxygenmanual = %{mmn}
+#Obsoletes:
+
+%description manual
+This contains the manpages for doxygen. The information can also be
+found at http://www.doxygen.org/.
+
+%prep
+%setup -q -n %{name}-%{version}_%{revision}
+./configure --with-doxywizard --prefix $RPM_BUILD_ROOT/usr
+
+%build
+make %{?_smp_mflags}
+make pdf %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make install
+mkdir -p $RPM_BUILD_ROOT/usr/share/doxygen
+cp -f ./latex/*.pdf $RPM_BUILD_ROOT/usr/share/doxygen
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+
+%doc README LICENSE LANGUAGE.HOWTO examples
+
+%{_bindir}/doxygen
+%{_bindir}/doxytag
+
+%files doxywizard
+%defattr(-,root,root)
+%{_bindir}/doxywizard
+
+%files manual
+%defattr(-,root,root)
+/usr/share/doxygen/*.pdf
+%doc /usr/man/man1/doxy*
+
+%changelog
+* Mon Oct 10 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.5
+- fixed versioning bugs.
+
+* Tue Oct 4 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.5
+- added obsoletes and proides sections.
+
+* Sun Sep 20 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.4
+- modified rpm spec file for Fedora Core acceptance criteria.
+
+* Sun Aug 7 2005 Kevin McBride <kevin@planetsaphire.com> 1.4.4
+- created initial rpm spec file for doxygen-1.4.4
+
diff --git a/src/code.l b/src/code.l
index ac5480c..a6da646 100644
--- a/src/code.l
+++ b/src/code.l
@@ -909,6 +909,10 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
{
//printf("non-dummy context lcd=%s!\n",lcd->name().data());
g_theCallContext.setClass(lcd);
+ if (getLink(g_classScope,clName,ol,clName))
+ {
+ return;
+ }
}
isLocal=TRUE;
//fprintf(stderr,"is a local variable cd=%p!\n",cd);
@@ -1014,7 +1018,7 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,ClassDef *mcd,const
}
}
- ClassDef *typeClass = stripClassName(xmd->typeString());
+ ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()));
//fprintf(stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass);
g_theCallContext.setClass(typeClass);
@@ -2055,6 +2059,13 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
endFontClass();
g_name.resize(0);g_type.resize(0);
}
+<Body>{FLOWKW}/{B}*"(" {
+ startFontClass("keywordflow");
+ codifyLines(yytext);
+ endFontClass();
+ g_name.resize(0);g_type.resize(0);
+ BEGIN(FuncCall);
+ }
<Body>{FLOWKW}/([^a-z_A-Z0-9]) {
startFontClass("keywordflow");
codifyLines(yytext);
@@ -2069,13 +2080,6 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
codifyLines(yytext);
endFontClass();
}
-<Body>{FLOWKW}/{B}*"(" {
- startFontClass("keywordflow");
- codifyLines(yytext);
- endFontClass();
- g_name.resize(0);g_type.resize(0);
- BEGIN(FuncCall);
- }
<Body>[\\|\)\+\-\/\%\~\!] {
g_code->codify(yytext);
g_name.resize(0);g_type.resize(0);
diff --git a/src/docparser.cpp b/src/docparser.cpp
index ee03c9a..b8d11e7 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -262,7 +262,7 @@ static void checkArgumentName(const QString &name,bool isParam)
static QRegExp re("[a-zA-Z0-9_]+\\.*");
int p=0,i=0,l;
- while ((i=re.match(name,p,&l))!=-1)
+ while ((i=re.match(name,p,&l))!=-1) // to handle @param x,y
{
QString aName=name.mid(i,l);
//printf("aName=`%s'\n",aName.data());
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 0e3133d..66406bb 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -43,7 +43,6 @@
#include "dot.h"
#include "docparser.h"
#include "dirdef.h"
-
#include "outputlist.h"
#include "declinfo.h"
#include "htmlgen.h"
@@ -73,8 +72,7 @@
#define pclose _pclose
#endif
-static QDict<Entry> classEntries(1009);
-
+// globally accessible variables
ClassSDict Doxygen::classSDict(1009);
ClassSDict Doxygen::hiddenClasses(257);
@@ -126,11 +124,18 @@ QCache<LookupInfo> Doxygen::lookupCache(20000,20000);
DirSDict Doxygen::directories(17);
SDict<DirRelation> Doxygen::dirRelations(257);
ParserManager *Doxygen::parserManager = 0;
+QCString Doxygen::htmlFileExtension;
+// locally accessible globals
+static QDict<Entry> classEntries(1009);
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds
static OutputList *outputList = 0; // list of output generating objects
+static QDict<FileDef> g_usingDeclarations(1009); // used classes
+static const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*";
+
+QCString spaces;
void clearAll()
@@ -201,9 +206,6 @@ static void findMember(Entry *root,
bool isFunc
);
-const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*";
-QCString spaces;
-QCString Doxygen::htmlFileExtension;
struct STLInfo
{
@@ -396,32 +398,6 @@ static void addRelatedPage(Entry *root)
);
if (pd)
{
-#if 0
- Definition *ctx = 0;
-
- // find the page's context
- if (root->parent->section & Entry::COMPOUND_MASK ) // inside class
- {
- QCString fullName=removeRedundantWhiteSpace(root->parent->name);
- fullName=stripAnonymousNamespaceScope(fullName);
- fullName=stripTemplateSpecifiersFromScope(fullName);
- ctx=getClass(fullName);
- }
- if (ctx==0 && root->parent->section == Entry::NAMESPACE_SEC ) // inside namespace
- {
- QCString nscope=removeAnonymousScopes(root->parent->name);
- if (!nscope.isEmpty())
- {
- ctx = getResolvedNamespace(nscope);
- }
- }
- if (ctx==0) // inside file
- {
- bool ambig;
- ctx=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
- }
- pd->setOuterScope(ctx);
-#endif
pd->addSectionsToDefinition(root->anchors);
//pi->context = ctx;
}
@@ -747,7 +723,57 @@ static Definition *findScope(Entry *root,int level=0)
return result;
}
-static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n)
+/*! returns the Definition object belonging to the first \a level levels of
+ * full qualified name \a name. Creates an artificial scope if the scope is
+ * not found and set the parent/child scope relation if the scope is found.
+ */
+static Definition *buildScopeFromQualifiedName(const QCString name,int level)
+{
+ int i=0;
+ int p=0,l;
+ Definition *prevScope=Doxygen::globalScope;
+ QCString fullScope;
+ while (i<level)
+ {
+ int idx=getScopeFragment(name,p,&l);
+ QCString nsName = name.mid(idx,l);
+ if (!fullScope.isEmpty()) fullScope+="::";
+ fullScope+=nsName;
+ NamespaceDef *nd=Doxygen::namespaceSDict.find(fullScope);
+ Definition *innerScope = nd;
+ ClassDef *cd=0;
+ if (nd==0) cd = getClass(fullScope);
+ if (nd==0 && cd) // scope is a class
+ {
+ innerScope = cd;
+ }
+ else if (nd==0 && cd==0) // scope is not known!
+ {
+ // introduce bogus namespace
+ //printf("adding dummy namespace %s to %s\n",nsName.data(),prevScope->name().data());
+ nd=new NamespaceDef(
+ "[generated]",1,fullScope);
+
+ // add namespace to the list
+ Doxygen::namespaceSDict.inSort(fullScope,nd);
+ innerScope = nd;
+ }
+ else // scope is a namespace
+ {
+ }
+ // make the parent/child scope relation
+ prevScope->addInnerCompound(innerScope);
+ innerScope->setOuterScope(prevScope);
+ // proceed to the next scope fragment
+ p=idx+l+2;
+ prevScope=innerScope;
+ i++;
+ }
+ return prevScope;
+}
+
+static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n,
+ FileDef *fileScope=0)
{
//printf("findScopeFromQualifiedName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data());
Definition *resultScope=startScope;
@@ -760,13 +786,55 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr
while ((i2=getScopeFragment(scope,p,&l2))!=-1)
{
QCString nestedNameSpecifier = scope.mid(i1,l1);
- //Definition *oldScope = resultScope;
+ Definition *orgScope = resultScope;
resultScope = resultScope->findInnerCompound(nestedNameSpecifier);
if (resultScope==0)
{
- //printf("name %s not found in scope %s\n",nestedNameSpecifier.data(),oldScope->name().data());
+ if (orgScope==Doxygen::globalScope && fileScope)
+ // also search for used namespaces
+ {
+ NamespaceSDict *usedNamespaces = fileScope->getUsedNamespaces();
+ if (usedNamespaces)
+ {
+ NamespaceSDict::Iterator ni(*usedNamespaces);
+ NamespaceDef *nd;
+ for (ni.toFirst();((nd=ni.current()) && resultScope==0);++ni)
+ {
+ // restart search within the used namespace
+ resultScope = findScopeFromQualifiedName(nd,n,fileScope);
+ }
+ if (resultScope) goto nextFragment;
+ }
+ }
+
+ // also search for used classes. Complication: we haven't been able
+ // to put them in the right scope yet, because we are still resolving
+ // the scope relations!
+ // Therefore loop through all used classes and see if there is a right
+ // scope match between the used class and nestedNameSpecifier.
+ QDictIterator<FileDef> ui(g_usingDeclarations);
+ FileDef *usedFd;
+ for (ui.toFirst();(usedFd=ui.current());++ui)
+ {
+ //printf("Checking using class %s\n",ui.currentKey());
+ if (rightScopeMatch(ui.currentKey(),nestedNameSpecifier))
+ {
+ // ui.currentKey() is the fully qualified name of nestedNameSpecifier
+ // so use this instead.
+ QCString fqn = QCString(ui.currentKey())+
+ scope.right(scope.length()-p);
+ resultScope = buildScopeFromQualifiedName(fqn,fqn.contains("::"));
+ //printf("Creating scope from fqn=%s result %p\n",fqn.data(),resultScope);
+ //resultScope = findScopeFromQualifiedName(startScope,fqn,usedFd);
+ //printf("Match! resultScope=%p\n",resultScope);
+ if (resultScope) return resultScope;
+ }
+ }
+
+ //printf("name %s not found in scope %s\n",nestedNameSpecifier.data(),orgScope->name().data());
return 0;
}
+ nextFragment:
i1=i2;
l1=l2;
p=i2+l2;
@@ -840,23 +908,6 @@ static ClassDef::CompoundType convertToCompoundType(int section)
static void addClassToContext(Entry *root)
{
-// QCString fullName=removeRedundantWhiteSpace(root->name);
-//
-// if (fullName.isEmpty())
-// {
-// // this should not be called
-// warn(root->fileName,root->startLine,
-// "Warning: invalid class name found!"
-// );
-// return;
-// }
-// Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
-//
-// fullName=stripAnonymousNamespaceScope(fullName);
-// fullName=stripTemplateSpecifiersFromScope(fullName);
-//
-// Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
-
bool ambig;
//NamespaceDef *nd = 0;
@@ -945,6 +996,7 @@ static void addClassToContext(Entry *root)
ClassDef::CompoundType sec = convertToCompoundType(root->section);
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
+
QCString className;
QCString namespaceName;
extractNamespaceName(fullName,className,namespaceName);
@@ -1049,38 +1101,6 @@ static void buildClassDocList(Entry *root)
}
}
-Definition *buildScopeFromQualifiedName(const QCString name,int level)
-{
- int i=0;
- int p=0,l;
- Definition *prevScope=Doxygen::globalScope;
- QCString fullScope;
- while (i<level)
- {
- int idx=getScopeFragment(name,p,&l);
- QCString nsName = name.mid(idx,l);
- if (!fullScope.isEmpty()) fullScope+="::";
- fullScope+=nsName;
- NamespaceDef *nd=Doxygen::namespaceSDict.find(fullScope);
- if (nd==0)
- {
- // introduce bogus namespace
- //printf("adding dummy namespace %s to %s\n",nsName.data(),prevScope->name().data());
- nd=new NamespaceDef(
- "[generated]",1,fullScope);
-
- // add namespace to the list
- Doxygen::namespaceSDict.inSort(fullScope,nd);
- }
- prevScope->addInnerCompound(nd);
- nd->setOuterScope(prevScope);
- p=idx+l+2;
- prevScope=nd;
- i++;
- }
- return prevScope;
-}
-
static void resolveClassNestingRelations()
{
ClassSDict::Iterator cli(Doxygen::classSDict);
@@ -1103,16 +1123,18 @@ static void resolveClassNestingRelations()
cd->visited=TRUE;
//printf("Level=%d processing=%s\n",nestingLevel,cd->name().data());
// also add class to the correct structural context
- Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,cd->name());
- if (d==0)
+ Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,
+ cd->name(),cd->getFileDef());
+ if (d==0) // we didn't find anything, create the scope artificially
+ // anyway, so we can at least relate scopes properly.
{
Definition *d = buildScopeFromQualifiedName(cd->name(),cd->name().contains("::"));
d->addInnerCompound(cd);
cd->setOuterScope(d);
- //warn(cd->getDefFileName(),cd->getDefLine(),
- // "Warning: Internal inconsistency: scope for class %s not "
- // "found!\n",cd->name().data()
- // );
+ warn(cd->getDefFileName(),cd->getDefLine(),
+ "Warning: Internal inconsistency: scope for class %s not "
+ "found!\n",cd->name().data()
+ );
}
else
{
@@ -1231,7 +1253,8 @@ static void buildNamespaceList(Entry *root)
// also add namespace to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
//printf("adding namespace %s to context %s\n",nd->name().data(),d?d->name().data():"none");
- if (d==0)
+ if (d==0) // we didn't find anything, create the scope artificially
+ // anyway, so we can at least relate scopes properly.
{
Definition *d = buildScopeFromQualifiedName(fullName,fullName.contains("::"));
d->addInnerCompound(nd);
@@ -1364,6 +1387,32 @@ static void findUsingDirectives(Entry *root)
//----------------------------------------------------------------------
+static void buildListOfUsingDecls(Entry *root)
+{
+ if (root->section==Entry::USINGDECL_SEC &&
+ !(root->parent->section&Entry::COMPOUND_MASK) // not a class/struct member
+ )
+ {
+ QCString name = substitute(root->name,".","::");
+ if (g_usingDeclarations.find(name)==0)
+ {
+ bool ambig;
+ FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+ if (fd)
+ {
+ g_usingDeclarations.insert(name,fd);
+ }
+ }
+ }
+ EntryListIterator eli(*root->sublist);
+ Entry *e;
+ for (;(e=eli.current());++eli)
+ {
+ buildListOfUsingDecls(e);
+ }
+}
+
+
static void findUsingDeclarations(Entry *root)
{
if (root->section==Entry::USINGDECL_SEC &&
@@ -2420,19 +2469,22 @@ static void buildFunctionList(Entry *root)
// root->type.find(re,0));
QCString scope=root->parent->name; //stripAnonymousNamespaceScope(root->parent->name);
scope=stripTemplateSpecifiersFromScope(scope,FALSE);
- //printf("scope=%s\n",scope.data());
+
+ bool ambig;
+ FileDef *rfd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+
+ int memIndex=rname.findRev("::");
cd=getClass(scope);
- //printf("cd=%p\n",cd);
if (cd && scope+"::"==rname.left(scope.length()+2)) // found A::f inside A
{
// strip scope from name
rname=rname.right(rname.length()-root->parent->name.length()-2);
}
+
NamespaceDef *nd = 0;
bool isMember=FALSE;
- int memIndex=rname.findRev("::");
if (memIndex!=-1)
{
int ts=rname.find('<');
@@ -2452,6 +2504,7 @@ static void buildFunctionList(Entry *root)
{
isMember=memIndex<ts || memIndex>te;
}
+
}
if (root->parent &&
@@ -2501,8 +2554,6 @@ static void buildFunctionList(Entry *root)
QCString nsName,rnsName;
if (mnd) nsName = mnd->name().copy();
if (rnd) rnsName = rnd->name().copy();
- bool ambig;
- FileDef *rfd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
//printf("matching arguments for %s%s %s%s\n",
// md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
if (
@@ -8608,15 +8659,22 @@ void parseInput()
msg("Associating documentation with classes...\n");
buildClassDocList(root);
+ // build list of using declarations here (global list)
+ buildListOfUsingDecls(root);
+
msg("Computing nesting relations for classes...\n");
resolveClassNestingRelations();
+
// calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelation(), that's why
// we need to clear the cache here
Doxygen::lookupCache.clear();
+ // we don't need the list of using declaration anymore
+ g_usingDeclarations.clear();
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(root);
+
findUsingDeclarations(root);
msg("Building example list...\n");
diff --git a/src/doxygen.h b/src/doxygen.h
index dd6ae1f..5f9dd16 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -64,7 +64,6 @@ struct LookupInfo
QCString templSpec;
};
-
extern QCString spaces;
/*! \brief This class serves as a namespace for global variables used by doxygen.
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 9ff634d..45f495b 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1747,7 +1747,7 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
{
t << " <li>\n";
t << " <form action=\"search.php\" method=\"get\">\n";
- t << " <table cellspacing=\"0\" callpadding=\"0\" border=\"0\">\n";
+ t << " <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
t << " <tr>\n";
t << " <td><label>&nbsp;" << searchFor << "&nbsp;</label></td>\n";
if (hli!=HLI_Search)
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 4836663..825a4be 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -446,10 +446,10 @@ void HtmlHelp::createProjectFile()
t << s << endl;
s = indexFiles.next();
}
- t << "tabs.css";
- t << "tab_b.gif";
- t << "tab_l.gif";
- t << "tab_r.gif";
+ t << "tabs.css" << endl;
+ t << "tab_b.gif" << endl;
+ t << "tab_l.gif" << endl;
+ t << "tab_r.gif" << endl;
f.close();
}
else
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index b7c92d8..32bdf87 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -516,7 +516,19 @@ QCString NamespaceDef::getOutputFileBase() const
Definition *NamespaceDef::findInnerCompound(const char *n)
{
if (n==0) return 0;
- return m_innerCompounds->find(n);
+ Definition *d = m_innerCompounds->find(n);
+ if (d==0)
+ {
+ if (usingDirList)
+ {
+ d = usingDirList->find(n);
+ }
+ if (d==0 && usingDeclList)
+ {
+ d = usingDirList->find(n);
+ }
+ }
+ return d;
}
void NamespaceDef::addListReferences()
diff --git a/src/pre.l b/src/pre.l
index 2406871..cc1705b 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1389,6 +1389,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputArray(yytext,yyleng);
}
}
+<CopyLine>"\\"\r?/\n { // strip line continuation characters
+ }
<CopyLine>. {
outputChar(*yytext);
}
diff --git a/src/scanner.l b/src/scanner.l
index b69690c..b41027f 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -82,6 +82,7 @@ static Entry* global_root = 0 ;
static Entry* current = 0 ;
static Entry* previous = 0 ;
static Entry* tempEntry = 0 ;
+static Entry* firstTypedefEntry = 0 ;
static int yyLineNr = 1 ;
static int anonCount = 0 ;
static QCString yyFileName;
@@ -1478,7 +1479,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
<QtPropType>{B}+ {
current->type+=yytext;
}
-<QtPropType>{ID} {
+<QtPropType>({ID}"::")*{ID} {
current->type+=yytext;
BEGIN(QtPropName);
}
@@ -2343,7 +2344,6 @@ IDLATTR ("["[^\]]*"]"){BN}*
if (!cn.isEmpty() && !rn.isEmpty())
{
prependScope();
- //cn.prepend(rn+"::");
}
if (isTypedef && cn.isEmpty())
{
@@ -2420,8 +2420,13 @@ IDLATTR ("["[^\]]*"]"){BN}*
current->type = current->type.simplifyWhiteSpace();
//printf("Adding compound %s %s %s\n",current->type.data(),current->name.data(),current->args.data());
current_root->addSubEntry( current ) ;
+ if (!firstTypedefEntry)
+ {
+ firstTypedefEntry = current;
+ }
current = new Entry;
initEntry();
+ isTypedef=TRUE; // to undo reset by initEntry()
BEGIN(MemberSpecSkip);
}
<TypedefName>";" { /* typedef of anonymous type */
@@ -2438,7 +2443,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
unput(';');
BEGIN( MemberSpec ) ;
}
-<MemberSpec>([*&]*{BN}*)*{ID}("["[^\]\n]*"]")* { // the [] part could be improved.
+<MemberSpec>([*&]*{BN}*)*{ID}{BN}*("["[^\]\n]*"]")* { // the [] part could be improved.
lineCount();
int i=0,l=yyleng,j;
while (i<l && (!isId(yytext[i]))) i++;
@@ -2451,11 +2456,31 @@ IDLATTR ("["[^\]]*"]"){BN}*
msName=msName.left(j);
}
msType = yytext; msType=msType.left(i);
+
+ // handle *pName in: typedef { ... } name, *pName;
+ if (firstTypedefEntry)
+ {
+ if (firstTypedefEntry->section==Entry::STRUCT_SEC)
+ {
+ msType.prepend("struct "+firstTypedefEntry->name);
+ }
+ else if (firstTypedefEntry->section==Entry::UNION_SEC)
+ {
+ msType.prepend("union "+firstTypedefEntry->name);
+ }
+ else if (firstTypedefEntry->section==Entry::ENUM_SEC)
+ {
+ msType.prepend("enum "+firstTypedefEntry->name);
+ }
+ else
+ {
+ msType.prepend(firstTypedefEntry->name);
+ }
+ }
}
<MemberSpec>[,;] {
//printf("current->name=`%s' msName=`%s'\n",current->name.data(),msName.data());
if (msName.isEmpty() && !current->name.isEmpty())
- /* && (current->section & Entry::COMPOUND_MASK)) */
{
// see if the compound does not have a name or is inside another
// annonymous compound. If so we insert a
@@ -2497,14 +2522,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
if (isTypedef)
{
varEntry->type.prepend("typedef ");
- // //printf("current->name = %s %s\n",current->name.data(),msName.data());
- // if (!current->name.isEmpty() && current->name.at(0)!='@')
- // {
- // //printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data());
- // QCString scope;
- // if (current_root->section & Entry::SCOPE_MASK) scope=current_root->name;
- // Doxygen::typedefDict.insert(msName,new TypedefInfo(current->name,scope));
- // }
+ // //printf("current->name = %s %s\n",current->name.data(),msName.data());
+ // if (!current->name.isEmpty() && current->name.at(0)!='@')
+ // {
+ // //printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data());
+ // QCString scope;
+ // if (current_root->section & Entry::SCOPE_MASK) scope=current_root->name;
+ // Doxygen::typedefDict.insert(msName,new TypedefInfo(current->name,scope));
+ // }
}
varEntry->type+=current->name+msType;
varEntry->fileName = yyFileName;
@@ -2543,6 +2568,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
msName.resize(0);
msArgs.resize(0);
isTypedef=FALSE;
+ firstTypedefEntry=0;
current->reset();
initEntry();
BEGIN( FindMembers );