Commit 00415514 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.3-20001217

parent 5167cf20
DOXYGEN Version 1.2.3-20001203 DOXYGEN Version 1.2.3-20001217
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (03 December 2000) Dimitri van Heesch (17 December 2000)
...@@ -69,8 +69,9 @@ pdf: docs ...@@ -69,8 +69,9 @@ pdf: docs
archive: clean archive: clean
tar zcvf dx`date +%y%m%d`.tgz addon tmake doc wintools examples bin objects \ tar zcvf dx`date +%y%m%d`.tgz addon tmake doc wintools examples bin objects \
qtools src configure configure.bin Makefile.in Makefile.win.in INSTALL \ qtools src configure configure.bin Makefile.in Makefile.win_nmake.in \
make.bat LANGUAGE.HOWTO LICENSE PLATFORMS VERSION packages Makefile.win_make.in INSTALL make.bat LANGUAGE.HOWTO LICENSE PLATFORMS \
VERSION packages
src/version.cpp: Makefile src/version.cpp: Makefile
echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp
......
all: src\version.cpp
set TMAKEPATH=$(TMAKEPATH) & cd qtools & $(MAKE)
set TMAKEPATH=$(TMAKEPATH) & cd src & $(MAKE)
clean:
cd examples & $(MAKE) clean
cd doc & $(MAKE) clean
cd src & $(MAKE) clean
-del bin\doxy*.*
-del objects\*.o
distclean: clean
-del src\Makefile.doxygen \
src\Makefile.doxytag \
src\Makefile.doxysearch
-del Makefile src\Makefile examples\Makefile doc\Makefile
-del src\doxygen.pro src\doxytag.pro src\doxysearch.pro
-del src\version.cpp
docs:
set TMAKEPATH=$(TMAKEPATH) & cd examples & $(MAKE)
set TMAKEPATH=$(TMAKEPATH) & cd doc & $(MAKE)
ps: docs
cd latex & $(MAKE)
src\version.cpp: Makefile
echo char versionString[]="$(VERSION)"; > src\version.cpp
FORCE:
DOXYGEN Version 1.2.3-20001203 DOXYGEN Version 1.2.3-20001217
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (03 December 2000) Dimitri van Heesch (17 December 2000)
1.2.3-20001203 1.2.3-20001217
...@@ -891,6 +891,15 @@ void checkConfig() ...@@ -891,6 +891,15 @@ void checkConfig()
if (!dp.exists() || !dp.isFile()) if (!dp.exists() || !dp.isFile())
{ {
err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data()); err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data());
Config::dotPath="";
}
else
{
Config::dotPath=dp.dirPath(TRUE)+"/";
#if defined(_WIN32) // convert slashes
uint i=0,l=Config::dotPath.length();
for (i=0;i<l;i++) if (Config::dotPath.at(i)=='/') Config::dotPath.at(i)='\\';
#endif
} }
} }
else // make sure the string is empty but not null! else // make sure the string is empty but not null!
......
#
#
#
# Copyright (C) 1997-2000 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.
all:
@xcopy /s /q /i ..\examples ..\html\examples
set DOXYGEN_DOCDIR=. & \
set VERSION=$(VERSION) & \
$(DOXYGEN)\bin\doxygen
@del ..\latex\refman.tex
@copy doxygen_logo*.gif ..\html
@copy Makefile.latex ..\latex\Makefile
@sed -e "s/\$$VERSION/$(VERSION)/g" doxygen_manual.tex >..\latex\doxygen_manual.tex
@sed -e "s/\$$VERSION/$(VERSION)/g" doxygen.sty >..\latex\doxygen.sty
@copy doxygen_logo.eps ..\latex
clean:
del /s /q ..\html ..\latex
FORCE:
...@@ -61,6 +61,7 @@ Written by Dimitri van Heesch\\[2ex] ...@@ -61,6 +61,7 @@ Written by Dimitri van Heesch\\[2ex]
\input{doxygen_usage} \input{doxygen_usage}
\input{doxytag_usage} \input{doxytag_usage}
\input{doxysearch_usage} \input{doxysearch_usage}
\input{doxywizard_usage}
\input{installdox_usage} \input{installdox_usage}
\input{output} \input{output}
\input{autolink} \input{autolink}
......
...@@ -337,29 +337,20 @@ doxygen for Windows. ...@@ -337,29 +337,20 @@ doxygen for Windows.
Here is what is required: Here is what is required:
<ul> <ul>
<li>WinZip to unpack the tar source distribution. This can be found at <li>An unzip/untar tool like WinZip to unpack the tar source distribution.
http://www.winzip.com/ . This can be found at http://www.winzip.com/
The good, tested, and free alternative is the <code>tar</code> utility The good, tested, and free alternative is the <code>tar</code> utility
supplied with <a href="http://sourceware.cygnus.com/cygwin/">cygwin supplied with <a href="http://sourceware.cygnus.com/cygwin/">cygwin
tools</a>. Anyway, the cygwin's flex, bison, and sed are also tools</a>. Anyway, the cygwin's flex, bison, and sed are also
recommended below. recommended below.
Notice (not related to tar): The good alternative to the WinZip,
concerning the zipping/unzipping are the Zip/UnZip utilities by
Info-ZIP which are available for free from
ftp://ftp.freesoftware.com/pub/infozip/index.html .
There also are archives with binaries for Windows. The tip is to
download the unz540xN.exe and zip23xN.zip (they were used without
problems here) which
contain UnZip, Zip, and other auxiliary (but not necessary)
utilities related to the UnZip and Zip.
It may be the case that
<li>Microsoft Visual C++ (I only tested with version 6.0). <li>Microsoft Visual C++ (I only tested with version 6.0).
Use the <code>vcvars32.bat</code> batch file to set the environment Use the <code>vcvars32.bat</code> batch file to set the environment
variables (if you did not select to do this automatically during variables (if you did not select to do this automatically during
installation). installation).
Borland C++ or MINGW (see http://www.mingw.org) are also supported.
<li>Perl 5.0 or higher for Windows. This can be download from: <li>Perl 5.0 or higher for Windows. This can be download from:
http://www.ActiveState.com/Products/ActivePerl/ http://www.ActiveState.com/Products/ActivePerl/
...@@ -387,7 +378,7 @@ Here is what is required: ...@@ -387,7 +378,7 @@ Here is what is required:
steps. steps.
<li>Since Doxygen-1.2.2-20001015, the distribution includes the part <li>Since Doxygen-1.2.2-20001015, the distribution includes the part
of Qt-2.2.0 that is needed for compilation of doxygen, doxytag, of Qt-2.x.x that is needed for compilation of doxygen, doxytag,
and doxysearch. The missing files for Windows were also created. and doxysearch. The missing files for Windows were also created.
This allows compilation of doxygen on systems without X11 or the This allows compilation of doxygen on systems without X11 or the
full Qt. For doxywizard Qt-2.2 is still required however. full Qt. For doxywizard Qt-2.2 is still required however.
...@@ -456,13 +447,13 @@ Compilation is now done by performing the following steps: ...@@ -456,13 +447,13 @@ Compilation is now done by performing the following steps:
<li>goto the doxygen root dir and type: <li>goto the doxygen root dir and type:
\verbatim \verbatim
make.bat make.bat msvc
\endverbatim \endverbatim
This should build the executables This should build the executables
<code>doxygen.exe</code>, <code>doxytag.exe</code>, and <code>doxygen.exe</code>, <code>doxytag.exe</code>, and
<code>doxysearch.exe</code> (The compiler should not produce any <code>doxysearch.exe</code> using Microsoft's Visual C++ compiler
serious warnings or errors). (The compiler should not produce any serious warnings or errors).
<li>To build the examples, go to the <code>examples</code> subdirectory <li>To build the examples, go to the <code>examples</code> subdirectory
and type: and type:
......
@echo off
REM make script for Microsoft Visual C++ REM make script for Microsoft Visual C++
REM ...and MINGW and Borland 5.5 also!
if "%1"=="bcc" SET CC=borland
if "%1"=="mingw" SET CC=mingw
if "%1"=="msvc" SET CC=msvc
if "%1"=="" goto USAGE
if "%CC%"=="msvc" SET MAKE=nmake
if not "%CC%"=="msvc" SET MAKE=make
SET MODE=release
if "%2"=="debug" SET MODE=debug
REM use perl to create the config file REM use perl to create the config file
perl wintools\make.pl perl wintools\make.pl %CC%
type makeconfig Makefile.win.in >Makefile type makeconfig > Makefile
type makeconfig qtools\Makefile.in >qtools\Makefile type Makefile.win_%MAKE%.in >>Makefile
type makeconfig src\Makefile.in >src\Makefile type makeconfig > qtools\Makefile
type makeconfig examples\Makefile.win.in >examples\Makefile type qtools\Makefile.in >>qtools\Makefile
type makeconfig doc\Makefile.win.in >doc\Makefile type makeconfig > src\Makefile
type src\Makefile.in >>src\Makefile
type makeconfig > examples\Makefile
type examples\Makefile.win.in >>examples\Makefile
type makeconfig > doc\Makefile
type doc\Makefile.win_%MAKE%.in >>doc\Makefile
REM build in release mode (replace release with debug to add debug info) REM build in release or debug mode
type qtools\qtools.pro.in | sed "s/\$extraopts/release/g" >qtools\qtools.pro type qtools\qtools.pro.in | sed "s/\$extraopts/%MODE%/g" >qtools\qtools.pro
type src\doxygen.pro.in | sed "s/\$extraopts/release/g" >src\doxygen.pro type src\doxygen.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxygen.pro
type src\doxytag.pro.in | sed "s/\$extraopts/release/g" >src\doxytag.pro type src\doxytag.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxytag.pro
type src\doxysearch.pro.in | sed "s/\$extraopts/release/g" >src\doxysearch.pro type src\doxysearch.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxysearch.pro
REM run make REM run make
nmake %MAKE%.exe
goto END
:USAGE
echo "Call with '%0 [bcc|mingw|msvc] [debug]'!"
echo " bcc: compile with Borland C++"
echo " mingw: compile with GCC for windows (see www.mingw.org)"
echo " msvc: compile with Microsoft Visual C++"
:END
Name: doxygen Name: doxygen
Version: 1.2.3-20001203 Version: 1.2.3-20001217
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -730,7 +730,22 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -730,7 +730,22 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
if (!Config::genTagFile.isEmpty()) tagFile << ">" << name() << ":"; if (!Config::genTagFile.isEmpty())
{
tagFile << " <compound kind=\"";
switch(compType)
{
case Class: tagFile << "class"; break;
case Struct: tagFile << "struct"; break;
case Union: tagFile << "union"; break;
case Interface: tagFile << "interface"; break;
case Exception: tagFile << "exception"; break;
}
tagFile << "\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl;
}
if (Config::classDiagramFlag) ol.disableAllBut(OutputGenerator::Man); if (Config::classDiagramFlag) ol.disableAllBut(OutputGenerator::Man);
...@@ -756,7 +771,23 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -756,7 +771,23 @@ void ClassDef::writeDocumentation(OutputList &ol)
ClassDef *cd=bcd->classDef; ClassDef *cd=bcd->classDef;
if (cd->isLinkable()) if (cd->isLinkable())
{ {
if (!Config::genTagFile.isEmpty()) tagFile << cd->name() << "?"; if (!Config::genTagFile.isEmpty())
{
tagFile << " <base";
if (bcd->prot==Protected)
{
tagFile << " protection=\"protected\"";
}
else if (bcd->prot==Private)
{
tagFile << " protection=\"private\"";
}
if (bcd->virt==Virtual)
{
tagFile << " virtualness=\"virtual\"";
}
tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl;
}
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers);
} }
else else
...@@ -774,8 +805,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -774,8 +805,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.newParagraph(); ol.newParagraph();
} }
if (!Config::genTagFile.isEmpty()) tagFile << " \"" << fileName << ".html\"\n";
// write subclasses // write subclasses
if ((count=inheritedBy->count())>0) if ((count=inheritedBy->count())>0)
{ {
...@@ -1156,6 +1185,11 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1156,6 +1185,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState(); ol.popGeneratorState();
ol.endTextBlock(); ol.endTextBlock();
if (!Config::genTagFile.isEmpty())
{
tagFile << " </compound>" << endl;
}
endFile(ol); endFile(ol);
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "outputlist.h" #include "outputlist.h"
#include "language.h" #include "language.h"
#include "doc.h" #include "doc.h"
#include "doxygen.h"
ClassList::ClassList() : QList<ClassDef>() ClassList::ClassList() : QList<ClassDef>()
{ {
...@@ -68,6 +69,10 @@ void ClassList::writeDeclaration(OutputList &ol) ...@@ -68,6 +69,10 @@ void ClassList::writeDeclaration(OutputList &ol)
ol.startMemberList(); ol.startMemberList();
found=TRUE; found=TRUE;
} }
if (!Config::genTagFile.isEmpty())
{
tagFile << " <class>" << convertToXML(cd->name()) << "</class>" << endl;
}
ol.startMemberItem(FALSE); ol.startMemberItem(FALSE);
switch (cd->compoundType()) switch (cd->compoundType())
{ {
......
/* This file was generated by configgen on Sun Dec 3 19:18:43 2000 /* This file was generated by configgen on Fri Dec 15 14:00:31 2000
* from config_templ.l * from config_templ.l
* *
* DO NOT EDIT! * DO NOT EDIT!
...@@ -2853,6 +2853,15 @@ void checkConfig() ...@@ -2853,6 +2853,15 @@ void checkConfig()
if (!dp.exists() || !dp.isFile()) if (!dp.exists() || !dp.isFile())
{ {
err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data()); err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data());
Config::dotPath="";
}
else
{
Config::dotPath=dp.dirPath(TRUE)+"/";
#if defined(_WIN32) // convert slashes
uint i=0,l=Config::dotPath.length();
for (i=0;i<l;i++) if (Config::dotPath.at(i)=='/') Config::dotPath.at(i)='\\';
#endif
} }
} }
else // make sure the string is empty but not null! else // make sure the string is empty but not null!
......
...@@ -76,7 +76,7 @@ class Definition ...@@ -76,7 +76,7 @@ class Definition
bool isReference() const { return !ref.isEmpty(); } bool isReference() const { return !ref.isEmpty(); }
void setReference(const char *r) { ref=r; } void setReference(const char *r) { ref=r; }
QCString getReference() { return ref; } QCString getReference() const { return ref; }
/*! returns the base file name that corresponds with the \a name of this /*! returns the base file name that corresponds with the \a name of this
* definition. This replaces a number of special characters in the * definition. This replaces a number of special characters in the
......
...@@ -997,7 +997,8 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, ...@@ -997,7 +997,8 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
QCString epsBaseName=(QCString)path+"/"+fileName; QCString epsBaseName=(QCString)path+"/"+fileName;
QCString epsName=epsBaseName+".eps"; QCString epsName=epsBaseName+".eps";
QFile f1(epsName.data()); QFile f1;
f1.setName(epsName.data());
if (!f1.open(IO_WriteOnly)) if (!f1.open(IO_WriteOnly))
{ {
err("Could not open file %s for writing\n",convertToQCString(f1.name()).data()); err("Could not open file %s for writing\n",convertToQCString(f1.name()).data());
...@@ -1234,11 +1235,11 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, ...@@ -1234,11 +1235,11 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
f1.close(); f1.close();
if (Config::usePDFLatexFlag) if (Config::usePDFLatexFlag)
{ {
QCString epstopdfCmd(4096); QCString epstopdfArgs(4096);
//epstopdfCmd.sprintf("epstopdf \"%s.eps\" -outfile=\"%s.pdf\"", epstopdfArgs.sprintf("\"%s.eps\" -outfile=\"%s.pdf\"",
// epsBaseName.data(),epsBaseName.data()); epsBaseName.data(),epsBaseName.data());
//printf("Converting eps using `%s'\n",epstopdfCmd.data()); //printf("Converting eps using `%s'\n",epstopdfCmd.data());
if (iSystem(epstopdfCmd)!=0) if (iSystem("epstopdf",epstopdfArgs)!=0)
{ {
err("Error: Problems running epstopdf. Check your TeX installation!\n"); err("Error: Problems running epstopdf. Check your TeX installation!\n");
return; return;
......
...@@ -995,7 +995,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -995,7 +995,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
} }
<DocIndexWord>[^\n]+ { <DocIndexWord>[^\n]+ {
//printf("Adding %s to index\n",yytext); //printf("Adding %s to index\n",yytext);
outDoc->addToIndex(yytext,0); outDoc->addIndexItem(yytext,0);
BEGIN(DocScan); BEGIN(DocScan);
} }
<DocScan>{CMD}("arg"|"li")/{BN} { <DocScan>{CMD}("arg"|"li")/{BN} {
......
...@@ -580,20 +580,18 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -580,20 +580,18 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
t << "}" << endl; t << "}" << endl;
f.close(); f.close();
QCString dotCmd(4096); QCString dotArgs(4096);
dotCmd.sprintf("%sdot -Tgif \"%s\" -o \"%s\"", dotArgs.sprintf("-Tgif \"%s\" -o \"%s\"",dotName.data(),gifName.data());
Config::dotPath.data(),dotName.data(),gifName.data());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data()); //printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (iSystem(dotCmd)!=0) if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
out << "</table>" << endl; out << "</table>" << endl;
return; return;
} }
dotCmd.sprintf("%sdot -Timap \"%s\" -o \"%s\"", dotArgs.sprintf("-Timap \"%s\" -o \"%s\"",dotName.data(),mapName.data());
Config::dotPath.data(),dotName.data(),mapName.data());
//printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data()); //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
if (iSystem(dotCmd)!=0) if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
out << "</table>" << endl; out << "</table>" << endl;
...@@ -996,11 +994,10 @@ static void findMaximalDotGraph(DotNode *root, ...@@ -996,11 +994,10 @@ static void findMaximalDotGraph(DotNode *root,
writeDotGraph(root,format,baseName,lrRank,renderParents, writeDotGraph(root,format,baseName,lrRank,renderParents,
curDistance,backArrows); curDistance,backArrows);
QCString dotCmd(4096); QCString dotArgs(4096);
// create annotated dot file // create annotated dot file
dotCmd.sprintf("%sdot -Tdot \"%s.dot\" -o \"%s_tmp.dot\"", dotArgs.sprintf("-Tdot \"%s.dot\" -o \"%s_tmp.dot\"",baseName.data(),baseName.data());
Config::dotPath.data(),baseName.data(),baseName.data()); if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
return; return;
...@@ -1103,10 +1100,10 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1103,10 +1100,10 @@ void DotClassGraph::writeGraph(QTextStream &out,
if (format==GIF) // run dot to create a .gif image if (format==GIF) // run dot to create a .gif image
{ {
QCString dotCmd(4096); QCString dotArgs(4096);
dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"", dotArgs.sprintf("-Tgif \"%s.dot\" -o \"%s.gif\"",
Config::dotPath.data(),baseName.data(),baseName.data()); baseName.data(),baseName.data());
if (iSystem(dotCmd)!=0) if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
{ {
err("Error: Problems running dot. Check your installation!\n"); err("Error: Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1115,9 +1112,8 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1115,9 +1112,8 @@ void DotClassGraph::writeGraph(QTextStream &out,
if (generateImageMap) if (generateImageMap)
{ {
// run dot again to create an image map // run dot again to create an image map
dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"", dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"",baseName.data(),baseName.data());
Config::dotPath.data(),baseName.data(),baseName.data()); if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
if (iSystem(dotCmd)!=0)
{ {
err("Error: Problems running dot. Check your installation!\n"); err("Error: Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1146,10 +1142,9 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1146,10 +1142,9 @@ void DotClassGraph::writeGraph(QTextStream &out,
} }
else if (format==EPS) // run dot to create a .eps image else if (format==EPS) // run dot to create a .eps image
{ {
QCString dotCmd(4096); QCString dotArgs(4096);
dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"", dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"",baseName.data(),baseName.data());
Config::dotPath.data(),baseName.data(),baseName.data()); if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
if (iSystem(dotCmd)!=0)
{ {
err("Error: Problems running dot. Check your installation!\n"); err("Error: Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1164,10 +1159,10 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1164,10 +1159,10 @@ void DotClassGraph::writeGraph(QTextStream &out,
} }
if (Config::usePDFLatexFlag) if (Config::usePDFLatexFlag)
{ {
QCString epstopdfCmd(4096); QCString epstopdfArgs(4096);
epstopdfCmd.sprintf("epstopdf \"%s.eps\" -outfile=\"%s.pdf\"", epstopdfArgs.sprintf("epstopdf \"%s.eps\" -outfile=\"%s.pdf\"",
baseName.data(),baseName.data()); baseName.data(),baseName.data());
if (iSystem(epstopdfCmd)!=0) if (iSystem("epstopdf",epstopdfArgs)!=0)
{ {
err("Error: Problems running epstopdf. Check your TeX installation!\n"); err("Error: Problems running epstopdf. Check your TeX installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1307,10 +1302,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1307,10 +1302,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
if (format==GIF) if (format==GIF)
{ {
// run dot to create a .gif image // run dot to create a .gif image
QCString dotCmd(4096); QCString dotArgs(4096);
dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"", dotArgs.sprintf("-Tgif \"%s.dot\" -o \"%s.gif\"",
Config::dotPath.data(),baseName.data(),baseName.data()); baseName.data(),baseName.data());
if (iSystem(dotCmd)!=0) if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1320,9 +1315,9 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1320,9 +1315,9 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
if (generateImageMap) if (generateImageMap)
{ {
// run dot again to create an image map // run dot again to create an image map
dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"", dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"",
Config::dotPath.data(),baseName.data(),baseName.data()); baseName.data(),baseName.data());
if (iSystem(dotCmd)!=0) if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1343,10 +1338,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1343,10 +1338,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
else if (format==EPS) else if (format==EPS)
{ {
// run dot to create a .eps image // run dot to create a .eps image
QCString dotCmd(4096); QCString dotArgs(4096);
dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"", dotArgs.sprintf("-Tps \"%s.dot\" -o \"%s.eps\"",
Config::dotPath.data(),baseName.data(),baseName.data()); baseName.data(),baseName.data());
if (iSystem(dotCmd)!=0) if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1361,10 +1356,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1361,10 +1356,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
} }
if (Config::usePDFLatexFlag) if (Config::usePDFLatexFlag)
{ {
QCString epstopdfCmd(4096); QCString epstopdfArgs(4096);
epstopdfCmd.sprintf("epstopdf \"%s.eps\" -outfile=\"%s.pdf\"", epstopdfArgs.sprintf("\"%s.eps\" -outfile=\"%s.pdf\"",
baseName.data(),baseName.data()); baseName.data(),baseName.data());
if (iSystem(epstopdfCmd)!=0) if (iSystem("epstopdf",epstopdfArgs)!=0)
{ {
err("Error: Problems running epstopdf. Check your TeX installation!\n"); err("Error: Problems running epstopdf. Check your TeX installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1435,10 +1430,9 @@ void generateGraphLegend(const char *path) ...@@ -1435,10 +1430,9 @@ void generateGraphLegend(const char *path)
QDir::setCurrent(d.absPath()); QDir::setCurrent(d.absPath());
// run dot to generate the a .gif image from the graph // run dot to generate the a .gif image from the graph
QCString dotCmd(4096); QCString dotArgs(4096);
dotCmd.sprintf("%sdot -Tgif graph_legend.dot -o graph_legend.gif", dotArgs.sprintf("-Tgif graph_legend.dot -o graph_legend.gif");
Config::dotPath.data()); if (iSystem(Config::dotPath+"dot",dotArgs)!=0)
if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
......
This diff is collapsed.
...@@ -20,7 +20,7 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ ...@@ -20,7 +20,7 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \ membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \ entry.h logos.h instdox.h message.h code.h \
filedef.h util.h cppvalue.h constexp.h \ filedef.h util.h cppvalue.h constexp.h \
outputgen.h outputlist.h htmlgen.h latexgen.h tag.h \ outputgen.h outputlist.h htmlgen.h latexgen.h \
filename.h defargs.h groupdef.h gifenc.h diagram.h image.h \ filename.h defargs.h groupdef.h gifenc.h diagram.h image.h \
namespacedef.h version.h language.h translator.h \ namespacedef.h version.h language.h translator.h \
translator_nl.h translator_se.h translator_cz.h translator_fr.h \ translator_nl.h translator_se.h translator_cz.h translator_fr.h \
...@@ -28,23 +28,26 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ ...@@ -28,23 +28,26 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \ translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \
reflist.h page.h sortdict.h translator_hu.h translator_kr.h \ reflist.h page.h sortdict.h translator_hu.h translator_kr.h \
translator_ro.h translator_si.h translator_cn.h ftvhelp.h \ translator_ro.h translator_si.h translator_cn.h ftvhelp.h \
treeview.h treeview.h tagreader.h
SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \ memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \ entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
config.cpp filedef.cpp util.cpp groupdef.cpp \ config.cpp filedef.cpp util.cpp groupdef.cpp \
outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \ outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \
cppvalue.cpp ce_lex.cpp ce_parse.cpp pre.cpp \ cppvalue.cpp ce_lex.cpp ce_parse.cpp pre.cpp \
tag.cpp filename.cpp declinfo.cpp defargs.cpp define.cpp \ filename.cpp declinfo.cpp defargs.cpp define.cpp \
diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \ diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \
version.cpp language.cpp definition.cpp formula.cpp debug.cpp \ version.cpp language.cpp definition.cpp formula.cpp debug.cpp \
membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \ membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \
reflist.cpp ftvhelp.cpp reflist.cpp ftvhelp.cpp tagreader.cpp
unix:LIBS += -L../qtools -lqtools unix:LIBS += -L../qtools -lqtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
win32:LIBS += qtools.lib shell32.lib win32-mingw:LIBS += -L../qtools -lqtools
win32:TMAKE_LFLAGS += /LIBPATH:..\qtools win32-msvc:LIBS += qtools.lib shell32.lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\qtools
INCLUDEPATH += ../qtools win32-borland:LIBS += qtools.lib shell32.lib
TARGET = ../bin/doxygen win32-borland:TMAKE_LFLAGS += -L..\qtools
OBJECTS_DIR = ../objects win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools
TARGET = ../bin/doxygen
OBJECTS_DIR = ../objects
...@@ -53,9 +53,6 @@ sub GenerateDep { ...@@ -53,9 +53,6 @@ sub GenerateDep {
#$ GenerateDep("pre.cpp","pre.l"); #$ GenerateDep("pre.cpp","pre.l");
$(LEX) -PpreYY -t pre.l >pre.cpp $(LEX) -PpreYY -t pre.l >pre.cpp
#$ GenerateDep("tag.cpp","tag.l");
$(LEX) -PtagYY -t tag.l >tag.cpp
#$ GenerateDep("config.cpp","config.l"); #$ GenerateDep("config.cpp","config.l");
$(LEX) -PconfigYY -t config.l >config.cpp $(LEX) -PconfigYY -t config.l >config.cpp
......
...@@ -36,6 +36,27 @@ ...@@ -36,6 +36,27 @@
#include "suffixtree.h" #include "suffixtree.h"
#include "searchindex.h" #include "searchindex.h"
#include "logos.h" #include "logos.h"
static QCString convertToXML(const char *s)
{
QCString result;
if (s==0) return result;
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
case '<': result+="&lt;"; break;
case '>': result+="&gt;"; break;
case '&': result+="&amp;"; break;
case '\'': result+="&apos;"; break;
case '"': result+="&quot;"; break;
default: result+=c; break;
}
}
return result;
}
struct MemberDef struct MemberDef
{ {
...@@ -61,21 +82,20 @@ QDict<ClassDef> fileDict(1009); ...@@ -61,21 +82,20 @@ QDict<ClassDef> fileDict(1009);
static bool genTag; static bool genTag;
static bool genIndex; static bool genIndex;
static QStrList bases; static QStrList bases;
static QCString inputString; static QCString inputString;
static int inputPosition; static int inputPosition;
static QCString yyFileName; static QCString yyFileName;
static int yyLineNr; static int yyLineNr;
static QCString classFile; static QCString classFile;
static QCString memberRef; static QCString memberRef;
static QCString memberName; static QCString memberName;
static QCString memberArgs; static QCString memberArgs;
static QCString className; static QCString className;
//static bool newClass;
static QCString docBaseLink; static QCString docBaseLink;
static QCString docAnchor; static QCString docAnchor;
static QCString docRefName; static QCString docRefName;
static bool nameBug; static bool nameBug;
static SearchIndex searchIndex; static SearchIndex searchIndex;
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
...@@ -423,7 +443,8 @@ void parse(QCString &s) ...@@ -423,7 +443,8 @@ void parse(QCString &s)
void parseFile(QFileInfo &fi) void parseFile(QFileInfo &fi)
{ {
fprintf(stderr,"Parsing file %s...\n",fi.fileName().data()); fprintf(stderr,"Parsing file %s...\n",fi.fileName().data());
QFile f(fi.absFilePath().data()); QFile f;
f.setName(fi.absFilePath());
if (f.open(IO_ReadOnly)) if (f.open(IO_ReadOnly))
{ {
yyFileName = fi.fileName(); yyFileName = fi.fileName();
...@@ -575,7 +596,8 @@ int main(int argc,char **argv) ...@@ -575,7 +596,8 @@ int main(int argc,char **argv)
fi.setFile(dir+"/search.cgi"); fi.setFile(dir+"/search.cgi");
if (!fi.exists()) if (!fi.exists())
{ {
QFile f(dir+"/search.cgi"); QFile f;
f.setName(dir+"/search.cgi");
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
...@@ -601,31 +623,40 @@ int main(int argc,char **argv) ...@@ -601,31 +623,40 @@ int main(int argc,char **argv)
} }
if (genTag) if (genTag)
{ {
QFile f(tagName); QFile f;
f.setName(tagName);
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
t << "<tagfile>" << endl;
ClassDef *cd=classList.first(); ClassDef *cd=classList.first();
while (cd) while (cd)
{ {
if (cd->isFile) t << "&"; else t << ">"; t << " <compound kind=\"";
t << cd->name << ":"; if (cd->isFile) t << "file"; else t << "class";
t << "\">" << endl;
t << " <name>" << convertToXML(cd->name) << "</name>" << endl;
char *base=cd->bases.first(); char *base=cd->bases.first();
while (base) while (base)
{ {
t << base << "?"; t << " <base>" << convertToXML(base) << "</base>" << endl;
base=cd->bases.next(); base=cd->bases.next();
} }
if (!cd->isFile) t << " \"" << cd->fileName << "\""; t << " <filename>" << convertToXML(cd->fileName) << "</filename>" << endl;
t << endl;
MemberDef *md=cd->memberList.first(); MemberDef *md=cd->memberList.first();
while (md) while (md)
{ {
t << md->name << " " << md->anchor << " \"" << md->args << "\"" << endl; t << " <member kind=\"function\">" << endl;
t << " <name>" << convertToXML(md->name) << "</name>" << endl;
t << " <anchor>" << convertToXML(md->anchor) << "</anchor>" << endl;
t << " <arglist>" << convertToXML(md->args) << "</arglist>" << endl;
t << " </member>" << endl;
md=cd->memberList.next(); md=cd->memberList.next();
} }
t << " </compound>" << endl;
cd=classList.next(); cd=classList.next();
} }
t << "</tagfile>" << endl;
} }
else else
{ {
......
...@@ -19,11 +19,14 @@ CONFIG = console warn_on $extraopts ...@@ -19,11 +19,14 @@ CONFIG = console warn_on $extraopts
HEADERS = suffixtree.h searchindex.h logos.h version.h HEADERS = suffixtree.h searchindex.h logos.h version.h
SOURCES = doxytag.cpp suffixtree.cpp searchindex.cpp \ SOURCES = doxytag.cpp suffixtree.cpp searchindex.cpp \
logos.cpp version.cpp logos.cpp version.cpp
unix:LIBS += -L../qtools -lqtools unix:LIBS += -L../qtools -lqtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
win32:LIBS += qtools.lib win32-mingw:LIBS += -L../qtools -lqtools
win32:TMAKE_LFLAGS += /LIBPATH:..\qtools win32-msvc:LIBS += qtools.lib shell32.lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\qtools
INCLUDEPATH += ../qtools win32-borland:LIBS += qtools.lib shell32.lib
OBJECTS_DIR = ../objects win32-borland:TMAKE_LFLAGS += -L..\qtools
TARGET = ../bin/doxytag win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools
OBJECTS_DIR = ../objects
TARGET = ../bin/doxytag
...@@ -39,6 +39,7 @@ Entry::Entry() ...@@ -39,6 +39,7 @@ Entry::Entry()
tArgList = 0; tArgList = 0;
mtArgList = 0; mtArgList = 0;
mGrpId = -1; mGrpId = -1;
tagInfo = 0;
reset(); reset();
} }
...@@ -75,6 +76,7 @@ Entry::Entry(const Entry &e) ...@@ -75,6 +76,7 @@ Entry::Entry(const Entry &e)
initLines = e.initLines; initLines = e.initLines;
todoId = e.todoId; todoId = e.todoId;
testId = e.testId; testId = e.testId;
tagInfo = e.tagInfo;
sublist = new QList<Entry>; sublist = new QList<Entry>;
sublist->setAutoDelete(TRUE); sublist->setAutoDelete(TRUE);
extends = new QList<BaseInfo>; extends = new QList<BaseInfo>;
...@@ -157,6 +159,7 @@ Entry::Entry(const Entry &e) ...@@ -157,6 +159,7 @@ Entry::Entry(const Entry &e)
//printf("appending argument %s %s\n",a->type.data(),a->name.data()); //printf("appending argument %s %s\n",a->type.data(),a->name.data());
} }
} }
} }
Entry::~Entry() Entry::~Entry()
...@@ -170,6 +173,7 @@ Entry::~Entry() ...@@ -170,6 +173,7 @@ Entry::~Entry()
delete argList; delete argList;
delete tArgList; delete tArgList;
delete mtArgList; delete mtArgList;
delete tagInfo;
num--; num--;
} }
...@@ -233,6 +237,7 @@ void Entry::reset() ...@@ -233,6 +237,7 @@ void Entry::reset()
groups->clear(); groups->clear();
anchors->clear(); anchors->clear();
argList->clear(); argList->clear();
if (tagInfo) { delete tagInfo; tagInfo=0; }
if (tArgList) { delete tArgList; tArgList=0; } if (tArgList) { delete tArgList; tArgList=0; }
if (mtArgList) { delete mtArgList; mtArgList=0; } if (mtArgList) { delete mtArgList; mtArgList=0; }
} }
......
...@@ -93,6 +93,13 @@ class ArgumentList : public QList<Argument> ...@@ -93,6 +93,13 @@ class ArgumentList : public QList<Argument>
typedef QListIterator<Argument> ArgumentListIterator; typedef QListIterator<Argument> ArgumentListIterator;
struct TagInfo
{
QCString tagName;
QCString fileName;
QCString anchor;
};
/*! Raw entry. parseMain() in scanner.l will generate a tree of these /*! Raw entry. parseMain() in scanner.l will generate a tree of these
* entries. * entries.
*/ */
...@@ -200,6 +207,7 @@ class Entry ...@@ -200,6 +207,7 @@ class Entry
int startLine; // start line of entry in the source int startLine; // start line of entry in the source
int todoId; // id of the todo item of this entry int todoId; // id of the todo item of this entry
int testId; // id of the test item of this entry int testId; // id of the test item of this entry
TagInfo *tagInfo; // tag file info
static int num; // counts the total number of entries static int num; // counts the total number of entries
private: private:
Entry &operator=(const Entry &); Entry &operator=(const Entry &);
......
...@@ -119,10 +119,16 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -119,10 +119,16 @@ void FileDef::writeDocumentation(OutputList &ol)
startFile(ol,diskname,pageTitle); startFile(ol,diskname,pageTitle);
startTitle(ol,getOutputFileBase()); startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trFileReference(docname)); parseText(ol,theTranslator->trFileReference(docname));
endTitle(ol,getOutputFileBase(),getOutputFileBase()); endTitle(ol,getOutputFileBase(),docName());
//ol.newParagraph(); //ol.newParagraph();
if (!Config::genTagFile.isEmpty()) tagFile << "&" << name() << ":\n"; if (!Config::genTagFile.isEmpty())
{
tagFile << " <compound kind=\"file\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(diskname) << ".html</filename>" << endl;
}
ol.startTextBlock(); ol.startTextBlock();
//brief=brief.stripWhiteSpace(); //brief=brief.stripWhiteSpace();
...@@ -272,7 +278,11 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -272,7 +278,11 @@ void FileDef::writeDocumentation(OutputList &ol)
nd->getOutputFileBase(), nd->getOutputFileBase(),
0, 0,
nd->name() nd->name()
); );
if (!Config::genTagFile.isEmpty())
{
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
} }
else else
{ {
...@@ -422,6 +432,12 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -422,6 +432,12 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName));
ol.enableAll(); ol.enableAll();
if (!Config::genTagFile.isEmpty())
{
tagFile << " </compound>" << endl;
}
endFile(ol); endFile(ol);
} }
...@@ -497,6 +513,7 @@ void FileDef::addMembersToMemberGroup() ...@@ -497,6 +513,7 @@ void FileDef::addMembersToMemberGroup()
/*! Adds member definition \a md to the list of all members of this file */ /*! Adds member definition \a md to the list of all members of this file */
void FileDef::insertMember(MemberDef *md) void FileDef::insertMember(MemberDef *md)
{ {
//printf("%s:FileDef::insertMember(%s)\n",name().data(),md->name().data());
allMemberList.append(md); allMemberList.append(md);
switch(md->memberType()) switch(md->memberType())
{ {
...@@ -524,11 +541,7 @@ void FileDef::insertMember(MemberDef *md) ...@@ -524,11 +541,7 @@ void FileDef::insertMember(MemberDef *md)
else else
enumMembers.append(md); enumMembers.append(md);
break; break;
case MemberDef::EnumValue: case MemberDef::EnumValue: // enum values are shown inside their enums
//if (Config::sortMembersFlag)
// enumValMembers.inSort(md);
//else
// enumValMembers.append(md);
break; break;
case MemberDef::Prototype: case MemberDef::Prototype:
if (Config::sortMembersFlag) if (Config::sortMembersFlag)
...@@ -692,3 +705,12 @@ void FileDef::generateXML(QTextStream &t) ...@@ -692,3 +705,12 @@ void FileDef::generateXML(QTextStream &t)
t << " </compounddef>" << endl; t << " </compounddef>" << endl;
} }
bool FileDef::generateSourceFile() const
{
return !isReference() &&
(Config::sourceBrowseFlag ||
(Config::verbatimHeaderFlag && guessSection(name())==Entry::HEADER_SEC)
) &&
name().right(4)!=".doc" && name().right(4)!=".txt";
}
...@@ -121,12 +121,7 @@ class FileDef : public Definition ...@@ -121,12 +121,7 @@ class FileDef : public Definition
void addUsingDeclaration(ClassDef *cd); void addUsingDeclaration(ClassDef *cd);
ClassList *getUsedClasses() const { return usingDeclList; } ClassList *getUsedClasses() const { return usingDeclList; }
//void setGenerateSource(bool b) { isSource=b; } bool generateSourceFile() const;
bool generateSourceFile() const
{ return !isReference() &&
(Config::sourceBrowseFlag || Config::verbatimHeaderFlag) &&
name().right(4)!=".doc" && name().right(4)!=".txt";
}
void addIncludeDependency(FileDef *fd,const char *incName,bool local); void addIncludeDependency(FileDef *fd,const char *incName,bool local);
void addIncludedByDependency(FileDef *fd,const char *incName,bool local); void addIncludedByDependency(FileDef *fd,const char *incName,bool local);
......
...@@ -103,7 +103,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -103,7 +103,7 @@ void FormulaList::generateBitmaps(const char *path)
{ {
//printf("Running latex...\n"); //printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null"); //system("latex _formulas.tex </dev/null >/dev/null");
if (iSystem("latex _formulas.tex")!=0) if (iSystem("latex","_formulas.tex")!=0)
{ {
err("Problems running latex. Check your installation or look for typos in _formulas.tex!\n"); err("Problems running latex. Check your installation or look for typos in _formulas.tex!\n");
formulaError=TRUE; formulaError=TRUE;
...@@ -117,14 +117,14 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -117,14 +117,14 @@ void FormulaList::generateBitmaps(const char *path)
{ {
int pageNum=*pagePtr; int pageNum=*pagePtr;
msg("Generating image form-%d.gif for formula\n",pageNum); msg("Generating image form-%d.gif for formula\n",pageNum);
char dviCmd[256]; char dviArgs[4096];
QCString formBase; QCString formBase;
formBase.sprintf("_form%d",pageNum); formBase.sprintf("_form%d",pageNum);
// run dvips to convert the page with number pageIndex to an // run dvips to convert the page with number pageIndex to an
// encapsulated postscript. // encapsulated postscript.
sprintf(dviCmd,"dvips -q -D 600 -E -n 1 -p %d -o %s.eps _formulas.dvi", sprintf(dviArgs,"-q -D 600 -E -n 1 -p %d -o %s.eps _formulas.dvi",
pageIndex,formBase.data()); pageIndex,formBase.data());
if (iSystem(dviCmd)!=0) if (iSystem("dvips",dviArgs)!=0)
{ {
err("Problems running dvips. Check your installation!\n"); err("Problems running dvips. Check your installation!\n");
return; return;
...@@ -208,13 +208,13 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -208,13 +208,13 @@ void FormulaList::generateBitmaps(const char *path)
WaitForSingleObject(sInfo.hProcess,INFINITE); WaitForSingleObject(sInfo.hProcess,INFINITE);
} }
#else #else
char gsCmd[256]; char gsArgs[4096];
sprintf(gsCmd,"gs -q -g%dx%d -r%dx%dx -sDEVICE=ppmraw " sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
"-sOutputFile=%s.pnm -DNOPAUSE -- %s.ps", "-sOutputFile=%s.pnm -DNOPAUSE -- %s.ps",
gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72), gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
formBase.data(),formBase.data() formBase.data(),formBase.data()
); );
if (iSystem(gsCmd)!=0) if (iSystem("gs",gsArgs)!=0)
{ {
err("Problem running ghostscript. Check your installation!\n"); err("Problem running ghostscript. Check your installation!\n");
return; return;
......
...@@ -37,7 +37,7 @@ unsigned char ftv2blank_gif[] = { ...@@ -37,7 +37,7 @@ unsigned char ftv2blank_gif[] = {
0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x64, 0x69, 0x9e, 0x68, 0xaa, 0x3e, 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x64, 0x69, 0x9e, 0x68, 0xaa, 0x3e,
0x11, 0x00, 0x3b 0x11, 0x00, 0x3b
}; };
unsigned int ftv2blank_gif_len = 135; const unsigned int ftv2blank_gif_len = 135;
unsigned char ftv2doc_gif[] = { unsigned char ftv2doc_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00,
...@@ -53,7 +53,7 @@ unsigned char ftv2doc_gif[] = { ...@@ -53,7 +53,7 @@ unsigned char ftv2doc_gif[] = {
0x85, 0xfc, 0x42, 0x5c, 0xdb, 0x32, 0x86, 0xf5, 0x0d, 0xce, 0xe8, 0x74, 0x85, 0xfc, 0x42, 0x5c, 0xdb, 0x32, 0x86, 0xf5, 0x0d, 0xce, 0xe8, 0x74,
0xf7, 0x41, 0x6b, 0xbb, 0x39, 0xf0, 0xb8, 0xdc, 0x92, 0x00, 0x00, 0x3b 0xf7, 0x41, 0x6b, 0xbb, 0x39, 0xf0, 0xb8, 0xdc, 0x92, 0x00, 0x00, 0x3b
}; };
unsigned int ftv2doc_gif_len = 144; const unsigned int ftv2doc_gif_len = 144;
unsigned char ftv2folderclosed_gif[] = { unsigned char ftv2folderclosed_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00,
...@@ -69,7 +69,7 @@ unsigned char ftv2folderclosed_gif[] = { ...@@ -69,7 +69,7 @@ unsigned char ftv2folderclosed_gif[] = {
0xd5, 0x5a, 0x4e, 0x43, 0x2f, 0x08, 0x43, 0x05, 0x99, 0xcf, 0xe8, 0x49, 0xd5, 0x5a, 0x4e, 0x43, 0x2f, 0x08, 0x43, 0x05, 0x99, 0xcf, 0xe8, 0x49,
0x02, 0x00, 0x3b 0x02, 0x00, 0x3b
}; };
unsigned int ftv2folderclosed_gif_len = 135; const unsigned int ftv2folderclosed_gif_len = 135;
unsigned char ftv2folderopen_gif[] = { unsigned char ftv2folderopen_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00,
...@@ -86,7 +86,7 @@ unsigned char ftv2folderopen_gif[] = { ...@@ -86,7 +86,7 @@ unsigned char ftv2folderopen_gif[] = {
0x95, 0x88, 0x36, 0x42, 0x27, 0x5f, 0x80, 0x7c, 0x2e, 0xef, 0x46, 0x6b, 0x95, 0x88, 0x36, 0x42, 0x27, 0x5f, 0x80, 0x7c, 0x2e, 0xef, 0x46, 0x6b,
0xf8, 0xbc, 0xbd, 0xc3, 0xef, 0xfb, 0x1b, 0x09, 0x00, 0x3b 0xf8, 0xbc, 0xbd, 0xc3, 0xef, 0xfb, 0x1b, 0x09, 0x00, 0x3b
}; };
unsigned int ftv2folderopen_gif_len = 154; const unsigned int ftv2folderopen_gif_len = 154;
unsigned char ftv2lastnode_gif[] = { unsigned char ftv2lastnode_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -102,7 +102,7 @@ unsigned char ftv2lastnode_gif[] = { ...@@ -102,7 +102,7 @@ unsigned char ftv2lastnode_gif[] = {
0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92, 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92,
0x4f, 0xe9, 0xb6, 0x63, 0x2c, 0xcf, 0x5e, 0x04, 0x00, 0x3b 0x4f, 0xe9, 0xb6, 0x63, 0x2c, 0xcf, 0x5e, 0x04, 0x00, 0x3b
}; };
unsigned int ftv2lastnode_gif_len = 142; const unsigned int ftv2lastnode_gif_len = 142;
unsigned char ftv2link_gif[] = { unsigned char ftv2link_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -126,7 +126,7 @@ unsigned char ftv2link_gif[] = { ...@@ -126,7 +126,7 @@ unsigned char ftv2link_gif[] = {
0x07, 0x8e, 0x8e, 0x89, 0x70, 0x38, 0x93, 0x94, 0x91, 0x22, 0x97, 0x98, 0x07, 0x8e, 0x8e, 0x89, 0x70, 0x38, 0x93, 0x94, 0x91, 0x22, 0x97, 0x98,
0x99, 0x9a, 0x0f, 0x11, 0x00, 0x3b 0x99, 0x9a, 0x0f, 0x11, 0x00, 0x3b
}; };
unsigned int ftv2link_gif_len = 234; const unsigned int ftv2link_gif_len = 234;
unsigned char ftv2mlastnode_gif[] = { unsigned char ftv2mlastnode_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -141,7 +141,7 @@ unsigned char ftv2mlastnode_gif[] = { ...@@ -141,7 +141,7 @@ unsigned char ftv2mlastnode_gif[] = {
0xd9, 0xf5, 0x7a, 0xeb, 0x35, 0x49, 0x82, 0xc0, 0xa0, 0x70, 0x48, 0x2c, 0xd9, 0xf5, 0x7a, 0xeb, 0x35, 0x49, 0x82, 0xc0, 0xa0, 0x70, 0x48, 0x2c,
0x1a, 0x35, 0x11, 0x00, 0x3b 0x1a, 0x35, 0x11, 0x00, 0x3b
}; };
unsigned int ftv2mlastnode_gif_len = 125; const unsigned int ftv2mlastnode_gif_len = 125;
unsigned char ftv2mnode_gif[] = { unsigned char ftv2mnode_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -156,7 +156,7 @@ unsigned char ftv2mnode_gif[] = { ...@@ -156,7 +156,7 @@ unsigned char ftv2mnode_gif[] = {
0xd9, 0xf5, 0x7a, 0xeb, 0x35, 0x49, 0x82, 0x40, 0x4c, 0x70, 0x28, 0x24, 0xd9, 0xf5, 0x7a, 0xeb, 0x35, 0x49, 0x82, 0x40, 0x4c, 0x70, 0x28, 0x24,
0x06, 0x71, 0xc6, 0x0d, 0x52, 0x12, 0x01, 0x00, 0x3b 0x06, 0x71, 0xc6, 0x0d, 0x52, 0x12, 0x01, 0x00, 0x3b
}; };
unsigned int ftv2mnode_gif_len = 129; const unsigned int ftv2mnode_gif_len = 129;
unsigned char ftv2node_gif[] = { unsigned char ftv2node_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -173,7 +173,7 @@ unsigned char ftv2node_gif[] = { ...@@ -173,7 +173,7 @@ unsigned char ftv2node_gif[] = {
0x4f, 0xe9, 0xb6, 0xd7, 0xba, 0xc9, 0x1a, 0x9d, 0xd9, 0x18, 0x1e, 0x63, 0x4f, 0xe9, 0xb6, 0xd7, 0xba, 0xc9, 0x1a, 0x9d, 0xd9, 0x18, 0x1e, 0x63,
0x11, 0x00, 0x3b 0x11, 0x00, 0x3b
}; };
unsigned int ftv2node_gif_len = 147; const unsigned int ftv2node_gif_len = 147;
unsigned char ftv2plastnode_gif[] = { unsigned char ftv2plastnode_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -188,7 +188,7 @@ unsigned char ftv2plastnode_gif[] = { ...@@ -188,7 +188,7 @@ unsigned char ftv2plastnode_gif[] = {
0xdd, 0xec, 0x04, 0xdb, 0xa7, 0x9a, 0xa3, 0x3d, 0x17, 0x89, 0x04, 0x2a, 0xdd, 0xec, 0x04, 0xdb, 0xa7, 0x9a, 0xa3, 0x3d, 0x17, 0x89, 0x04, 0x2a,
0x1a, 0x8f, 0xc8, 0xa4, 0x72, 0xa9, 0x89, 0x00, 0x00, 0x3b 0x1a, 0x8f, 0xc8, 0xa4, 0x72, 0xa9, 0x89, 0x00, 0x00, 0x3b
}; };
unsigned int ftv2plastnode_gif_len = 130; const unsigned int ftv2plastnode_gif_len = 130;
unsigned char ftv2pnode_gif[] = { unsigned char ftv2pnode_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -204,7 +204,7 @@ unsigned char ftv2pnode_gif[] = { ...@@ -204,7 +204,7 @@ unsigned char ftv2pnode_gif[] = {
0xc6, 0x8c, 0x48, 0x5e, 0xd2, 0xd8, 0x5a, 0x72, 0x9a, 0x93, 0x08, 0x00, 0xc6, 0x8c, 0x48, 0x5e, 0xd2, 0xd8, 0x5a, 0x72, 0x9a, 0x93, 0x08, 0x00,
0x3b 0x3b
}; };
unsigned int ftv2pnode_gif_len = 133; const unsigned int ftv2pnode_gif_len = 133;
unsigned char ftv2vertline_gif[] = { unsigned char ftv2vertline_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00,
...@@ -220,7 +220,7 @@ unsigned char ftv2vertline_gif[] = { ...@@ -220,7 +220,7 @@ unsigned char ftv2vertline_gif[] = {
0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92, 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92,
0x66, 0x8b, 0xba, 0x2a, 0x5c, 0x45, 0x00, 0x3b 0x66, 0x8b, 0xba, 0x2a, 0x5c, 0x45, 0x00, 0x3b
}; };
unsigned int ftv2vertline_gif_len = 140; const unsigned int ftv2vertline_gif_len = 140;
struct ImageInfo struct ImageInfo
{ {
...@@ -272,7 +272,16 @@ static void generateFolderTreeViewData() ...@@ -272,7 +272,16 @@ static void generateFolderTreeViewData()
else else
{ {
QTextStream t(&f); QTextStream t(&f);
t << "<html><head><title>" << Config::projectName << "</title></head>" << endl; t << "<html><head><title>";
if (Config::projectName.isEmpty())
{
t << "Doxygen Documentation";
}
else
{
t << Config::projectName;
}
t << "</title></head>" << endl;
t << "<frameset cols=\"" << Config::treeViewWidth << ",*\">" << endl; t << "<frameset cols=\"" << Config::treeViewWidth << ",*\">" << endl;
t << " <frame src=\"tree.html\" name=\"treefrm\">" << endl; t << " <frame src=\"tree.html\" name=\"treefrm\">" << endl;
t << " <frame src=\"main.html\" name=\"basefrm\">" << endl; t << " <frame src=\"main.html\" name=\"basefrm\">" << endl;
...@@ -361,7 +370,7 @@ void FTVHelp::initialize() ...@@ -361,7 +370,7 @@ void FTVHelp::initialize()
} }
/* Write the header of the contents file */ /* Write the header of the contents file */
m_cts.setDevice(m_cf); m_cts.setDevice(m_cf);
m_cts << "foldersTree = gFld(\"\", \"<b>"; m_cts << "foldersTree = gFld(\"<b>";
if (Config::projectName.isEmpty()) if (Config::projectName.isEmpty())
{ {
m_cts << "Root"; m_cts << "Root";
...@@ -370,7 +379,7 @@ void FTVHelp::initialize() ...@@ -370,7 +379,7 @@ void FTVHelp::initialize()
{ {
m_cts << Config::projectName; m_cts << Config::projectName;
} }
m_cts << "</b>\", \"\")\n"; m_cts << "</b>\", \"\", \"\")\n";
} }
/*! Finalizes the FTV help. This will finish and close the /*! Finalizes the FTV help. This will finish and close the
......
...@@ -249,7 +249,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -249,7 +249,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
startFile(ol,fileName,title); startFile(ol,fileName,title);
startTitle(ol,getOutputFileBase()); startTitle(ol,getOutputFileBase());
ol.docify(title); ol.docify(title);
endTitle(ol,getOutputFileBase(),name()); endTitle(ol,getOutputFileBase(),title);
//brief=brief.stripWhiteSpace(); //brief=brief.stripWhiteSpace();
//int bl=brief.length(); //int bl=brief.length();
...@@ -269,6 +269,13 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -269,6 +269,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState(); ol.popGeneratorState();
} }
if (!Config::genTagFile.isEmpty())
{
tagFile << " <compound kind=\"group\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <title>" << convertToXML(title) << "</title>" << endl;
tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl;
}
ol.startMemberSections(); ol.startMemberSections();
if (fileList->count()>0) if (fileList->count()>0)
...@@ -284,6 +291,10 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -284,6 +291,10 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.docify("file "); ol.docify("file ");
ol.insertMemberAlign(); ol.insertMemberAlign();
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
if (!Config::genTagFile.isEmpty())
{
tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!fd->briefDescription().isEmpty() && Config::briefMemDescFlag) if (!fd->briefDescription().isEmpty() && Config::briefMemDescFlag)
{ {
...@@ -309,6 +320,10 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -309,6 +320,10 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.docify("namespace "); ol.docify("namespace ");
ol.insertMemberAlign(); ol.insertMemberAlign();
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,nd->name()); ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,nd->name());
if (!Config::genTagFile.isEmpty())
{
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!nd->briefDescription().isEmpty() && Config::briefMemDescFlag) if (!nd->briefDescription().isEmpty() && Config::briefMemDescFlag)
{ {
...@@ -333,6 +348,10 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -333,6 +348,10 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startMemberItem(0); ol.startMemberItem(0);
//ol.insertMemberAlign(); //ol.insertMemberAlign();
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle()); ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
if (!Config::genTagFile.isEmpty())
{
tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
}
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!gd->briefDescription().isEmpty() && Config::briefMemDescFlag) if (!gd->briefDescription().isEmpty() && Config::briefMemDescFlag)
{ {
...@@ -396,23 +415,27 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -396,23 +415,27 @@ void GroupDef::writeDocumentation(OutputList &ol)
PageSDictIterator pdi(*pageDict); PageSDictIterator pdi(*pageDict);
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
QCString pageName; if (!pi->isReference())
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
SectionInfo *si=0;
if (!pi->title.isEmpty() && !pi->name.isEmpty() &&
(si=sectionDict[pi->name])!=0)
{ {
ol.startSection(si->label,si->title,TRUE); QCString pageName = pi->getOutputFileBase();
ol.docify(si->title);
ol.endSection(si->label,TRUE); if (!Config::genTagFile.isEmpty())
{
tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl;
}
SectionInfo *si=0;
if (!pi->title.isEmpty() && !pi->name.isEmpty() &&
(si=sectionDict[pi->name])!=0)
{
ol.startSection(si->label,si->title,TRUE);
ol.docify(si->title);
ol.endSection(si->label,TRUE);
}
ol.startTextBlock();
parseDoc(ol,pi->defFileName,pi->defLine,0,0,pi->doc);
ol.endTextBlock();
} }
ol.startTextBlock();
parseDoc(ol,pi->defFileName,pi->defLine,0,0,pi->doc);
ol.endTextBlock();
} }
defineMembers.countDocMembers(TRUE); defineMembers.countDocMembers(TRUE);
...@@ -475,6 +498,11 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -475,6 +498,11 @@ void GroupDef::writeDocumentation(OutputList &ol)
varMembers.writeDocumentation(ol,name(),this); varMembers.writeDocumentation(ol,name(),this);
} }
if (!Config::genTagFile.isEmpty())
{
tagFile << " </compound>" << endl;
}
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
} }
......
...@@ -304,6 +304,7 @@ void HtmlGenerator::writeString(const char *text) ...@@ -304,6 +304,7 @@ void HtmlGenerator::writeString(const char *text)
void HtmlGenerator::writeIndexItem(const char *ref,const char *f, void HtmlGenerator::writeIndexItem(const char *ref,const char *f,
const char *name) const char *name)
{ {
//printf("HtmlGenerator::writeIndexItem(%s,%s,%s)\n",ref,f,name);
QCString *dest; QCString *dest;
t << "<li>"; t << "<li>";
if (ref || f) if (ref || f)
......
...@@ -188,7 +188,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -188,7 +188,7 @@ class HtmlGenerator : public OutputGenerator
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *) {} void addIndexItem(const char *,const char *) {}
void startIndent(); void startIndent();
void endIndent(); void endIndent();
void writeSynopsis() {} void writeSynopsis() {}
......
...@@ -704,7 +704,7 @@ int countNamespaces() ...@@ -704,7 +704,7 @@ int countNamespaces()
NamespaceDef *nd; NamespaceDef *nd;
for (;(nd=nli.current());++nli) for (;(nd=nli.current());++nli)
{ {
if (nd->isLinkableInProject()) count++; if (nd->isLinkableInProject() && nd->countMembers()>0) count++;
} }
return count; return count;
} }
...@@ -726,7 +726,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -726,7 +726,7 @@ void writeNamespaceIndex(OutputList &ol)
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0; FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -1677,8 +1677,11 @@ int countGroups() ...@@ -1677,8 +1677,11 @@ int countGroups()
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
gd->visited=FALSE; if (!gd->isReference())
count++; {
gd->visited=FALSE;
count++;
}
} }
return count; return count;
} }
...@@ -1751,7 +1754,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd) ...@@ -1751,7 +1754,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
//parseText(ol,gd->groupTitle()); //parseText(ol,gd->groupTitle());
//ol.endTextLink(); //ol.endTextLink();
ol.writeIndexItem(0,gd->getOutputFileBase(),gd->groupTitle()); ol.writeIndexItem(gd->getReference(),gd->getOutputFileBase(),gd->groupTitle());
if (gd->isReference())
{
ol.startTypewriter();
ol.docify(" [external]");
ol.endTypewriter();
}
//ol.writeStartAnnoItem(0,gd->getOutputFileBase(),0,gd-); //ol.writeStartAnnoItem(0,gd->getOutputFileBase(),0,gd-);
//parseText(ol,gd->groupTitle()); //parseText(ol,gd->groupTitle());
...@@ -1962,20 +1971,14 @@ void writeGroupIndex(OutputList &ol) ...@@ -1962,20 +1971,14 @@ void writeGroupIndex(OutputList &ol)
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
//if(!Config::htmlHelpGroupsOnly) htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"modules");
//{ htmlHelp->incContentsDepth();
htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"modules");
htmlHelp->incContentsDepth();
//}
} }
if (hasFtvHelp) if (hasFtvHelp)
{ {
ftvHelp = FTVHelp::getInstance(); ftvHelp = FTVHelp::getInstance();
//if(!Config::htmlHelpGroupsOnly) ftvHelp->addContentsItem(TRUE,0,"modules",0,ftvHelpTitle);
//{ ftvHelp->incContentsDepth();
ftvHelp->addContentsItem(TRUE,0,"modules",0,htmlHelpTitle);
ftvHelp->incContentsDepth();
//}
} }
parseText(ol,theTranslator->trModulesDescription()); parseText(ol,theTranslator->trModulesDescription());
ol.endTextBlock(); ol.endTextBlock();
......
...@@ -494,9 +494,12 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -494,9 +494,12 @@ void LatexGenerator::startIndexSection(IndexSections is)
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (!gd->isReference())
t << "{"; //Module Documentation}\n"; {
found=TRUE; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Documentation}\n";
found=TRUE;
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -507,7 +510,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -507,7 +510,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
bool found=FALSE; bool found=FALSE;
while (nd && !found) while (nd && !found)
{ {
if (nd->isLinkableInProject()) if (nd->isLinkableInProject() && nd->countMembers()>0)
{ {
if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; // Namespace Documentation}\n": t << "{"; // Namespace Documentation}\n":
...@@ -616,14 +619,20 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -616,14 +619,20 @@ void LatexGenerator::endIndexSection(IndexSections is)
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n"; if (!gd->isReference())
found=TRUE; {
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE;
}
gd=groupList.next(); gd=groupList.next();
} }
while (gd) while (gd)
{ {
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; if (!gd->isReference())
t << "{" << gd->getOutputFileBase() << "}\n"; {
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->getOutputFileBase() << "}\n";
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -1050,7 +1059,7 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name) ...@@ -1050,7 +1059,7 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name)
// writeDoxyAnchor(0,clName,anchor,0); // writeDoxyAnchor(0,clName,anchor,0);
//} //}
void LatexGenerator::addToIndex(const char *s1,const char *s2) void LatexGenerator::addIndexItem(const char *s1,const char *s2)
{ {
if (s1) if (s1)
{ {
...@@ -1067,6 +1076,7 @@ void LatexGenerator::addToIndex(const char *s1,const char *s2) ...@@ -1067,6 +1076,7 @@ void LatexGenerator::addToIndex(const char *s1,const char *s2)
} }
} }
void LatexGenerator::startSection(const char *lab,const char *,bool sub) void LatexGenerator::startSection(const char *lab,const char *,bool sub)
{ {
if (Config::pdfHyperFlag) if (Config::pdfHyperFlag)
...@@ -1092,13 +1102,16 @@ void LatexGenerator::writeSectionRef(const char *,const char *lab, ...@@ -1092,13 +1102,16 @@ void LatexGenerator::writeSectionRef(const char *,const char *lab,
t << "}{"; t << "}{";
docify(text); docify(text);
t << "}"; t << "}";
//t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
} }
else else
{ {
if (strcmp(lab,text)!=0) // lab!=text if (strcmp(lab,text)!=0) // lab!=text
{ {
// todo: don't hardcode p. here! // todo: don't hardcode p. here!
t << "{\\bf " << text << "} {\\rm (p.\\,\\pageref{" << lab << "})}"; t << "{\\bf ";
docify(text);
t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
} }
else else
{ {
......
...@@ -185,7 +185,7 @@ class LatexGenerator : public OutputGenerator ...@@ -185,7 +185,7 @@ class LatexGenerator : public OutputGenerator
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent() {} void startIndent() {}
void endIndent() {} void endIndent() {}
void writeSynopsis() {} void writeSynopsis() {}
......
...@@ -175,7 +175,7 @@ class ManGenerator : public OutputGenerator ...@@ -175,7 +175,7 @@ class ManGenerator : public OutputGenerator
void writeSectionRef(const char *,const char *,const char *) {} void writeSectionRef(const char *,const char *,const char *) {}
void writeSectionRefItem(const char *,const char *,const char *) {} void writeSectionRefItem(const char *,const char *,const char *) {}
void writeSectionRefAnchor(const char *,const char *,const char *) {} void writeSectionRefAnchor(const char *,const char *,const char *) {}
void addToIndex(const char *,const char *) {} void addIndexItem(const char *,const char *) {}
void startIndent() {} void startIndent() {}
void endIndent() {} void endIndent() {}
void writeSynopsis(); void writeSynopsis();
......
...@@ -258,6 +258,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -258,6 +258,7 @@ MemberDef::MemberDef(const char *df,int dl,
initLines=0; initLines=0;
type=t; type=t;
args=a; args=a;
args=args.stripWhiteSpace();
if (type.isEmpty()) decl=name()+args; else decl=type+" "+name()+args; if (type.isEmpty()) decl=name()+args; else decl=type+" "+name()+args;
declLine=0; declLine=0;
memberGroup=0; memberGroup=0;
...@@ -277,6 +278,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -277,6 +278,7 @@ MemberDef::MemberDef(const char *df,int dl,
annEnumType=0; annEnumType=0;
indDepth=0; indDepth=0;
section=0; section=0;
explExt=FALSE;
maxInitLines=defMaxInitLines; maxInitLines=defMaxInitLines;
docEnumValues=FALSE; docEnumValues=FALSE;
// copy function template arguments (if any) // copy function template arguments (if any)
...@@ -507,8 +509,43 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -507,8 +509,43 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << name() << " " << anchor() << " \"" tagFile << " <member kind=\"";
<< argsString() << "\"\n"; switch (mtype)
{
case Define: tagFile << "define"; break;
case EnumValue: tagFile << "enumvalue"; break;
case Property: tagFile << "property"; break;
case Variable: tagFile << "variable"; break;
case Typedef: tagFile << "typedef"; break;
case Enumeration: tagFile << "enumeration"; break;
case Function: tagFile << "function"; break;
case Signal: tagFile << "signal"; break;
case Prototype: tagFile << "prototype"; break;
case Friend: tagFile << "friend"; break;
case DCOP: tagFile << "dcop"; break;
case Slot: tagFile << "slot"; break;
}
if (prot!=Public)
{
tagFile << "\" protection=\"";
if (prot==Protected) tagFile << "public";
else /* Private */ tagFile << "protected";
}
if (virt!=Normal)
{
tagFile << "\" virtualness=\"";
if (virt==Virtual) tagFile << "virtual";
else /* Pure */ tagFile << "pure";
}
if (isStatic())
{
tagFile << "\" static=\"yes";
}
tagFile << "\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
tagFile << " </member>" << endl;
} }
Definition *d=0; Definition *d=0;
...@@ -593,8 +630,10 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -593,8 +630,10 @@ 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,anchor(),doxyName); ol.startDoxyAnchor(cfname,anchor(),doxyName);
ol.addToIndex(name(),cname);
ol.addToIndex(cname,name()); ol.addIndexItem(name(),cname);
ol.addIndexItem(cname,name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,anchor());
...@@ -1115,8 +1154,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1115,8 +1154,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//ol.startItemList(); //ol.startItemList();
ol.startDescTable(); ol.startDescTable();
} }
ol.addToIndex(fmd->name(),cname);
ol.addToIndex(cname,fmd->name()); ol.addIndexItem(fmd->name(),cname);
ol.addIndexItem(cname,fmd->name());
if (Config::generateHtml && Config::htmlHelpFlag) if (Config::generateHtml && Config::htmlHelpFlag)
{ {
HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfname,fmd->anchor()); HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfname,fmd->anchor());
......
...@@ -118,6 +118,7 @@ class MemberDef : public Definition ...@@ -118,6 +118,7 @@ class MemberDef : public Definition
bool isInline() const { return (memSpec&Entry::Inline)!=0; } bool isInline() const { return (memSpec&Entry::Inline)!=0; }
bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; } bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; }
bool isMutable() const { return (memSpec&Entry::Mutable)!=0; } bool isMutable() const { return (memSpec&Entry::Mutable)!=0; }
bool isExternal() const { return explExt; }
// output info // output info
bool isLinkableInProject(); bool isLinkableInProject();
...@@ -142,6 +143,7 @@ class MemberDef : public Definition ...@@ -142,6 +143,7 @@ class MemberDef : public Definition
void setMemberClass(ClassDef *cd) { classDef=cd; } void setMemberClass(ClassDef *cd) { classDef=cd; }
void setSectionList(MemberList *sl) { section=sl; } void setSectionList(MemberList *sl) { section=sl; }
void setGroupDef(GroupDef *gd) { group=gd; } void setGroupDef(GroupDef *gd) { group=gd; }
void setExplicitExternal(bool b) { explExt=b; }
void makeRelated() { related=TRUE; } void makeRelated() { related=TRUE; }
...@@ -269,6 +271,7 @@ class MemberDef : public Definition ...@@ -269,6 +271,7 @@ class MemberDef : public Definition
MemberGroup *memberGroup; // group's member definition MemberGroup *memberGroup; // group's member definition
GroupDef *group; // group in which this member is in GroupDef *group; // group in which this member is in
bool explExt; // member was explicitly declared external
// disable copying of member defs // disable copying of member defs
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <qlist.h> #include <qlist.h>
#include <qintdict.h> #include <qintdict.h>
//#include "definition.h"
#define NOGROUP -1 #define NOGROUP -1
class MemberDef; class MemberDef;
......
...@@ -291,8 +291,13 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -291,8 +291,13 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (md->isLinkableInProject() || md->hasDocumentedEnumValues()) if (md->isLinkableInProject() || md->hasDocumentedEnumValues())
{ {
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
tagFile << md->name() << " " << md->anchor() {
<< " \"\"" << endl; tagFile << " <member>" << endl;
tagFile << " <name>" << convertToXML(md->name()) << "</name>" << endl;
tagFile << " <anchor>" << convertToXML(md->anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(md->argsString()) << "</arglist>" << endl;
tagFile << " </member>" << endl;
}
md->writeLink(typeDecl,cd,nd,fd,gd); md->writeLink(typeDecl,cd,nd,fd,gd);
} }
else else
...@@ -325,9 +330,14 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -325,9 +330,14 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (fmd->hasDocumentation()) // enum value has docs if (fmd->hasDocumentation()) // enum value has docs
{ {
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
tagFile << fmd->name() << " " << fmd->anchor() {
<< " \"" << fmd->argsString() << "\""; tagFile << " <member>" << endl;
tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
tagFile << " </member>" << endl;
}
fmd->writeLink(typeDecl,cd,nd,fd,gd); fmd->writeLink(typeDecl,cd,nd,fd,gd);
} }
else // no docs for this enum value else // no docs for this enum value
......
...@@ -198,7 +198,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -198,7 +198,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
parseText(ol,theTranslator->trNamespaceReference(name())); parseText(ol,theTranslator->trNamespaceReference(name()));
endTitle(ol,getOutputFileBase(),name()); endTitle(ol,getOutputFileBase(),name());
if (!Config::genTagFile.isEmpty()) tagFile << "%" << name() << ":\n"; if (!Config::genTagFile.isEmpty())
{
tagFile << " <compound kind=\"namespace\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl;
}
ol.startTextBlock(); ol.startTextBlock();
...@@ -346,7 +351,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -346,7 +351,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
parseText(ol,theTranslator->trAuthor()); parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName));
//ol.enableAll();
if (!Config::genTagFile.isEmpty())
{
tagFile << " </compound>" << endl;
}
ol.popGeneratorState(); ol.popGeneratorState();
endFile(ol); endFile(ol);
} }
......
...@@ -176,7 +176,7 @@ class OutputGenerator ...@@ -176,7 +176,7 @@ class OutputGenerator
virtual void writeSectionRefItem(const char *,const char *,const char *) = 0; virtual void writeSectionRefItem(const char *,const char *,const char *) = 0;
virtual void writeSectionRefAnchor(const char *,const char *,const char *) = 0; virtual void writeSectionRefAnchor(const char *,const char *,const char *) = 0;
virtual void lineBreak() = 0; virtual void lineBreak() = 0;
virtual void addToIndex(const char *s1,const char *s2) = 0; virtual void addIndexItem(const char *s1,const char *s2) = 0;
virtual void startIndent() = 0; virtual void startIndent() = 0;
virtual void endIndent() = 0; virtual void endIndent() = 0;
virtual void writeSynopsis() = 0; virtual void writeSynopsis() = 0;
......
...@@ -71,14 +71,10 @@ class OutputList ...@@ -71,14 +71,10 @@ class OutputList
{ forall(&OutputGenerator::writeStyleInfo,part); } { forall(&OutputGenerator::writeStyleInfo,part); }
void startFile(const char *name,const char *title,bool external) void startFile(const char *name,const char *title,bool external)
{ forall(&OutputGenerator::startFile,name,title,external); } { forall(&OutputGenerator::startFile,name,title,external); }
void startPlainFile(const char *name)
{ forall(&OutputGenerator::startPlainFile,name); }
void writeFooter(int fase,bool external) void writeFooter(int fase,bool external)
{ forall(&OutputGenerator::writeFooter,fase,external); } { forall(&OutputGenerator::writeFooter,fase,external); }
void endFile() void endFile()
{ forall(&OutputGenerator::endFile); } { forall(&OutputGenerator::endFile); }
void endPlainFile()
{ forall(&OutputGenerator::endPlainFile); }
void startTitleHead(const char *fileName) void startTitleHead(const char *fileName)
{ forall(&OutputGenerator::startTitleHead,fileName); } { forall(&OutputGenerator::startTitleHead,fileName); }
void endTitleHead(const char *fileName,const char *name) void endTitleHead(const char *fileName,const char *name)
...@@ -313,8 +309,8 @@ class OutputList ...@@ -313,8 +309,8 @@ class OutputList
{ forall(&OutputGenerator::writeSectionRefItem,page,lab,title); } { forall(&OutputGenerator::writeSectionRefItem,page,lab,title); }
void writeSectionRefAnchor(const char *page,const char *lab, const char *title) void writeSectionRefAnchor(const char *page,const char *lab, const char *title)
{ forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); } { forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); }
void addToIndex(const char *s1,const char *s2) void addIndexItem(const char *s1,const char *s2)
{ forall(&OutputGenerator::addToIndex,s1,s2); } { forall(&OutputGenerator::addIndexItem,s1,s2); }
void writeSynopsis() void writeSynopsis()
{ forall(&OutputGenerator::writeSynopsis); } { forall(&OutputGenerator::writeSynopsis); }
void startClassDiagram() void startClassDiagram()
...@@ -389,6 +385,32 @@ class OutputList ...@@ -389,6 +385,32 @@ class OutputList
void endFontClass() void endFontClass()
{ forall(&OutputGenerator::endFontClass); } { forall(&OutputGenerator::endFontClass); }
#if 0
void startPlainFile(const char *name)
{ forall(&OutputGenerator::startPlainFile,name); }
void endPlainFile()
{ forall(&OutputGenerator::endPlainFile); }
#else // this is to work around a bug in the SGI MipsPro compiler
void startPlainFile(const char *name)
{
OutputGenerator *og=outputs->first();
while (og)
{
if (og->isEnabled()) (og->startPlainFile)(name);
og=outputs->next();
}
}
void endPlainFile()
{
OutputGenerator *og=outputs->first();
while (og)
{
if (og->isEnabled()) (og->endPlainFile)();
og=outputs->next();
}
}
#endif
private: private:
void debug(); void debug();
void clear(); void clear();
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
#include "sortdict.h" #include "sortdict.h"
#include "config.h"
class PageInfo class PageInfo
{ {
...@@ -33,6 +34,15 @@ class PageInfo ...@@ -33,6 +34,15 @@ class PageInfo
QCString doc; QCString doc;
QCString title; QCString title;
// external reference? if so then this is the tag file name
QCString reference;
// functions to get a uniform interface with Definitions
QCString getOutputFileBase() const
{ if (Config::caseSensitiveNames) return name; else return name.lower(); }
bool isReference() const { return !reference.isEmpty(); }
QCString getReference() const { return reference; }
// ids // ids
int todoId; int todoId;
int testId; int testId;
......
...@@ -671,7 +671,7 @@ void RTFGenerator::beginRTFDocument() ...@@ -671,7 +671,7 @@ void RTFGenerator::beginRTFDocument()
} }
if (array.at(index) != 0) if (array.at(index) != 0)
{ {
QCString key(iter.currentKey()); QCString key(convertToQCString(iter.currentKey()));
msg("Style '%s' redefines \\s%d.\n", key.data(), index); msg("Style '%s' redefines \\s%d.\n", key.data(), index);
} }
array.at(index) = style; array.at(index) = style;
...@@ -810,8 +810,11 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -810,8 +810,11 @@ void RTFGenerator::startIndexSection(IndexSections is)
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
beginRTFChapter(); if (!gd->isReference())
found=TRUE; {
beginRTFChapter();
found=TRUE;
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -965,10 +968,13 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -965,10 +968,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl;
while (gd) while (gd)
{ {
t << "\\par " << Rtf_Style_Reset << endl; if (!gd->isReference())
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; {
t << gd->getOutputFileBase(); t << "\\par " << Rtf_Style_Reset << endl;
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << gd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -1519,7 +1525,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name) ...@@ -1519,7 +1525,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
t << "}" << endl; t << "}" << endl;
// make an index entry // make an index entry
addToIndex(name,0); addIndexItem(name,0);
//if (name) //if (name)
//{ //{
...@@ -1566,8 +1572,8 @@ void RTFGenerator::startMemberDoc(const char *clname, ...@@ -1566,8 +1572,8 @@ void RTFGenerator::startMemberDoc(const char *clname,
DBG_RTF(t << "{\\comment startMemberDoc}" << endl) DBG_RTF(t << "{\\comment startMemberDoc}" << endl)
if (memname && memname[0]!='@') if (memname && memname[0]!='@')
{ {
addToIndex(memname,clname); addIndexItem(memname,clname);
addToIndex(clname,memname); addIndexItem(clname,memname);
} }
t << Rtf_Style_Reset << Rtf_Style["Heading4"]->reference; t << Rtf_Style_Reset << Rtf_Style["Heading4"]->reference;
//styleStack.push(Rtf_Style_Heading4); //styleStack.push(Rtf_Style_Heading4);
...@@ -1619,7 +1625,7 @@ void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor) ...@@ -1619,7 +1625,7 @@ void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor)
// writeDoxyAnchor(0,clName,anchor,0); // writeDoxyAnchor(0,clName,anchor,0);
//} //}
void RTFGenerator::addToIndex(const char *s1,const char *s2) void RTFGenerator::addIndexItem(const char *s1,const char *s2)
{ {
if (s1) if (s1)
{ {
......
...@@ -171,7 +171,7 @@ class RTFGenerator : public OutputGenerator ...@@ -171,7 +171,7 @@ class RTFGenerator : public OutputGenerator
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent(); void startIndent();
void endIndent(); void endIndent();
void writeSynopsis() {} void writeSynopsis() {}
......
This diff is collapsed.
...@@ -23,6 +23,25 @@ ...@@ -23,6 +23,25 @@
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
template<class T> class SDict;
/*! internal wrapper class that redirects compareItems() to the
* dictionary
*/
template<class T>
class SList : public QList<T>
{
public:
SList(SDict<T> *owner) : m_owner(owner) {}
~SList() {}
int compareItems(GCI item1,GCI item2)
{
return m_owner->compareItems(item1,item2);
}
private:
SDict<T> *m_owner;
};
/*! Ordered dictionary of elements of type T. /*! Ordered dictionary of elements of type T.
* Internally uses a QList<T> and a QDict<T>. * Internally uses a QList<T> and a QDict<T>.
*/ */
...@@ -30,23 +49,7 @@ template<class T> ...@@ -30,23 +49,7 @@ template<class T>
class SDict class SDict
{ {
private: private:
SList<T> *m_list;
/*! internal wrapper class that redirects compareItems() to the
* dictionary
*/
class SList : public QList<T>
{
public:
SList(SDict<T> *owner) : m_owner(owner) {}
~SList() {}
int compareItems(GCI item1,GCI item2)
{
return m_owner->compareItems(item1,item2);
}
private:
SDict<T> *m_owner;
};
SList *m_list;
QDict<T> *m_dict; QDict<T> *m_dict;
public: public:
...@@ -56,7 +59,7 @@ class SDict ...@@ -56,7 +59,7 @@ class SDict
*/ */
SDict(int size) SDict(int size)
{ {
m_list = new SList(this); m_list = new SList<T>(this);
m_dict = new QDict<T>(size); m_dict = new QDict<T>(size);
} }
/*! Destroys the dictionary */ /*! Destroys the dictionary */
...@@ -169,5 +172,4 @@ class SDict ...@@ -169,5 +172,4 @@ class SDict
}; };
#endif #endif
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 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 TAG_H
#define TAG_H
extern void parseTagFile(const char *fileName);
#endif
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 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.
*
*/
%{
/*
* includes
*/
#include <stdio.h>
#include "qtbc.h"
#include <qfileinfo.h>
#include "classdef.h"
#include "filedef.h"
#include "namespacedef.h"
#include "memberdef.h"
#include "doxygen.h"
#include "util.h"
#include "message.h"
#include "defargs.h"
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
static int yyLineNr;
static QCString className;
static QCString fileName;
static QCString namespaceName;
static QCString tagName;
static QCString memberName;
static QCString anchorName;
static QCString argString;
static ClassDef *cd;
static FileDef *fd;
static NamespaceDef *nd;
static void addClass(const char *name,const char *fileName)
{
//printf("adding class %s\n",name);
if (name!=0 && strlen(name)>0 && classDict[name]==0)
{
cd = new ClassDef(fileName,1,name,ClassDef::Class,tagName,fileName);
fd = 0;
nd = 0;
classList.inSort(cd);
classDict.insert(className,cd);
}
}
static void addFile(const char *name)
{
//printf("adding file %s tagName=`%s'\n",name,tagName.data());
fd = new FileDef(0,name,tagName);
FileName *mn;
if ((mn=inputNameDict->find(name)))
{
mn->append(fd);
}
else
{
mn = new FileName(name,name);
mn->append(fd);
inputNameList.inSort(mn);
inputNameDict->insert(name,mn);
}
cd = 0;
nd = 0;
//fileList.inSort(fd);
//fileDict.insert(fileName,fd);
}
static void addNamespace(const char *name)
{
if ((nd=namespaceDict[name])==0)
{
// TODO: we assume that each namespace is limited to a single tagfile.
// since namespace are open, this need not to be the case. As a result
// namespace may contain members that are located in
// different namespaces!
nd = new NamespaceDef("<tagfile>",1,name,tagName);
namespaceList.inSort(nd);
namespaceDict.insert(name,nd);
}
cd = 0;
fd = 0;
}
static void addMember(const char *name,const char *anchor,const char *args)
{
//printf("adding member `%s' `%s'\n",name,anchor);
if (cd || fd)
{
MemberNameDict *mnd=0;
MemberNameList *mnl=0;
MemberDef *md;
ArgumentList *argList = new ArgumentList;
stringToArgumentList(args,argList);
md=new MemberDef("<tagfile>",1,
0,name,args,0,Public,Normal,FALSE,FALSE,
MemberDef::Function,0,argList);
delete argList;
md->setAnchor(anchor);
md->setReference(tagName);
if (cd) // member of a class
{
md->setMemberClass(cd);
cd->insertMember(md);
mnd=&memberNameDict;
mnl=&memberNameList;
}
else if (nd) // member of a namespace
{
md->setNamespace(nd);
nd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
else // member of a file
{
md->setFileDef(fd);
fd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
MemberName *mn = 0;
if ((mn=(*mnd)[memberName]))
{
//printf("mn->inSort()\n");
mn->append(md);
}
else
{
//printf("mn->append()\n");
mn=new MemberName(memberName);
mn->append(md);
//printf("Adding memberName=%s\n",mn->memberName());
mnl->inSort(mn);
mnd->insert(memberName,mn);
}
}
}
/* -----------------------------------------------------------------
*/
%}
ID [a-z_A-Z0-9]+
FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
SCOPE ({ID}"::")*{ID}
%option noyywrap
%x Pass1
%x Pass2
%x AnchorName
%x ArgString1
%x ArgString2
%x ClassName1
%x ClassName2
%x FileName
%x NamespaceName
%x BaseClasses
%x ClassFile1
%x ClassFile2
%%
<Pass1>^">" { // start of a class
BEGIN(ClassName1);
}
<Pass1>^"&" { // start of a file
BEGIN(FileName);
}
<Pass1>^"%" { // start of a namespace
BEGIN(NamespaceName);
}
<Pass1>^[~a-z_A-Z][^ \n]*/" " {
memberName=yytext;
BEGIN(AnchorName);
}
<Pass2>^">" {
BEGIN(ClassName2);
}
<AnchorName>{ID} {
anchorName=yytext;
BEGIN(ArgString1);
}
<ArgString1>"\"" {
BEGIN(ArgString2);
}
<ArgString2>[^\"\n]*/"\"" {
argString=yytext;
addMember(memberName,anchorName,argString);
BEGIN(Pass1);
}
<FileName>{FILE}/":" {
fileName=yytext;
addFile(yytext);
BEGIN(Pass1);
}
<NamespaceName>{SCOPE}/":" {
namespaceName=yytext;
addNamespace(yytext);
BEGIN(Pass1);
}
<ClassName1>{SCOPE}/":" {
className=yytext;
BEGIN(ClassFile1);
}
<ClassFile1>\" {
BEGIN(ClassFile2);
}
<ClassFile2>[^\"]*/\" {
addClass(className,yytext);
BEGIN(Pass1);
}
<ClassFile2>\n {
yyLineNr++;
BEGIN(Pass1);
}
<ClassName2>{ID}/":" {
cd=getClass(yytext);
BEGIN(BaseClasses);
}
<BaseClasses>{ID}/"?" {
ClassDef *bcd=getClass(yytext);
if (cd && bcd)
{
cd->insertBaseClass(bcd,Public,Normal);
bcd->insertSuperClass(cd,Public,Normal);
}
}
<BaseClasses>\n {
yyLineNr++;
BEGIN(Pass2);
}
<*>.
<*>\n { yyLineNr++ ; }
%%
/*@ ----------------------------------------------------------------------------
*/
void parseTagFile(const char *fileName)
{
FILE *f=fopen(fileName,"r");
QFileInfo fi(fileName);
if (!f || !fi.exists())
{
if (f) fclose(f);
return;
}
tagName = fi.fileName();
tagYYin = f;
cd=0;
yyLineNr = 1;
tagYYrestart( tagYYin );
BEGIN(Pass1);
tagYYlex();
rewind(f);
cd=0;
yyLineNr = 1;
tagYYrestart( tagYYin );
BEGIN(Pass2);
tagYYlex();
fclose(f);
}
//extern "C" { // some bogus code to keep the compiler happy
// int tagYYwrap() { return 1 ; }
//}
This diff is collapsed.
#ifndef TAGREADER_H
#define TAGREADER_H
#include "qtbc.h"
class Entry;
void parseTagFile(Entry *root,const char *fullPathName,const char *fileName);
#endif
...@@ -383,7 +383,7 @@ class TranslatorGerman : public Translator ...@@ -383,7 +383,7 @@ class TranslatorGerman : public Translator
QCString trNamespaceList() QCString trNamespaceList()
// used as the title of page containing all the index of all namespaces. // used as the title of page containing all the index of all namespaces.
{ return ""; } { return "Lister aller Namensberiche"; }
QCString trNamespaceListDescription(bool extractAll) QCString trNamespaceListDescription(bool extractAll)
// used as an introduction to the namespace list // used as an introduction to the namespace list
{ {
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include "qtbc.h" #include "qtbc.h"
#include <qregexp.h> #include <qregexp.h>
...@@ -110,8 +113,8 @@ void TextGeneratorXMLImpl::writeLink(const char *extRef,const char *file, ...@@ -110,8 +113,8 @@ void TextGeneratorXMLImpl::writeLink(const char *extRef,const char *file,
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/*! Implements an interruptable system call on Unix */ /*! Implements an interruptable system call on Unix/Windows */
int iSystem(const char *command) int iSystem(const char *command,const char *args)
{ {
#ifndef _WIN32 #ifndef _WIN32
/*! taken from the system() manpage on my Linux box */ /*! taken from the system() manpage on my Linux box */
...@@ -122,10 +125,14 @@ int iSystem(const char *command) ...@@ -122,10 +125,14 @@ int iSystem(const char *command)
if (pid==-1) return -1; if (pid==-1) return -1;
if (pid==0) if (pid==0)
{ {
char buf[4096];
strcpy(buf,command);
strcat(buf," ");
strcat(buf,args);
const char * argv[4]; const char * argv[4];
argv[0] = "sh"; argv[0] = "sh";
argv[1] = "-c"; argv[1] = "-c";
argv[2] = command; argv[2] = buf;
argv[3] = 0; argv[3] = 0;
execve("/bin/sh",(char * const *)argv,environ); execve("/bin/sh",(char * const *)argv,environ);
exit(127); exit(127);
...@@ -142,7 +149,33 @@ int iSystem(const char *command) ...@@ -142,7 +149,33 @@ int iSystem(const char *command)
} }
} }
#else #else
return system(command); SHELLEXECUTEINFO sInfo = {
sizeof(SHELLEXECUTEINFO), /* structure size */
SEE_MASK_NOCLOSEPROCESS, /* leave the process running */
NULL, /* window handle */
NULL, /* action to perform: open */
command, /* file to execute */
args, /* argument list */
NULL, /* use current working dir */
SW_HIDE, /* minimize on start-up */
0, /* application instance handle */
NULL, /* ignored: id list */
NULL, /* ignored: class name */
NULL, /* ignored: key class */
0, /* ignored: hot key */
NULL, /* ignored: icon */
NULL /* resulting application handle */
};
if (!ShellExecuteEx(&sInfo))
{
return -1;
}
else if (sInfo.hProcess) /* executable was launched, wait for it to finish */
{
WaitForSingleObject(sInfo.hProcess,INFINITE);
}
return 0;
//return system(command);
#endif #endif
} }
...@@ -305,13 +338,17 @@ QCString stripFromPath(const QCString &path) ...@@ -305,13 +338,17 @@ QCString stripFromPath(const QCString &path)
int guessSection(const char *name) int guessSection(const char *name)
{ {
QCString n=((QCString)name).lower(); QCString n=((QCString)name).lower();
if (n.right(2)==".c" || if (n.right(2)==".c" || // source
n.right(3)==".cc" || n.right(3)==".cc" ||
n.right(4)==".cxx" || n.right(4)==".cxx" ||
n.right(4)==".cpp" || n.right(4)==".cpp" ||
n.right(4)==".c++" n.right(4)==".c++" ||
n.right(3)==".ii" || // inline
n.right(4)==".ixx" ||
n.right(4)==".ipp" ||
n.right(4)==".i++"
) return Entry::SOURCE_SEC; ) return Entry::SOURCE_SEC;
if (n.right(2)==".h" || if (n.right(2)==".h" || // header
n.right(3)==".hh" || n.right(3)==".hh" ||
n.right(4)==".hxx" || n.right(4)==".hxx" ||
n.right(4)==".hpp" || n.right(4)==".hpp" ||
...@@ -1257,14 +1294,14 @@ static void trimNamespaceScope(QCString &t1,QCString &t2) ...@@ -1257,14 +1294,14 @@ static void trimNamespaceScope(QCString &t1,QCString &t2)
*/ */
void stripIrrelevantConstVolatile(QCString &s) void stripIrrelevantConstVolatile(QCString &s)
{ {
int i,j; int i;
if (s=="const") { s.resize(0); return; } if (s=="const") { s.resize(0); return; }
if (s=="volatile") { s.resize(0); return; } if (s=="volatile") { s.resize(0); return; }
i = s.find("const "); i = s.find("const ");
if (i!=-1) if (i!=-1)
{ {
// no & or * after the const // no & or * after the const
if ((j=s.find('*',i+6))==-1 && (j=s.find('&',i+6))==-1) if (s.find('*',i+6)==-1 && s.find('&',i+6)==-1)
{ {
s=s.left(i)+s.right(s.length()-i-6); s=s.left(i)+s.right(s.length()-i-6);
} }
...@@ -1273,7 +1310,7 @@ void stripIrrelevantConstVolatile(QCString &s) ...@@ -1273,7 +1310,7 @@ void stripIrrelevantConstVolatile(QCString &s)
if (i!=-1) if (i!=-1)
{ {
// no & or * after the volatile // no & or * after the volatile
if ((j=s.find('*',i+9))==-1 && (j=s.find('&',i+9))==-1) if (s.find('*',i+9)==-1 && s.find('&',i+9)==-1)
{ {
s=s.left(i)+s.right(s.length()-i-9); s=s.left(i)+s.right(s.length()-i-9);
} }
...@@ -1993,9 +2030,9 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -1993,9 +2030,9 @@ bool getDefs(const QCString &scName,const QCString &memberName,
// maybe an namespace, file or group member ? // maybe an namespace, file or group member ?
//printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n", //printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n",
// scopeName.data(),mScope.data(),mName.data()); // scopeName.data(),mScope.data(),mName.data());
//printf(" >member name found\n");
if ((mn=functionNameDict[mName])) // name is known if ((mn=functionNameDict[mName])) // name is known
{ {
//printf(" >member name found\n");
NamespaceDef *fnd=0; NamespaceDef *fnd=0;
int scopeOffset=scopeName.length(); int scopeOffset=scopeName.length();
do do
...@@ -2298,13 +2335,11 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2298,13 +2335,11 @@ bool generateRef(OutputList &ol,const char *scName,
if (bracePos!=-1) argsStr=tmpName.right(tmpName.length()-bracePos); if (bracePos!=-1) argsStr=tmpName.right(tmpName.length()-bracePos);
// create a default link text if none was explicitly given // create a default link text if none was explicitly given
bool explicitLink=TRUE;
if (linkText.isEmpty()) if (linkText.isEmpty())
{ {
//if (!scopeUser.isEmpty()) linkText=scopeUser+"::"; //if (!scopeUser.isEmpty()) linkText=scopeUser+"::";
linkText=nameStr; linkText=nameStr;
if (linkText.left(2)=="::") linkText=linkText.right(linkText.length()-2); if (linkText.left(2)=="::") linkText=linkText.right(linkText.length()-2);
explicitLink=FALSE;
} }
//printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n", //printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n",
// scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data()); // scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data());
...@@ -2445,12 +2480,12 @@ bool generateLink(OutputList &ol,const char *clName, ...@@ -2445,12 +2480,12 @@ bool generateLink(OutputList &ol,const char *clName,
{ {
SectionInfo *si=0; SectionInfo *si=0;
if (!pi->name.isEmpty()) si=sectionDict[pi->name]; if (!pi->name.isEmpty()) si=sectionDict[pi->name];
ol.writeObjectLink(0,gd->getOutputFileBase(),si ? si->label.data() : 0,lt); ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),si ? si->label.data() : 0,lt);
writePageRef(ol,gd->getOutputFileBase(),si ? si->label.data() : 0); writePageRef(ol,gd->getOutputFileBase(),si ? si->label.data() : 0);
} }
else else
{ {
ol.writeObjectLink(0,pi->name,0,lt); ol.writeObjectLink(pi->getReference(),pi->getOutputFileBase(),0,lt);
writePageRef(ol,pi->name,0); writePageRef(ol,pi->name,0);
} }
return TRUE; return TRUE;
...@@ -2877,3 +2912,23 @@ QCString stripScope(const char *name) ...@@ -2877,3 +2912,23 @@ QCString stripScope(const char *name)
return result; return result;
} }
QCString convertToXML(const char *s)
{
QCString result;
if (s==0) return result;
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
case '<': result+="&lt;"; break;
case '>': result+="&gt;"; break;
case '&': result+="&amp;"; break;
case '\'': result+="&apos;"; break;
case '"': result+="&quot;"; break;
default: result+=c; break;
}
}
return result;
}
...@@ -133,6 +133,7 @@ void setFileNameForSections(QList<QCString> *anchorList,const char *fileName); ...@@ -133,6 +133,7 @@ void setFileNameForSections(QList<QCString> *anchorList,const char *fileName);
QCString stripAnnonymousScope(const QCString &s); QCString stripAnnonymousScope(const QCString &s);
QCString stripAnnonymousNamespaceScope(const QCString &s); QCString stripAnnonymousNamespaceScope(const QCString &s);
QCString stripFromPath(const QCString &path); QCString stripFromPath(const QCString &path);
QCString convertToXML(const char *s);
bool rightScopeMatch(const QCString &scope, const QCString &name); bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name); bool leftScopeMatch(const QCString &scope, const QCString &name);
void writePageRef(OutputList &ol,const char *cn,const char *mn); void writePageRef(OutputList &ol,const char *cn,const char *mn);
...@@ -149,7 +150,7 @@ void extractNamespaceName(const QCString &scopeName, ...@@ -149,7 +150,7 @@ void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName); QCString &className,QCString &namespaceName);
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ); QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
QCString stripScope(const char *name); QCString stripScope(const char *name);
int iSystem(const char *command); int iSystem(const char *command,const char *args);
#endif #endif
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "message.h" #include "message.h"
#include "config.h" #include "config.h"
#include "classlist.h" #include "classlist.h"
#include "util.h"
#include <qdir.h> #include <qdir.h>
#include <qfile.h> #include <qfile.h>
...@@ -46,21 +47,7 @@ void generateDTD() ...@@ -46,21 +47,7 @@ void generateDTD()
void writeXMLString(QTextStream &t,const char *s) void writeXMLString(QTextStream &t,const char *s)
{ {
if (s==0) return; t << convertToXML(s);
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
case '<': t << "&lt;"; break;
case '>': t << "&gt;"; break;
case '&': t << "&amp;"; break;
case '\'': t << "&apos;"; break;
case '"': t << "&quot;"; break;
default: t << c; break;
}
}
} }
void writeXMLLink(QTextStream &t,const char *compoundId,const char *memId, void writeXMLLink(QTextStream &t,const char *compoundId,const char *memId,
......
...@@ -19,6 +19,7 @@ class QTextStream; ...@@ -19,6 +19,7 @@ class QTextStream;
void generateXML(); void generateXML();
void writeXMLString(QTextStream &t,const char *s); void writeXMLString(QTextStream &t,const char *s);
void writeXMLString(QTextStream &t,const char *s);
void writeXMLLink(QTextStream &t,const char *compoundRef,const char *memAnchor, void writeXMLLink(QTextStream &t,const char *compoundRef,const char *memAnchor,
const char *text); const char *text);
......
#############################################################################
#!
#! This is a tmake template for building Win32 applications.
#!
#$ Project('TMAKE_APP_FLAG = 1');
#$ IncludeTemplate("generic.t");
#!
#! This is a tmake template for building Win32 applications or libraries.
#!
#${
if ( Config("qt") ) {
if ( !(Project("DEFINES") =~ /QT_NODLL/) &&
((Project("DEFINES") =~ /QT_(?:MAKE)?DLL/) ||
($ENV{"QT_DLL"} && !$ENV{"QT_NODLL"})) ) {
Project('TMAKE_QT_DLL = 1');
if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) {
Project('CONFIG += dll');
}
}
}
if ( Config("dll") || Project("TMAKE_APP_FLAG") ) {
Project('CONFIG -= staticlib');
Project('TMAKE_APP_OR_DLL = 1');
} else {
Project('CONFIG += staticlib');
}
if ( Config("warn_off") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_OFF');
Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_WARN_OFF');
} elsif ( Config("warn_on") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_ON');
Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_WARN_ON');
}
if ( Config("debug") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_DEBUG');
Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_DEBUG');
Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_DEBUG');
} elsif ( Config("release") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_RELEASE');
Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_RELEASE');
Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_RELEASE');
}
if ( Config("qt") || Config("opengl") ) {
Project('CONFIG += windows' );
}
if ( Config("qt") ) {
Project('CONFIG *= moc');
AddIncludePath(Project("TMAKE_INCDIR_QT"));
if ( Config("release") ) {
Project('DEFINES += NO_DEBUG');
}
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL');
}
if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) {
if ( Project("TMAKE_QT_DLL") ) {
Project('DEFINES -= QT_DLL');
Project('DEFINES *= QT_MAKEDLL');
Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_QT_DLL');
}
} else {
if ( Project("TMAKE_QT_DLL") ) {
Project('DEFINES *= QT_DLL');
}
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT');
if ( Project("TMAKE_QT_DLL") ) {
my $qtver =FindHighestLibVersion($ENV{"QTDIR"} . "/lib", "qt");
Project("TMAKE_LIBS /= s/qt.lib/qt${qtver}.lib/");
if ( !Config("dll") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
}
}
}
}
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_OPENGL');
}
if ( Config("dll") ) {
Project('TMAKE_LFLAGS_CONSOLE_ANY = $$TMAKE_LFLAGS_CONSOLE_DLL');
Project('TMAKE_LFLAGS_WINDOWS_ANY = $$TMAKE_LFLAGS_WINDOWS_DLL');
if ( Project("TMAKE_LIB_FLAG") ) {
my $ver = Project("VERSION");
$ver =~ s/\.//g;
$project{"TARGET_EXT"} = "${ver}.dll";
} else {
$project{"TARGET_EXT"} = ".dll";
}
} else {
Project('TMAKE_LFLAGS_CONSOLE_ANY = $$TMAKE_LFLAGS_CONSOLE');
Project('TMAKE_LFLAGS_WINDOWS_ANY = $$TMAKE_LFLAGS_WINDOWS');
if ( Project("TMAKE_APP_FLAG") ) {
$project{"TARGET_EXT"} = ".exe";
} else {
$project{"TARGET_EXT"} = ".a";
}
}
if ( Config("windows") ) {
if ( Config("console") ) {
Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY');
Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE');
} else {
Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_WINDOWS_ANY');
}
Project('TMAKE_LIBS *= $$TMAKE_LIBS_WINDOWS');
} else {
Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY');
Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE');
}
if ( Config("moc") ) {
$moc_aware = 1;
}
Project('TMAKE_LIBS += $$LIBS');
Project('TMAKE_FILETAGS = HEADERS SOURCES DEF_FILE RC_FILE TARGET TMAKE_LIBS DESTDIR DLLDESTDIR $$FILETAGS');
foreach ( split(/\s/,Project("TMAKE_FILETAGS")) ) {
$project{$_} =~ s-[/\\]+-/-g;
}
if ( Project("DEF_FILE") ) {
Project('TMAKE_LFLAGS *= $$DEF_FILE');
}
if ( Project("RC_FILE") ) {
if ( Project("RES_FILE") ) {
tmake_error("Both .rc and .res file specified.\n" .
"Please specify one of them, not both.");
}
$project{"RES_FILE"} = $project{"RC_FILE"};
$project{"RES_FILE"} =~ s/\.rc$/.res/i;
Project('TARGETDEPS += $$RES_FILE');
}
if ( Project("RES_FILE") ) {
Project('TMAKE_LIBS *= $$RES_FILE');
}
$obj_ext = "o";
$dir_sep = "/";
$gnuwin32 = 1;
if ( Config("qt") ) {
$qtdir = $ENV{"QTDIR"};
$project{"INCPATH"} =~ s/\$\(QTDIR\)/$qtdir/;
$project{"INCPATH"} =~ s/\\/\//g;
$project{"TMAKE_LIBS"} =~ s/\$\(QTDIR\)/$qtdir/;
$project{"TMAKE_LIBS"} =~ s/\\/\//g;
}
StdInit();
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
$project{"VER_MIN"} = $project{"VERSION"};
$project{"VER_MIN"} =~ s/^\d+\.//;
}
if ( Config("staticlib") ) {
$project{"TARGET"} = $project{"DESTDIR"} . "lib" . $project{"TARGET"};
} else {
$project{"TARGET"} = $project{"DESTDIR"} . $project{"TARGET"};
}
#$}
#!
# Makefile for building #$ Expand("TARGET")
# Generated by tmake at #$ Now();
# Project: #$ Expand("PROJECT");
# Template: #$ Expand("TEMPLATE");
#############################################################################
####### Compiler, tools and options
CC = #$ Expand("TMAKE_CC");
CXX = #$ Expand("TMAKE_CXX");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
CXXFLAGS= #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
INCPATH = #$ ExpandPath("INCPATH",'-I',' -I','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
LIBS = #$ Expand("TMAKE_LIBS");
#$ !Project("TMAKE_APP_OR_DLL") && EnableOutput();
#$ Project("TMAKE_APP_OR_DLL") && DisableOutput();
AR = #$ Expand("TMAKE_AR");
RANLIB = #$ Expand("TMAKE_RANLIB");
#$ Project("TMAKE_APP_OR_DLL") && EnableOutput();
MOC = #$ Expand("TMAKE_MOC");
ZIP = #$ Expand("TMAKE_ZIP");
####### Files
HEADERS = #$ ExpandList("HEADERS");
SOURCES = #$ ExpandList("SOURCES");
OBJECTS = #$ ExpandList("OBJECTS");
SRCMOC = #$ ExpandList("SRCMOC");
OBJMOC = #$ ExpandList("OBJMOC");
DIST = #$ ExpandList("DISTFILES");
TARGET = #$ ExpandGlue("TARGET",$project{"DESTDIR"},"",$project{"TARGET_EXT"});
####### Implicit rules
.SUFFIXES: .cpp .cxx .cc .c
.cpp.o:
#$ Expand("TMAKE_RUN_CXX_IMP");
.cxx.o:
#$ Expand("TMAKE_RUN_CXX_IMP");
.cc.o:
#$ Expand("TMAKE_RUN_CXX_IMP");
.c.o:
#$ Expand("TMAKE_RUN_CC_IMP");
####### Build rules
all: #$ ExpandGlue("ALL_DEPS",""," "," "); $text .= '$(TARGET)';
$(TARGET): $(OBJECTS) $(OBJMOC) #$ Expand("TARGETDEPS");
#$ Project("TMAKE_APP_OR_DLL") || DisableOutput();
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)
#$ Project("TMAKE_APP_OR_DLL") || EnableOutput();
#$ Project("TMAKE_APP_OR_DLL") && DisableOutput();
-rm -f $(TARGET)
$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)
#$ ExpandGlue("TMAKE_RANLIB","",""," \$(TARGET)");
#$ Project("TMAKE_APP_OR_DLL") && EnableOutput();
#$ (Config("dll") && Project("DLLDESTDIR")) || DisableOutput();
-cp $(TARGET) #$ Expand("DLLDESTDIR");
#$ (Config("dll") && Project("DLLDESTDIR")) || EnableOutput();
#$ Project('RC_FILE') || DisableOutput();
#$ Substitute("\$\$RES_FILE: \$\$RC_FILE\n\t\$\$TMAKE_RC \$\$RC_FILE");
#$ Project('RC_FILE') || EnableOutput();
moc: $(SRCMOC)
#$ TmakeSelf();
dist:
#$ Substitute('$(ZIP) $$PROJECT.zip $$PROJECT.pro $(SOURCES) $(HEADERS) $(DIST)');
clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET)
#$ ExpandGlue("TMAKE_CLEAN","-rm -f "," ","");
-rm -f *~ core
#$ ExpandGlue("CLEAN_FILES","-rm -f "," ","");
####### Compile
#$ BuildObj(Project("OBJECTS"),Project("SOURCES"));
#$ BuildMocObj(Project("OBJMOC"),Project("SRCMOC"));
#$ BuildMocSrc(Project("HEADERS"));
#$ BuildMocSrc(Project("SOURCES"));
#############################################################################
#!
#! This is a tmake template for building Win32 libraries.
#!
#$ Project('TMAKE_LIB_FLAG = 1');
#$ IncludeTemplate("generic.t");
#! Use the common Win32 template
#$ IncludeTemplate("../win32/subdirs.t");
#
#
#
# tmake configuration for Win32/mingw (MINGW gnu-win32)
#
TEMPLATE = app
CONFIG = qt warn_on release
TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON =
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2 -s
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
TMAKE_CXX = g++
TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
TMAKE_INCDIR_QT = $(QTDIR)/include
TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
TMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
TMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
TMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
TMAKE_LINK = g++
TMAKE_LFLAGS =
TMAKE_LFLAGS_RELEASE = -s
TMAKE_LFLAGS_DEBUG =
TMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
TMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
TMAKE_LFLAGS_CONSOLE_DLL= -Wl,-subsystem,console
TMAKE_LFLAGS_WINDOWS_DLL= -Wl,-subsystem,windows
TMAKE_LIBS =
TMAKE_LIBS_CONSOLE =
TMAKE_LIBS_WINDOWS = -luser32 -lgdi32 -lcomdlg32 -limm32 -lole32 -luuid -lwsock32
TMAKE_LIBS_QT = -L$(QTDIR)/lib -lqt
TMAKE_LIBS_QT_DLL = -lqtmain
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lopengl32
TMAKE_MOC = moc
TMAKE_AR = ar cqs
TMAKE_RANLIB =
TMAKE_ZIP = zip -r -9
# make script used to create a config file for windows # make script used to create a config file for windows
$target = shift @ARGV;
$make = "make";
if ($target eq "msvc")
{
$make = "nmake";
}
use Cwd; use Cwd;
# get current working directory # get current working directory
...@@ -9,9 +16,9 @@ $pwd=cwd(); ...@@ -9,9 +16,9 @@ $pwd=cwd();
open(FILE,">makeconfig") || die "Cannot create file makeconfig!"; open(FILE,">makeconfig") || die "Cannot create file makeconfig!";
print FILE "DOXYGEN = $pwd\n"; print FILE "DOXYGEN = $pwd\n";
print FILE "TMAKEPATH = $pwd\\tmake\\lib\\win32-msvc\n"; print FILE "TMAKEPATH = $pwd\\tmake\\lib\\win32-$target\n";
print FILE "TMAKE = $pwd\\tmake\\bin\\tmake\n"; print FILE "TMAKE = $pwd\\tmake\\bin\\tmake\n";
print FILE "MAKE = nmake\n"; print FILE "MAKE = $make\n";
print FILE "PERL = perl\n"; print FILE "PERL = perl\n";
print FILE "RM = del /s /q\n"; print FILE "RM = del /s /q\n";
print FILE "VERSION = "; print FILE "VERSION = ";
......
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