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

Release-1.3.6-20040324

parent ce05925c
DOXYGEN Version 1.3.6-20040307 DOXYGEN Version 1.3.6-20040324
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (07 March 2004) Dimitri van Heesch (24 March 2004)
DOXYGEN Version 1.3.6_20040307 DOXYGEN Version 1.3.6_20040324
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (07 March 2004) Dimitri van Heesch (dimitri@stack.nl) (24 March 2004)
1.3.6-20040307 1.3.6-20040324
...@@ -147,6 +147,7 @@ documentation: ...@@ -147,6 +147,7 @@ documentation:
\refitem cmdlt \\\< \refitem cmdlt \\\<
\refitem cmdgt \\\> \refitem cmdgt \\\>
\refitem cmdhash \\\# \refitem cmdhash \\\#
\refitem cmdperc \\\%
\endsecreflist \endsecreflist
The following subsections provide a list of all commands that are recognized by The following subsections provide a list of all commands that are recognized by
...@@ -1956,6 +1957,15 @@ class C {}; ...@@ -1956,6 +1957,15 @@ class C {};
\f$\mbox{\LaTeX}\f$ output. This \f$\mbox{\LaTeX}\f$ output. This
character has to be escaped because it has a special meaning in HTML. character has to be escaped because it has a special meaning in HTML.
\section cmdperc \%
\addindex \\\%
This command writes the \% character to the HTML and
\f$\mbox{\LaTeX}\f$ output. This
character has to be escaped in some cases, because it is used to
prevent auto-linking to word that is also a documented class or struct.
<hr>
<hr> <hr>
<h2>\htmlonly <center> --- \endhtmlonly <h2>\htmlonly <center> --- \endhtmlonly
Commands included for Qt compatibility Commands included for Qt compatibility
......
...@@ -71,6 +71,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -71,6 +71,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_cols_in_alpha_index COLS_IN_ALPHA_INDEX \refitem cfg_cols_in_alpha_index COLS_IN_ALPHA_INDEX
\refitem cfg_compact_latex COMPACT_LATEX \refitem cfg_compact_latex COMPACT_LATEX
\refitem cfg_compact_rtf COMPACT_RTF \refitem cfg_compact_rtf COMPACT_RTF
\refitem cfg_create_subdirs CREATE_SUBDIRS
\refitem cfg_details_at_top DETAILS_AT_TOP \refitem cfg_details_at_top DETAILS_AT_TOP
\refitem cfg_disable_index DISABLE_INDEX \refitem cfg_disable_index DISABLE_INDEX
\refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC \refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC
...@@ -233,6 +234,16 @@ followed by the descriptions of the tags grouped by category. ...@@ -233,6 +234,16 @@ followed by the descriptions of the tags grouped by category.
If a relative path is entered, it will be relative to the location If a relative path is entered, it will be relative to the location
where doxygen was started. If left blank the current directory will be used. where doxygen was started. If left blank the current directory will be used.
\anchor cfg_create_subdirs
<dt>\c CREATE_SUBDIRS <dd>
\addindex CREATE_SUBDIRS
If the \c CREATE_SUBDIRS tag is set to \c YES, then doxygen will create
2 levels of 10 sub-directories under the output directory of each output
format and will distribute the generated files over these directories.
Enabling this option can be useful when feeding doxygen a huge amount of source
files, where putting all generated files in the same directory would otherwise
causes performance problems for the file system.
\anchor cfg_output_language \anchor cfg_output_language
<dt>\c OUTPUT_LANGUAGE <dd> <dt>\c OUTPUT_LANGUAGE <dd>
\addindex OUTPUT_LANGUAGE \addindex OUTPUT_LANGUAGE
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.6_20040307 Version: 1.3.6_20040324
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -1186,7 +1186,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1186,7 +1186,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.writeString("<center><font size=\"2\">["); ol.writeString("<center><font size=\"2\">[");
ol.startHtmlLink("graph_legend"+Doxygen::htmlFileExtension); ol.startHtmlLink(relativePathToRoot(0)+"graph_legend"+Doxygen::htmlFileExtension);
ol.docify(theTranslator->trLegend()); ol.docify(theTranslator->trLegend());
ol.endHtmlLink(); ol.endHtmlLink();
ol.writeString("]</font></center>"); ol.writeString("]</font></center>");
...@@ -1220,7 +1220,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1220,7 +1220,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{ {
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.writeString("<center><font size=\"2\">["); ol.writeString("<center><font size=\"2\">[");
ol.startHtmlLink("graph_legend"+Doxygen::htmlFileExtension); ol.startHtmlLink(relativePathToRoot(0)+"graph_legend"+Doxygen::htmlFileExtension);
ol.docify(theTranslator->trLegend()); ol.docify(theTranslator->trLegend());
ol.endHtmlLink(); ol.endHtmlLink();
ol.writeString("]</font></center>"); ol.writeString("]</font></center>");
......
...@@ -1319,18 +1319,29 @@ void Config::create() ...@@ -1319,18 +1319,29 @@ void Config::create()
"where doxygen was started. If left blank the current directory will be used.\n" "where doxygen was started. If left blank the current directory will be used.\n"
); );
cs->setWidgetType(ConfigString::Dir); cs->setWidgetType(ConfigString::Dir);
cb = addBool(
"CREATE_SUBDIRS",
"If the CREATE_SUBDIRS tag is set to YES, then doxygen will create \n"
"2 levels of 10 sub-directories under the output directory of each output \n"
"format and will distribute the generated files over these directories. \n"
"Enabling this option can be useful when feeding doxygen a huge amount of source \n"
"files, where putting all generated files in the same directory would otherwise \n"
"cause performance problems for the file system. \n",
FALSE
);
cb->addDependency("GENERATE_HTML");
ce = addEnum( ce = addEnum(
"OUTPUT_LANGUAGE", "OUTPUT_LANGUAGE",
"The OUTPUT_LANGUAGE tag is used to specify the language in which all \n" "The OUTPUT_LANGUAGE tag is used to specify the language in which all \n"
"documentation generated by doxygen is written. Doxygen will use this \n" "documentation generated by doxygen is written. Doxygen will use this \n"
"information to generate all constant output in the proper language. \n" "information to generate all constant output in the proper language. \n"
"The default language is English, other supported languages are: \n" "The default language is English, other supported languages are: \n"
"Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, \n" "Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, \n"
"Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en \n" "Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en \n"
"(Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, \n" "(Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, \n"
"Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.\n", "Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.\n",
"English" "English"
); );
#ifdef LANG_BR #ifdef LANG_BR
ce->addValue("Brazilian"); ce->addValue("Brazilian");
#endif #endif
......
...@@ -65,7 +65,11 @@ static void addTypeName() ...@@ -65,7 +65,11 @@ static void addTypeName()
{ {
//printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n", //printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
// type.data(),scope.data(),name.data()); // type.data(),scope.data(),name.data());
if (name.isEmpty()) return; if (name.isEmpty() ||
name.at(name.length()-1)==':') // end of Objective-C keyword => append to name not type
{
return;
}
if (!type.isEmpty()) type+=' '; if (!type.isEmpty()) type+=' ';
type+=name; type+=name;
name.resize(0); name.resize(0);
......
...@@ -266,7 +266,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -266,7 +266,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if (l>0) if (l>0)
{ {
int i=l-1; int i=l-1;
while (i>=0 && (isspace(g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--; while (i>=0 && (isspace((uchar)g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--;
while (i>=0 && isId(g_curArgTypeName.at(i))) i--; while (i>=0 && isId(g_curArgTypeName.at(i))) i--;
//printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i); //printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i);
Argument *a = new Argument; Argument *a = new Argument;
......
...@@ -58,7 +58,7 @@ class Definition ...@@ -58,7 +58,7 @@ class Definition
/*! Returns the base name of the output file that contains this /*! Returns the base name of the output file that contains this
* definition. * definition.
*/ */
QCString qualifiedName() const; virtual QCString qualifiedName() const;
QCString localName() const; QCString localName() const;
virtual QCString getOutputFileBase() const = 0; virtual QCString getOutputFileBase() const = 0;
/*! Returns the name of the source listing of this file. */ /*! Returns the name of the source listing of this file. */
......
...@@ -84,6 +84,7 @@ static QStack<DocStyleChange> g_styleStack; ...@@ -84,6 +84,7 @@ static QStack<DocStyleChange> g_styleStack;
static QStack<DocStyleChange> g_initialStyleStack; static QStack<DocStyleChange> g_initialStyleStack;
static QList<Definition> g_copyStack; static QList<Definition> g_copyStack;
static QString g_fileName; static QString g_fileName;
static QString g_relPath;
struct DocParserContext struct DocParserContext
{ {
...@@ -96,6 +97,7 @@ struct DocParserContext ...@@ -96,6 +97,7 @@ struct DocParserContext
QList<Definition> copyStack; QList<Definition> copyStack;
MemberDef *memberDef; MemberDef *memberDef;
QString fileName; QString fileName;
QString relPath;
}; };
static QStack<DocParserContext> g_parserStack; static QStack<DocParserContext> g_parserStack;
...@@ -114,6 +116,7 @@ static void docParserPushContext() ...@@ -114,6 +116,7 @@ static void docParserPushContext()
ctx->initialStyleStack = g_initialStyleStack; ctx->initialStyleStack = g_initialStyleStack;
ctx->copyStack = g_copyStack; ctx->copyStack = g_copyStack;
ctx->fileName = g_fileName; ctx->fileName = g_fileName;
ctx->relPath = g_relPath;
g_parserStack.push(ctx); g_parserStack.push(ctx);
} }
...@@ -128,6 +131,7 @@ static void docParserPopContext() ...@@ -128,6 +131,7 @@ static void docParserPopContext()
g_initialStyleStack = ctx->initialStyleStack; g_initialStyleStack = ctx->initialStyleStack;
g_copyStack = ctx->copyStack; g_copyStack = ctx->copyStack;
g_fileName = ctx->fileName; g_fileName = ctx->fileName;
g_relPath = ctx->relPath;
delete ctx; delete ctx;
doctokenizerYYpopContext(); doctokenizerYYpopContext();
} }
...@@ -1191,7 +1195,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word, ...@@ -1191,7 +1195,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word,
const QString &ref,const QString &file, const QString &ref,const QString &file,
const QString &anchor) : const QString &anchor) :
m_parent(parent), m_word(word), m_ref(ref), m_parent(parent), m_word(word), m_ref(ref),
m_file(file), m_anchor(anchor) m_file(file), m_relPath(g_relPath), m_anchor(anchor)
{ {
//printf("new word %s url=%s\n",word.data(),g_searchUrl.data()); //printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
if (!g_searchUrl.isEmpty()) if (!g_searchUrl.isEmpty())
...@@ -1281,7 +1285,7 @@ void DocIncOperator::parse() ...@@ -1281,7 +1285,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match if (nonEmpty) break; // we have a pattern to match
so=o+1; // no pattern, skip empty line so=o+1; // no pattern, skip empty line
} }
else if (!isspace(c)) // no white space char else if (!isspace((uchar)c)) // no white space char
{ {
nonEmpty=TRUE; nonEmpty=TRUE;
} }
...@@ -1306,7 +1310,7 @@ void DocIncOperator::parse() ...@@ -1306,7 +1310,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match if (nonEmpty) break; // we have a pattern to match
so=o+1; // no pattern, skip empty line so=o+1; // no pattern, skip empty line
} }
else if (!isspace(c)) // no white space char else if (!isspace((uchar)c)) // no white space char
{ {
nonEmpty=TRUE; nonEmpty=TRUE;
} }
...@@ -1334,7 +1338,7 @@ void DocIncOperator::parse() ...@@ -1334,7 +1338,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match if (nonEmpty) break; // we have a pattern to match
so=o+1; // no pattern, skip empty line so=o+1; // no pattern, skip empty line
} }
else if (!isspace(c)) // no white space char else if (!isspace((uchar)c)) // no white space char
{ {
nonEmpty=TRUE; nonEmpty=TRUE;
} }
...@@ -1361,7 +1365,7 @@ void DocIncOperator::parse() ...@@ -1361,7 +1365,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match if (nonEmpty) break; // we have a pattern to match
so=o+1; // no pattern, skip empty line so=o+1; // no pattern, skip empty line
} }
else if (!isspace(c)) // no white space char else if (!isspace((uchar)c)) // no white space char
{ {
nonEmpty=TRUE; nonEmpty=TRUE;
} }
...@@ -1635,7 +1639,7 @@ endsecreflist: ...@@ -1635,7 +1639,7 @@ endsecreflist:
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocInternalRef::DocInternalRef(DocNode *parent,const QString &ref) DocInternalRef::DocInternalRef(DocNode *parent,const QString &ref)
: m_parent(parent) : m_parent(parent), m_relPath(g_relPath)
{ {
int i=ref.find('#'); int i=ref.find('#');
if (i!=-1) if (i!=-1)
...@@ -1691,6 +1695,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1691,6 +1695,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
Definition *compound = 0; Definition *compound = 0;
QCString anchor; QCString anchor;
ASSERT(!target.isEmpty()); ASSERT(!target.isEmpty());
m_relPath = g_relPath;
SectionInfo *sec = Doxygen::sectionDict[target]; SectionInfo *sec = Doxygen::sectionDict[target];
if (sec) // ref to section or anchor if (sec) // ref to section or anchor
{ {
...@@ -1779,6 +1784,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) : ...@@ -1779,6 +1784,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
//PageInfo *page; //PageInfo *page;
QCString anchor; QCString anchor;
m_refText = target; m_refText = target;
m_relPath = g_relPath;
if (!m_refText.isEmpty() && m_refText.at(0)=='#') if (!m_refText.isEmpty() && m_refText.at(0)=='#')
{ {
m_refText = m_refText.right(m_refText.length()-1); m_refText = m_refText.right(m_refText.length()-1);
...@@ -4889,6 +4895,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -4889,6 +4895,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
} }
g_fileName = fileName; g_fileName = fileName;
g_relPath = ctx ? relativePathToRoot(ctx->getOutputFileBase()) : QString("");
g_memberDef = md; g_memberDef = md;
g_nodeStack.clear(); g_nodeStack.clear();
g_styleStack.clear(); g_styleStack.clear();
...@@ -4940,6 +4947,7 @@ DocNode *validatingParseText(const char *input) ...@@ -4940,6 +4947,7 @@ DocNode *validatingParseText(const char *input)
g_token = new TokenInfo; g_token = new TokenInfo;
g_context = ""; g_context = "";
g_fileName = "<parseText>"; g_fileName = "<parseText>";
g_relPath = "";
g_memberDef = 0; g_memberDef = 0;
g_nodeStack.clear(); g_nodeStack.clear();
g_styleStack.clear(); g_styleStack.clear();
......
...@@ -203,6 +203,7 @@ class DocLinkedWord : public DocNode ...@@ -203,6 +203,7 @@ class DocLinkedWord : public DocNode
Kind kind() const { return Kind_Word; } Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
QString file() const { return m_file; } QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString ref() const { return m_ref; } QString ref() const { return m_ref; }
QString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
...@@ -212,6 +213,7 @@ class DocLinkedWord : public DocNode ...@@ -212,6 +213,7 @@ class DocLinkedWord : public DocNode
QString m_word; QString m_word;
QString m_ref; QString m_ref;
QString m_file; QString m_file;
QString m_relPath;
QString m_anchor; QString m_anchor;
}; };
...@@ -614,6 +616,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode ...@@ -614,6 +616,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode
QString parse(bool); QString parse(bool);
Kind kind() const { return Kind_Link; } Kind kind() const { return Kind_Link; }
QString file() const { return m_file; } QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString ref() const { return m_ref; } QString ref() const { return m_ref; }
QString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
...@@ -622,6 +625,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode ...@@ -622,6 +625,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode
private: private:
DocNode *m_parent; DocNode *m_parent;
QString m_file; QString m_file;
QString m_relPath;
QString m_ref; QString m_ref;
QString m_anchor; QString m_anchor;
QString m_refText; QString m_refText;
...@@ -635,6 +639,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode ...@@ -635,6 +639,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode
void parse(); void parse();
Kind kind() const { return Kind_Ref; } Kind kind() const { return Kind_Ref; }
QString file() const { return m_file; } QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString ref() const { return m_ref; } QString ref() const { return m_ref; }
QString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
QString targetTitle() const { return m_text; } QString targetTitle() const { return m_text; }
...@@ -649,6 +654,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode ...@@ -649,6 +654,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode
bool m_refToSection; bool m_refToSection;
bool m_refToAnchor; bool m_refToAnchor;
QString m_file; QString m_file;
QString m_relPath;
QString m_ref; QString m_ref;
QString m_anchor; QString m_anchor;
QString m_text; QString m_text;
...@@ -662,6 +668,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode ...@@ -662,6 +668,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
void parse(); void parse();
Kind kind() const { return Kind_Ref; } Kind kind() const { return Kind_Ref; }
QString file() const { return m_file; } QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); }
...@@ -669,6 +676,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode ...@@ -669,6 +676,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
private: private:
DocNode * m_parent; DocNode * m_parent;
QString m_file; QString m_file;
QString m_relPath;
QString m_anchor; QString m_anchor;
}; };
......
...@@ -292,7 +292,8 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&] ...@@ -292,7 +292,8 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&]
FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&] FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&]
SCOPESEP "::"|"#"|"." SCOPESEP "::"|"#"|"."
SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP} SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP}
SCOPEMASK {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")? SCOPEKEYS ":"({ID}":")*
SCOPEMASK {SCOPEPRE}*(~)?{ID}{SCOPEKEYS}?("<"{TEMPCHAR}*">")?
FUNCARG "("{FUNCCHAR}*")" FUNCARG "("{FUNCCHAR}*")"
OPNEW {BLANK}+"new"({BLANK}*"[]")? OPNEW {BLANK}+"new"({BLANK}*"[]")?
OPDEL {BLANK}+"delete"({BLANK}*"[]")? OPDEL {BLANK}+"delete"({BLANK}*"[]")?
......
...@@ -1610,6 +1610,7 @@ QCString DotClassGraph::diskName() const ...@@ -1610,6 +1610,7 @@ QCString DotClassGraph::diskName() const
QCString DotClassGraph::writeGraph(QTextStream &out, QCString DotClassGraph::writeGraph(QTextStream &out,
GraphOutputFormat format, GraphOutputFormat format,
const char *path, const char *path,
const char *relPath,
bool isTBRank, bool isTBRank,
bool generateImageMap) bool generateImageMap)
{ {
...@@ -1643,7 +1644,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, ...@@ -1643,7 +1644,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
} }
baseName = convertNameToFile(diskName()); baseName = convertNameToFile(diskName());
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString md5 = computeMd5Signature(m_startNode, // root QCString md5 = computeMd5Signature(m_startNode, // root
m_graphType, // gt m_graphType, // gt
...@@ -1722,7 +1722,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out, ...@@ -1722,7 +1722,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
if (format==BITMAP && generateImageMap) // run dot to create a image map if (format==BITMAP && generateImageMap) // run dot to create a image map
{ {
QCString mapLabel = convertNameToFile(m_startNode->m_label+"_"+mapName); QCString mapLabel = convertNameToFile(m_startNode->m_label+"_"+mapName);
out << "<p><center><img src=\"" << baseName << "." out << "<p><center><img src=\"" << relPath << baseName << "."
<< imgExt << "\" border=\"0\" usemap=\"#" << imgExt << "\" border=\"0\" usemap=\"#"
<< mapLabel << "\" alt=\""; << mapLabel << "\" alt=\"";
switch (m_graphType) switch (m_graphType)
...@@ -1816,7 +1816,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) ...@@ -1816,7 +1816,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
doc = bfd->isLinkable(); doc = bfd->isLinkable();
src = bfd->generateSourceFile(); src = bfd->generateSourceFile();
} }
if (doc || src) if (doc || src || !Config_getBool("HIDE_UNDOC_RELATIONS"))
{ {
QCString url=""; QCString url="";
if (bfd) url=bfd->getOutputFileBase().copy(); if (bfd) url=bfd->getOutputFileBase().copy();
...@@ -1833,8 +1833,8 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) ...@@ -1833,8 +1833,8 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
} }
else else
{ {
QCString tmp_url=""; QCString tmp_url;
if (bfd) tmp_url=bfd->getReference()+"$"+url; if (bfd) tmp_url=doc || src ? bfd->getReference()+"$"+url : QCString();
bn = new DotNode( bn = new DotNode(
m_curNodeNumber++, m_curNodeNumber++,
ii->includeName, ii->includeName,
...@@ -1890,6 +1890,7 @@ QCString DotInclDepGraph::diskName() const ...@@ -1890,6 +1890,7 @@ QCString DotInclDepGraph::diskName() const
QCString DotInclDepGraph::writeGraph(QTextStream &out, QCString DotInclDepGraph::writeGraph(QTextStream &out,
GraphOutputFormat format, GraphOutputFormat format,
const char *path, const char *path,
const char *relPath,
bool generateImageMap bool generateImageMap
) )
{ {
...@@ -1900,7 +1901,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1900,7 +1901,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
err("Error: Output dir %s does not exist!\n",path); exit(1); err("Error: Output dir %s does not exist!\n",path); exit(1);
} }
QCString oldDir = convertToQCString(QDir::currentDirPath()); QCString oldDir = convertToQCString(QDir::currentDirPath());
// go to the html output directory (i.e. path) // go to the output directory (i.e. path)
QDir::setCurrent(d.absPath()); QDir::setCurrent(d.absPath());
QDir thisDir; QDir thisDir;
...@@ -1995,7 +1996,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1995,7 +1996,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
if (format==BITMAP && generateImageMap) if (format==BITMAP && generateImageMap)
{ {
out << "<p><center><img src=\"" << baseName << "." out << "<p><center><img src=\"" << relPath << baseName << "."
<< imgExt << "\" border=\"0\" usemap=\"#" << imgExt << "\" border=\"0\" usemap=\"#"
<< mapName << "_map\" alt=\""; << mapName << "_map\" alt=\"";
if (m_inverse) out << "Included by dependency graph"; else out << "Include dependency graph"; if (m_inverse) out << "Included by dependency graph"; else out << "Include dependency graph";
...@@ -2081,7 +2082,7 @@ DotCallGraph::~DotCallGraph() ...@@ -2081,7 +2082,7 @@ DotCallGraph::~DotCallGraph()
} }
QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
const char *path,bool generateImageMap) const char *path,const char *relPath,bool generateImageMap)
{ {
QDir d(path); QDir d(path);
// store the original directory // store the original directory
...@@ -2177,7 +2178,7 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, ...@@ -2177,7 +2178,7 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
if (format==BITMAP && generateImageMap) if (format==BITMAP && generateImageMap)
{ {
out << "<p><center><img src=\"" << baseName << "." out << "<p><center><img src=\"" << relPath << baseName << "."
<< imgExt << "\" border=\"0\" usemap=\"#" << imgExt << "\" border=\"0\" usemap=\"#"
<< mapName << "_map\" alt=\""; << mapName << "_map\" alt=\"";
out << "\">"; out << "\">";
......
...@@ -137,7 +137,7 @@ class DotClassGraph ...@@ -137,7 +137,7 @@ class DotClassGraph
~DotClassGraph(); ~DotClassGraph();
bool isTrivial() const; bool isTrivial() const;
QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path, QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path,
bool TBRank=TRUE,bool imageMap=TRUE); const char *relPath, bool TBRank=TRUE,bool imageMap=TRUE);
void writeXML(QTextStream &t); void writeXML(QTextStream &t);
void writeDEF(QTextStream &t); void writeDEF(QTextStream &t);
...@@ -163,6 +163,7 @@ class DotInclDepGraph ...@@ -163,6 +163,7 @@ class DotInclDepGraph
DotInclDepGraph(FileDef *fd,int maxRecusionDepth,bool inverse); DotInclDepGraph(FileDef *fd,int maxRecusionDepth,bool inverse);
~DotInclDepGraph(); ~DotInclDepGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path, QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path,
const char *relPath,
bool writeImageMap=TRUE); bool writeImageMap=TRUE);
bool isTrivial() const; bool isTrivial() const;
QCString diskName() const; QCString diskName() const;
...@@ -185,7 +186,7 @@ class DotCallGraph ...@@ -185,7 +186,7 @@ class DotCallGraph
DotCallGraph(MemberDef *md,int maxRecursionDepth); DotCallGraph(MemberDef *md,int maxRecursionDepth);
~DotCallGraph(); ~DotCallGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f, QCString writeGraph(QTextStream &t, GraphOutputFormat f,
const char *path,bool writeImageMap=TRUE); const char *path,const char *relPath,bool writeImageMap=TRUE);
void buildGraph(DotNode *n,MemberDef *md,int distance); void buildGraph(DotNode *n,MemberDef *md,int distance);
bool isTrivial() const; bool isTrivial() const;
......
...@@ -118,12 +118,14 @@ QTime Doxygen::runningTime; ...@@ -118,12 +118,14 @@ QTime Doxygen::runningTime;
SearchIndex * Doxygen::searchIndex=0; SearchIndex * Doxygen::searchIndex=0;
SDict<DefinitionList> *Doxygen::symbolMap; SDict<DefinitionList> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE; bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0;
static StringList inputFiles; static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections static StringDict excludeNameDict(1009); // sections
static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds
static OutputList *outputList = 0; // list of output generating objects static OutputList *outputList = 0; // list of output generating objects
void clearAll() void clearAll()
{ {
inputFiles.clear(); inputFiles.clear();
......
...@@ -101,6 +101,7 @@ class Doxygen ...@@ -101,6 +101,7 @@ class Doxygen
static SearchIndex *searchIndex; static SearchIndex *searchIndex;
static SDict<DefinitionList> *symbolMap; static SDict<DefinitionList> *symbolMap;
static bool outputToWizard; static bool outputToWizard;
static QDict<int> *htmlDirMap;
}; };
void initDoxygen(); void initDoxygen();
......
...@@ -61,7 +61,7 @@ void HtmlDocVisitor::visit(DocWord *w) ...@@ -61,7 +61,7 @@ void HtmlDocVisitor::visit(DocWord *w)
void HtmlDocVisitor::visit(DocLinkedWord *w) void HtmlDocVisitor::visit(DocLinkedWord *w)
{ {
if (m_hide) return; if (m_hide) return;
startLink(w->ref(),w->file(),w->anchor()); startLink(w->ref(),w->file(),w->relPath(),w->anchor());
filter(w->word()); filter(w->word());
endLink(); endLink();
} }
...@@ -750,7 +750,7 @@ void HtmlDocVisitor::visitPost(DocDotFile *df) ...@@ -750,7 +750,7 @@ void HtmlDocVisitor::visitPost(DocDotFile *df)
void HtmlDocVisitor::visitPre(DocLink *lnk) void HtmlDocVisitor::visitPre(DocLink *lnk)
{ {
if (m_hide) return; if (m_hide) return;
startLink(lnk->ref(),lnk->file(),lnk->anchor()); startLink(lnk->ref(),lnk->file(),lnk->relPath(),lnk->anchor());
} }
void HtmlDocVisitor::visitPost(DocLink *) void HtmlDocVisitor::visitPost(DocLink *)
...@@ -762,7 +762,10 @@ void HtmlDocVisitor::visitPost(DocLink *) ...@@ -762,7 +762,10 @@ void HtmlDocVisitor::visitPost(DocLink *)
void HtmlDocVisitor::visitPre(DocRef *ref) void HtmlDocVisitor::visitPre(DocRef *ref)
{ {
if (m_hide) return; if (m_hide) return;
if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor()); if (!ref->file().isEmpty())
{
startLink(ref->ref(),ref->file(),ref->relPath(),ref->anchor());
}
if (!ref->hasLinkText()) filter(ref->targetTitle()); if (!ref->hasLinkText()) filter(ref->targetTitle());
} }
...@@ -891,7 +894,7 @@ void HtmlDocVisitor::visitPost(DocXRefItem *) ...@@ -891,7 +894,7 @@ void HtmlDocVisitor::visitPost(DocXRefItem *)
void HtmlDocVisitor::visitPre(DocInternalRef *ref) void HtmlDocVisitor::visitPre(DocInternalRef *ref)
{ {
if (m_hide) return; if (m_hide) return;
startLink(0,ref->file(),ref->anchor()); startLink(0,ref->file(),ref->relPath(),ref->anchor());
} }
void HtmlDocVisitor::visitPost(DocInternalRef *) void HtmlDocVisitor::visitPost(DocInternalRef *)
...@@ -972,7 +975,8 @@ void HtmlDocVisitor::filterQuotedCdataAttr(const char* str) ...@@ -972,7 +975,8 @@ void HtmlDocVisitor::filterQuotedCdataAttr(const char* str)
} }
} }
void HtmlDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor) void HtmlDocVisitor::startLink(const QString &ref,const QString &file,
const QString &relPath,const QString &anchor)
{ {
QCString *dest; QCString *dest;
if (!ref.isEmpty()) // link to entity imported via tag file if (!ref.isEmpty()) // link to entity imported via tag file
...@@ -989,7 +993,11 @@ void HtmlDocVisitor::startLink(const QString &ref,const QString &file,const QStr ...@@ -989,7 +993,11 @@ void HtmlDocVisitor::startLink(const QString &ref,const QString &file,const QStr
m_t << "href=\""; m_t << "href=\"";
if (!ref.isEmpty()) if (!ref.isEmpty())
{ {
if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) m_t << relPath << *dest << "/";
}
else
{
m_t << relPath;
} }
if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension; if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension;
if (!anchor.isEmpty()) m_t << "#" << anchor; if (!anchor.isEmpty()) m_t << "#" << anchor;
......
...@@ -135,7 +135,7 @@ class HtmlDocVisitor : public DocVisitor ...@@ -135,7 +135,7 @@ class HtmlDocVisitor : public DocVisitor
void filter(const char *str); void filter(const char *str);
void filterQuotedCdataAttr(const char* str); void filterQuotedCdataAttr(const char* str);
void startLink(const QString &ref,const QString &file, void startLink(const QString &ref,const QString &file,
const QString &anchor); const QString &relPath,const QString &anchor);
void endLink(); void endLink();
void writeDotFile(const QString &fileName); void writeDotFile(const QString &fileName);
......
This diff is collapsed.
...@@ -128,7 +128,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -128,7 +128,7 @@ class HtmlGenerator : public OutputGenerator
void lineBreak() { t << "<br>" << endl; } void lineBreak() { t << "<br>" << endl; }
void writeChar(char c); void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc(bool);
void startDoxyAnchor(const char *fName,const char *manName, void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name); const char *anchor,const char *name);
void endDoxyAnchor(const char *fName,const char *anchor); void endDoxyAnchor(const char *fName,const char *anchor);
...@@ -214,6 +214,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -214,6 +214,7 @@ class HtmlGenerator : public OutputGenerator
private: private:
QCString lastTitle; QCString lastTitle;
QCString lastFile; QCString lastFile;
QCString relPath;
HtmlGenerator &operator=(const HtmlGenerator &g); HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g); HtmlGenerator(const HtmlGenerator &g);
......
...@@ -904,7 +904,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x) ...@@ -904,7 +904,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
m_t << "\\item["; m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
{ {
m_t << "\\hyperlink{" << x->file() << "_" << x->anchor() << "}{"; m_t << "\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
} }
else else
{ {
...@@ -960,7 +960,7 @@ void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QSt ...@@ -960,7 +960,7 @@ void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QSt
if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS"))
{ {
m_t << "\\hyperlink{"; m_t << "\\hyperlink{";
if (!file.isEmpty()) m_t << file; if (!file.isEmpty()) m_t << stripPath(file);
if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_"; if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
if (!anchor.isEmpty()) m_t << anchor; if (!anchor.isEmpty()) m_t << anchor;
m_t << "}{"; m_t << "}{";
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
// return result; // return result;
//} //}
static QCString escapeLabelName(const char *s) static QCString escapeLabelName(const char *s)
{ {
QCString result; QCString result;
...@@ -222,6 +223,8 @@ void LatexGenerator::init() ...@@ -222,6 +223,8 @@ void LatexGenerator::init()
t << endl t << endl
<< "clean:" << endl << "clean:" << endl
<< "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf" << endl; << "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf" << endl;
createSubDirs(d);
} }
static void writeDefaultHeaderPart1(QTextStream &t) static void writeDefaultHeaderPart1(QTextStream &t)
...@@ -441,6 +444,7 @@ void LatexGenerator::writeStyleSheetFile(QFile &f) ...@@ -441,6 +444,7 @@ void LatexGenerator::writeStyleSheetFile(QFile &f)
void LatexGenerator::startFile(const char *name,const char *,const char *) void LatexGenerator::startFile(const char *name,const char *,const char *)
{ {
QCString fileName=name; QCString fileName=name;
relPath = relativePathToRoot(fileName);
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex"; if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
startPlainFile(fileName); startPlainFile(fileName);
} }
...@@ -926,7 +930,7 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor) ...@@ -926,7 +930,7 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor)
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
{ {
t << "\\hyperlink{"; t << "\\hyperlink{";
if (f) t << f; if (f) t << stripPath(f);
if (anchor) t << "_" << anchor; if (anchor) t << "_" << anchor;
t << "}{"; t << "}{";
} }
...@@ -947,7 +951,7 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f, ...@@ -947,7 +951,7 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f,
if (!ref && Config_getBool("PDF_HYPERLINKS")) if (!ref && Config_getBool("PDF_HYPERLINKS"))
{ {
t << "\\hyperlink{"; t << "\\hyperlink{";
if (f) t << f; if (f) t << stripPath(f);
if (f && anchor) t << "_"; if (f && anchor) t << "_";
if (anchor) t << anchor; if (anchor) t << anchor;
t << "}{"; t << "}{";
...@@ -986,7 +990,7 @@ void LatexGenerator::startTitleHead(const char *fileName) ...@@ -986,7 +990,7 @@ void LatexGenerator::startTitleHead(const char *fileName)
{ {
if (Config_getBool("PDF_HYPERLINKS") && fileName) if (Config_getBool("PDF_HYPERLINKS") && fileName)
{ {
t << "\\hypertarget{" << fileName << "}{" << endl; t << "\\hypertarget{" << stripPath(fileName) << "}{" << endl;
} }
if (Config_getBool("COMPACT_LATEX")) if (Config_getBool("COMPACT_LATEX"))
{ {
...@@ -1100,7 +1104,7 @@ void LatexGenerator::startMemberDoc(const char *clname, ...@@ -1100,7 +1104,7 @@ void LatexGenerator::startMemberDoc(const char *clname,
t << "{\\setlength{\\rightskip}{0pt plus 5cm}"; t << "{\\setlength{\\rightskip}{0pt plus 5cm}";
} }
void LatexGenerator::endMemberDoc() void LatexGenerator::endMemberDoc(bool)
{ {
t << "}"; t << "}";
if (Config_getBool("COMPACT_LATEX")) t << "\\hfill"; if (Config_getBool("COMPACT_LATEX")) t << "\\hfill";
...@@ -1112,7 +1116,7 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *, ...@@ -1112,7 +1116,7 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
{ {
t << "\\hypertarget{"; t << "\\hypertarget{";
if (fName) t << fName; if (fName) t << stripPath(fName);
if (anchor) t << "_" << anchor; if (anchor) t << "_" << anchor;
t << "}{" << endl; t << "}{" << endl;
} }
...@@ -1136,7 +1140,7 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name) ...@@ -1136,7 +1140,7 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name)
t << "\\label{" << name << "}" << endl; t << "\\label{" << name << "}" << endl;
if (fName && Config_getBool("PDF_HYPERLINKS")) if (fName && Config_getBool("PDF_HYPERLINKS"))
{ {
t << "\\hypertarget{" << fName << "_" << name << "}{}" << endl; t << "\\hypertarget{" << stripPath(fName) << "_" << name << "}{}" << endl;
} }
} }
...@@ -1168,7 +1172,7 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect ...@@ -1168,7 +1172,7 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect
{ {
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
{ {
t << "\\hypertarget{" << lab << "}{}"; t << "\\hypertarget{" << stripPath(lab) << "}{}";
} }
t << "\\"; t << "\\";
if (Config_getBool("COMPACT_LATEX")) if (Config_getBool("COMPACT_LATEX"))
...@@ -1380,7 +1384,7 @@ void LatexGenerator::startDotGraph() ...@@ -1380,7 +1384,7 @@ void LatexGenerator::startDotGraph()
void LatexGenerator::endDotGraph(DotClassGraph &g) void LatexGenerator::endDotGraph(DotClassGraph &g)
{ {
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT")); g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath);
} }
void LatexGenerator::startInclDepGraph() void LatexGenerator::startInclDepGraph()
...@@ -1389,7 +1393,7 @@ void LatexGenerator::startInclDepGraph() ...@@ -1389,7 +1393,7 @@ void LatexGenerator::startInclDepGraph()
void LatexGenerator::endInclDepGraph(DotInclDepGraph &g) void LatexGenerator::endInclDepGraph(DotInclDepGraph &g)
{ {
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT")); g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath);
} }
void LatexGenerator::startCallGraph() void LatexGenerator::startCallGraph()
...@@ -1398,7 +1402,7 @@ void LatexGenerator::startCallGraph() ...@@ -1398,7 +1402,7 @@ void LatexGenerator::startCallGraph()
void LatexGenerator::endCallGraph(DotCallGraph &g) void LatexGenerator::endCallGraph(DotCallGraph &g)
{ {
g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT")); g.writeGraph(t,EPS,Config_getString("LATEX_OUTPUT"),relPath);
} }
void LatexGenerator::startDescription() void LatexGenerator::startDescription()
......
...@@ -142,7 +142,7 @@ class LatexGenerator : public OutputGenerator ...@@ -142,7 +142,7 @@ class LatexGenerator : public OutputGenerator
void endDescItem(); void endDescItem();
void lineBreak() { t << "\\par\n"; } void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *); void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {} void startCodeAnchor(const char *) {}
...@@ -299,6 +299,7 @@ class LatexGenerator : public OutputGenerator ...@@ -299,6 +299,7 @@ class LatexGenerator : public OutputGenerator
bool insideTabbing; bool insideTabbing;
bool firstDescItem; bool firstDescItem;
bool insidePre; bool insidePre;
QCString relPath;
}; };
#endif #endif
...@@ -35,10 +35,9 @@ static QCString getExtension() ...@@ -35,10 +35,9 @@ static QCString getExtension()
{ {
QCString ext = Config_getString("MAN_EXTENSION"); QCString ext = Config_getString("MAN_EXTENSION");
if( ext.length() >= 2 && if( ext.length() >= 2 &&
ext.data()[0] == '.' && ext.data()[0] == '.')
isdigit( ext.data()[1] ) )
{ {
ext = ext.mid(1, 1); ext = ext.mid(1, ext.length()-1);
} }
else else
{ {
...@@ -95,6 +94,7 @@ void ManGenerator::init() ...@@ -95,6 +94,7 @@ void ManGenerator::init()
err("Could not create output directory %s/man%s\n",manOutput.data(),ext.data()); err("Could not create output directory %s/man%s\n",manOutput.data(),ext.data());
exit(1); exit(1);
} }
createSubDirs(d);
} }
static QCString buildFileName(const char *name) static QCString buildFileName(const char *name)
...@@ -405,7 +405,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName, ...@@ -405,7 +405,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
linkfile.close(); linkfile.close();
} }
void ManGenerator::endMemberDoc() void ManGenerator::endMemberDoc(bool)
{ {
t << "\""; t << "\"";
} }
......
...@@ -135,7 +135,7 @@ class ManGenerator : public OutputGenerator ...@@ -135,7 +135,7 @@ class ManGenerator : public OutputGenerator
void lineBreak() { t << "\n.br" << endl; } void lineBreak() { t << "\n.br" << endl; }
void writeChar(char c); void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *) {} void endDoxyAnchor(const char *,const char *) {}
void startCodeAnchor(const char *) {} void startCodeAnchor(const char *) {}
......
This diff is collapsed.
...@@ -99,6 +99,7 @@ class MemberDef : public Definition ...@@ -99,6 +99,7 @@ class MemberDef : public Definition
const char *getGroupFileName() const { return groupFileName; } const char *getGroupFileName() const { return groupFileName; }
int getGroupStartLine() const { return groupStartLine; } int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; } bool getGroupHasDocs() const { return groupHasDocs; }
QCString qualifiedName() const;
// direct kind info // direct kind info
Protection protection() const { return prot; } Protection protection() const { return prot; }
......
...@@ -316,7 +316,7 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -316,7 +316,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void insertMemberAlign() = 0; virtual void insertMemberAlign() = 0;
virtual void startMemberDoc(const char *,const char *, virtual void startMemberDoc(const char *,const char *,
const char *,const char *) = 0; const char *,const char *) = 0;
virtual void endMemberDoc() = 0; virtual void endMemberDoc(bool) = 0;
virtual void startDoxyAnchor(const char *fName,const char *manName, virtual void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name) = 0; const char *anchor,const char *name) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0; virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
......
...@@ -207,8 +207,8 @@ class OutputList : public OutputDocInterface ...@@ -207,8 +207,8 @@ class OutputList : public OutputDocInterface
void startMemberDoc(const char *clName,const char *memName, void startMemberDoc(const char *clName,const char *memName,
const char *anchor,const char *title) const char *anchor,const char *title)
{ forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); } { forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); }
void endMemberDoc() void endMemberDoc(bool hasArgs)
{ forall(&OutputGenerator::endMemberDoc); } { forall(&OutputGenerator::endMemberDoc,hasArgs); }
void startDoxyAnchor(const char *fName,const char *manName, void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor, const char *name) const char *anchor, const char *name)
{ forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name); } { forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name); }
......
...@@ -190,6 +190,8 @@ void RTFGenerator::init() ...@@ -190,6 +190,8 @@ void RTFGenerator::init()
{ {
loadExtensions(rtfExtensionsFile); loadExtensions(rtfExtensionsFile);
} }
createSubDirs(d);
} }
static QCString makeIndexName(const char *s,int i) static QCString makeIndexName(const char *s,int i)
...@@ -322,6 +324,7 @@ void RTFGenerator::beginRTFSection() ...@@ -322,6 +324,7 @@ void RTFGenerator::beginRTFSection()
void RTFGenerator::startFile(const char *name,const char *,const char *) void RTFGenerator::startFile(const char *name,const char *,const char *)
{ {
QCString fileName=name; QCString fileName=name;
relPath = relativePathToRoot(fileName);
if (fileName.right(4)!=".rtf" ) fileName+=".rtf"; if (fileName.right(4)!=".rtf" ) fileName+=".rtf";
startPlainFile(fileName); startPlainFile(fileName);
...@@ -1357,7 +1360,7 @@ void RTFGenerator::startMemberDoc(const char *clname, ...@@ -1357,7 +1360,7 @@ void RTFGenerator::startMemberDoc(const char *clname,
t << endl; t << endl;
} }
void RTFGenerator::endMemberDoc() void RTFGenerator::endMemberDoc(bool)
{ {
DBG_RTF(t << "{\\comment endMemberDoc}" << endl) DBG_RTF(t << "{\\comment endMemberDoc}" << endl)
t << "}" << endl; t << "}" << endl;
...@@ -2188,7 +2191,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) ...@@ -2188,7 +2191,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
newParagraph(); newParagraph();
QCString fileName = QCString fileName =
g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),TRUE,FALSE); g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),relPath,TRUE,FALSE);
// display the file // display the file
t << "{" << endl; t << "{" << endl;
...@@ -2210,7 +2213,8 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -2210,7 +2213,8 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
{ {
newParagraph(); newParagraph();
QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),FALSE); QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
relPath,FALSE);
// display the file // display the file
t << "{" << endl; t << "{" << endl;
...@@ -2231,7 +2235,8 @@ void RTFGenerator::endCallGraph(DotCallGraph &g) ...@@ -2231,7 +2235,8 @@ void RTFGenerator::endCallGraph(DotCallGraph &g)
{ {
newParagraph(); newParagraph();
QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),FALSE); QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
relPath,FALSE);
// display the file // display the file
t << "{" << endl; t << "{" << endl;
......
...@@ -134,7 +134,7 @@ class RTFGenerator : public OutputGenerator ...@@ -134,7 +134,7 @@ class RTFGenerator : public OutputGenerator
void endDescItem(); void endDescItem();
void lineBreak(); void lineBreak();
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *); void startDoxyAnchor(const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *); void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {}; void startCodeAnchor(const char *) {};
...@@ -282,6 +282,7 @@ class RTFGenerator : public OutputGenerator ...@@ -282,6 +282,7 @@ class RTFGenerator : public OutputGenerator
int m_listLevel; // // RTF does not really have a addative indent...manually set list level. int m_listLevel; // // RTF does not really have a addative indent...manually set list level.
bool m_omitParagraph; // should a the next paragraph command be ignored? bool m_omitParagraph; // should a the next paragraph command be ignored?
int m_numCols; // number of columns in a table int m_numCols; // number of columns in a table
QCString relPath;
void beginRTFDocument(); void beginRTFDocument();
void beginRTFChapter(); void beginRTFChapter();
......
This diff is collapsed.
...@@ -1127,7 +1127,7 @@ static bool findOperator(const QCString &s,int i) ...@@ -1127,7 +1127,7 @@ static bool findOperator(const QCString &s,int i)
while (b<i) // check if there are only spaces inbetween while (b<i) // check if there are only spaces inbetween
// the operator and the > // the operator and the >
{ {
if (!isspace(s.at(b))) return FALSE; if (!isspace((uchar)s.at(b))) return FALSE;
b++; b++;
} }
return TRUE; return TRUE;
...@@ -1147,20 +1147,20 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -1147,20 +1147,20 @@ QCString removeRedundantWhiteSpace(const QCString &s)
char c=s.at(i); char c=s.at(i);
if (csp<6 && c==constScope[csp]) csp++; else csp=0; if (csp<6 && c==constScope[csp]) csp++; else csp=0;
if (i<l-2 && c=='<' && // current char is a < if (i<l-2 && c=='<' && // current char is a <
(isId(s.at(i+1)) || isspace(s.at(i+1))) && // next char is an id char or space (isId(s.at(i+1)) || isspace((uchar)s.at(i+1))) && // next char is an id char or space
(i<8 || !findOperator(s,i)) // string in front is not "operator" (i<8 || !findOperator(s,i)) // string in front is not "operator"
) )
{ {
result+="< "; // insert extra space for layouting (nested) templates result+="< "; // insert extra space for layouting (nested) templates
} }
else if (i>0 && c=='>' && // current char is a > else if (i>0 && c=='>' && // current char is a >
(isId(s.at(i-1)) || isspace(s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space
(i<8 || !findOperator(s,i)) // string in front is not "operator" (i<8 || !findOperator(s,i)) // string in front is not "operator"
) )
{ {
result+=" >"; // insert extra space for layouting (nested) templates result+=" >"; // insert extra space for layouting (nested) templates
} }
else if (i>0 && c==',' && !isspace(s.at(i-1)) else if (i>0 && c==',' && !isspace((uchar)s.at(i-1))
&& ((i<l-1 && isId(s.at(i+1))) && ((i<l-1 && isId(s.at(i+1)))
|| (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) // for PHP || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) // for PHP
|| (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3))))) // for PHP || (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3))))) // for PHP
...@@ -1186,7 +1186,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -1186,7 +1186,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result+=" :"; result+=" :";
csp=0; csp=0;
} }
else if (!isspace(c) || else if (!isspace((uchar)c) ||
( i>0 && i<l-1 && ( i>0 && i<l-1 &&
(isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']')
&& (isId(s.at(i+1)) || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) && (isId(s.at(i+1)) || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2)))
...@@ -2247,7 +2247,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -2247,7 +2247,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
} }
else if (dstPos<dstAType.length()) else if (dstPos<dstAType.length())
{ {
if (!isspace(dstAType.at(dstPos))) // maybe the names differ if (!isspace((uchar)dstAType.at(dstPos))) // maybe the names differ
{ {
if (!dstA->name.isEmpty()) // dst has its name separated from its type if (!dstA->name.isEmpty()) // dst has its name separated from its type
{ {
...@@ -2274,7 +2274,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -2274,7 +2274,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
} }
else if (srcPos<srcAType.length()) else if (srcPos<srcAType.length())
{ {
if (!isspace(srcAType.at(srcPos))) // maybe the names differ if (!isspace((uchar)srcAType.at(srcPos))) // maybe the names differ
{ {
if (!srcA->name.isEmpty()) // src has its name separated from its type if (!srcA->name.isEmpty()) // src has its name separated from its type
{ {
...@@ -2646,7 +2646,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -2646,7 +2646,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
{ {
delete argList; argList=0; delete argList; argList=0;
} }
if (mdist==maxInheritanceDepth && !strcmp(args,"()")) if (mdist==maxInheritanceDepth && args && strcmp(args,"()")!=0)
// no exact match found, but if args="()" an arbitrary member will do // no exact match found, but if args="()" an arbitrary member will do
{ {
//printf(" >Searching for arbitrary member\n"); //printf(" >Searching for arbitrary member\n");
...@@ -2746,7 +2746,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -2746,7 +2746,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
} }
} }
} }
if (!found && !strcmp(args,"()")) if (!found && args && !strcmp(args,"()"))
// no exact match found, but if args="()" an arbitrary // no exact match found, but if args="()" an arbitrary
// member will do // member will do
{ {
...@@ -2812,7 +2812,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -2812,7 +2812,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
} }
} }
} }
if (members.count()!=1 && !strcmp(args,"()")) if (members.count()!=1 && args && !strcmp(args,"()"))
{ {
// no exact match found, but if args="()" an arbitrary // no exact match found, but if args="()" an arbitrary
// member will do // member will do
...@@ -3548,11 +3548,12 @@ QCString escapeCharsInString(const char *name,bool allowDots) ...@@ -3548,11 +3548,12 @@ QCString escapeCharsInString(const char *name,bool allowDots)
} }
/*! This function determines the file name on disk of an item /*! This function determines the file name on disk of an item
* given its name, which could be a class name with templete * given its name, which could be a class name with template
* arguments, so special characters need to be escaped. * arguments, so special characters need to be escaped.
*/ */
QCString convertNameToFile(const char *name,bool allowDots) QCString convertNameToFile(const char *name,bool allowDots)
{ {
QCString result;
if (Config_getBool("SHORT_NAMES")) if (Config_getBool("SHORT_NAMES"))
{ {
static QDict<void> usedNames(10007); static QDict<void> usedNames(10007);
...@@ -3569,13 +3570,75 @@ QCString convertNameToFile(const char *name,bool allowDots) ...@@ -3569,13 +3570,75 @@ QCString convertNameToFile(const char *name,bool allowDots)
{ {
num = *(int*)&value; num = *(int*)&value;
} }
QCString result;
result.sprintf("a%05d",num); result.sprintf("a%05d",num);
return result;
} }
else // long names else // long names
{ {
return escapeCharsInString(name,allowDots); result=escapeCharsInString(name,allowDots);
}
if (Config_getBool("CREATE_SUBDIRS"))
{
if (Doxygen::htmlDirMap==0)
{
Doxygen::htmlDirMap=new QDict<int>(100003);
Doxygen::htmlDirMap->setAutoDelete(TRUE);
}
static int curDirNum=0;
int *dirNum = Doxygen::htmlDirMap->find(result);
int l1Dir=0,l2Dir=0;
if (dirNum==0) // new name
{
Doxygen::htmlDirMap->insert(result,new int(curDirNum));
l1Dir = (curDirNum)%10;
l2Dir = ((curDirNum)/10)%10;
curDirNum++;
}
else // existing name
{
l1Dir = (*dirNum)%10;
l2Dir = ((*dirNum)/10)%10;
}
result.prepend(QCString().sprintf("d%d/d%d/",l1Dir,l2Dir));
}
return result;
}
QCString relativePathToRoot(const char *name)
{
QCString result;
if (Config_getBool("CREATE_SUBDIRS"))
{
if (name==0)
{
return REL_PATH_TO_ROOT;
}
else
{
QCString n = name;
int i = n.findRev('/');
if (i!=-1)
{
result=REL_PATH_TO_ROOT;
}
}
}
return result;
}
void createSubDirs(QDir &d)
{
if (Config_getBool("CREATE_SUBDIRS"))
{
// create 100 subdirectories
int l1,l2;
for (l1=0;l1<10;l1++)
{
d.mkdir(QString().sprintf("d%d",l1));
for (l2=0;l2<10;l2++)
{
d.mkdir(QString().sprintf("d%d/d%d",l1,l2));
}
}
} }
} }
...@@ -4714,3 +4777,13 @@ void replaceNamespaceAliases(QCString &scope,int i) ...@@ -4714,3 +4777,13 @@ void replaceNamespaceAliases(QCString &scope,int i)
//printf("replaceNamespaceAliases() result=%s\n",scope.data()); //printf("replaceNamespaceAliases() result=%s\n",scope.data());
} }
QCString stripPath(const char *s)
{
QCString result=s;
int i=result.findRev('/');
if (i!=-1)
{
result=result.mid(i+1);
}
return result;
}
...@@ -49,6 +49,7 @@ class MemberNameInfoSDict; ...@@ -49,6 +49,7 @@ class MemberNameInfoSDict;
struct ListItemInfo; struct ListItemInfo;
class PageDef; class PageDef;
struct SectionInfo; struct SectionInfo;
class QDir;
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -213,6 +214,11 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item); ...@@ -213,6 +214,11 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item);
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
const QCString &explicitScopePart); const QCString &explicitScopePart);
int computeQualifiedIndex(const QString &name); int computeQualifiedIndex(const QString &name);
void addDirPrefix(QCString &fileName);
QCString relativePathToRoot(const char *name);
#define REL_PATH_TO_ROOT "../../"
void createSubDirs(QDir &d);
QCString stripPath(const char *s);
#endif #endif
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