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

Release-1.3-rc3-20030330

parent fc0deb3d
DOXYGEN Version 1.3-rc3-20030317
DOXYGEN Version 1.3-rc3-20030330
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (17 March 2003)
Dimitri van Heesch (30 March 2003)
DOXYGEN Version 1.3_rc3_20030317
DOXYGEN Version 1.3_rc3_20030330
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (17 March 2003)
Dimitri van Heesch (dimitri@stack.nl) (30 March 2003)
1.3-rc3-20030317
1.3-rc3-20030330
......@@ -153,6 +153,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_man_extension MAN_EXTENSION
\refitem cfg_man_links MAN_LINKS
\refitem cfg_man_output MAN_OUTPUT
\refitem cfg_max_dot_graph_depth MAX_DOT_GRAPH_DEPTH
\refitem cfg_max_dot_graph_height MAX_DOT_GRAPH_HEIGHT
\refitem cfg_max_dot_graph_width MAX_DOT_GRAPH_WIDTH
\refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES
......@@ -1493,6 +1494,21 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
the specified constraint. Beware that most browsers cannot cope with very
large images.
\anchor cfg_max_dot_graph_depth
<dt>\c MAX_DOT_GRAPH_DEPTH <dd>
\addindex MAX_DOT_GRAPH_DEPTH
The \c MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
graphs generated by dot. A depth value of 3 means that only nodes reachable
from the root by following a path via at most 3 edges will be shown. Nodes that
lay further from the root node will be omitted. Note that setting this option to
1 or 2 may greatly reduce the computation time needed for large code bases. Also
note that a graph may be further truncated if the graph's image dimensions are
not sufficient to fit the graph (see
\ref cfg_max_dot_graph_width "MAX_DOT_GRAPH_WIDTH" and
\ref cfg_max_dot_graph_height "MAX_DOT_GRAPH_HEIGHT").
If 0 is used fot the depth value (the default), the graph is
not depth constraint.
\anchor cfg_max_dot_graph_width
<dt>\c MAX_DOT_GRAPH_WIDTH <dd>
\addindex MAX_DOT_GRAPH_WIDTH
......@@ -1512,8 +1528,9 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\anchor cfg_dot_cleanup
<dt>\c DOT_CLEANUP <dd>
\addindex DOT_CLEANUP
This tag can be used to cleanup any mess DOT left behind.
If left blank, "NO" is assumed.
If the \c DOT_CLEANUP tag is set to \c YES (the default) doxygen will
remove the intermedate dot files that are used to generate the various graphs.
</dl>
\section config_search Search engine options
......
......@@ -344,7 +344,7 @@ $(TARGET): $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) -Bdynamic
\endverbatim
<b>GNU 2.7.2.x compiler problems</b>
<b>GCC compiler problems</b>
Older versions of the GNU compiler have problems with constant strings
containing characters with character codes larger than 127. Therefore
......@@ -357,6 +357,9 @@ On some platforms (such as OpenBSD) using some versions of gcc with
such as config.cpp. As a workaround use --debug as a configure option
or omit the -O2 for the particular files in the Makefile.
Gcc versions before 2.95 may produce broken binaries due to bugs in
these compilers.
<b>Dot problems</b>
Due to a change in the way image maps are generated, older versions
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.14-20020317), 28 languages
Currently (version 1.3-rc3-20030327), 28 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
......
......@@ -213,7 +213,7 @@ local int huft_build(uIntf *b, uInt n, uInt s, const uIntf *d, const uIntf *e, i
/* compute minimum size table less than or equal to l bits */
z = g - w;
z = z > (uInt)l ? l : z; /* table size upper limit */
z = z > (uInt)l ? (uInt)l : z; /* table size upper limit */
if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
{ /* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */
......@@ -445,6 +445,8 @@ int inflate_trees_fixed(uIntf *bl, uIntf *bd, inflate_huft **tl, inflate_huft **
ZFREE(z, c);
fixed_built = 1;
}
#else
z=z; // DvH: added to avoid compiler warning
#endif
*bl = fixed_bl;
*bd = fixed_bd;
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3_rc3_20030317
Version: 1.3_rc3_20030330
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -593,4 +593,7 @@ Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
Q_EXPORT void qObsolete( const char *message );
#endif
// DvH: added to avoid warnings on recent gcc versions
#define Q_DELETE_VOID_UNDEFINED
#endif // QGLOBAL_H
......@@ -925,6 +925,7 @@ struct QMultiByteUnicodeTable {
QMultiByteUnicodeTable* multibyte;
};
#ifndef QT_NO_CODECS
static int getByte(char* &cursor)
{
int byte = 0;
......@@ -939,7 +940,6 @@ static int getByte(char* &cursor)
return byte&0xff;
}
#ifndef QT_NO_CODECS
class QTextCodecFromIOD;
class QTextCodecFromIODDecoder : public QTextDecoder {
......
......@@ -1032,7 +1032,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("CLASS_GRAPH"))
// write class diagram using dot
{
DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance);
DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
ol.pushGeneratorState();
......@@ -1067,7 +1067,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("COLLABORATION_GRAPH"))
{
DotClassGraph usageImplGraph(this,DotClassGraph::Implementation);
DotClassGraph usageImplGraph(this,DotClassGraph::Implementation,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!usageImplGraph.isTrivial())
{
ol.pushGeneratorState();
......
......@@ -1217,6 +1217,12 @@ void Config::check()
}
PUTENV(buf);
}
int &depth = Config_getInt("MAX_DOT_GRAPH_DEPTH");
if (depth==0)
{
depth=1000;
}
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO"))
{
......@@ -2518,6 +2524,18 @@ void Config::create()
"large images. \n",
100,30000,1024
);
ci = addInt(
"MAX_DOT_GRAPH_DEPTH",
"The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the \n"
"graphs generated by dot. A depth value of 3 means that only nodes reachable \n"
"from the root by following a path via at most 3 edges will be shown. Nodes that \n"
"lay further from the root node will be omitted. Note that setting this option to \n"
"1 or 2 may greatly reduce the computation time needed for large code bases. Also \n"
"note that a graph may be further truncated if the graph's image dimensions are \n"
"not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). \n"
"If 0 is used fot the depth value (the default), the graph is not depth constraint. \n",
0,1000,0
);
ci->addDependency("HAVE_DOT");
cb = addBool(
"GENERATE_LEGEND",
......
......@@ -450,14 +450,16 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl;
inheritanceGraph.writeDEF(t);
t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial())
{
t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl;
......
......@@ -37,6 +37,7 @@
#include "cmdmapper.h"
#include "printdocvisitor.h"
#include "message.h"
#include "section.h"
#define DBG(x) do {} while(0)
//#define DBG(x) printf x
......@@ -58,10 +59,11 @@ static const char *sectionLevelToName[] =
//---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc
static bool g_hasParamCommand;
static MemberDef * g_memberDef;
static QDict<void> g_paramsFound;
static bool g_isExample;
static bool g_hasParamCommand;
static MemberDef * g_memberDef;
static QDict<void> g_paramsFound;
static bool g_isExample;
static SectionDict *g_sectionDict;
// include file state
static QString g_includeFileText;
......@@ -703,6 +705,10 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
}
else // compound link
{
if (compound->definitionType()==Definition::TypeFile)
{
name=g_token->name;
}
children.append(new
DocLinkedWord(parent,name,
compound->getReference(),
......@@ -1153,6 +1159,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{
m_file = sec->fileName;
m_anchor = sec->label;
if (g_sectionDict && g_sectionDict->find(id)==0)
{
g_sectionDict->insert(id,sec);
}
}
else
{
......@@ -1458,6 +1468,10 @@ void DocSecRefItem::parse()
{
m_file = sec->fileName;
m_anchor = sec->label;
if (g_sectionDict && g_sectionDict->find(m_target)==0)
{
g_sectionDict->insert(m_target,sec);
}
}
else
{
......@@ -4339,6 +4353,7 @@ reparsetoken:
break;
}
}
retval=0;
endparagraph:
handlePendingStyleCommands(this,m_children);
DocNode *n = g_nodeStack.pop();
......@@ -4369,6 +4384,10 @@ int DocSection::parse()
m_anchor = sec->label;
m_title = sec->title;
if (m_title.isEmpty()) m_title = sec->label;
if (g_sectionDict && g_sectionDict->find(m_id)==0)
{
g_sectionDict->insert(m_id,sec);
}
}
}
......@@ -4611,7 +4630,8 @@ void DocRoot::parse()
DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md,
const char *input,bool isExample)
const char *input,bool isExample,
SectionDict *sections)
{
//printf("========== validating %s at line %d\n",fileName,startLine);
......@@ -4633,6 +4653,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
g_sectionDict = sections;
doctokenizerYYlineno=startLine;
doctokenizerYYinit(input,g_fileName);
......
......@@ -33,6 +33,7 @@ class MemberDef;
class PageInfo;
class Definition;
class MemberGroup;
class SectionDict;
//---------------------------------------------------------------------------
......@@ -51,7 +52,8 @@ class MemberGroup;
*/
DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context, MemberDef *md,
const char *input,bool isExample);
const char *input,bool isExample,
SectionDict *sections=0);
/*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols.
......
......@@ -288,7 +288,7 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>()\[\]:;\?{}&$#,.]+|"{"|"}"
WORD1 [^ \t\n\r\\@<>()\[\]:;\?{}&$#,.]+|"{"|"}"|("\""[^"\n]*"\"")
WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"
WORD1NQ [^ \t\n\r\\@<>()\[\]:;\?{}&$#,."]+
WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"
......@@ -603,7 +603,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
return 0;
}
<St_Ref>("#"|"::")?({ID}[.#:-])*{ID} {
<St_Ref>("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID} {
g_token->name=yytext;
return TK_WORD;
}
......
......@@ -775,7 +775,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
DotNode *node;
for (;(node=dnli2.current());++dnli2)
{
if (node->m_subgraphId==n->m_subgraphId) node->write(t,BITMAP,FALSE,TRUE);
if (node->m_subgraphId==n->m_subgraphId)
node->write(t,BITMAP,FALSE,TRUE,1000,TRUE);
}
t << "}" << endl;
f.close();
......@@ -1062,7 +1063,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
}
m_usedNodes->insert(className,bn);
//printf(" add new child node `%s' to %s\n",className.data(),n->m_label.data());
if (distance<m_recDepth) buildGraph(cd,bn,distance+1,base);
// we use <=, i.s.o < to cause one more level than intended which is used to
// detect truncated nodes
if (distance<=m_recDepth) buildGraph(cd,bn,distance+1,base);
}
}
......@@ -1374,7 +1378,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
}
baseName = convertNameToFile(diskName());
findMaximalDotGraph(m_startNode,m_maxDistance,baseName,
findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,
thisDir,format,!isTBRank,m_graphType==Inheritance);
if (format==BITMAP) // run dot to create a bitmap image
......@@ -1548,15 +1552,19 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
n->addChild(bn,0,0,0);
bn->addParent(n);
m_usedNodes->insert(in,bn);
if (bfd) buildGraph(bn,bfd,distance+1);
// we use <=, i.s.o < to cause one more level than intended which is used to
// detect truncated nodes
if (bfd && distance<=m_recDepth) buildGraph(bn,bfd,distance+1);
}
}
}
}
DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse)
DotInclDepGraph::DotInclDepGraph(FileDef *fd,int maxRecursionDepth,bool inverse)
{
m_maxDistance = 0;
m_recDepth = maxRecursionDepth;
m_inverse = inverse;
ASSERT(fd!=0);
m_diskName = fd->getFileBase().copy();
......@@ -1610,7 +1618,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
QCString mapName=m_startNode->m_label.copy();
if (m_inverse) mapName+="dep";
findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir,format,
findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,thisDir,format,
FALSE,FALSE,!m_inverse);
if (format==BITMAP)
......
......@@ -76,7 +76,7 @@ class DotNode
void removeChild(DotNode *n);
void removeParent(DotNode *n);
void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren,
int maxDistance=1000,bool backArrows=TRUE);
int maxDistance,bool backArrows);
int m_subgraphId;
void clearWriteFlag();
void writeXML(QTextStream &t,bool isClassGraph);
......@@ -125,7 +125,7 @@ class DotClassGraph
{
public:
enum GraphType { Interface, Implementation, Inheritance };
DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth=1000);
DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth);
~DotClassGraph();
bool isTrivial() const;
QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path,
......@@ -152,7 +152,7 @@ class DotClassGraph
class DotInclDepGraph
{
public:
DotInclDepGraph(FileDef *fd,bool inverse=FALSE);
DotInclDepGraph(FileDef *fd,int maxRecusionDepth,bool inverse=FALSE);
~DotInclDepGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path,
bool writeImageMap=TRUE);
......@@ -168,6 +168,7 @@ class DotInclDepGraph
QCString m_diskName;
int m_maxDistance;
bool m_inverse;
int m_recDepth;
};
void generateGraphLegend(const char *path);
......
......@@ -2939,9 +2939,11 @@ static void findUsedClassesForClass(Entry *root,
//printf("findUsedClassesForClass(%s)=%s\n",masterCd->name().data(),type.data());
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec))
{
//printf("Found used class %s\n",usedClassName.data());
// the name could be a type definition, resolve it
// TODO: recursive typedef resolution
QCString typeName = resolveTypeDef(masterCd,usedClassName);
//printf("Found resolved class %s\n",typeName.data());
// add any template arguments to the class
QCString usedName = usedClassName+templSpec;
......@@ -2993,34 +2995,10 @@ static void findUsedClassesForClass(Entry *root,
if (!found)
{
ClassDef *usedCd=0;
#if 0
Definition *scope=masterCd->getOuterScope();
do
{
// TODO: also consider using declarations and directives
// as done for inheritance relations.
QCString scopeName;
if (scope) scopeName=scope->qualifiedName();
if (!scopeName.isEmpty())
{
usedCd=getResolvedClass(masterCd,scopeName+"::"+usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(masterCd,scopeName+"::"+usedClassName,0,&templSpec);
//printf("Search for class %s result=%p\n",(scopeName+"::"+usedName).data(),usedCd);
}
else
{
usedCd=getResolvedClass(masterCd,usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(masterCd,usedClassName,0,&templSpec);
//printf("Search for class %s result=%p\n",usedName.data(),usedCd);
}
if (scope) scope=scope->getOuterScope();
} while (scope && usedCd==0);
#endif
usedCd = findClassWithinClassContext(masterCd,usedName);
ClassDef *usedCd=findClassWithinClassContext(masterCd,usedName);
//printf("Looking for used class: result=%p master=%p\n",usedCd,masterCd);
if (usedCd && usedCd!=masterCd)
if (usedCd /*&& usedCd!=masterCd*/)
{
found=TRUE;
Debug::print(Debug::Classes,0," Adding used class `%s'\n", usedCd->name().data());
......@@ -6109,7 +6087,7 @@ static void findMainPage(Entry *root)
indexName, root->doc,title);
//setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->fileName = indexName;
Doxygen::mainPage->addSections(root->anchors);
//Doxygen::mainPage->addSections(root->anchors);
// a page name is a label as well!
SectionInfo *si=new SectionInfo(
......@@ -6253,7 +6231,7 @@ static void generatePageDocs()
{
scName=pi->context->name();
}
outputList->parseDoc(pi->defFileName,pi->defLine,scName,0,pi->doc,FALSE);
outputList->parseDoc(pi->defFileName,pi->defLine,scName,0,pi->doc,FALSE,pi->sectionDict);
outputList->endTextBlock();
endFile(*outputList);
//outputList->enable(OutputGenerator::Man);
......@@ -6293,7 +6271,7 @@ static void buildExampleList(Entry *root)
PageInfo *pi=new PageInfo(root->fileName,root->startLine,
root->name,root->doc,root->args);
pi->fileName = convertNameToFile(pi->name+"-example");
pi->addSections(root->anchors);
//pi->addSections(root->anchors);
Doxygen::exampleSDict->inSort(root->name,pi);
addExampleToGroups(root,pi);
......
......@@ -63,6 +63,7 @@ static const char *defaultStyleSheet =
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY { background: white; color: black }\n"
"EM.mdesc { font-size: smaller }\n"
"TD.indexkey { \n"
" background-color: #eeeeff; \n"
" font-weight: bold; \n"
......@@ -791,11 +792,11 @@ void HtmlGenerator::startMemberDescription()
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "<tr><td>&nbsp;</td><td><font size=-1><em>";
t << "<tr><td>&nbsp;</td><td><em class=\"mdesc\">";
}
else
{
t << "<dl class=\"el\"><dd><font size=-1><em>";
t << "<dl class=\"el\"><dd><em class=\"mdesc\">";
}
}
......@@ -804,11 +805,11 @@ void HtmlGenerator::endMemberDescription()
DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "</em></font><br><br></td></tr>" << endl;
t << "</em><br><br></td></tr>" << endl;
}
else
{
t << "<br><br></em></font></dl>";
t << "<br><br></em></dl>";
}
}
......@@ -1046,7 +1047,7 @@ void HtmlGenerator::startParameterName(bool oneArgOnly)
{
t << "1\" valign=\"top";
}
t << "\" nowrap>&nbsp;";
t << "\" nowrap>"; //&nbsp;";
}
void HtmlGenerator::endParameterName(bool last,bool emptyList)
......@@ -1057,7 +1058,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList)
if (emptyList)
{
t << " </td>" << endl;
t << " <td class=\"md\" valign=\"top\">)&nbsp;</td>" << endl;
t << " <td class=\"md\" valign=\"top\">&nbsp;)&nbsp;</td>" << endl;
t << " <td class=\"md\" nowrap>";
}
else
......
......@@ -2763,7 +2763,8 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage)
{
Doxygen::insideMainPage=TRUE;
ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->doc,FALSE);
ol.parseDoc(defFileName,defLine,0,0,
Doxygen::mainPage->doc,FALSE,Doxygen::mainPage->sectionDict);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
......@@ -2936,7 +2937,8 @@ void writeIndex(OutputList &ol)
// ol.endSection(si->label,FALSE);
//}
ol.startTextBlock();
ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->doc,FALSE);
ol.parseDoc(defFileName,defLine,0,0,
Doxygen::mainPage->doc,FALSE,Doxygen::mainPage->sectionDict);
ol.endTextBlock();
endFile(ol);
ol.enable(OutputGenerator::Man);
......
......@@ -26,7 +26,7 @@
#include "translator_nl.h"
#endif
#ifdef LANG_SE
#include "translator_se.h"
//#include "translator_se.h"
#endif
#ifdef LANG_CZ
#include "translator_cz.h"
......@@ -47,7 +47,7 @@
#include "translator_es.h"
#endif
#ifdef LANG_FI
#include "translator_fi.h"
//#include "translator_fi.h"
#endif
#ifdef LANG_RU
#include "translator_ru.h"
......@@ -112,6 +112,16 @@
Translator *theTranslator=0;
static const char obsoleteMsg[] =
"---------\n"
"ERROR: The selected language is no longer supported!\n"
"If you want doxygen to produce output in this language \n"
"you are kindly requested to help bringing the documentation \n"
"up to date. Please read the development section of the manual \n"
"for more information or contact Petr Prikryl (Prikryl@skil.cz).\n"
"Thanks in advance!\n"
"---------\n";
bool setTranslator(const char *langName)
{
if (L_EQUAL("english"))
......@@ -128,7 +138,9 @@ bool setTranslator(const char *langName)
#ifdef LANG_SE
else if (L_EQUAL("swedish"))
{
theTranslator=new TranslatorSwedish;
//theTranslator=new TranslatorSwedish;
theTranslator=new TranslatorEnglish;
err(obsoleteMsg);
}
#endif
#ifdef LANG_CZ
......@@ -174,7 +186,9 @@ bool setTranslator(const char *langName)
#ifdef LANG_FI
else if (L_EQUAL("finnish"))
{
theTranslator=new TranslatorFinnish;
//theTranslator=new TranslatorFinnish;
theTranslator=new TranslatorEnglish;
err(obsoleteMsg);
}
#endif
#ifdef LANG_RU
......
......@@ -179,103 +179,100 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()); ++mli )
{
//printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType());
switch(md->memberType())
if (md->isBriefSectionVisible())
{
case MemberDef::Define: // fall through
case MemberDef::Prototype: // fall through
case MemberDef::Typedef: // fall through
case MemberDef::Variable: // fall through
case MemberDef::Function: // fall through
case MemberDef::Signal: // fall through
case MemberDef::Slot: // fall through
case MemberDef::DCOP: // fall through
case MemberDef::Property: // fall through
case MemberDef::Event:
{
if (md->isBriefSectionVisible())
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
break;
}
case MemberDef::Enumeration:
//printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType());
switch(md->memberType())
{
if (first) ol.startMemberList(),first=FALSE;
int enumVars=0;
MemberListIterator vmli(*this);
MemberDef *vmd;
QCString name(md->name());
int i=name.findRev("::");
if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
if (name[0]=='@') // anonymous enum => append variables
{
for ( ; (vmd=vmli.current()) ; ++vmli)
case MemberDef::Define: // fall through
case MemberDef::Prototype: // fall through
case MemberDef::Typedef: // fall through
case MemberDef::Variable: // fall through
case MemberDef::Function: // fall through
case MemberDef::Signal: // fall through
case MemberDef::Slot: // fall through
case MemberDef::DCOP: // fall through
case MemberDef::Property: // fall through
case MemberDef::Event:
{
QCString vtype=vmd->typeString();
if ((vtype.find(name))!=-1)
{
enumVars++;
vmd->setAnonymousEnumType(md);
}
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
break;
}
}
// if this is an anoymous enum and there are variable of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
//ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
case MemberDef::Enumeration:
{
ol.startMemberDescription();
ol.parseDoc(
md->briefFile(),md->briefLine(),
cd?cd->name().data():0,md,
md->briefDescription(),
FALSE
);
if (md->isDetailedSectionLinkable())
if (first) ol.startMemberList(),first=FALSE;
int enumVars=0;
MemberListIterator vmli(*this);
MemberDef *vmd;
QCString name(md->name());
int i=name.findRev("::");
if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
if (name[0]=='@') // anonymous enum => append variables
{
ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis();
ol.docify(" ");
if (md->getGroupDef()!=0 && gd==0) // forward link to group
for ( ; (vmd=vmli.current()) ; ++vmli)
{
ol.startTextLink(md->getGroupDef()->getOutputFileBase(),
md->anchor());
QCString vtype=vmd->typeString();
if ((vtype.find(name))!=-1)
{
enumVars++;
vmd->setAnonymousEnumType(md);
}
}
else
}
// if this is an anoymous enum and there are variables of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
//ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startTextLink(0,md->anchor());
ol.startMemberDescription();
ol.parseDoc(
md->briefFile(),md->briefLine(),
cd?cd->name().data():0,md,
md->briefDescription(),
FALSE
);
if (md->isDetailedSectionLinkable())
{
ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis();
ol.docify(" ");
if (md->getGroupDef()!=0 && gd==0) // forward link to group
{
ol.startTextLink(md->getGroupDef()->getOutputFileBase(),
md->anchor());
}
else
{
ol.startTextLink(0,md->anchor());
}
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.enableAll();
}
ol.endMemberDescription();
}
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.enableAll();
}
ol.endMemberDescription();
md->warnIfUndocumented();
break;
}
}
md->warnIfUndocumented();
break;
}
case MemberDef::Friend:
{
if (md->isBriefSectionVisible())
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
break;
case MemberDef::Friend:
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
break;
}
case MemberDef::EnumValue:
break;
}
case MemberDef::EnumValue:
break;
}
}
......
......@@ -193,7 +193,8 @@ void OutputList::popGeneratorState()
void OutputList::parseDoc(const char *fileName,int startLine,
const char * clName,MemberDef * md,
const QCString &docStr,bool isExample)
const QCString &docStr,bool isExample,
SectionDict *sections)
{
int count=0;
OutputGenerator *og=outputs->first();
......@@ -205,7 +206,7 @@ void OutputList::parseDoc(const char *fileName,int startLine,
if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine,
clName,md,docStr,isExample);
clName,md,docStr,isExample,sections);
og=outputs->first();
while (og)
......
......@@ -36,6 +36,7 @@ class ClassDiagram;
class DotClassGraph;
class DotInclDepGraph;
class DotGfxHierarchyTable;
class SectionDict;
class OutputList : public OutputDocInterface
{
......@@ -61,7 +62,7 @@ class OutputList : public OutputDocInterface
void parseDoc(const char *fileName,int startLine,
const char *clName,MemberDef *md,const QCString &docStr,
bool isExample);
bool isExample,SectionDict *sections=0);
void parseText(const QCString &textStr);
......
......@@ -27,8 +27,14 @@ class PageInfo
public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n),
doc(d), title(t), context(0), sectionDict(0),specialListItems(0),m_inGroup(0)
{}
doc(d), title(t), context(0),specialListItems(0),m_inGroup(0)
{
sectionDict = new SectionDict(17);
}
~PageInfo()
{
delete sectionDict;
}
// where the page definition was found
QCString defFileName;
......@@ -51,33 +57,33 @@ class PageInfo
bool isReference() const { return !reference.isEmpty(); }
QCString getReference() const { return reference; }
void addSections(QList<QCString> *anchorList)
{
if (anchorList)
{
QCString *s=anchorList->first();
while (s)
{
SectionInfo *si=0;
if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
{
//printf("Add section `%s' to definition `%s'\n",
// si->label.data(),n.data());
if (sectionDict==0)
{
sectionDict = new SectionDict(17);
}
if (sectionDict->find(*s)==0)
{
sectionDict->insert(*s,si);
}
si->pageRef = this;
si->fileName = fileName;
}
s=anchorList->next();
}
}
}
//void addSections(QList<QCString> *anchorList)
//{
// if (anchorList)
// {
// QCString *s=anchorList->first();
// while (s)
// {
// SectionInfo *si=0;
// if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
// {
// //printf("Add section `%s' to definition `%s'\n",
// // si->label.data(),n.data());
// if (sectionDict==0)
// {
// sectionDict = new SectionDict(17);
// }
// if (sectionDict->find(*s)==0)
// {
// sectionDict->insert(*s,si);
// }
// si->pageRef = this;
// si->fileName = fileName;
// }
// s=anchorList->next();
// }
// }
//}
void findSectionsInDocumentation()
{
docFindSections(doc,this,0,0,defFileName);
......
......@@ -292,15 +292,15 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "\\par" << endl;
//m_t << "\\par" << endl;
m_t << "}" << endl;
break;
case DocVerbatim::Verbatim:
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
filter(s->text());
m_t << "\\par" << endl;
filter(s->text(),TRUE);
//m_t << "\\par" << endl;
m_t << "}" << endl;
break;
case DocVerbatim::HtmlOnly:
......@@ -572,14 +572,17 @@ void RTFDocVisitor::visitPost(DocSimpleListItem *)
void RTFDocVisitor::visitPre(DocSection *s)
{
if (m_hide) return;
m_t << "{" // start section
m_t << "\\par" << endl <<
"{{" // start section
<< rtf_Style_Reset;
QString heading;
int level = QMIN(s->level()+2,4);
int level = QMIN(s->level()+1,4);
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading]->reference;
m_t << rtf_Style[heading]->reference << endl;
// make table of contents entry
filter(s->title());
m_t << endl << "\\par" << "}" << endl;
m_t << "{\\tc\\tcl" << level << " \\v ";
filter(s->title());
m_t << "}" << endl;
......@@ -588,8 +591,7 @@ void RTFDocVisitor::visitPre(DocSection *s)
void RTFDocVisitor::visitPost(DocSection *)
{
if (m_hide) return;
m_t << "\\par" << endl;
m_t << "}"; // end section
m_t << "}" << endl; // end section
}
void RTFDocVisitor::visitPre(DocHtmlList *l)
......@@ -686,15 +688,15 @@ void RTFDocVisitor::visitPre(DocHtmlTable *)
m_t << "\\par" << endl;
}
void RTFDocVisitor::visitPost(DocHtmlTable *t)
void RTFDocVisitor::visitPost(DocHtmlTable *)
{
if (m_hide) return;
if (!t->hasCaption())
{
m_t << endl;
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
m_t << "{\\row }" << endl;
}
//if (!t->hasCaption())
//{
// m_t << endl;
// m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
// m_t << "{\\row }" << endl;
//}
m_t << "\\pard" << endl;
}
......@@ -724,7 +726,7 @@ void RTFDocVisitor::visitPre(DocHtmlRow *r)
"\\clbrdrb\\brdrs\\brdrw10 "
"\\clbrdrr \\brdrs\\brdrw10 "
"\\cltxlrtb "
"\\cellx" << (i*columnWidth) << endl;
"\\cellx" << ((i+1)*columnWidth) << endl;
}
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
}
......@@ -1091,7 +1093,7 @@ static char* getMultiByte(int c)
return s;
}
void RTFDocVisitor::filter(const char *str)
void RTFDocVisitor::filter(const char *str,bool verbatim)
{
if (str)
{
......@@ -1121,6 +1123,15 @@ void RTFDocVisitor::filter(const char *str)
case '{': m_t << "\\{"; break;
case '}': m_t << "\\}"; break;
case '\\': m_t << "\\\\"; break;
case '\n': if (verbatim)
{
m_t << "\\par" << endl;
}
else
{
m_t << '\n';
}
break;
default: m_t << (char)c;
}
pc = c;
......
......@@ -132,7 +132,7 @@ class RTFDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
void filter(const char *str);
void filter(const char *str,bool verbatim=FALSE);
void startLink(const QString &ref,const QString &file,
const QString &anchor);
void endLink(const QString &ref);
......
......@@ -823,7 +823,7 @@ void RTFGenerator::lastIndexPage()
t <<"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
t <<"\\sect \\sectd \\sbknone\n";
// set footer
// set new footer with arabic numbers
t <<"{\\footer "<< rtf_Style["Footer"]->reference << "{\\chpgn}}\n";
//t << rtf_Style["Heading1"]->reference << "\n";
......@@ -1970,7 +1970,7 @@ void RTFGenerator::endTextBlock()
newParagraph();
DBG_RTF(t << "{\\comment endTextBlock}" << endl)
t << "}" << endl;
m_omitParagraph = TRUE;
//m_omitParagraph = TRUE;
}
void RTFGenerator::newParagraph()
......
......@@ -467,9 +467,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
MemberDef *tmd=0;
for (;(tmd=mni.current());++mni)
{
//printf("Found member %s scope=%p mContext=%p\n",tmd->name().data(),
// tmd->getOuterScope(),mContext);
if (tmd->isTypedef() && tmd->getOuterScope()==resScope)
//printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
// tmd->name().data(), resScope->name().data(),
// tmd->getOuterScope()->name().data(), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
/*! TODO: look if resScope is visible within tmd->getOuterScope() */
{
md=tmd;
}
......@@ -2739,6 +2741,10 @@ bool generateLink(OutputDocInterface &od,const char *clName,
{
linkText=((GroupDef *)compound)->groupTitle(); // use group's title as link
}
else if (compound->definitionType()==Definition::TypeFile)
{
linkText=lt; // use text "as is"
}
od.writeObjectLink(compound->getReference(),
compound->getOutputFileBase(),anchor,linkText);
if (!compound->isReference())
......@@ -2761,6 +2767,7 @@ bool generateLink(OutputDocInterface &od,const char *clName,
void generateFileRef(OutputDocInterface &od,const char *name,const char *text)
{
//printf("generateFileRef(%s,%s)\n",name,text);
QCString linkText = text ? text : name;
//FileInfo *fi;
FileDef *fd;
......@@ -3581,7 +3588,8 @@ found:
//----------------------------------------------------------------------------
PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors,
const QCString &doc,
QList<QCString> * /*anchors*/,
const char *fileName,int startLine,
const QList<ListItemInfo> *sli,
GroupDef *gd,
......@@ -3634,7 +3642,7 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
pageName=pi->name.lower();
//setFileNameForSections(anchors,pageName,pi);
pi->fileName = pageName;
pi->addSections(anchors);
//pi->addSections(anchors);
//printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pi);
......
......@@ -978,14 +978,16 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd->name(),0,cd->documentation());
t << " </detaileddescription>" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
Config_getBool("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
t << " <inheritancegraph>" << endl;
inheritanceGraph.writeXML(t);
t << " </inheritancegraph>" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
Config_getBool("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial())
{
t << " <collaborationgraph>" << endl;
......
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