summaryrefslogtreecommitdiffstats
path: root/examples/h5_ref_extern.c
Commit message (Expand)AuthorAgeFilesLines
* Fixed all -Wincompatible-pointer-types-discards-qualifiers warnings (#341)Sean McBride2021-02-221-2/+2
* Update license url part2 (#333)Larry Knox2021-02-171-1/+1
* Clang-format of source filesAllen Byrne2020-09-301-25/+23
* Trim trailing whitespaceQuincey Koziol2020-04-201-1/+1
* Add OAPL parameter to H5Rcreate_ APIsJordan Henderson2019-12-021-1/+1
* Add new H5R API that abstracts object, region and attribute reference typesJerome Soumagne2019-10-081-0/+94
d class='mode'>-rw-r--r--src/compound_xsd.h1
-rw-r--r--src/definition.cpp2
-rw-r--r--src/docparser.cpp10
-rw-r--r--src/doxygen.cpp240
-rw-r--r--src/doxygen.h3
-rw-r--r--src/filedef.cpp13
-rw-r--r--src/filedef.h2
-rw-r--r--src/groupdef.cpp4
-rw-r--r--src/htmlgen.cpp2
-rw-r--r--src/index.cpp2
-rw-r--r--src/lang_cfg.h1
-rw-r--r--src/language.cpp9
-rw-r--r--src/libdoxygen.pro.in1
-rw-r--r--src/memberdef.cpp50
-rw-r--r--src/memberdef.h8
-rw-r--r--src/memberlist.cpp3
-rw-r--r--src/memberlist.h6
-rw-r--r--src/parserintf.h106
-rw-r--r--src/pre.l8
-rw-r--r--src/scanner.h22
-rw-r--r--src/scanner.l2400
-rw-r--r--src/search.php21
-rw-r--r--src/search_php.h21
-rw-r--r--src/searchindex.cpp23
-rw-r--r--src/translator.cpp75
-rw-r--r--src/translator.h4
-rw-r--r--src/translator_ca.h272
-rw-r--r--src/translator_de.h6
-rw-r--r--src/translator_id.h1597
-rw-r--r--src/translator_kr.h381
-rw-r--r--src/util.cpp3
-rw-r--r--src/xmlgen.cpp13
47 files changed, 2573 insertions, 2874 deletions
diff --git a/INSTALL b/INSTALL
index 545fd51..21b9011 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.4.2
+DOXYGEN Version 1.4.2-20050410
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (28 March 2005)
+Dimitri van Heesch (10 April 2005)
diff --git a/Makefile.in b/Makefile.in
index 149bef7..4b89e6d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -46,17 +46,18 @@ distclean: clean
DATE=$(shell date "+%B %Y")
+MAN1DIR = man/man1
+
install: doxywizard_install
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxytag $(INSTALL)/bin
- $(INSTTOOL) -d $(INSTALL)/man/man1
- cat doc/doxygen.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/man/man1/doxygen.1 ; \
- cat doc/doxytag.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/man/man1/doxytag.1 ; \
- cat doc/doxywizard.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/man/man1/doxywizard.1 ;
-
+ $(INSTTOOL) -d $(INSTALL)/$(MAN1DIR)
+ cat doc/doxygen.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxygen.1 ; \
+ cat doc/doxytag.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxytag.1 ; \
+ cat doc/doxywizard.1 | sed -e "s/DATE/\$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > $(INSTALL)/$(MAN1DIR)/doxywizard.1 ;
-install_docs: install
+install_docs:
$(INSTTOOL) -d $(DOCDIR)
cp -r doc $(DOCDIR)
cp -r examples $(DOCDIR)
diff --git a/README b/README
index 616363c..c82b69a 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.4.2
+DOXYGEN Version 1.4.2_20050410
Please read INSTALL for compilation instructions.
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (28 March 2005)
+Dimitri van Heesch (dimitri@stack.nl) (10 April 2005)
diff --git a/VERSION b/VERSION
index 9df886c..147880e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.4.2
+1.4.2-20050410
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp
index 2d3556b..b221530 100644
--- a/addon/doxywizard/doxywizard.cpp
+++ b/addon/doxywizard/doxywizard.cpp
@@ -31,6 +31,7 @@
#include "doxywizard.h"
#include "expert.h"
#include "config.h"
+#include "version.h"
const int messageTimeout = 5000; //!< status bar message timeout in millisec.
@@ -1310,9 +1311,9 @@ void MainWidget::about()
{
QString msg;
QTextStream t(&msg,IO_WriteOnly);
- t << "<qt><center>A tool to configure and run doxygen "
- "on your source files.</center><p><br>"
- "<center>Written by<br> Dimitri van Heesch<br>&copy; 2000-2004</center><p>"
+ t << QString("<qt><center>A tool to configure and run doxygen version ")+versionString+
+ " on your source files.</center><p><br>"
+ "<center>Written by<br> Dimitri van Heesch<br>&copy; 2000-2005</center><p>"
"</qt>";
QMessageBox::about(this,"Doxygen GUI",msg);
}
diff --git a/configure b/configure
index 6a53fa3..0781e41 100755
--- a/configure
+++ b/configure
@@ -28,7 +28,7 @@ f_insttool=NO
f_english=NO
f_wizard=NO
f_thread=NO
-f_langs=nl,se,cz,fr,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za
+f_langs=nl,se,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za
while test -n "$1"; do
case $1 in
@@ -145,12 +145,18 @@ if test -z "$f_platform"; then
;;
Darwin:*)
f_platform=macosx-c++
+ if test "$f_insttool" = NO; then
+ f_insttool=/usr/bin/install
+ fi
;;
FreeBSD:*)
f_platform=freebsd-g++
;;
HP-UX:*)
f_platform=hpux-g++
+ if test "$f_insttool" = NO; then
+ f_insttool=/usr/bin/install
+ fi
;;
IRIX64:*)
f_platform=irix-64
@@ -181,6 +187,9 @@ if test -z "$f_platform"; then
;;
SunOS:5*)
f_platform=solaris-g++
+ if test "$f_insttool" = NO; then
+ f_insttool=/usr/bin/install
+ fi
;;
ULTRIX:*)
f_platform=ultrix-g++
@@ -523,7 +532,7 @@ fi
echo -n " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
- @allowed=(split(/,/,"NL,SE,CZ,FR,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA"));
+ @allowed=(split(/,/,"NL,SE,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA"));
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
diff --git a/doc/doxygen_usage.doc b/doc/doxygen_usage.doc
index fa57ea4..18773e5 100644
--- a/doc/doxygen_usage.doc
+++ b/doc/doxygen_usage.doc
@@ -72,6 +72,9 @@ doxygen -w html header.html footer.html stylesheet.css
\verbatim
doxygen -w latex header.tex doxygen.sty
\endverbatim
+If you need non-default options (for instance to use pdflatex) you need
+to make a config file with those options set correctly and then specify
+that config file as the forth argument.
<li>For RTF output, you can generate the default style sheet file (see
\ref cfg_rtf_stylesheet_file "RTF_STYLESHEET_FILE") using:
\verbatim
diff --git a/doc/language.doc b/doc/language.doc
index cbe7d25..cf80d6a 100644
--- a/doc/language.doc
+++ b/doc/language.doc
@@ -23,13 +23,13 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile).
-Currently (version 1.4.1-20050315), 30 languages
+Currently (version 1.4.2), 31 languages
are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
-German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En),
-Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian,
-Slovak, Slovene, Spanish, Swedish, and Ukrainian..
+German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean
+(+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian..
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
@@ -141,6 +141,12 @@ when the translator was updated.
<td>1.4.1</td>
</tr>
<tr bgcolor="#ffffff">
+ <td>Indonesian</td>
+ <td>Hendy Irawan</td>
+ <td>ceefour at gauldong dot net</td>
+ <td>up-to-date</td>
+ </tr>
+ <tr bgcolor="#ffffff">
<td>Italian</td>
<td>Alessandro Falappa<br>Ahmed Aldo Faisal</td>
<td>alessandro at falappa dot net<br>aaf23 at cam dot ac dot uk</td>
@@ -291,6 +297,8 @@ when the translator was updated.
Hungarian & \'{A}kos Kiss & {\tt\tiny akiss@users.sourceforge.net} & 1.4.1 \\
~ & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny foldvari lost@cyberspace} & ~ \\
\hline
+ Indonesian & Hendy Irawan & {\tt\tiny ceefour@gauldong.net} & up-to-date \\
+ \hline
Italian & Alessandro Falappa & {\tt\tiny alessandro@falappa.net} & up-to-date \\
~ & Ahmed Aldo Faisal & {\tt\tiny aaf23@cam.ac.uk} & ~ \\
\hline
diff --git a/doc/maintainers.txt b/doc/maintainers.txt
index 5140334..bbb36f2 100644
--- a/doc/maintainers.txt
+++ b/doc/maintainers.txt
@@ -58,6 +58,9 @@ TranslatorHungarian
&Aacute;kos Kiss: akiss@users.sourceforge.net
F&ouml;ldv&aacute;ri Gy&ouml;rgy: foldvari lost@cyberspace
+TranslatorIndonesian
+Hendy Irawan: ceefour@gauldong.net
+
TranslatorItalian
Alessandro Falappa: alessandro@falappa.net
Ahmed Aldo Faisal: aaf23@cam.ac.uk
diff --git a/doc/translator_report.txt b/doc/translator_report.txt
index bbec1bd..ef5e72e 100644
--- a/doc/translator_report.txt
+++ b/doc/translator_report.txt
@@ -1,14 +1,14 @@
-(1.4.1-20050315)
+(1.4.2)
-Doxygen supports the following 30 languages (sorted alphabetically):
+Doxygen supports the following 31 languages (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
-German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En),
-Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian,
-Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean
+(+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-Of them, 9 translators are up-to-date, 21 translators are based on
+Of them, 10 translators are up-to-date, 21 translators are based on
some adapter class, and 2 are English based.
----------------------------------------------------------------------
@@ -23,6 +23,7 @@ still may be some details listed even for them:
TranslatorDutch -- Remove the obsolete methods (never used).
TranslatorEnglish -- Remove the obsolete methods (never used).
TranslatorGerman -- Remove the obsolete methods (never used).
+ TranslatorIndonesian -- Remove the obsolete methods (never used).
TranslatorItalian
TranslatorRussian
TranslatorSwedish
@@ -476,6 +477,25 @@ TranslatorHungarian (TranslatorAdapter_1_4_1) 1 method to implement
QCString trNoDescriptionAvailable()
+TranslatorIndonesian (Translator)
+--------------------
+
+ Implements 192 of the required methods.
+
+ 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()
+
+
TranslatorJapanese (TranslatorAdapter_1_3_9) 7 methods to implement
------------------
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index 666ffbd..e6d8ada 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,6 +1,6 @@
Summary: A documentation system for C/C++.
Name: doxygen
-Version: 1.4.2
+Version: 1.4.2_20050410
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 10973aa..c93b0c0 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -320,7 +320,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
copyToOutput(yytext,yyleng);
BEGIN(CComment);
}
-<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code") { /* start of a verbatim block */
+<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code")/[ \r\t\n] { /* start of a verbatim block */
copyToOutput(yytext,yyleng);
g_blockName=&yytext[1];
g_lastCommentContext = YY_START;
@@ -423,7 +423,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
copyToOutput(yytext,yyleng);
BEGIN(g_readLineCtx);
}
-<CComment,ReadLine>("\\\\"|"@@")[~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command
+<CComment,ReadLine>[\\@][\\@][~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command
copyToOutput(yytext,yyleng);
}
<CComment,ReadLine>[\\@]"cond"[ \t]+ { // conditional section
@@ -507,6 +507,7 @@ void replaceComment(int offset)
*/
void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
{
+ //printf("convertCppComments(%s)\n",fileName);
g_inBuf = inBuf;
g_outBuf = outBuf;
g_inBufPos = 0;
diff --git a/src/commentscan.h b/src/commentscan.h
index d954a93..9d7fe7b 100644
--- a/src/commentscan.h
+++ b/src/commentscan.h
@@ -19,7 +19,10 @@
#include "qtbc.h"
#include "entry.h"
-bool parseCommentBlock(/* in,out */ Entry *curEntry,
+class ParserInterface;
+
+bool parseCommentBlock(/* in */ ParserInterface *parser,
+ /* in,out */ Entry *curEntry,
/* in */ const QCString &comment,
/* in */ const QCString &fileName,
/* in */ int lineNr,
diff --git a/src/commentscan.l b/src/commentscan.l
index 225706b..bcbd296 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -44,6 +44,7 @@
#include "reflist.h"
#include "code.h"
#include "debug.h"
+#include "parserintf.h"
// forward declarations
static void handleBrief(const QCString &);
@@ -288,6 +289,7 @@ class GuardedSection
* statics
*/
+static ParserInterface *langParser; // the language parser that is calling us
static const char * inputString; // input string
static int inputPosition; // read pointer
static QCString yyFileName; // file name that is read from
@@ -322,6 +324,7 @@ static QCString xrefListTitle;
static Protection protection;
static bool xrefAppendFlag;
+static bool inGroupParamFound;
//-----------------------------------------------------------------------------
@@ -812,10 +815,11 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
BEGIN(ReadFormulaLong);
}
<Comment>{CMD}"{" { // begin of a group
- handleGroupStartCommand(nameHeader);
+ langParser->handleGroupStartCommand(nameHeader);
}
<Comment>{CMD}"}" { // end of a group
- handleGroupEndCommand();
+ langParser->handleGroupEndCommand();
+ nameHeader.resize(0);
}
<Comment>{CMD}[$@\\&~<>#%] { // escaped character
addOutput(yytext);
@@ -1507,12 +1511,15 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
current->groups->append(
new Grouping(yytext, Grouping::GROUPING_INGROUP)
);
- BEGIN( Comment );
+ inGroupParamFound=TRUE;
}
<InGroupParam>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
- "Warning: Missing group name for \\ingroup command"
- );
+ if (!inGroupParamFound)
+ {
+ warn(yyFileName,yyLineNr,
+ "Warning: Missing group name for \\ingroup command"
+ );
+ }
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
BEGIN( Comment );
@@ -1530,7 +1537,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<FnParam>{DOCNL} { // end of argument
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
- parsePrototype(functionProto);
+ langParser->parsePrototype(functionProto);
BEGIN( Comment );
}
<FnParam>{LC} { // line continuation
@@ -1558,7 +1565,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
else // overload declaration
{
makeStructuralIndicator(Entry::OVERLOADDOC_SEC);
- parsePrototype(functionProto);
+ langParser->parsePrototype(functionProto);
}
BEGIN( Comment );
}
@@ -1913,6 +1920,7 @@ static void handleEndIf(const QCString &)
static void handleIngroup(const QCString &)
{
+ inGroupParamFound=FALSE;
BEGIN( InGroupParam );
}
@@ -2010,7 +2018,8 @@ static void checkFormula()
//----------------------------------------------------------------------------
-bool parseCommentBlock(/* in,out */ Entry *curEntry,
+bool parseCommentBlock(/* in */ ParserInterface *parser,
+ /* in,out */ Entry *curEntry,
/* in */ const QCString &comment,
/* in */ const QCString &fileName,
/* in */ int lineNr,
@@ -2025,6 +2034,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
initParser();
guards.setAutoDelete(TRUE);
guards.clear();
+ langParser = parser;
current = curEntry;
inputString = comment;
if (inputString==0) return FALSE; // avoid empty strings
diff --git a/src/compound.xsd b/src/compound.xsd
index 367fdd0..561ab94 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -253,6 +253,7 @@
<xsd:complexType name="locationType">
<xsd:attribute name="file" type="xsd:string" />
<xsd:attribute name="line" type="xsd:integer" />
+ <xsd:attribute name="bodyfile" type="xsd:string" />
<xsd:attribute name="bodystart" type="xsd:integer" />
<xsd:attribute name="bodyend" type="xsd:integer" />
</xsd:complexType>
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 7766410..2d93a57 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -253,6 +253,7 @@
" <xsd:complexType name=\"locationType\">\n"
" <xsd:attribute name=\"file\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"line\" type=\"xsd:integer\" />\n"
+" <xsd:attribute name=\"bodyfile\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"bodystart\" type=\"xsd:integer\" />\n"
" <xsd:attribute name=\"bodyend\" type=\"xsd:integer\" />\n"
" </xsd:complexType>\n"
diff --git a/src/definition.cpp b/src/definition.cpp
index 5fb5092..64db73d 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -249,7 +249,7 @@ static bool readCodeFragment(const char *fileName,
{
//printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine);
if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name
- QCString cmd=getFileFilter(fileName)+" \""+fileName+"\"";
+ QCString cmd="\"" + getFileFilter(fileName)+"\" \""+fileName+"\"";
FILE *f = Config_getBool("FILTER_SOURCE_FILES") ? popen(cmd,"r") : fopen(fileName,"r");
bool found=FALSE;
if (f)
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 66b0203..c3208eb 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -864,7 +864,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member))
{
//printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE);
- if (member) // member link
+ if (member && member->isLinkable()) // member link
{
children.append(new
DocLinkedWord(parent,name,
@@ -874,7 +874,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
)
);
}
- else // compound link
+ else if (compound->isLinkable()) // compound link
{
if (compound->definitionType()==Definition::TypeFile)
{
@@ -892,8 +892,12 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
)
);
}
+ else // not linkable
+ {
+ children.append(new DocWord(parent,name));
+ }
}
- else if (!g_insideHtmlLink && g_token->name.at(len-1)==':')
+ else if (!g_insideHtmlLink && len>1 && g_token->name.at(len-1)==':')
{
// special case, where matching Foo: fails to be an Obj-C reference,
// but Foo itself might be linkable.
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 7a0ab82..5a6b965 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -65,6 +65,7 @@
#include "commentcnv.h"
#include "cmdmapper.h"
#include "searchindex.h"
+#include "parserintf.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
@@ -214,7 +215,16 @@ static void addRelatedPage(Entry *root)
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) break;
}
//printf("---> addRelatedPage() %s gd=%p\n",root->name.data(),gd);
- PageDef *pd = addRelatedPage(root->name,root->args,root->doc,root->anchors,
+ QCString doc;
+ if (root->brief.isEmpty())
+ {
+ doc=root->doc;
+ }
+ else
+ {
+ doc=root->brief+"\n\n"+root->doc;
+ }
+ PageDef *pd = addRelatedPage(root->name,root->args,doc,root->anchors,
root->fileName,root->startLine,
root->sli,
gd,root->tagInfo
@@ -2261,16 +2271,23 @@ static void buildFunctionList(Entry *root)
rname=rname.right(rname.length()-root->parent->name.length()-2);
}
+ NamespaceDef *nd = 0;
bool isMember=FALSE;
- int memIndex=rname.find("::");
+ int memIndex=rname.findRev("::");
if (memIndex!=-1)
{
int ts=rname.find('<');
int te=rname.find('>');
if (ts==-1 || te==-1)
{
- NamespaceDef *nd = Doxygen::namespaceSDict.find(rname.left(memIndex));
- isMember=nd==0;
+ nd = Doxygen::namespaceSDict.find(rname.left(memIndex));
+ isMember = nd==0;
+ if (nd)
+ {
+ // strip namespace scope from name
+ scope=rname.left(memIndex);
+ rname=rname.right(rname.length()-memIndex-2);
+ }
}
else
{
@@ -2288,7 +2305,7 @@ static void buildFunctionList(Entry *root)
)
)
{
- Debug::print(Debug::Functions,0,"--> member %s of class %s!\n",
+ Debug::print(Debug::Functions,0," --> member %s of class %s!\n",
rname.data(),cd->name().data());
addMethodToClass(root,cd,rname,isFriend);
}
@@ -2308,26 +2325,25 @@ static void buildFunctionList(Entry *root)
*/
bool found=FALSE;
MemberName *mn;
- //MemberDef *fmd;
+ MemberDef *md=0;
if ((mn=Doxygen::functionNameSDict[rname]))
{
- Debug::print(Debug::Functions,0,"--> function %s already found!\n",rname.data());
+ Debug::print(Debug::Functions,0," --> function %s already found!\n",rname.data());
MemberNameIterator mni(*mn);
- MemberDef *md;
- for (mni.toFirst();((md=mni.current()) && !found);++mni)
+ for (mni.toFirst();(!found && (md=mni.current()));++mni)
{
- NamespaceDef *nd = md->getNamespaceDef();
+ NamespaceDef *mnd = md->getNamespaceDef();
NamespaceDef *rnd = 0;
if (!root->parent->name.isEmpty())
{
rnd = getResolvedNamespace(root->parent->name);
}
- FileDef *fd = md->getFileDef();
+ FileDef *mfd = md->getFileDef();
QCString nsName,rnsName;
- if (nd) nsName = nd->name().copy();
+ if (mnd) nsName = mnd->name().copy();
if (rnd) rnsName = rnd->name().copy();
- NamespaceSDict *unl = fd ? fd->getUsedNamespaces() : 0;
- SDict<Definition> *ucl = fd ? fd->getUsedClasses() : 0;
+ NamespaceSDict *unl = mfd ? mfd->getUsedNamespaces() : 0;
+ SDict<Definition> *ucl = mfd ? mfd->getUsedClasses() : 0;
//printf("matching arguments for %s%s %s%s\n",
// md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
if (
@@ -2341,9 +2357,9 @@ static void buildFunctionList(Entry *root)
}
//printf("match!\n");
// see if we need to create a new member
- found=(nd && rnd && nsName==rnsName) || // members are in the same namespace
- ((nd==0 && rnd==0 && fd!=0 && // no external reference and
- fd->absFilePath()==root->fileName // prototype in the same file
+ found=(mnd && rnd && nsName==rnsName) || // members are in the same namespace
+ ((mnd==0 && rnd==0 && mfd!=0 && // no external reference and
+ mfd->absFilePath()==root->fileName // prototype in the same file
)
);
// otherwise, allow a duplicate global member with the same argument list
@@ -2378,7 +2394,7 @@ static void buildFunctionList(Entry *root)
md->setArgumentList(argList);
}
}
- else if (!md->documentation().isEmpty() && !root->doc.isEmpty() && nd==rnd)
+ else if (!md->documentation().isEmpty() && !root->doc.isEmpty() && mnd==rnd)
{
warn(root->docFile,root->docLine,"Warning: member %s: ignoring the detailed description found here, since another one was found at line %d of file %s!",md->name().data(),md->docLine(),md->docFile().data());
}
@@ -2387,7 +2403,7 @@ static void buildFunctionList(Entry *root)
{
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
}
- else if (!md->briefDescription().isEmpty() && !root->brief.isEmpty() && nd==rnd)
+ else if (!md->briefDescription().isEmpty() && !root->brief.isEmpty() && mnd==rnd)
{
warn(root->briefFile,root->briefLine,"Warning: member %s: ignoring the brief description found here, since another one was found at line %d of file %s!",md->name().data(),md->briefLine(),md->briefFile().data());
}
@@ -2416,19 +2432,19 @@ static void buildFunctionList(Entry *root)
}
if (!found) /* global function is unique with respect to the file */
{
+ Debug::print(Debug::Functions,0," --> new function %s found!\n",rname.data());
//printf("New function type=`%s' name=`%s' args=`%s' bodyLine=%d\n",
// root->type.data(),rname.data(),root->args.data(),root->bodyLine);
// new global function
ArgumentList *tArgList = root->tArgLists ? root->tArgLists->last() : 0;
QCString name=removeRedundantWhiteSpace(rname);
- MemberDef *md=new MemberDef(
+ md=new MemberDef(
root->fileName,root->startLine,
root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,FALSE,
MemberDef::Function,tArgList,root->argList);
-
md->setTagInfo(root->tagInfo);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
@@ -2446,27 +2462,26 @@ static void buildFunctionList(Entry *root)
md->setMemberSpecifiers(root->memSpec);
md->setMemberGroupId(root->mGrpId);
- // see if the function is inside a namespace
- NamespaceDef *nd = 0;
- QCString scope;
- if (root->parent->section == Entry::NAMESPACE_SEC )
+ // see if the function is inside a namespace that was not part of
+ // the name already (in that case nd should be non-zero already)
+ if (nd==0 && root->parent->section == Entry::NAMESPACE_SEC )
{
QCString nscope=removeAnonymousScopes(root->parent->name);
if (!nscope.isEmpty())
{
nd = getResolvedNamespace(nscope);
- if (nd)
- {
- scope+=nd->name();
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
- {
- scope+=".";
- }
- else
- {
- scope+="::";
- }
- }
+ }
+ }
+
+ if (!scope.isEmpty())
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
+ {
+ scope = substitute(scope,"::",".")+".";
+ }
+ else
+ {
+ scope+="::";
}
}
@@ -2518,7 +2533,6 @@ static void buildFunctionList(Entry *root)
nd->insertMember(md);
md->setNamespace(nd);
}
-
if (fd)
{
// add member to the file (we do this even if we have already
@@ -2551,7 +2565,14 @@ static void buildFunctionList(Entry *root)
}
else
{
- //printf("Function already found!\n");
+ bool ambig;
+ FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+ if (fd)
+ {
+ // add member to the file (we do this even if we have already
+ // inserted it into the namespace)
+ fd->insertMember(md);
+ }
}
//printf("unrelated function %d `%s' `%s' `%s'\n",
@@ -4215,7 +4236,7 @@ static bool findGlobalMember(Entry *root,
}
}
}
- if (!found) // no match
+ if (!found && !root->relatesDup) // no match
{
QCString fullFuncDecl=decl;
if (root->argList) fullFuncDecl+=argListToString(root->argList);
@@ -5297,6 +5318,15 @@ static void findMemberDocumentation(Entry *root)
root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId
);
bool isFunc=TRUE;
+
+ if (root->relatesDup && !root->relates.isEmpty())
+ {
+ QCString tmp = root->relates;
+ root->relates.resize(0);
+ findMemberDocumentation(root);
+ root->relates = tmp;
+ }
+
if ( // detect func variable/typedef to func ptr
(i=findFunctionPtr(root->type,&l))!=-1
)
@@ -5669,27 +5699,30 @@ static void findEnumDocumentation(Entry *root)
&& root->name[0]!='@' // skip anonymous enums
)
{
- //printf("Found docs for enum with name `%s'\n",root->name.data());
+ //printf("Found docs for enum with name `%s' in context %s\n",
+ // root->name.data(),root->parent->name.data());
int i;
- ClassDef *cd=0;
QCString name;
- if ((i=root->name.findRev("::"))!=-1) // scope is specified
+ QCString scope;
+ if ((i=root->name.findRev("::"))!=-1) // scope is specified as part of the name
{
- QCString scope=root->name.left(i); // extract scope
name=root->name.right(root->name.length()-i-2); // extract name
- cd=getClass(scope);
+ scope=root->name.left(i); // extract scope
//printf("Scope=`%s' Name=`%s'\n",scope.data(),name.data());
}
- else // no scope, check the scope in which the docs where found
+ else // just the name
{
- if (( root->parent->section & Entry::COMPOUND_MASK )
- && !root->parent->name.isEmpty()
- ) // found enum docs inside a compound
- {
- cd=getClass(root->parent->name);
- }
- name=root->name.copy();
+ name=root->name;
+ }
+ if (( root->parent->section & Entry::SCOPE_MASK )
+ && !root->parent->name.isEmpty()
+ ) // found enum docs inside a compound
+ {
+ if (!scope.isEmpty()) scope.prepend("::");
+ scope.prepend(root->parent->name);
}
+ ClassDef *cd=getClass(scope);
+
if (!name.isEmpty())
{
bool found=FALSE;
@@ -7270,7 +7303,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
}
else
{
- QCString cmd=filterName+" \""+fileName+"\"";
+ QCString cmd="\""+filterName+"\" \""+fileName+"\"";
FILE *f=popen(cmd,"r");
if (!f)
{
@@ -7339,8 +7372,7 @@ static void copyStyleSheet()
}
}
-#ifdef USE_TMP_FILE
-
+#if 0
static void readFiles(const QCString &tmpFile)
{
QFile outFile(tmpFile);
@@ -7386,36 +7418,27 @@ static void readFiles(const QCString &tmpFile)
}
}
}
+#endif
-#else
-//----------------------------------------------------------------------------
-// Reads a file to a string.
-// The name of the file is written in front of the file's contents and
-// between 0x06 markers
-
-static void readFiles(BufStr &output)
+static void parseFiles(Entry *root)
{
+ ParserInterface *defaultParser = new CLanguageScanner;
+ ParserManager *parserManager = new ParserManager(defaultParser);
+
+ // register any additional parsers here...
+
QCString *s=inputFiles.first();
while (s)
{
QCString fileName=*s;
+ QCString extension;
+ int ei = fileName.findRev('.');
+ if (ei!=-1) extension=fileName.right(fileName.length()-ei);
- int fileNameSize=fileName.length();
-
- //bool multiLineIsBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF");
-
- BufStr tempBuf(20000);
- //BufStr *bufPtr = multiLineIsBrief ? &output : &tempBuf;
- BufStr *bufPtr = &tempBuf;
+ QFileInfo fi(fileName);
+ BufStr preBuf(fi.size()+4096);
+ BufStr *bufPtr = &preBuf;
- // add begin filename marker
- bufPtr->addChar(0x06);
- // copy filename
- bufPtr->addArray(fileName.data(),fileNameSize);
-
- // add end filename marker
- bufPtr->addChar(0x06);
- bufPtr->addChar('\n');
if (Config_getBool("ENABLE_PREPROCESSING"))
{
msg("Preprocessing %s...\n",s->data());
@@ -7429,14 +7452,18 @@ static void readFiles(BufStr &output)
bufPtr->addChar('\n'); /* to prevent problems under Windows ? */
- convertCppComments(&tempBuf,&output,fileName);
+ BufStr convBuf(bufPtr->curPos()+1024);
+
+ convertCppComments(&preBuf,&convBuf,fileName);
+
+ convBuf.addChar('\0');
+
+ ParserInterface *parser = parserManager->getParser(extension);
+ parser->parse(fileName,convBuf.data(),root);
s=inputFiles.next();
- //printf("-------> adding new line\n");
}
- output.addChar(0);
}
-#endif
//----------------------------------------------------------------------------
// Read all files matching at least one pattern in `patList' in the
@@ -8285,14 +8312,15 @@ void parseInput()
// strip trailing slashes
if (path.at(l-1)=='\\' || path.at(l-1)=='/') path=path.left(l-1);
- inputSize+=readFileOrDirectory(path,&Doxygen::inputNameList,
+ inputSize+=readFileOrDirectory(
+ path,&Doxygen::inputNameList,
Doxygen::inputNameDict,&excludeNameDict,
- &Config_getList("FILE_PATTERNS"),
- &Config_getList("EXCLUDE_PATTERNS"),
- &inputFiles,0,
- alwaysRecursive,
- TRUE,
- killDict);
+ &Config_getList("FILE_PATTERNS"),
+ &Config_getList("EXCLUDE_PATTERNS"),
+ &inputFiles,0,
+ alwaysRecursive,
+ TRUE,
+ killDict);
s=inputList.next();
}
delete killDict;
@@ -8466,8 +8494,7 @@ void parseInput()
* Read Input Files *
**************************************************************************/
-#ifdef USE_TMP_FILE
-
+#if 0
QCString tmpName = Config_getString("OUTPUT_DIRECTORY")+
"/doxygen_scratchfile.tmp";
@@ -8493,36 +8520,9 @@ void parseInput()
// remove temp file
QDir().remove(tmpName);
-
-#else // use memory to store intermediate results
-
- BufStr input(inputSize+1); // Add one byte extra for \0 termination
-
- // read and preprocess all input files
- readFiles(input);
-
- if (input.isEmpty())
- {
- err("No input read, no output generated!\n");
- delete root;
- cleanUpDoxygen();
- exit(1);
- }
- else
- {
- msg("Read %d bytes\n",input.curPos());
- }
-
- root->program=input;
-
- msg("Parsing input...\n");
- parseMain(root); // build a tree of entries
-
- msg("Freeing input...\n");
- input.resize(0);
-
#endif
-
+ parseFiles(root);
+
/**************************************************************************
* Gather information *
**************************************************************************/
diff --git a/src/doxygen.h b/src/doxygen.h