Commit 5bd970b1 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.4.2-20050508

parent 4a8c2f5c
DOXYGEN Version 1.4.2-20050421 DOXYGEN Version 1.4.2-20050508
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (21 April 2005) Dimitri van Heesch (08 May 2005)
DOXYGEN Version 1.4.2_20050421 DOXYGEN Version 1.4.2_20050508
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (21 April 2005) Dimitri van Heesch (dimitri@stack.nl) (08 May 2005)
1.4.2-20050421 1.4.2-20050508
...@@ -205,6 +205,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -205,6 +205,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_toc_expand TOC_EXPAND \refitem cfg_toc_expand TOC_EXPAND
\refitem cfg_treeview_width TREEVIEW_WIDTH \refitem cfg_treeview_width TREEVIEW_WIDTH
\refitem cfg_uml_look UML_LOOK \refitem cfg_uml_look UML_LOOK
\refitem cfg_use_htags USE_HTAGS
\refitem cfg_use_windows_encoding USE_WINDOWS_ENCODING \refitem cfg_use_windows_encoding USE_WINDOWS_ENCODING
\refitem cfg_verbatim_headers VERBATIM_HEADERS \refitem cfg_verbatim_headers VERBATIM_HEADERS
\refitem cfg_warn_format WARN_FORMAT \refitem cfg_warn_format WARN_FORMAT
...@@ -907,6 +908,14 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -907,6 +908,14 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
which an include is specified. Set to NO to disable this. which an include is specified. Set to NO to disable this.
\sa Section \ref cmdclass "\\class". \sa Section \ref cmdclass "\\class".
\anchor cfg_use_htags
<dt>\c USE_HTAGS <dd>
\addindex USE_HTAGS
If the \c USE_HTAGS tag is set to \c YES then the references to source code
will point to the HTML generated by the htags(1) tool instead of doxygen
built-in source browser. The htags tool is part of GNU's global source
tagging system (see http://www.gnu.org/software/global/global.html)
</dl> </dl>
\section alphabetical_index Alphabetical index options \section alphabetical_index Alphabetical index options
...@@ -1479,7 +1488,7 @@ EXTRA_PACKAGES = times ...@@ -1479,7 +1488,7 @@ EXTRA_PACKAGES = times
gcc). The argument of the tag is a list of macros of the form: gcc). The argument of the tag is a list of macros of the form:
<code>name</code> or <code>name=definition</code> (no spaces). <code>name</code> or <code>name=definition</code> (no spaces).
If the definition and the "=" are omitted, "=1" is assumed. To prevent If the definition and the "=" are omitted, "=1" is assumed. To prevent
a macro definition from being undefined via #undef or recursively expanded a macro definition from being undefined via \#undef or recursively expanded
use the := operator instead of the = operator. use the := operator instead of the = operator.
\anchor cfg_expand_as_defined \anchor cfg_expand_as_defined
...@@ -1659,7 +1668,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1659,7 +1668,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\addindex DIRECTORY_GRAPH \addindex DIRECTORY_GRAPH
If the \c DIRECTORY_GRAPH, \c SHOW_DIRECTORIES and \c HAVE_DOT options are set If the \c DIRECTORY_GRAPH, \c SHOW_DIRECTORIES and \c HAVE_DOT options are set
to \c YES then doxygen will show the dependencies a directory has on other directories to \c YES then doxygen will show the dependencies a directory has on other directories
in a graphical way. The dependency relations are determined by the #include in a graphical way. The dependency relations are determined by the \#include
relations between the files in the directories. relations between the files in the directories.
\anchor cfg_dot_image_format \anchor cfg_dot_image_format
......
...@@ -56,7 +56,7 @@ tools should be installed. ...@@ -56,7 +56,7 @@ tools should be installed.
<A HREF="http://www.trolltech.com/products/qt.html">Qt</A> <A HREF="http://www.trolltech.com/products/qt.html">Qt</A>
\latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly \latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly
\addindex Qt \addindex Qt
version 2 or higher. version 3.2 or higher.
This is needed to build the GUI front-end doxywizard. This is needed to build the GUI front-end doxywizard.
<li>A \f$\mbox{\LaTeX}\f$ distribution: for instance <li>A \f$\mbox{\LaTeX}\f$ distribution: for instance
<a href="http://www.tug.org/interest.html#free">teTeX 1.0</a> <a href="http://www.tug.org/interest.html#free">teTeX 1.0</a>
......
...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other ...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile). configuration file (with default name and known as Doxyfile).
Currently (version 1.4.2-20050410), 31 languages Currently (version 1.4.2-20050508), 31 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
...@@ -54,7 +54,7 @@ when the translator was updated. ...@@ -54,7 +54,7 @@ when the translator was updated.
<td>Afrikaans</td> <td>Afrikaans</td>
<td>Johan Prinsloo</td> <td>Johan Prinsloo</td>
<td>johan at zippysnoek dot com</td> <td>johan at zippysnoek dot com</td>
<td>1.3.9</td> <td>up-to-date</td>
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>Brazilian Portuguese</td> <td>Brazilian Portuguese</td>
...@@ -263,7 +263,7 @@ when the translator was updated. ...@@ -263,7 +263,7 @@ when the translator was updated.
\hline \hline
\hline \hline
Afrikaans & Johan Prinsloo & {\tt\tiny johan@zippysnoek.com} & 1.3.9 \\ Afrikaans & Johan Prinsloo & {\tt\tiny johan@zippysnoek.com} & up-to-date \\
\hline \hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino@uol.com.br} & up-to-date \\ Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino@uol.com.br} & up-to-date \\
\hline \hline
......
(1.4.2-20050410) (1.4.2-20050508)
Doxygen supports the following 31 languages (sorted alphabetically): Doxygen supports the following 31 languages (sorted alphabetically):
...@@ -8,7 +8,7 @@ German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean ...@@ -8,7 +8,7 @@ German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean
(+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, (+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
Of them, 12 translators are up-to-date, 19 translators are based on Of them, 13 translators are up-to-date, 18 translators are based on
some adapter class, and 2 are English based. some adapter class, and 2 are English based.
---------------------------------------------------------------------- ----------------------------------------------------------------------
...@@ -17,6 +17,7 @@ alphabetically). This means that they derive from the Translator class ...@@ -17,6 +17,7 @@ alphabetically). This means that they derive from the Translator class
and they implement all 192 of the required methods. Anyway, there and they implement all 192 of the required methods. Anyway, there
still may be some details listed even for them: still may be some details listed even for them:
TranslatorAfrikaans
TranslatorBrazilian -- Remove the obsolete methods (never used). TranslatorBrazilian -- Remove the obsolete methods (never used).
TranslatorCroatian TranslatorCroatian
TranslatorCzech TranslatorCzech
...@@ -46,7 +47,6 @@ must be implemented to become up-to-date: ...@@ -46,7 +47,6 @@ must be implemented to become up-to-date:
TranslatorNorwegian 1.3.9 7 methods to implement TranslatorNorwegian 1.3.9 7 methods to implement
TranslatorJapanese 1.3.9 7 methods to implement TranslatorJapanese 1.3.9 7 methods to implement
TranslatorDanish 1.3.9 7 methods to implement TranslatorDanish 1.3.9 7 methods to implement
TranslatorAfrikaans 1.3.9 7 methods to implement
TranslatorSpanish 1.3.8 8 methods to implement TranslatorSpanish 1.3.8 8 methods to implement
TranslatorLithuanian 1.3.8 8 methods to implement TranslatorLithuanian 1.3.8 8 methods to implement
TranslatorChinesetraditional 1.3.8 8 methods to implement TranslatorChinesetraditional 1.3.8 8 methods to implement
...@@ -70,35 +70,6 @@ Details for translators (classes sorted alphabetically): ...@@ -70,35 +70,6 @@ Details for translators (classes sorted alphabetically):
TranslatorAfrikaans (TranslatorAdapter_1_3_9) 7 methods to implement
-------------------
Implements 185 of the required methods.
Missing methods (should be implemented):
virtual QCString trOverloadText()
virtual QCString trDirIndex()
virtual QCString trDirDocumentation()
virtual QCString trDirectories()
virtual QCString trDirDescription()
virtual QCString trDirReference(const char * dirName)
virtual QCString trDir(bool first_capital, bool singular)
Obsolete methods (should be removed, never used):
virtual QCString trHeaderFilesDescription()
virtual QCString trField(bool first_capital, bool singular)
virtual QCString trPackageDocumentation()
virtual QCString trSources()
virtual QCString trReimplementedForInternalReasons()
virtual QCString trInterfaces()
virtual QCString trHeaderFiles()
virtual QCString trBugsAndLimitations()
virtual QCString trEnumerationValueDocumentation()
virtual QCString trNoDescriptionAvailable()
TranslatorBrazilian (Translator) TranslatorBrazilian (Translator)
------------------- -------------------
......
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?> <?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
<tagfile> <tagfile>
<compound kind="class"> <compound kind="class">
<name>Test</name> <name>Test</name>
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<member kind="function"> <member kind="function">
<type>void</type> <type>void</type>
<name>example</name> <name>example</name>
<anchorfile>class_test.html</anchorfile>
<anchor>a0</anchor> <anchor>a0</anchor>
<arglist>()</arglist> <arglist>()</arglist>
</member> </member>
......
#!/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
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.4.2_20050421 Version: 1.4.2
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Patch: doxygen-1.2.7-redhat.patch
Patch1: doxygen-1.2.12-qt2.patch
Group: Development/Tools Group: Development/Tools
License: GPL License: GPL
Url: http://www.stack.nl/~dimitri/doxygen/index.html Url: http://www.stack.nl/~dimitri/doxygen/index.html
Prefix: %{_prefix} Prefix: %{_prefix}
BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl, /usr/bin/latex, /usr/bin/dvips
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
...@@ -24,7 +22,7 @@ source files. ...@@ -24,7 +22,7 @@ source files.
Summary: A GUI for creating and editing configuration files. Summary: A GUI for creating and editing configuration files.
Group: User Interface/X Group: User Interface/X
Requires: %{name} = %{version} Requires: %{name} = %{version}
BuildPrereq: qt-devel => 2.3.0 BuildPrereq: qt3-devel => 2.3.0, flex
Requires: qt >= 2.3.0 Requires: qt >= 2.3.0
%description doxywizard %description doxywizard
...@@ -33,11 +31,9 @@ are used by doxygen. ...@@ -33,11 +31,9 @@ are used by doxygen.
%prep %prep
%setup -q %setup -q
%patch -p1 -b .redhat
%patch1 -p1 -b .qt2
%build %build
QTDIR="" && . /etc/profile.d/qt.sh QTDIR="" && . /etc/profile.d/qt*.sh
export OLD_PO_FILE_INPUT=yes export OLD_PO_FILE_INPUT=yes
./configure --prefix %{_prefix} --shared --release --with-doxywizard ./configure --prefix %{_prefix} --shared --release --with-doxywizard
...@@ -57,6 +53,7 @@ rm -rf ${RPM_BUILD_ROOT} ...@@ -57,6 +53,7 @@ rm -rf ${RPM_BUILD_ROOT}
%doc LANGUAGE.HOWTO README examples html %doc LANGUAGE.HOWTO README examples html
%{_bindir}/doxygen %{_bindir}/doxygen
%{_bindir}/doxytag %{_bindir}/doxytag
%doc /usr/man/man1/*
%files doxywizard %files doxywizard
%defattr(-,root,root) %defattr(-,root,root)
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
bool remove( const char *k ) bool remove( const char *k )
{ return QGCache::remove_other(k); } { return QGCache::remove_other(k); }
type *take( const char *k ) type *take( const char *k )
{ return (type *)QGCache::take_ascii(k); } { return (type *)QGCache::take_other(k); }
type *find( const char *k, bool ref=TRUE ) const type *find( const char *k, bool ref=TRUE ) const
{ return (type *)QGCache::find_other(k,ref);} { return (type *)QGCache::find_other(k,ref);}
type *operator[]( const char *k ) const type *operator[]( const char *k ) const
......
...@@ -643,6 +643,21 @@ void SCString::msg_index( uint index ) ...@@ -643,6 +643,21 @@ void SCString::msg_index( uint index )
#endif #endif
} }
bool SCString::stripPrefix(const char *prefix)
{
if (prefix==0) return FALSE;
uint plen = qstrlen(prefix);
if (m_data && qstrncmp(prefix,m_data,plen)==0) // prefix matches
{
uint len = qstrlen(m_data);
uint newlen = len-plen+1;
qmemmove(m_data,m_data+plen,newlen);
resize(newlen);
return TRUE;
}
return FALSE;
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void *qmemmove( void *dst, const void *src, uint len ) void *qmemmove( void *dst, const void *src, uint len )
......
...@@ -64,6 +64,7 @@ public: ...@@ -64,6 +64,7 @@ public:
int contains( char c, bool cs=TRUE ) const; int contains( char c, bool cs=TRUE ) const;
int contains( const char *str, bool cs=TRUE ) const; int contains( const char *str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const; int contains( const QRegExp & ) const;
bool stripPrefix(const char *prefix);
SCString left( uint len ) const; SCString left( uint len ) const;
SCString right( uint len ) const; SCString right( uint len ) const;
......
...@@ -1034,6 +1034,30 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1034,6 +1034,30 @@ void ClassDef::writeDocumentation(OutputList &ol)
addGroupListToTitle(ol,this); addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name()); endTitle(ol,getOutputFileBase(),name());
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.writeString("<!-- doxytag: class=<");
ol.docify(name());
ol.writeString("> -->");
if (m_inherits->count()>0)
{
BaseClassListIterator bli(*m_inherits);
ol.writeString("<!-- doxytag: inherits=<");
BaseClassDef *bcd=0;
bool first=TRUE;
for (bli.toFirst();(bcd=bli.current());++bli)
{
if (!first) ol.writeString(",");
ol.docify(bcd->classDef->name());
first=FALSE;
}
ol.writeString("> -->");
}
ol.popGeneratorState();
}
if (Config_getBool("SEARCHENGINE")) if (Config_getBool("SEARCHENGINE"))
{ {
Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
...@@ -1543,6 +1567,8 @@ void ClassDef::writeMemberPages(OutputList &ol) ...@@ -1543,6 +1567,8 @@ void ClassDef::writeMemberPages(OutputList &ol)
void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{ {
static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
ol.writeString(" <div class=\"navtab\">\n"); ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n"); ol.writeString(" <table>\n");
...@@ -1569,6 +1595,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const ...@@ -1569,6 +1595,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("<a class=\"qindex\" "); ol.writeString("<a class=\"qindex\" ");
} }
ol.writeString("href=\""); ol.writeString("href=\"");
if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">"); ol.writeString("\">");
ol.writeString(md->name()); ol.writeString(md->name());
...@@ -2141,8 +2168,16 @@ void ClassDef::mergeMembers() ...@@ -2141,8 +2168,16 @@ void ClassDef::mergeMembers()
if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE)) if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE))
// member is in the same or a base class // member is in the same or a base class
{ {
#ifdef NEWMATCH
found=matchArguments2(
srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->argumentList(),
dstMd->getOuterScope(),dstMd->getFileDef(),dstMd->argumentList(),
TRUE
);
#else
found=matchArguments(srcMd->argumentList(), found=matchArguments(srcMd->argumentList(),
dstMd->argumentList()); dstMd->argumentList());
#endif
//printf(" Yes, matching (%s<->%s): %d\n", //printf(" Yes, matching (%s<->%s): %d\n",
// argListToString(srcMd->argumentList()).data(), // argListToString(srcMd->argumentList()).data(),
// argListToString(dstMd->argumentList()).data(), // argListToString(dstMd->argumentList()).data(),
......
...@@ -461,6 +461,11 @@ static void startCodeLine() ...@@ -461,6 +461,11 @@ static void startCodeLine()
g_insideBody = FALSE; g_insideBody = FALSE;
g_searchingForBody = TRUE; g_searchingForBody = TRUE;
g_realScope = d->name().copy(); g_realScope = d->name().copy();
g_type.resize(0);
g_name.resize(0);
g_args.resize(0);
g_parmType.resize(0);
g_parmName.resize(0);
//printf("Real scope: `%s'\n",g_realScope.data()); //printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0; g_bodyCurlyCount = 0;
QCString lineAnchor; QCString lineAnchor;
...@@ -2260,6 +2265,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2260,6 +2265,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_theCallContext.pushScope(); g_theCallContext.pushScope();
} }
g_args.resize(0); g_args.resize(0);
g_parmType.resize(0);
g_parmName.resize(0);
} }
} }
/* /*
...@@ -2427,6 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2427,6 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<MemberCall2,FuncCall>{OPERATOR} { // operator <MemberCall2,FuncCall>{OPERATOR} { // operator
if (strcmp(yytext,"*") && strcmp(yytext,"&")) // typically a pointer or reference if (strcmp(yytext,"*") && strcmp(yytext,"&")) // typically a pointer or reference
{ {
// not a * or &
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
} }
g_code->codify(yytext); g_code->codify(yytext);
......
...@@ -545,6 +545,19 @@ static void addSection() ...@@ -545,6 +545,19 @@ static void addSection()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// strip trailing whitespace (excluding newlines) from string s
static void stripTrailingWhiteSpace(QCString &s)
{
uint len = s.length();
int i = (int)len-1;
char c;
while (i>=0 && ((c = s.at(i))==' ' || c=='\t' || c=='\r')) i--;
if (i!=(int)len-1)
{
s.resize(i+2); // string upto and including char at pos i and \0 terminator
}
}
// selects the output to write to // selects the output to write to
static inline void setOutput(OutputContext ctx) static inline void setOutput(OutputContext ctx)
{ {
...@@ -610,6 +623,7 @@ static inline void setOutput(OutputContext ctx) ...@@ -610,6 +623,7 @@ static inline void setOutput(OutputContext ctx)
switch(inContext) switch(inContext)
{ {
case OutputDoc: case OutputDoc:
stripTrailingWhiteSpace(current->doc);
if (current->docFile.isEmpty()) if (current->docFile.isEmpty())
{ {
current->docFile = yyFileName; current->docFile = yyFileName;
...@@ -842,7 +856,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -842,7 +856,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput(yytext[2]); addOutput(yytext[2]);
} }
<Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command) <Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command)
if (inContext) if (inContext==OutputBrief)
{ {
setOutput(OutputDoc); setOutput(OutputDoc);
} }
......
...@@ -1935,6 +1935,15 @@ void Config::create() ...@@ -1935,6 +1935,15 @@ void Config::create()
TRUE TRUE
); );
cb->addDependency("SOURCE_BROWSER"); cb->addDependency("SOURCE_BROWSER");
cb = addBool(
"USE_HTAGS",
"If the USE_HTAGS tag is set to YES then the references to source code \n"
"will point to the HTML generated by the htags(1) tool instead of doxygen \n"
"built-in source browser. The htags tool is part of GNU's global source \n"
"tagging system (see http://www.gnu.org/software/global/global.html) \n",
FALSE
);
cb->addDependency("SOURCE_BROWSER");
cb = addBool( cb = addBool(
"VERBATIM_HEADERS", "VERBATIM_HEADERS",
"If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n" "If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n"
...@@ -1942,6 +1951,7 @@ void Config::create() ...@@ -1942,6 +1951,7 @@ void Config::create()
"which an include is specified. Set to NO to disable this. \n", "which an include is specified. Set to NO to disable this. \n",
TRUE TRUE
); );
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
addInfo( "Index","configuration options related to the alphabetical class index"); addInfo( "Index","configuration options related to the alphabetical class index");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "groupdef.h" #include "groupdef.h"
#include "pagedef.h" #include "pagedef.h"
#include "section.h" #include "section.h"
#include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__) #if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen #define popen _popen
...@@ -368,7 +369,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -368,7 +369,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
{ {
QCString lineStr,anchorStr; QCString lineStr,anchorStr;
lineStr.sprintf("%d",m_startBodyLine); lineStr.sprintf("%d",m_startBodyLine);
anchorStr.sprintf("l%05d",m_startBodyLine); anchorStr.sprintf(Htags::useHtags ? "%d" : "l%05d",m_startBodyLine);
ol.newParagraph(); ol.newParagraph();
if (lineMarkerPos<fileMarkerPos) // line marker before file marker if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{ {
...@@ -584,9 +585,11 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) ...@@ -584,9 +585,11 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
bool Definition::hasDocumentation() const bool Definition::hasDocumentation() const
{ {
static bool extractAll = Config_getBool("EXTRACT_ALL"); static bool extractAll = Config_getBool("EXTRACT_ALL");
static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
return !m_doc.isEmpty() || // has detailed docs return !m_doc.isEmpty() || // has detailed docs
!m_brief.isEmpty() || // has brief description !m_brief.isEmpty() || // has brief description
extractAll; // extract everything extractAll || // extract everything
(sourceBrowser && m_startBodyLine!=-1 && m_bodyDef); // link to definition
} }
void Definition::addSourceReferencedBy(MemberDef *md) void Definition::addSourceReferencedBy(MemberDef *md)
...@@ -783,7 +786,7 @@ void Definition::writePathFragment(OutputList &ol) const ...@@ -783,7 +786,7 @@ void Definition::writePathFragment(OutputList &ol) const
else else
{ {
ol.writeString("&nbsp;"); ol.writeString("&nbsp;");
ol.writeString("/"); ol.writeString("&raquo");
ol.writeString("&nbsp;"); ol.writeString("&nbsp;");
} }
} }
......
...@@ -866,6 +866,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -866,6 +866,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
//printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE); //printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE);
if (member && member->isLinkable()) // member link if (member && member->isLinkable()) // member link
{ {
if (member->isObjCMethod())
{
bool localLink = g_memberDef ? member->getClassDef()==g_memberDef->getClassDef() : FALSE;
name = member->objCMethodName(localLink,g_inSeeBlock);
}
children.append(new children.append(new
DocLinkedWord(parent,name, DocLinkedWord(parent,name,
member->getReference(), member->getReference(),
...@@ -929,7 +934,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -929,7 +934,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
} }
else // normal non-linkable word else // normal non-linkable word
{ {
children.append(new DocWord(parent,g_token->name)); if (g_token->name.at(0)=='#')
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: explicit link request to '%s' could not be resolved",name.data());
}
children.append(new DocWord(parent,name));
} }
} }
...@@ -1914,7 +1923,6 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1914,7 +1923,6 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
ASSERT(!target.isEmpty()); ASSERT(!target.isEmpty());
m_relPath = g_relPath; m_relPath = g_relPath;
SectionInfo *sec = Doxygen::sectionDict[target]; SectionInfo *sec = Doxygen::sectionDict[target];
//printf("DocRef::DocRef(target=%s) sec=%p\n",target.data(),sec);
if (sec) // ref to section or anchor if (sec) // ref to section or anchor
{ {
m_text = sec->title; m_text = sec->title;
...@@ -1943,7 +1951,15 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1943,7 +1951,15 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
((GroupDef *)compound)->groupTitle() /* with title */ ((GroupDef *)compound)->groupTitle() /* with title */
) )
{ {
m_text=((GroupDef *)compound)->groupTitle(); // use group's title as l m_text=((GroupDef *)compound)->groupTitle(); // use group's title as link
}
else if (compound->definitionType()==Definition::TypeMember &&
((MemberDef*)compound)->isObjCMethod())
{
// Objective C Method
MemberDef *member = (MemberDef*)compound;
bool localLink = g_memberDef ? member->getClassDef()==g_memberDef->getClassDef() : FALSE;
m_text = member->objCMethodName(localLink,g_inSeeBlock);
} }
m_file = compound->getOutputFileBase(); m_file = compound->getOutputFileBase();
......
...@@ -331,7 +331,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|" ...@@ -331,7 +331,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU} HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]* LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}? REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*({ID}(":")?){FUNCARG}?
%option noyywrap %option noyywrap
%option yylineno %option yylineno
......
This diff is collapsed.
...@@ -123,4 +123,6 @@ void readConfiguration(int argc, char **argv); ...@@ -123,4 +123,6 @@ void readConfiguration(int argc, char **argv);
void parseInput(); void parseInput();
void generateOutput(); void generateOutput();
#define NEWMATCH
#endif #endif
...@@ -91,6 +91,7 @@ static QCString memberRef; ...@@ -91,6 +91,7 @@ static QCString memberRef;
static QCString memberName; static QCString memberName;
static QCString memberArgs; static QCString memberArgs;
static QCString className; static QCString className;
static QCString baseName;
static QCString docBaseLink; static QCString docBaseLink;
static QCString docAnchor; static QCString docAnchor;
static QCString docRefName; static QCString docRefName;
...@@ -119,6 +120,7 @@ static void addClass(const char *clName) ...@@ -119,6 +120,7 @@ static void addClass(const char *clName)
{ {
if (classDict[clName]==0) if (classDict[clName]==0)
{ {
//printf("addClass(%s)\n",clName);
ClassDef *cd=new ClassDef; ClassDef *cd=new ClassDef;
cd->name=clName; cd->name=clName;
cd->fileName=yyFileName; cd->fileName=yyFileName;
...@@ -149,13 +151,22 @@ static void addBases(const char *clName) ...@@ -149,13 +151,22 @@ static void addBases(const char *clName)
static void addMember(const char *memName,const char *memRef,const char *memArgs) static void addMember(const char *memName,const char *memRef,const char *memArgs)
{ {
//printf("addMember(%s,%s,%s)\n",memName,memRef,memArgs);
ClassDef *cd=classList.last(); ClassDef *cd=classList.last();
if (cd)
{
MemberDef *md; MemberDef *md;
md=new MemberDef; md=new MemberDef;
md->name=memName; md->name=memName;
md->anchor=memRef; md->anchor=memRef;
md->args=memArgs; md->args=memArgs;
cd->memberList.append(md); cd->memberList.append(md);
}
else
{
//printf("Warning: found member %s %s but not class was found to insert it!\n",
// memName,memArgs);
}
} }
static void addReference() static void addReference()
...@@ -214,12 +225,25 @@ QCString unhtmlify(const char *str) ...@@ -214,12 +225,25 @@ QCString unhtmlify(const char *str)
%x CheckConstructor %x CheckConstructor
%x SkipPreformated %x SkipPreformated
%x Qt3ReadType
%x Qt3ReadAnchor
%x Qt3ReadName
%x Qt3ReadOperator
%x Qt3ReadArgs
%x DoxReadAnchor
%x DoxReadName
%x DoxReadArgs
%x DoxClassName
%x DoxClassBase
%% %%
<Start>^"<li>" { <Start>^"<li>" {
BEGIN( SearchClassFile ); BEGIN( SearchClassFile );
} }
<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x+ <Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x
<Start>"</table><h1 align=\"center\">" | // Qt-4
<Start>^"<h1 align=center>" { // Qt variant <Start>^"<h1 align=center>" { // Qt variant
BEGIN( ReadClassName ); BEGIN( ReadClassName );
} }
...@@ -233,6 +257,207 @@ QCString unhtmlify(const char *str) ...@@ -233,6 +257,207 @@ QCString unhtmlify(const char *str)
<Start>^"<h3 class=\"fn\">"/[a-z_A-Z0-9] { // needed due to inconsistency in the Qt docs <Start>^"<h3 class=\"fn\">"/[a-z_A-Z0-9] { // needed due to inconsistency in the Qt docs
BEGIN( CheckConstructor ); BEGIN( CheckConstructor );
} }
/* --------------------------------------------------- */
/* Qt member extraction rules */
<Start>^"<h3 class=fn>" {
BEGIN( Qt3ReadType );
}
<Start>^"<h3 class=fn><a name=\"" { // Qt-3.3+ html file
BEGIN( Qt3ReadAnchor );
}
<Start>^"<h3 class=\"fn\"><a name=\"" { // Qt-4 html file
BEGIN( Qt3ReadAnchor );
}
<Qt3ReadType>"<a name=\"" {
BEGIN( Qt3ReadAnchor );
}
<Qt3ReadType>.
<Qt3ReadAnchor>[~a-z_A-Z0-9\-\[\]*+%\^&|!]+ {
memberRef = yytext;
}
<Qt3ReadAnchor>"\"></a>" {
BEGIN( Qt3ReadName );
}
<Qt3ReadAnchor>. {
BEGIN( Start );
}
<Qt3ReadName>[a-z_A-Z0-9]+"::operator" {
memberName="operator";
BEGIN(Qt3ReadOperator);
}
<Qt3ReadOperator>[+\-*/%\^&|~!=\[\]]+ { memberName+=yytext; }
<Qt3ReadOperator>"&lt;" { memberName+="<"; }
<Qt3ReadOperator>"&gt;" { memberName+=">"; }
<Qt3ReadOperator>"new" { memberName+=" new"; }
<Qt3ReadOperator>"delete" { memberName+=" delete"; }
<Qt3ReadOperator>"()" { memberName+="()"; BEGIN( Qt3ReadArgs ); }
<Qt3ReadOperator>. { unput(*yytext); BEGIN( Qt3ReadArgs ); }
<Qt3ReadName>[a-z_A-Z0-9]+"::"[~a-z_A-Z0-9]+ {
memberName=yytext;
memberName=memberName.mid(memberName.find("::")+2);
BEGIN(Qt3ReadArgs);
}
<Qt3ReadName>.
<Qt3ReadArgs>[ \t]*"(" {
memberArgs+="(";
}
<Qt3ReadArgs>"&amp;" { memberArgs+="&"; }
<Qt3ReadArgs>"&lt;" { memberArgs+="<"; }
<Qt3ReadArgs>"&gt;" { memberArgs+=">"; }
<Qt3ReadArgs>"&nbsp;" { memberArgs+=" "; }
<Qt3ReadArgs>"</h3>" {
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
BEGIN(Start);
}
<Qt3ReadArgs>"<"[^>]+">"
<Qt3ReadArgs>")" {
memberArgs+=")";
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
BEGIN(Start);
}
<Qt3ReadArgs>[a-z_A-Z0-9]+ { memberArgs+=yytext; }
<Qt3ReadArgs>. { memberArgs+=*yytext; }
/* --------------------------------------------------- */
/* Doxygen class extraction rules */
<Start>"<!-- doxytag: class=<" {
className.resize(0);
BEGIN(DoxClassName);
}
<DoxClassName>[^&>]+ {
className=yytext;
addClass(className);
}
<DoxClassName>"&lt;" {
className+="<";
}
<DoxClassName>"&gt;" {
className+=">";
}
<DoxClassName>"&amp;" {
className+="&";
}
<DoxClassName>. {
className+=*yytext;
}
<DoxClassName>"> -->" {
BEGIN(Start);
}
/* --------------------------------------------------- */
/* Doxygen inheritance extraction rules */
<Start>"<!-- doxytag: inherits=<" {
bases.clear();
baseName.resize(0);
BEGIN(DoxClassBase);
}
<DoxClassBase>[^&,>]+ {
baseName+=yytext;
}
<DoxClassBase>"," {
bases.append(baseName);
baseName.resize(0);
}
<DoxClassBase>"&lt;" {
baseName+="<";
}
<DoxClassBase>"&gt;" {
baseName+=">";
}
<DoxClassBase>"&amp;" {
baseName+="&";
}
<DoxClassBase>. {
baseName+=*yytext;
}
<DoxClassBase>"> -->" {
bases.append(baseName);
baseName.resize(0);
addBases(className);
BEGIN(Start);
}
/* --------------------------------------------------- */
/* Doxygen member extraction rules */
<Start>"<!-- doxytag: member=<" {
memberName.resize(0);
BEGIN(DoxReadName);
}
<DoxReadName>[^&>]+ {
memberName+=yytext;
}
<DoxReadName>"&lt;" {
memberName+="<";
}
<DoxReadName>"&gt;" {
memberName+=">";
}
<DoxReadName>"&amp;" {
memberName+="&";
}
<DoxReadName>. {
memberName+=*yytext;
}
<DoxReadName>"> ref=<" {
memberName=memberName.mid(memberName.find("::")+2);
memberRef.resize(0);
BEGIN(DoxReadAnchor);
}
<DoxReadAnchor>[^&>]+ {
memberRef+=yytext;
}
<DoxReadAnchor>"&lt;" {
memberRef+="<";
}
<DoxReadAnchor>"&gt;" {
memberRef+=">";
}
<DoxReadAnchor>"&amp;" {
memberRef+="&";
}
<DoxReadAnchor>. {
memberRef+=*yytext;
}
<DoxReadAnchor>"> args=<" {
memberArgs.resize(0);
BEGIN(DoxReadArgs);
}
<DoxReadArgs>[^&>]+ {
memberArgs+=yytext;
}
<DoxReadArgs>"&lt;" {
memberArgs+="<";
}
<DoxReadArgs>"&gt;" {
memberArgs+=">";
}
<DoxReadArgs>"&amp;" {
memberArgs+="&";
}
<DoxReadArgs>. {
memberArgs+=*yytext;
}
<DoxReadArgs>"> -->" {
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
BEGIN(Start);
}
/** --------------------------------------------------- */
<Start>"<pre>" { <Start>"<pre>" {
BEGIN( SkipPreformated ); BEGIN( SkipPreformated );
} }
...@@ -353,7 +578,8 @@ QCString unhtmlify(const char *str) ...@@ -353,7 +578,8 @@ QCString unhtmlify(const char *str)
{ {
classFile=yyFileName; classFile=yyFileName;
} }
BEGIN( ReadMemberRef ); //BEGIN( ReadMemberRef );
BEGIN( Start );
} }
<ReadMemberRef>[a-z_A-Z0-9]+ { <ReadMemberRef>[a-z_A-Z0-9]+ {
memberRef=yytext; memberRef=yytext;
...@@ -410,6 +636,8 @@ QCString unhtmlify(const char *str) ...@@ -410,6 +636,8 @@ QCString unhtmlify(const char *str)
// addClass(className); // addClass(className);
//} //}
addMember(memberName,memberRef,memberArgs); addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0); memberArgs.resize(0);
if (*yytext=='<') if (*yytext=='<')
BEGIN( SkipHTMLTag); BEGIN( SkipHTMLTag);
...@@ -446,7 +674,7 @@ void parse(QCString &s) ...@@ -446,7 +674,7 @@ void parse(QCString &s)
void parseFile(QFileInfo &fi) void parseFile(QFileInfo &fi)
{ {
fprintf(stderr,"Parsing file %s...\n",fi.fileName().data()); printf("Parsing file %s...\n",fi.fileName().data());
QFile f; QFile f;
f.setName(fi.absFilePath()); f.setName(fi.absFilePath());
if (f.open(IO_ReadOnly)) if (f.open(IO_ReadOnly))
...@@ -650,8 +878,15 @@ int main(int argc,char **argv) ...@@ -650,8 +878,15 @@ int main(int argc,char **argv)
t << " <filename>" << convertToXML(cd->fileName) << "</filename>" << endl; t << " <filename>" << convertToXML(cd->fileName) << "</filename>" << endl;
MemberDef *md=cd->memberList.first(); MemberDef *md=cd->memberList.first();
while (md) while (md)
{
if (md->anchor.right(5)=="-enum")
{
t << " <member kind=\"enum\">" << endl;
}
else
{ {
t << " <member kind=\"function\">" << endl; t << " <member kind=\"function\">" << endl;
}
t << " <name>" << convertToXML(md->name) << "</name>" << endl; t << " <name>" << convertToXML(md->name) << "</name>" << endl;
t << " <anchor>" << convertToXML(md->anchor) << "</anchor>" << endl; t << " <anchor>" << convertToXML(md->anchor) << "</anchor>" << endl;
t << " <arglist>" << convertToXML(md->args) << "</arglist>" << endl; t << " <arglist>" << convertToXML(md->args) << "</arglist>" << endl;
......
...@@ -87,6 +87,7 @@ struct Argument ...@@ -87,6 +87,7 @@ struct Argument
QCString attrib; /*!< Argument's attribute (IDL only) */ QCString attrib; /*!< Argument's attribute (IDL only) */
QCString type; /*!< Argument's type */ QCString type; /*!< Argument's type */
QCString canType; /*!< Cached value of canonical type (after type resolution). Empty initially. */
QCString name; /*!< Argument's name (may be empty) */ QCString name; /*!< Argument's name (may be empty) */
QCString array; /*!< Argument's array specifier (may be empty) */ QCString array; /*!< Argument's array specifier (may be empty) */
QCString defval; /*!< Argument's default value (may be empty) */ QCString defval; /*!< Argument's default value (may be empty) */
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "docparser.h" #include "docparser.h"
#include "ftvhelp.h" #include "ftvhelp.h"
#include "searchindex.h" #include "searchindex.h"
//#include "xml.h" #include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__) #if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen #define popen _popen
...@@ -583,6 +583,8 @@ void FileDef::writeMemberPages(OutputList &ol) ...@@ -583,6 +583,8 @@ void FileDef::writeMemberPages(OutputList &ol)
void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{ {
static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
ol.writeString(" <div class=\"navtab\">\n"); ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n"); ol.writeString(" <table>\n");
...@@ -604,6 +606,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const ...@@ -604,6 +606,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("<a class=\"qindex\" "); ol.writeString("<a class=\"qindex\" ");
} }
ol.writeString("href=\""); ol.writeString("href=\"");
if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">"); ol.writeString("\">");
ol.writeString(md->localName()); ol.writeString(md->localName());
...@@ -1254,3 +1257,28 @@ void FileDef::acquireFileVersion() ...@@ -1254,3 +1257,28 @@ void FileDef::acquireFileVersion()
} }
QCString FileDef::getSourceFileBase() const
{
if (Htags::useHtags)
{
return Htags::path2URL(filepath);
}
else
{
return convertNameToFile(diskname+"-source");
}
}
/*! Returns the name of the verbatim copy of this file (if any). */
QCString FileDef::includeName() const
{
if (Htags::useHtags)
{
return Htags::path2URL(filepath);
}
else
{
return convertNameToFile(diskname+"-source");
}
}
...@@ -86,12 +86,10 @@ class FileDef : public Definition ...@@ -86,12 +86,10 @@ class FileDef : public Definition
QCString getFileBase() const QCString getFileBase() const
{ return diskname; } { return diskname; }
QCString getSourceFileBase() const QCString getSourceFileBase() const;
{ return convertNameToFile(diskname+"-source"); }
/*! Returns the name of the verbatim copy of this file (if any). */ /*! Returns the name of the verbatim copy of this file (if any). */
QCString includeName() const QCString includeName() const;
{ return convertNameToFile(diskname+"-source"); }
/*! Returns the absolute path including the file name. */ /*! Returns the absolute path including the file name. */
QCString absFilePath() const { return filepath; } QCString absFilePath() const { return filepath; }
......
...@@ -218,7 +218,14 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly) ...@@ -218,7 +218,14 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly)
md->getOuterScope()->definitionType()==Definition::TypeFile); md->getOuterScope()->definitionType()==Definition::TypeFile);
if (srcMd->isFunction() && md->isFunction() && if (srcMd->isFunction() && md->isFunction() &&
#ifdef NEWMATCH
matchArguments2(srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->argumentList(),
md->getOuterScope(),md->getFileDef(),md->argumentList(),
TRUE
) &&
#else
matchArguments(srcMd->argumentList(),md->argumentList()) && matchArguments(srcMd->argumentList(),md->argumentList()) &&
#endif
sameScope sameScope
) )
{ {
...@@ -754,6 +761,8 @@ void GroupDef::writeMemberPages(OutputList &ol) ...@@ -754,6 +761,8 @@ void GroupDef::writeMemberPages(OutputList &ol)
void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{ {
static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
ol.writeString(" <div class=\"navtab\">\n"); ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n"); ol.writeString(" <table>\n");
...@@ -775,6 +784,7 @@ void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const ...@@ -775,6 +784,7 @@ void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("<a class=\"qindex\" "); ol.writeString("<a class=\"qindex\" ");
} }
ol.writeString("href=\""); ol.writeString("href=\"");
if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">"); ol.writeString("\">");
ol.writeString(md->localName()); ol.writeString(md->localName());
...@@ -878,7 +888,7 @@ void addMemberToGroups(Entry *root,MemberDef *md) ...@@ -878,7 +888,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
(gd=Doxygen::groupSDict[g->groupname]) && (gd=Doxygen::groupSDict[g->groupname]) &&
g->pri >= pri) g->pri >= pri)
{ {
if (fgd && g->pri==pri) if (fgd && gd!=fgd && g->pri==pri)
{ {
warn(root->fileName.data(), root->startLine, warn(root->fileName.data(), root->startLine,
"Warning: Member %s found in multiple %s groups! " "Warning: Member %s found in multiple %s groups! "
......
/******************************************************************************
*
* Copyright (C) 1997-2005 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include <stdio.h>
#include <qdir.h>
#include <qdict.h>
#include "qtbc.h"
#include "htags.h"
#include "util.h"
#include "message.h"
#include "config.h"
bool Htags::useHtags = FALSE;
static QDir g_inputDir;
static QDict<QCString> g_symbolDict(10007);
/*! constructs command line of htags(1) and executes it.
* \retval TRUE success
* \retval FALSE an error has occured.
*/
bool Htags::execute(const QCString &htmldir)
{
static QStrList &inputSource = Config_getList("INPUT");
static bool quiet = Config_getBool("QUIET");
static bool warnings = Config_getBool("WARNINGS");
static QCString htagsOptions = ""; //Config_getString("HTAGS_OPTIONS");
static QCString projectName = Config_getString("PROJECT_NAME");
static QCString projectNumber = Config_getString("PROJECT_NUMBER");
QCString cwd = convertToQCString(QDir::currentDirPath());
if (inputSource.isEmpty())
{
g_inputDir.setPath(cwd);
}
else if (inputSource.count()==1)
{
g_inputDir.setPath(inputSource.first());
if (!g_inputDir.exists())
err("Error: Cannot find directory %s. "
"Check the value of the INPUT tag in the configuration file.\n",
inputSource.first()
);
}
else
{
err("Error: If you use USE_HTAGS then INPUT should specific a single directory. \n");
return FALSE;
}
/*
* Construct command line for htags(1).
*/
QCString commandLine = " -g -s -a -n";
if (!quiet) commandLine += "-v ";
if (warnings) commandLine += "-w ";
if (!htagsOptions.isEmpty())
{
commandLine += ' ';
commandLine += htagsOptions;
}
if (!projectName.isEmpty())
{
commandLine += "-t \"";
commandLine += projectName;
if (!projectNumber.isEmpty())
{
commandLine += '-';
commandLine += projectNumber;
}
commandLine += "\" ";
}
commandLine += " \"" + htmldir + "\"";
QCString oldDir = convertToQCString(QDir::currentDirPath());
QDir::setCurrent(g_inputDir.absPath());
//printf("CommandLine=[%s]\n",commandLine.data());
bool result=iSystem("htags",commandLine,FALSE)==0;
QDir::setCurrent(oldDir);
return result;
}
/*! load filemap and make index.
* \param htmlDir of HTML directory generated by htags(1).
* \retval TRUE success
* \retval FALSE error
*/
bool Htags::loadFilemap(const QCString &htmlDir)
{
QCString fileMapName = htmlDir+"/HTML/FILEMAP";
QCString fileMap;
QFileInfo fi(fileMapName);
/*
* Construct FILEMAP dictionary using QDict.
*
* In FILEMAP, URL includes 'html' suffix but we cut it off according
* to the method of FileDef class.
*
* FILEMAP format:
* <NAME>\t<HREF>.html\n
* QDICT:
* dict[<NAME>] = <HREF>
*/
if (fi.exists() && fi.isReadable())
{
QFile f(fileMapName);
const int maxlen = 8192;
QCString line(maxlen+1);
line.at(maxlen)='\0';
if (f.open(IO_ReadOnly))
{
while (f.readLine(line.data(),maxlen)>0)
{
//printf("Read line: %s",line.data());
int sep = line.find('\t');
if (sep!=-1)
{
QCString key = line.left(sep).stripWhiteSpace();
QCString value = line.mid(sep+1).stripWhiteSpace();
int ext=value.findRev('.');
if (ext!=-1) value=value.left(ext); // strip extension
g_symbolDict.setAutoDelete(TRUE);
g_symbolDict.insert(key,new QCString(value));
//printf("Key/Value=(%s,%s)\n",key.data(),value.data());
}
}
return TRUE;
}
else
{
err("Error: file %s cannot be opened\n",fileMapName.data());
}
}
return FALSE;
}
/*! convert path name into the url in the hypertext generated by htags.
* \param path path name
* \returns URL NULL: not found.
*/
QCString Htags::path2URL(const QCString &path)
{
QCString url,symName=path;
QCString dir = convertToQCString(g_inputDir.absPath());
int dl=dir.length();
if ((int)symName.length()>dl+1)
{
symName = symName.mid(dl+1);
}
if (!symName.isEmpty())
{
QCString *result = g_symbolDict[symName];
//printf("path2URL=%s symName=%s result=%p\n",path.data(),symName.data(),result);
if (result)
{
url = "HTML/" + *result;
}
}
return url;
}
/******************************************************************************
*
* Copyright (C) 1997-2005 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef HTAGS_H
#define HTAGS_H
class QCString;
struct Htags
{
static bool useHtags;
static bool loadFilemap(const QCString &htmldir);
static QCString path2URL(const QCString &path);
static bool execute(const QCString &htmldir);
};
#endif /* HTAGS_H */
...@@ -599,9 +599,13 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -599,9 +599,13 @@ void HtmlGenerator::writeStyleInfo(int part)
} }
void HtmlGenerator::startDoxyAnchor(const char *,const char *, void HtmlGenerator::startDoxyAnchor(const char *,const char *,
const char *anchor, const char *name) const char *anchor, const char *name,
const char *args)
{ {
t << "<a class=\"anchor\" name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>"; t << "<a class=\"anchor\" name=\"" << anchor << "\"></a>";
t << "<!-- doxytag: member=<" << name << "> ref=<" << anchor << "> args=<";
docify(args);
t << "> -->";
} }
void HtmlGenerator::endDoxyAnchor(const char *,const char *) void HtmlGenerator::endDoxyAnchor(const char *,const char *)
......
...@@ -136,7 +136,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -136,7 +136,8 @@ class HtmlGenerator : public OutputGenerator
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool); void endMemberDoc(bool);
void startDoxyAnchor(const char *fName,const char *manName, void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name); const char *anchor,const char *name,
const char *args);
void endDoxyAnchor(const char *fName,const char *anchor); void endDoxyAnchor(const char *fName,const char *anchor);
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; } void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; }
void endCodeAnchor() { } void endCodeAnchor() { }
......
This diff is collapsed.
...@@ -332,6 +332,12 @@ bool setTranslator(const char *langName) ...@@ -332,6 +332,12 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorLithuanian; theTranslator=new TranslatorLithuanian;
} }
#endif #endif
#ifdef LANG_ZA
else if (L_EQUAL("afrikaans"))
{
theTranslator=new TranslatorAfrikaans;
}
#endif
#endif // ENGLISH_ONLY #endif // ENGLISH_ONLY
else // use the default language (i.e. english) else // use the default language (i.e. english)
{ {
......
...@@ -1133,7 +1133,8 @@ void LatexGenerator::endMemberDoc(bool) ...@@ -1133,7 +1133,8 @@ void LatexGenerator::endMemberDoc(bool)
} }
void LatexGenerator::startDoxyAnchor(const char *fName,const char *, void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
const char *anchor, const char *) const char *anchor, const char *,
const char *)
{ {
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
{ {
......
...@@ -129,7 +129,7 @@ class LatexGenerator : public OutputGenerator ...@@ -129,7 +129,7 @@ class LatexGenerator : public OutputGenerator
void lineBreak() { t << "\\par\n"; } void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool); void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *); void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {} void startCodeAnchor(const char *) {}
void endCodeAnchor() {} void endCodeAnchor() {}
......
...@@ -47,6 +47,7 @@ HEADERS = bufstr.h \ ...@@ -47,6 +47,7 @@ HEADERS = bufstr.h \
formula.h \ formula.h \
ftvhelp.h \ ftvhelp.h \
groupdef.h \ groupdef.h \
htags.h \
htmlattrib.h \ htmlattrib.h \
htmldocvisitor.h \ htmldocvisitor.h \
htmlgen.h \ htmlgen.h \
...@@ -150,6 +151,7 @@ SOURCES = ce_lex.cpp \ ...@@ -150,6 +151,7 @@ SOURCES = ce_lex.cpp \
formula.cpp \ formula.cpp \
ftvhelp.cpp \ ftvhelp.cpp \
groupdef.cpp \ groupdef.cpp \
htags.cpp \
htmldocvisitor.cpp \ htmldocvisitor.cpp \
htmlgen.cpp \ htmlgen.cpp \
htmlhelp.cpp \ htmlhelp.cpp \
......
...@@ -372,7 +372,8 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c ...@@ -372,7 +372,8 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
} }
void ManGenerator::startDoxyAnchor(const char *,const char *manName, void ManGenerator::startDoxyAnchor(const char *,const char *manName,
const char *, const char *name) const char *, const char *name,
const char *)
{ {
// something to be done? // something to be done?
if( !Config_getBool("MAN_LINKS") ) if( !Config_getBool("MAN_LINKS") )
......
...@@ -139,7 +139,7 @@ class ManGenerator : public OutputGenerator ...@@ -139,7 +139,7 @@ class ManGenerator : public OutputGenerator
void writeChar(char c); void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool); void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *) {} void endDoxyAnchor(const char *,const char *) {}
void startCodeAnchor(const char *) {} void startCodeAnchor(const char *) {}
void endCodeAnchor() {} void endCodeAnchor() {}
......
...@@ -333,10 +333,10 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -333,10 +333,10 @@ MemberDef::MemberDef(const char *df,int dl,
m_hasCallGraph = FALSE; m_hasCallGraph = FALSE;
initLines=0; initLines=0;
type=t; type=t;
if (mt==Typedef && type.left(8)=="typedef ") type=type.mid(8); if (mt==Typedef) type.stripPrefix("typedef ");
if (type.left(7)=="struct ") type=type.right(type.length()-7); type.stripPrefix("struct ");
if (type.left(6)=="class " ) type=type.right(type.length()-6); type.stripPrefix("class " );
if (type.left(6)=="union " ) type=type.right(type.length()-6); type.stripPrefix("union " );
type=removeRedundantWhiteSpace(type); type=removeRedundantWhiteSpace(type);
args=a; args=a;
...@@ -637,7 +637,7 @@ bool MemberDef::isLinkableInProject() const ...@@ -637,7 +637,7 @@ bool MemberDef::isLinkableInProject() const
//printf("in a namespace but namespace not linkable!\n"); //printf("in a namespace but namespace not linkable!\n");
return FALSE; // in namespace but namespace not linkable return FALSE; // in namespace but namespace not linkable
} }
if (!group && !nspace && !related && fileDef && !fileDef->isLinkableInProject()) if (!group && !nspace && !related && !classDef && fileDef && !fileDef->isLinkableInProject())
{ {
//printf("in a file but file not linkable!\n"); //printf("in a file but file not linkable!\n");
return FALSE; // in file (and not in namespace) but file not linkable return FALSE; // in file (and not in namespace) but file not linkable
...@@ -685,6 +685,10 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *, ...@@ -685,6 +685,10 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *,
QCString n = name(); QCString n = name();
if (classDef && gd) n.prepend(classDef->name()+sep); if (classDef && gd) n.prepend(classDef->name()+sep);
else if (nspace && (gd || fd)) n.prepend(nspace->name()+sep); else if (nspace && (gd || fd)) n.prepend(nspace->name()+sep);
if (isObjCMethod())
{
if (isStatic()) ol.docify("+ "); else ol.docify("- ");
}
if (!onlyText) // write link if (!onlyText) // write link
{ {
ol.writeObjectLink(getReference(),getOutputFileBase(),anchor(),n); ol.writeObjectLink(getReference(),getOutputFileBase(),anchor(),n);
...@@ -717,7 +721,7 @@ ClassDef *MemberDef::getClassDefOfAnonymousType() ...@@ -717,7 +721,7 @@ ClassDef *MemberDef::getClassDefOfAnonymousType()
// strip `static' keyword from ltype // strip `static' keyword from ltype
//if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7); //if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7);
// strip `friend' keyword from ltype // strip `friend' keyword from ltype
if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7); ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+"); static QRegExp r("@[0-9]+");
int l,i=r.match(ltype,0,&l); int l,i=r.match(ltype,0,&l);
//printf("ltype=`%s' i=%d\n",ltype.data(),i); //printf("ltype=`%s' i=%d\n",ltype.data(),i);
...@@ -943,7 +947,8 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -943,7 +947,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
{ {
QCString doxyName=name().copy(); QCString doxyName=name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::"); if (!cname.isEmpty()) doxyName.prepend(cname+"::");
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); QCString doxyArgs=argsString();
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
...@@ -973,7 +978,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -973,7 +978,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
QCString ltype(type); QCString ltype(type);
if (mtype==Typedef) ltype.prepend("typedef "); if (mtype==Typedef) ltype.prepend("typedef ");
// strip `friend' keyword from ltype // strip `friend' keyword from ltype
if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7); ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+"); static QRegExp r("@[0-9]+");
bool endAnonScopeNeeded=FALSE; bool endAnonScopeNeeded=FALSE;
...@@ -1308,6 +1313,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1308,6 +1313,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString doxyName=name().copy(); QCString doxyName=name().copy();
// prepend scope if there is any. TODO: make this optional for C only docs // prepend scope if there is any. TODO: make this optional for C only docs
if (scopeName) doxyName.prepend((QCString)scopeName+"::"); if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QCString doxyArgs=argsString();
QCString ldef = definition(); QCString ldef = definition();
//printf("member `%s' def=`%s'\n",name().data(),ldef.data()); //printf("member `%s' def=`%s'\n",name().data(),ldef.data());
...@@ -1340,7 +1346,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1340,7 +1346,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{ {
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name()) if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{ {
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(cname,name(),memAnchor,name()); ol.startMemberDoc(cname,name(),memAnchor,name());
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i)); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef()); vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
...@@ -1352,7 +1358,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1352,7 +1358,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (!found) // anonymous compound if (!found) // anonymous compound
{ {
//printf("Anonymous compound `%s'\n",cname.data()); //printf("Anonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(cname,name(),memAnchor,name()); ol.startMemberDoc(cname,name(),memAnchor,name());
// strip anonymous compound names from definition // strip anonymous compound names from definition
int si=ldef.find(' '),pi,ei=i+l; int si=ldef.find(' '),pi,ei=i+l;
...@@ -1370,7 +1376,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1370,7 +1376,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
else // not an enum value else // not an enum value
{ {
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(cname,name(),memAnchor,name()); ol.startMemberDoc(cname,name(),memAnchor,name());
ClassDef *cd=getClassDef(); ClassDef *cd=getClassDef();
...@@ -1678,7 +1684,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1678,7 +1684,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
//ol.writeListItem(); //ol.writeListItem();
ol.startDescTableTitle(); // this enables emphasis! ol.startDescTableTitle(); // this enables emphasis!
ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name()); ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name(),fmd->argsString());
first=FALSE; first=FALSE;
//ol.startEmphasis(); //ol.startEmphasis();
ol.docify(fmd->name()); ol.docify(fmd->name());
...@@ -2396,3 +2402,20 @@ void MemberDef::setTagInfo(TagInfo *ti) ...@@ -2396,3 +2402,20 @@ void MemberDef::setTagInfo(TagInfo *ti)
} }
} }
QCString MemberDef::objCMethodName(bool localLink,bool showStatic) const
{
QCString qm;
if (showStatic)
{
if (isStatic()) qm="+ "; else qm="- ";
}
qm+=name();
if (!localLink) // link to method of same class
{
qm+=" (";
qm+=classDef->name();
qm+=")";
}
return qm;
}
...@@ -106,6 +106,7 @@ class MemberDef : public Definition ...@@ -106,6 +106,7 @@ class MemberDef : public Definition
int getGroupStartLine() const { return groupStartLine; } int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; } bool getGroupHasDocs() const { return groupHasDocs; }
QCString qualifiedName(); QCString qualifiedName();
QCString objCMethodName(bool localLink,bool showStatic) const;
// direct kind info // direct kind info
Protection protection() const { return prot; } Protection protection() const { return prot; }
......
...@@ -434,6 +434,8 @@ void NamespaceDef::writeMemberPages(OutputList &ol) ...@@ -434,6 +434,8 @@ void NamespaceDef::writeMemberPages(OutputList &ol)
void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{ {
static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
ol.writeString(" <div class=\"navtab\">\n"); ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n"); ol.writeString(" <table>\n");
...@@ -455,6 +457,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co ...@@ -455,6 +457,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co
ol.writeString("<a class=\"qindex\" "); ol.writeString("<a class=\"qindex\" ");
} }
ol.writeString("href=\""); ol.writeString("href=\"");
if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor()); ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">"); ol.writeString("\">");
ol.writeString(md->localName()); ol.writeString(md->localName());
......
...@@ -323,7 +323,8 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -323,7 +323,8 @@ class OutputGenerator : public BaseOutputDocInterface
const char *,const char *) = 0; const char *,const char *) = 0;
virtual void endMemberDoc(bool) = 0; virtual void endMemberDoc(bool) = 0;
virtual void startDoxyAnchor(const char *fName,const char *manName, virtual void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name) = 0; const char *anchor,const char *name,
const char *args) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0; virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
virtual void writeLatexSpacing() = 0; virtual void writeLatexSpacing() = 0;
virtual void writeStartAnnoItem(const char *type,const char *file, virtual void writeStartAnnoItem(const char *type,const char *file,
......
...@@ -258,6 +258,18 @@ void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4),a1,a2,a3,a4) ...@@ -258,6 +258,18 @@ void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4),a1,a2,a3,a4)
} \ } \
} }
// five arguments
#define FORALL5(a1,a2,a3,a4,a5,p1,p2,p3,p4,p5) \
void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4,a5),a1,a2,a3,a4,a5) \
{ \
OutputGenerator *og=outputs->first(); \
while (og) \
{ \
if (og->isEnabled()) (og->*func)(p1,p2,p3,p4,p5); \
og=outputs->next(); \
} \
}
// now instantiate only the ones we need. // now instantiate only the ones we need.
FORALL1(const char *a1,a1) FORALL1(const char *a1,a1)
...@@ -293,6 +305,7 @@ FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3) ...@@ -293,6 +305,7 @@ FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3)
FORALL4(SectionTypes a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4) FORALL4(SectionTypes a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4) FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,int a4,a1,a2,a3,a4) FORALL4(const char *a1,const char *a2,const char *a3,int a4,a1,a2,a3,a4)
FORALL5(const char *a1,const char *a2,const char *a3,const char *a4,const char *a5,a1,a2,a3,a4,a5)
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3),arg1,arg2,arg3) void forall(void (OutputGenerator::*func)(arg1,arg2,arg3),arg1,arg2,arg3)
#define FORALLPROTO4(arg1,arg2,arg3,arg4) \ #define FORALLPROTO4(arg1,arg2,arg3,arg4) \
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4),arg1,arg2,arg3,arg4) void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4),arg1,arg2,arg3,arg4)
#define FORALLPROTO5(arg1,arg2,arg3,arg4,arg5) \
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4,arg5),arg1,arg2,arg3,arg4,arg5)
class ClassDiagram; class ClassDiagram;
class DotClassGraph; class DotClassGraph;
...@@ -217,8 +219,9 @@ class OutputList : public OutputDocInterface ...@@ -217,8 +219,9 @@ class OutputList : public OutputDocInterface
void endMemberDoc(bool hasArgs) void endMemberDoc(bool hasArgs)
{ forall(&OutputGenerator::endMemberDoc,hasArgs); } { forall(&OutputGenerator::endMemberDoc,hasArgs); }
void startDoxyAnchor(const char *fName,const char *manName, void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor, const char *name) const char *anchor, const char *name,
{ forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name); } const char *args)
{ forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name,args); }
void endDoxyAnchor(const char *fn,const char *anchor) void endDoxyAnchor(const char *fn,const char *anchor)
{ forall(&OutputGenerator::endDoxyAnchor,fn,anchor); } { forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
void startCodeAnchor(const char *label) void startCodeAnchor(const char *label)
...@@ -423,6 +426,7 @@ class OutputList : public OutputDocInterface ...@@ -423,6 +426,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO4(SectionTypes,const char *,const char *,const char *); FORALLPROTO4(SectionTypes,const char *,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,const char *); FORALLPROTO4(const char *,const char *,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,bool); FORALLPROTO4(const char *,const char *,const char *,bool);
FORALLPROTO5(const char *,const char *,const char *,const char *,const char *);
OutputList(const OutputList &ol); OutputList(const OutputList &ol);
QList<OutputGenerator> *outputs; QList<OutputGenerator> *outputs;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "util.h" #include "util.h"
#include "outputlist.h" #include "outputlist.h"
#include "doxygen.h" #include "doxygen.h"
#include "language.h"
PageDef::PageDef(const char *f,int l,const char *n, PageDef::PageDef(const char *f,int l,const char *n,
...@@ -77,6 +78,9 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -77,6 +78,9 @@ void PageDef::writeDocumentation(OutputList &ol)
{ {
ol.startSection(si->label,si->title,si->type); ol.startSection(si->label,si->title,si->type);
ol.docify(si->title); ol.docify(si->title);
stringToSearchIndex(getOutputFileBase(),
theTranslator->trPage(TRUE,TRUE)+" "+si->title,
si->title);
ol.endSection(si->label,si->type); ol.endSection(si->label,si->type);
} }
ol.startTextBlock(); ol.startTextBlock();
...@@ -117,4 +121,29 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -117,4 +121,29 @@ void PageDef::writeDocumentation(OutputList &ol)
} }
} }
bool PageDef::visibleInIndex() const
{
return // not part of a group
!getGroupDef() &&
// not an externally defined page
(!isReference() || Config_getBool("ALLEXTERNALS")) &&
// not a subpage
(getOuterScope()==0 ||
getOuterScope()->definitionType()!=Definition::TypePage
);
}
bool PageDef::documentedPage() const
{
return // not part of a group
!getGroupDef() &&
// not an externally defined page
!isReference();
}
bool PageDef::hasSubPages() const
{
return subPageDict->count()>0;
}
...@@ -46,6 +46,9 @@ class PageDef : public Definition ...@@ -46,6 +46,9 @@ class PageDef : public Definition
PageSDict * getSubPages() const { return subPageDict; } PageSDict * getSubPages() const { return subPageDict; }
void setFileName(const char *name) { m_fileName = name; } void setFileName(const char *name) { m_fileName = name; }
void addInnerCompound(Definition *d); void addInnerCompound(Definition *d);
bool visibleInIndex() const;
bool documentedPage() const;
bool hasSubPages() const;
private: private:
QCString m_fileName; QCString m_fileName;
......
...@@ -1384,7 +1384,9 @@ void RTFGenerator::endMemberDoc(bool) ...@@ -1384,7 +1384,9 @@ void RTFGenerator::endMemberDoc(bool)
} }
void RTFGenerator::startDoxyAnchor(const char *,const char *, void RTFGenerator::startDoxyAnchor(const char *,const char *,
const char *,const char *) const char *,const char *,
const char *
)
{ {
DBG_RTF(t << "{\\comment startDoxyAnchor}" << endl) DBG_RTF(t << "{\\comment startDoxyAnchor}" << endl)
} }
......
...@@ -138,7 +138,7 @@ class RTFGenerator : public OutputGenerator ...@@ -138,7 +138,7 @@ class RTFGenerator : public OutputGenerator
void lineBreak(); void lineBreak();
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool); void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *); void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {}; void startCodeAnchor(const char *) {};
void endCodeAnchor() {}; void endCodeAnchor() {};
......
...@@ -95,12 +95,9 @@ static int memberGroupId = DOX_NOGROUP; ...@@ -95,12 +95,9 @@ static int memberGroupId = DOX_NOGROUP;
static QCString memberGroupHeader; static QCString memberGroupHeader;
static QCString memberGroupDocs; static QCString memberGroupDocs;
static bool isTypedef; static bool isTypedef;
//static char afterDocTerminator;
static int tmpDocType; static int tmpDocType;
static QCString sectionLabel; static QCString sectionLabel;
static QCString sectionTitle; static QCString sectionTitle;
//static SectionInfo::SectionType
// sectionType;
static QCString funcPtrType; static QCString funcPtrType;
static QCString templateStr; static QCString templateStr;
static QCString aliasName; static QCString aliasName;
...@@ -127,7 +124,6 @@ static QCString *copyArgString; ...@@ -127,7 +124,6 @@ static QCString *copyArgString;
static QCString fullArgString; static QCString fullArgString;
static ArgumentList *currentArgumentList; static ArgumentList *currentArgumentList;
//static QCString *currentTemplateSpec;
static char lastCopyArgChar; static char lastCopyArgChar;
static QCString *pCopyRoundString; static QCString *pCopyRoundString;
static QCString *pCopyCurlyString; static QCString *pCopyCurlyString;
...@@ -688,7 +684,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -688,7 +684,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
%x PrototypeExc %x PrototypeExc
%x PrototypeSkipLine %x PrototypeSkipLine
/** new comment parsing states */ /** comment parsing states */
%x DocLine %x DocLine
%x DocBlock %x DocBlock
......
...@@ -21,24 +21,26 @@ function readHeader($file) ...@@ -21,24 +21,26 @@ function readHeader($file)
function computeIndex($word) function computeIndex($word)
{ {
$lword = strtolower($word); // Fast string hashing
$l = strlen($lword); //$lword = strtolower($word);
for ($i=0;$i<$l;$i++) //$l = strlen($lword);
{ //for ($i=0;$i<$l;$i++)
$c = ord($lword{$i}); //{
$v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff; // $c = ord($lword{$i});
} // $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
return $v; //}
//return $v;
//if (strlen($word)<2) return -1; // Simple hashing that allows for substring search
if (strlen($word)<2) return -1;
// high char of the index // high char of the index
//$hi = ord($word{0}); $hi = ord($word{0});
//if ($hi==0) return -1; if ($hi==0) return -1;
// low char of the index // low char of the index
//$lo = ord($word{1}); $lo = ord($word{1});
//if ($lo==0) return -1; if ($lo==0) return -1;
// return index // return index
//return $hi*256+$lo; return $hi*256+$lo;
} }
function search($file,$word,&$statsList) function search($file,$word,&$statsList)
...@@ -48,7 +50,7 @@ function search($file,$word,&$statsList) ...@@ -48,7 +50,7 @@ function search($file,$word,&$statsList)
{ {
fseek($file,$index*4+4); // 4 bytes per entry, skip header fseek($file,$index*4+4); // 4 bytes per entry, skip header
$index = readInt($file); $index = readInt($file);
if ($index) // found words matching first two characters if ($index) // found words matching the hash key
{ {
$start=sizeof($statsList); $start=sizeof($statsList);
$count=$start; $count=$start;
......
...@@ -21,24 +21,26 @@ ...@@ -21,24 +21,26 @@
"\n" "\n"
"function computeIndex($word)\n" "function computeIndex($word)\n"
"{\n" "{\n"
" $lword = strtolower($word);\n" " // Fast string hashing\n"
" $l = strlen($lword);\n" " //$lword = strtolower($word);\n"
" for ($i=0;$i<$l;$i++)\n" " //$l = strlen($lword);\n"
" {\n" " //for ($i=0;$i<$l;$i++)\n"
" $c = ord($lword{$i});\n" " //{\n"
" $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;\n" " // $c = ord($lword{$i});\n"
" }\n" " // $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;\n"
" return $v;\n" " //}\n"
" //return $v;\n"
"\n" "\n"
" //if (strlen($word)<2) return -1;\n" " // Simple hashing that allows for substring search\n"
" if (strlen($word)<2) return -1;\n"
" // high char of the index\n" " // high char of the index\n"
" //$hi = ord($word{0});\n" " $hi = ord($word{0});\n"
" //if ($hi==0) return -1;\n" " if ($hi==0) return -1;\n"
" // low char of the index\n" " // low char of the index\n"
" //$lo = ord($word{1});\n" " $lo = ord($word{1});\n"
" //if ($lo==0) return -1;\n" " if ($lo==0) return -1;\n"
" // return index\n" " // return index\n"
" //return $hi*256+$lo;\n" " return $hi*256+$lo;\n"
"}\n" "}\n"
"\n" "\n"
"function search($file,$word,&$statsList)\n" "function search($file,$word,&$statsList)\n"
...@@ -48,7 +50,7 @@ ...@@ -48,7 +50,7 @@
" {\n" " {\n"
" fseek($file,$index*4+4); // 4 bytes per entry, skip header\n" " fseek($file,$index*4+4); // 4 bytes per entry, skip header\n"
" $index = readInt($file);\n" " $index = readInt($file);\n"
" if ($index) // found words matching first two characters\n" " if ($index) // found words matching the hash key\n"
" {\n" " {\n"
" $start=sizeof($statsList);\n" " $start=sizeof($statsList);\n"
" $count=$start;\n" " $count=$start;\n"
......
...@@ -80,20 +80,22 @@ static int charsToIndex(const char *word) ...@@ -80,20 +80,22 @@ static int charsToIndex(const char *word)
{ {
if (word==0) return -1; if (word==0) return -1;
register ushort h=0; // Fast string hashing algorithm
const char *k = word; //register ushort h=0;
ushort mask=0xfc00; //const char *k = word;
while ( *k ) //ushort mask=0xfc00;
{ //while ( *k )
h = (h&mask)^(h<<6)^(*k++); //{
} // h = (h&mask)^(h<<6)^(*k++);
//}
//return h;
//uint c1=word[0]; // Simple hashing that allows for substring searching
//if (c1==0) return -1; uint c1=word[0];
//uint c2=word[1]; if (c1==0) return -1;
//if (c2==0) return -1; uint c2=word[1];
//return c1*256+c2; if (c2==0) return -1;
return h; return c1*256+c2;
} }
void SearchIndex::addWord(const char *word,bool hiPriority) void SearchIndex::addWord(const char *word,bool hiPriority)
......
...@@ -471,7 +471,7 @@ class TranslatorEnglish : public Translator ...@@ -471,7 +471,7 @@ class TranslatorEnglish : public Translator
* list of (global) variables * list of (global) variables
*/ */
virtual QCString trEnumerationValues() virtual QCString trEnumerationValues()
{ return "Enumeration values"; } { return "Enumerator"; }
/*! This is used in the documentation of a file before the list of /*! This is used in the documentation of a file before the list of
* documentation blocks for defines * documentation blocks for defines
...@@ -501,7 +501,7 @@ class TranslatorEnglish : public Translator ...@@ -501,7 +501,7 @@ class TranslatorEnglish : public Translator
* of documentation blocks for enumeration values * of documentation blocks for enumeration values
*/ */
virtual QCString trEnumerationValueDocumentation() virtual QCString trEnumerationValueDocumentation()
{ return "Enumeration Value Documentation"; } { return "Enumerator Documentation"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions * of documentation blocks for functions
......
...@@ -56,7 +56,7 @@ class TranslatorHungarian : public Translator ...@@ -56,7 +56,7 @@ class TranslatorHungarian : public Translator
*/ */
virtual QCString latexLanguageSupportCommand() virtual QCString latexLanguageSupportCommand()
{ {
return ""; return "\\usepackage{t1enc}\n\\usepackage[latin2]{inputenc}\n\\usepackage[magyar]{babel}\n";
} }
/*! return the language charset. This will be used for the HTML output */ /*! return the language charset. This will be used for the HTML output */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#ifndef TRANSLATOR_ZA_H #ifndef TRANSLATOR_ZA_H
#define TRANSLATOR_ZA_H #define TRANSLATOR_ZA_H
class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 class TranslatorAfrikaans : public Translator
{ {
public: public:
...@@ -178,10 +178,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -178,10 +178,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trFileList() virtual QCString trFileList()
{ return "Le&euml;r Lys"; } { return "Le&euml;r Lys"; }
/*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles()
{ return "Kop Le&euml;r"; }
/*! This is put above each page as a link to all members of compounds. */ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers() virtual QCString trCompoundMembers()
{ {
...@@ -314,10 +310,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -314,10 +310,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return result; return result;
} }
/*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription()
{ return "Die kop leers waaruit die API bestaan:"; }
/*! This is an introduction to the page with the list of all examples */ /*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription() virtual QCString trExamplesDescription()
{ return "'n Lys van alle voorbeelde:"; } { return "'n Lys van alle voorbeelde:"; }
...@@ -330,15 +322,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -330,15 +322,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trModulesDescription() virtual QCString trModulesDescription()
{ return "'n Lys van alle modules:"; } { return "'n Lys van alle modules:"; }
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual QCString trNoDescriptionAvailable()
{ return "Geen beskrywings beskikbaar"; }
// index titles (the project name is prepended for these)
/*! This is used in HTML as the title of index.html. */ /*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation() virtual QCString trDocumentation()
{ return "Dokumentasie"; } { return "Dokumentasie"; }
...@@ -485,12 +468,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -485,12 +468,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return "Enumeration Type Dokumentasie"; } { return "Enumeration Type Dokumentasie"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
{ return "Enumeration Waarde Dokumentasie"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions * of documentation blocks for functions
*/ */
...@@ -545,18 +522,10 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -545,18 +522,10 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trForInternalUseOnly() virtual QCString trForInternalUseOnly()
{ return "Slegs vir interne gebruik."; } { return "Slegs vir interne gebruik."; }
/*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
{ return "Hergeimplimenteer vir interne redes; die API word nie beinvloed nie."; }
/*! this text is generated when the \\warning command is used. */ /*! this text is generated when the \\warning command is used. */
virtual QCString trWarning() virtual QCString trWarning()
{ return "Waarskuwing"; } { return "Waarskuwing"; }
/*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return "Bugs and beperkings"; }
/*! this text is generated when the \\version command is used. */ /*! this text is generated when the \\version command is used. */
virtual QCString trVersion() virtual QCString trVersion()
{ return "Weergawe"; } { return "Weergawe"; }
...@@ -794,8 +763,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -794,8 +763,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
case ClassDef::Union: result+="union"; break; case ClassDef::Union: result+="union"; break;
case ClassDef::Interface: result+="intervlak"; break; case ClassDef::Interface: result+="intervlak"; break;
case ClassDef::Protocol: result+="protokol"; break; case ClassDef::Protocol: result+="protokol"; break;
case ClassDef::Category: result+="category"; break; case ClassDef::Category: result+="kategorie"; break;
case ClassDef::Exception: result+="exception"; break; case ClassDef::Exception: result+="eksepsie"; break;
} }
result+=" is gegenereer vanaf die volgende le&euml;r"; result+=" is gegenereer vanaf die volgende le&euml;r";
if (single) result+=":"; else result+="s:"; if (single) result+=":"; else result+="s:";
...@@ -831,10 +800,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -831,10 +800,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
// new since 0.49-991003 // new since 0.49-991003
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return "Bronne";
}
virtual QCString trDefinedAtLineInSourceFile() virtual QCString trDefinedAtLineInSourceFile()
{ {
return "Gedefinie&euml;r by lyn @0 van le&euml;r @1."; return "Gedefinie&euml;r by lyn @0 van le&euml;r @1.";
...@@ -1141,11 +1106,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -1141,11 +1106,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
// new since 1.2.4 // new since 1.2.4
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return "Intervlake";
}
/*! Used for Java classes in the summary section of Java packages */ /*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses() virtual QCString trClasses()
{ {
...@@ -1178,11 +1138,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -1178,11 +1138,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
{ {
return "Pakkette"; return "Pakkette";
} }
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return "Pakket Dokumentasie";
}
/*! Text shown before a multi-line define */ /*! Text shown before a multi-line define */
virtual QCString trDefineValue() virtual QCString trDefineValue()
{ {
...@@ -1319,17 +1274,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -1319,17 +1274,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return result; return result;
} }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool singular)
{
QCString result((first_capital ? "Veld" : "veld"));
if (!singular) result+="e";
return result;
}
/*! This is used for translation of the word that will possibly /*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names * be followed by a single name or by a list of names
* of the category. * of the category.
...@@ -1521,8 +1465,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -1521,8 +1465,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
} }
else else
{ {
return "Die soektog het <b>$num</b> documente gevind na gelang van jou navraag. " return "Die soektog het <b>$num</b> dokumente gevind na gelang van jou navraag. "
"Begin met beste resultate."; "Beste resultate eerste.";
} }
} }
/*! This string is put before the list of matched words, for each search /*! This string is put before the list of matched words, for each search
...@@ -1544,6 +1488,67 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9 ...@@ -1544,6 +1488,67 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return filename + " Bron kode Le&euml;r"; return filename + " Bron kode Le&euml;r";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.3.9
//////////////////////////////////////////////////////////////////////////
/*! This is used as the name of the chapter containing the directory
* hierarchy.
*/
virtual QCString trDirIndex()
{ return "Directory Hi&euml;rargie"; }
/*! This is used as the name of the chapter containing the documentation
* of the directories.
*/
virtual QCString trDirDocumentation()
{ return "Directory Documentasie"; }
/*! This is used as the title of the directory index and also in the
* Quick links of a HTML page, to link to the directory hierarchy.
*/
virtual QCString trDirectories()
{ return "Directories"; }
/*! This returns a sentences that introduces the directory hierarchy.
* and the fact that it is sorted alphabetically per level
*/
virtual QCString trDirDescription()
{ return "Hierdie directory hi&euml;rargie is min of meer alfabeties "
"gesorteer:";
}
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
virtual QCString trDirReference(const char *dirName)
{ QCString result=dirName; result+=" Directory Verwysing"; return result; }
/*! This returns the word directory with or without starting capital
* (\a first_capital) and in sigular or plural form (\a singular).
*/
virtual QCString trDir(bool first_capital, bool singular)
{
QCString result((first_capital ? "Director" : "director"));
if (singular) result+="y"; else result+="ies";
return result;
}
//////////////////////////////////////////////////////////////////////////
// new since 1.4.1
//////////////////////////////////////////////////////////////////////////
/*! This text is added to the documentation when the \\overload command
* is used for a overloaded function.
*/
virtual QCString trOverloadText()
{
return "Hierdie is 'n oorlaaide lede funksie, "
"vertoon vir volledigheid. Dit verskil slegs van die bogegewe "
"funksie in die argument(e) wat dit aanvaar.";
}
}; };
#endif #endif
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "reflist.h" #include "reflist.h"
#include "pagedef.h" #include "pagedef.h"
#include "debug.h" #include "debug.h"
#include "searchindex.h"
#if !defined(_WIN32) || defined(__CYGWIN__) #if !defined(_WIN32) || defined(__CYGWIN__)
#include <unistd.h> #include <unistd.h>
...@@ -622,18 +623,9 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe ...@@ -622,18 +623,9 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe
ip--; ip--;
} }
type=type.left(ip+1); type=type.left(ip+1);
if (type.left(6)=="const ") // strip leading "const" type.stripPrefix("const "); // strip leading "const"
{ type.stripPrefix("struct "); // strip leading "struct"
type=type.mid(6); type.stripPrefix("union "); // strip leading "union"
}
if (type.left(7)=="struct ") // strip leading "struct"
{
type=type.mid(7);
}
else if (type.left(6)=="union ") // or strip leading "union"
{
type=type.mid(6);
}
type=type.stripWhiteSpace(); // strip leading and trailing whitespace type=type.stripWhiteSpace(); // strip leading and trailing whitespace
MemberDef *memTypeDef = 0; MemberDef *memTypeDef = 0;
ClassDef *result = getResolvedClassRec(md->getOuterScope(), ClassDef *result = getResolvedClassRec(md->getOuterScope(),
...@@ -1243,7 +1235,12 @@ ClassDef *getResolvedClass(Definition *scope, ...@@ -1243,7 +1235,12 @@ ClassDef *getResolvedClass(Definition *scope,
{ {
scope=Doxygen::globalScope; scope=Doxygen::globalScope;
} }
//printf("getResolvedClass(%s,%s)\n",scope?scope->name().data():"<global>",n); //printf("getResolvedClass(scope=%s,file=%s,name=%s,mayUnlinkable=%d)\n",
// scope?scope->name().data():"<global>",
// fileScope?fileScope->name().data():"<none>",
// n,
// mayBeUnlinkable
// );
ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec); ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec);
if (!mayBeUnlinkable && result && !result->isLinkable()) if (!mayBeUnlinkable && result && !result->isLinkable())
{ {
...@@ -1251,7 +1248,6 @@ ClassDef *getResolvedClass(Definition *scope, ...@@ -1251,7 +1248,6 @@ ClassDef *getResolvedClass(Definition *scope,
} }
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>", //printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>"); // n,result?result->name().data():"<none>");
return result; return result;
} }
...@@ -2281,8 +2277,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -2281,8 +2277,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
QCString dstAType=trimTemplateSpecifiers(namespaceName,className,dstA->type); QCString dstAType=trimTemplateSpecifiers(namespaceName,className,dstA->type);
QCString srcAName=srcA->name.stripWhiteSpace(); QCString srcAName=srcA->name.stripWhiteSpace();
QCString dstAName=dstA->name.stripWhiteSpace(); QCString dstAName=dstA->name.stripWhiteSpace();
if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6); srcAType.stripPrefix("class ");
if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6); dstAType.stripPrefix("class ");
// allow distingishing "const A" from "const B" even though // allow distingishing "const A" from "const B" even though
// from a syntactic point of view they would be two names of the same // from a syntactic point of view they would be two names of the same
...@@ -2651,22 +2647,21 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a ...@@ -2651,22 +2647,21 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
stripIrrelevantConstVolatile(type); stripIrrelevantConstVolatile(type);
// strip leading keywords // strip leading keywords
if (type.left(6)=="class ") type=type.right(type.length()-6); type.stripPrefix("class ");
else if (type.left(7)=="struct ") type=type.right(type.length()-7); type.stripPrefix("struct ");
else if (type.left(6)=="union ") type=type.right(type.length()-6); type.stripPrefix("union ");
else if (type.left(5)=="enum ") type=type.right(type.length()-5); type.stripPrefix("enum ");
else if (type.left(9)=="typename ") type=type.right(type.length()-9); type.stripPrefix("typename ");
static QRegExp id("[a-z_A-Z][:a-z_A-Z0-9]*"); static QRegExp id("[a-z_A-Z][:a-z_A-Z0-9]*");
QCString canType; QCString canType;
int i,p=0,l; int i,p=0,l;
while ((i=id.match(type,p,&l))!=-1) // foreach identifier in the type while ((i=id.match(type,p,&l))!=-1) // foreach identifier in the type
{ {
canType += type.mid(p,i-p); canType += type.mid(p,i-p);
QCString word = type.mid(i,l); QCString word = type.mid(i,l);
ClassDef *cd = getResolvedClass(d,fs,word); ClassDef *cd = getResolvedClass(d,fs,word,0,0,TRUE);
//printf("word %s => %s\n",word.data(),cd?cd->qualifiedName().data():"<none>"); //printf("word %s => %s\n",word.data(),cd?cd->qualifiedName().data():"<none>");
if (cd) if (cd)
{ {
...@@ -2676,9 +2671,18 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a ...@@ -2676,9 +2671,18 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
{ {
QCString resolvedType = resolveTypeDef(d,word); QCString resolvedType = resolveTypeDef(d,word);
if (resolvedType.isEmpty()) if (resolvedType.isEmpty())
{
int i=word.findRev("::");
if (i!=-1) // strip scope if it cannot be resolved anyway
// TODO is this robust enough?
{
canType+=word.mid(i+2);
}
else
{ {
canType+=word; canType+=word;
} }
}
else else
{ {
canType+=resolvedType; canType+=resolvedType;
...@@ -2687,7 +2691,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a ...@@ -2687,7 +2691,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
p=i+l; p=i+l;
} }
canType += type.right(type.length()-p); canType += type.right(type.length()-p);
//printf("result = %s\n",canType.data()); //printf("result = %s->%s\n",type.data(),canType.data());
return removeRedundantWhiteSpace(canType); return removeRedundantWhiteSpace(canType);
} }
...@@ -2697,11 +2701,11 @@ static bool matchArgument2( ...@@ -2697,11 +2701,11 @@ static bool matchArgument2(
Definition *dstScope,FileDef *dstFileScope,const Argument *dstA Definition *dstScope,FileDef *dstFileScope,const Argument *dstA
) )
{ {
//printf("match argument start `%s|%s' <-> `%s|%s' using nsp=%p class=%p\n", //printf(">> match argument: %s::`%s|%s' (%s) <-> %s::`%s|%s' (%s)\n",
// srcA->type.data(),srcA->name.data(), // srcScope ? srcScope->name().data() : "",
// dstA->type.data(),dstA->name.data(), // srcA->type.data(),srcA->name.data(),srcA->canType.data(),
// usingNamespaces, // dstScope ? dstScope->name().data() : "",
// usingClasses); // dstA->type.data(),dstA->name.data(),dstA->canType.data());
if (srcA->array!=dstA->array) // nomatch for char[] against char if (srcA->array!=dstA->array) // nomatch for char[] against char
{ {
...@@ -2709,16 +2713,28 @@ static bool matchArgument2( ...@@ -2709,16 +2713,28 @@ static bool matchArgument2(
return FALSE; return FALSE;
} }
QCString canonicalSrcType = extractCanonicalType(srcScope,srcFileScope,srcA); if (srcA->canType.isEmpty())
QCString canonicalDstType = extractCanonicalType(dstScope,dstFileScope,dstA); {
Argument *thatSrcA = (Argument*)srcA; // since canType is a cached value
// of type we do not really change the argument, but the
// compiler does know that.
thatSrcA->canType = extractCanonicalType(srcScope,srcFileScope,srcA);
}
if (dstA->canType.isEmpty())
{
Argument *thatDstA = (Argument*)dstA;
thatDstA->canType = extractCanonicalType(dstScope,dstFileScope,dstA);
}
if (canonicalSrcType==canonicalDstType) if (srcA->canType==dstA->canType)
{ {
MATCH MATCH
return TRUE; return TRUE;
} }
else else
{ {
//printf(" Canonical types do not match [%s]<->[%s]\n",
// srcA->canType.data(),dstA->canType.data());
NOMATCH NOMATCH
return FALSE; return FALSE;
} }
...@@ -3545,11 +3561,11 @@ QCString linkToText(const char *link,bool isFileName) ...@@ -3545,11 +3561,11 @@ QCString linkToText(const char *link,bool isFileName)
* 3) "memberName(...)" a specific (overloaded) function or define * 3) "memberName(...)" a specific (overloaded) function or define
* with name memberName * with name memberName
* 4) "::name a global variable or define * 4) "::name a global variable or define
* 4) "#memberName member variable, global variable or define * 4) "\#memberName member variable, global variable or define
* 5) ("ScopeName::")+"memberName()" * 5) ("ScopeName::")+"memberName()"
* 6) ("ScopeName::")+"memberName(...)" * 6) ("ScopeName::")+"memberName(...)"
* 7) ("ScopeName::")+"memberName" * 7) ("ScopeName::")+"memberName"
* instead of :: the # symbol may also be used. * instead of :: the \# symbol may also be used.
*/ */
bool generateRef(OutputDocInterface &od,const char *scName, bool generateRef(OutputDocInterface &od,const char *scName,
...@@ -5373,5 +5389,20 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s) ...@@ -5373,5 +5389,20 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s)
return s.mid(li,bi-li); return s.mid(li,bi-li);
} }
void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title,
const QCString &str,bool priority,const QCString &anchor)
{
static bool searchEngine = Config_getBool("SEARCHENGINE");
if (searchEngine)
{
Doxygen::searchIndex->setCurrentDoc(title,docBaseUrl,anchor);
static QRegExp wordPattern("[a-z_A-Z][a-z_A-Z0-9]*");
int i,p=0,l;
while ((i=wordPattern.match(str,p,&l))!=-1)
{
Doxygen::searchIndex->addWord(str.mid(i,l),priority);
p=i+l;
}
}
}
...@@ -231,6 +231,9 @@ QCString stripPath(const char *s); ...@@ -231,6 +231,9 @@ QCString stripPath(const char *s);
bool containsWord(const QCString &s,const QCString &word); bool containsWord(const QCString &s,const QCString &word);
bool findAndRemoveWord(QCString &s,const QCString &word); bool findAndRemoveWord(QCString &s,const QCString &word);
QCString stripLeadingAndTrailingEmptyLines(const QCString &s); QCString stripLeadingAndTrailingEmptyLines(const QCString &s);
void stringToSearchIndex(const QCString &docUrlBase,const QCString &title,
const QCString &str, bool priority=FALSE,
const QCString &anchor="");
#endif #endif
...@@ -483,9 +483,9 @@ static void stripQualifiers(QCString &typeStr) ...@@ -483,9 +483,9 @@ static void stripQualifiers(QCString &typeStr)
bool done=FALSE; bool done=FALSE;
while (!done) while (!done)
{ {
if (typeStr.left(7)=="static ") typeStr=typeStr.mid(7); if (typeStr.stripPrefix("static "));
else if (typeStr.left(8)=="virtual ") typeStr=typeStr.mid(8); else if (typeStr.stripPrefix("virtual "));
else if (typeStr.left(9)=="volatile ") typeStr=typeStr.mid(9); else if (typeStr.stripPrefix("volatile "));
else done=TRUE; else done=TRUE;
} }
} }
......
...@@ -201,6 +201,10 @@ SOURCE=..\src\groupdef.cpp ...@@ -201,6 +201,10 @@ SOURCE=..\src\groupdef.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\src\htags.cpp
# End Source File
# Begin Source File
SOURCE=..\src\htmldocvisitor.cpp SOURCE=..\src\htmldocvisitor.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment