Commit 02b5f51e authored by dimitri's avatar dimitri

Release-1.3.6-20040324

parent f12fe31a
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);
......
...@@ -298,6 +298,7 @@ void HtmlGenerator::init() ...@@ -298,6 +298,7 @@ void HtmlGenerator::init()
g_footer=fileToString(Config_getString("HTML_FOOTER")); g_footer=fileToString(Config_getString("HTML_FOOTER"));
//printf("g_footer='%s'\n",g_footer.data()); //printf("g_footer='%s'\n",g_footer.data());
} }
createSubDirs(d);
} }
void HtmlGenerator::writeStyleSheetFile(QFile &file) void HtmlGenerator::writeStyleSheetFile(QFile &file)
...@@ -306,7 +307,8 @@ void HtmlGenerator::writeStyleSheetFile(QFile &file) ...@@ -306,7 +307,8 @@ void HtmlGenerator::writeStyleSheetFile(QFile &file)
t << defaultStyleSheet; t << defaultStyleSheet;
} }
static void writeDefaultHeaderFile(QTextStream &t, const char *title) static void writeDefaultHeaderFile(QTextStream &t, const char *title,
const char *relPath)
{ {
t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
"<html><head>" "<html><head>"
...@@ -319,7 +321,7 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title) ...@@ -319,7 +321,7 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title)
t << "href=\""; t << "href=\"";
if (Config_getString("HTML_STYLESHEET").isEmpty()) if (Config_getString("HTML_STYLESHEET").isEmpty())
{ {
t << "doxygen.css"; t << relPath << "doxygen.css";
} }
else else
{ {
...@@ -342,7 +344,7 @@ void HtmlGenerator::writeHeaderFile(QFile &file) ...@@ -342,7 +344,7 @@ void HtmlGenerator::writeHeaderFile(QFile &file)
#if QT_VERSION >= 200 #if QT_VERSION >= 200
t.setEncoding(QTextStream::Latin1); t.setEncoding(QTextStream::Latin1);
#endif #endif
writeDefaultHeaderFile(t,"$title"); writeDefaultHeaderFile(t,"$title",relativePathToRoot(0));
} }
void HtmlGenerator::writeFooterFile(QFile &file) void HtmlGenerator::writeFooterFile(QFile &file)
...@@ -366,6 +368,8 @@ void HtmlGenerator::startFile(const char *name,const char *, ...@@ -366,6 +368,8 @@ void HtmlGenerator::startFile(const char *name,const char *,
//printf("HtmlGenerator::startFile(%s)\n",name); //printf("HtmlGenerator::startFile(%s)\n",name);
QCString fileName=name; QCString fileName=name;
lastTitle=title; lastTitle=title;
relPath = relativePathToRoot(fileName);
if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
{ {
fileName+=Doxygen::htmlFileExtension; fileName+=Doxygen::htmlFileExtension;
...@@ -386,7 +390,7 @@ void HtmlGenerator::startFile(const char *name,const char *, ...@@ -386,7 +390,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
lastFile = fileName; lastFile = fileName;
if (g_header.isEmpty()) if (g_header.isEmpty())
{ {
writeDefaultHeaderFile(t,dispTitle); writeDefaultHeaderFile(t,dispTitle,relPath);
} }
else else
{ {
...@@ -425,7 +429,8 @@ void HtmlGenerator::startFile(const char *name,const char *, ...@@ -425,7 +429,8 @@ void HtmlGenerator::startFile(const char *name,const char *,
// t << "</a> &nbsp; "; // t << "</a> &nbsp; ";
//} //}
static void writePageFooter(QTextStream &t,const QCString lastTitle) static void writePageFooter(QTextStream &t,const QCString &lastTitle,
const QCString relPath)
{ {
if (g_footer.isEmpty()) if (g_footer.isEmpty())
{ {
...@@ -435,8 +440,8 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle) ...@@ -435,8 +440,8 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle)
Config_getString("PROJECT_NAME") Config_getString("PROJECT_NAME")
); );
t << endl << "<a href=\"http://www.doxygen.org/index.html\">"; t << endl << "<a href=\"http://www.doxygen.org/index.html\">";
t << endl << "<img src=\"doxygen.png\" alt=\"doxygen\" " t << endl << "<img src=\"" << relPath << "doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0 > " << "</a>" << versionString << " "; << "align=\"middle\" border=0 >" << "</a> " << versionString << " ";
t << "</small></address>\n</body>\n</html>\n"; t << "</small></address>\n</body>\n</html>\n";
} }
else else
...@@ -447,7 +452,7 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle) ...@@ -447,7 +452,7 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle)
void HtmlGenerator::writeFooter() void HtmlGenerator::writeFooter()
{ {
writePageFooter(t,lastTitle); writePageFooter(t,lastTitle,relPath);
} }
void HtmlGenerator::endFile() void HtmlGenerator::endFile()
...@@ -562,10 +567,6 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f, ...@@ -562,10 +567,6 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f,
{ {
t << "</b>"; t << "</b>";
} }
//if (Config_getBool("GENERATE_HTMLHELP") && f)
//{
// htmlHelp->addItem(name,((QCString)f)+htmlFileExtension);
//}
} }
void HtmlGenerator::writeStartAnnoItem(const char *,const char *f, void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
...@@ -576,10 +577,6 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f, ...@@ -576,10 +577,6 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
t << "<a class=\"el\" href=\"" << f << Doxygen::htmlFileExtension << "\">"; t << "<a class=\"el\" href=\"" << f << Doxygen::htmlFileExtension << "\">";
docify(name); docify(name);
t << "</a> "; t << "</a> ";
//if (Config_getBool("GENERATE_HTMLHELP") && f)
//{
// htmlHelp->addItem(name, ((QCString)f)+htmlFileExtension);
//}
} }
void HtmlGenerator::writeObjectLink(const char *ref,const char *f, void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
...@@ -600,7 +597,11 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, ...@@ -600,7 +597,11 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
t << "href=\""; t << "href=\"";
if (ref) if (ref)
{ {
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << relPath << *dest << "/";
}
else
{
t << relPath;
} }
if (f) t << f << Doxygen::htmlFileExtension; if (f) t << f << Doxygen::htmlFileExtension;
if (anchor) t << "#" << anchor; if (anchor) t << "#" << anchor;
...@@ -627,7 +628,11 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, ...@@ -627,7 +628,11 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
t << "href=\""; t << "href=\"";
if (ref) if (ref)
{ {
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << relPath << *dest << "/";
}
else
{
t << relPath;
} }
if (f) t << f << Doxygen::htmlFileExtension; if (f) t << f << Doxygen::htmlFileExtension;
if (anchor) t << "#" << anchor; if (anchor) t << "#" << anchor;
...@@ -640,7 +645,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, ...@@ -640,7 +645,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
void HtmlGenerator::startTextLink(const char *f,const char *anchor) void HtmlGenerator::startTextLink(const char *f,const char *anchor)
{ {
t << "<a href=\""; t << "<a href=\"";
if (f) t << f << Doxygen::htmlFileExtension; if (f) t << relPath << f << Doxygen::htmlFileExtension;
if (anchor) t << "#" << anchor; if (anchor) t << "#" << anchor;
t << "\">"; t << "\">";
} }
...@@ -1019,7 +1024,7 @@ void HtmlGenerator::startMemberDocName(bool align) ...@@ -1019,7 +1024,7 @@ void HtmlGenerator::startMemberDocName(bool align)
void HtmlGenerator::endMemberDocName() void HtmlGenerator::endMemberDocName()
{ {
DBG_HTML(t << "<!-- endMemberDocName -->" << endl;) DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
t << "</td>" << endl; t << " </td>" << endl;
} }
void HtmlGenerator::startParameterList(bool openBracket) void HtmlGenerator::startParameterList(bool openBracket)
...@@ -1108,10 +1113,13 @@ void HtmlGenerator::endParameterList() ...@@ -1108,10 +1113,13 @@ void HtmlGenerator::endParameterList()
t << " </tr>" << endl; t << " </tr>" << endl;
} }
void HtmlGenerator::endMemberDoc() void HtmlGenerator::endMemberDoc(bool hasArgs)
{ {
DBG_HTML(t << "<!-- endMemberDoc -->" << endl;) DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
t << endl; if (!hasArgs)
{
t << " </tr>" << endl;
}
t << " </table>" << endl; t << " </table>" << endl;
t << " </td>" << endl; t << " </td>" << endl;
t << " </tr>" << endl; t << " </tr>" << endl;
...@@ -1124,7 +1132,7 @@ void HtmlGenerator::startDotGraph() ...@@ -1124,7 +1132,7 @@ void HtmlGenerator::startDotGraph()
void HtmlGenerator::endDotGraph(DotClassGraph &g) void HtmlGenerator::endDotGraph(DotClassGraph &g)
{ {
g.writeGraph(t,BITMAP,Config_getString("HTML_OUTPUT")); g.writeGraph(t,BITMAP,dir,relPath);
} }
void HtmlGenerator::startInclDepGraph() void HtmlGenerator::startInclDepGraph()
...@@ -1133,7 +1141,7 @@ void HtmlGenerator::startInclDepGraph() ...@@ -1133,7 +1141,7 @@ void HtmlGenerator::startInclDepGraph()
void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g) void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g)
{ {
g.writeGraph(t,BITMAP,Config_getString("HTML_OUTPUT")); g.writeGraph(t,BITMAP,dir,relPath);
} }
void HtmlGenerator::startCallGraph() void HtmlGenerator::startCallGraph()
...@@ -1142,12 +1150,12 @@ void HtmlGenerator::startCallGraph() ...@@ -1142,12 +1150,12 @@ void HtmlGenerator::startCallGraph()
void HtmlGenerator::endCallGraph(DotCallGraph &g) void HtmlGenerator::endCallGraph(DotCallGraph &g)
{ {
g.writeGraph(t,BITMAP,Config_getString("HTML_OUTPUT")); g.writeGraph(t,BITMAP,dir,relPath);
} }
void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g) void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g)
{ {
g.writeGraph(t,Config_getString("HTML_OUTPUT")); g.writeGraph(t,dir);
} }
void HtmlGenerator::startMemberGroupHeader(bool) void HtmlGenerator::startMemberGroupHeader(bool)
...@@ -1278,7 +1286,8 @@ void HtmlGenerator::printDoc(DocNode *n) ...@@ -1278,7 +1286,8 @@ void HtmlGenerator::printDoc(DocNode *n)
} }
static void startQuickIndexItem(QTextStream &t,const char *l, static void startQuickIndexItem(QTextStream &t,const char *l,
bool hl,bool compact,bool &first) bool hl,bool compact,bool &first,
const QCString &relPath)
{ {
if (!first && compact) t << " | "; if (!first && compact) t << " | ";
first=FALSE; first=FALSE;
...@@ -1291,7 +1300,7 @@ static void startQuickIndexItem(QTextStream &t,const char *l, ...@@ -1291,7 +1300,7 @@ static void startQuickIndexItem(QTextStream &t,const char *l,
{ {
t << "<a class=\"qindex\" "; t << "<a class=\"qindex\" ";
} }
t << "href=\"" << l << "\">"; t << "href=\"" << relPath << l << "\">";
} }
static void endQuickIndexItem(QTextStream &t) static void endQuickIndexItem(QTextStream &t)
...@@ -1304,7 +1313,8 @@ static QCString fixSpaces(const QCString &s) ...@@ -1304,7 +1313,8 @@ static QCString fixSpaces(const QCString &s)
return substitute(s," ","&nbsp;"); return substitute(s," ","&nbsp;");
} }
static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem hli) static void writeDefaultQuickLinks(QTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath)
{ {
bool first=TRUE; bool first=TRUE;
if (compact) if (compact)
...@@ -1318,18 +1328,19 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h ...@@ -1318,18 +1328,19 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h
if (Config_getBool("SEARCHENGINE")) if (Config_getBool("SEARCHENGINE"))
{ {
t << " <form class=\"search\" action=\"search.php\" method=\"get\">\n"; t << " <form class=\"search\" action=\"" << relPath
<< "search.php\" method=\"get\">\n";
} }
if (Config_getBool("GENERATE_TREEVIEW")) if (Config_getBool("GENERATE_TREEVIEW"))
{ {
startQuickIndexItem(t,"main"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"main"+Doxygen::htmlFileExtension,
hli==HLI_Main,compact,first); hli==HLI_Main,compact,first,relPath);
} }
else else
{ {
startQuickIndexItem(t,"index"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"index"+Doxygen::htmlFileExtension,
hli==HLI_Main,compact,first); hli==HLI_Main,compact,first,relPath);
} }
t << fixSpaces(theTranslator->trMainPage()); t << fixSpaces(theTranslator->trMainPage());
endQuickIndexItem(t); endQuickIndexItem(t);
...@@ -1337,14 +1348,14 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h ...@@ -1337,14 +1348,14 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h
if (documentedGroups>0) if (documentedGroups>0)
{ {
startQuickIndexItem(t,"modules"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"modules"+Doxygen::htmlFileExtension,
hli==HLI_Modules,compact,first); hli==HLI_Modules,compact,first,relPath);
t << fixSpaces(theTranslator->trModules()); t << fixSpaces(theTranslator->trModules());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (documentedNamespaces>0) if (documentedNamespaces>0)
{ {
startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
hli==HLI_Namespaces,compact,first); hli==HLI_Namespaces,compact,first,relPath);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{ {
t << fixSpaces(theTranslator->trPackages()); t << fixSpaces(theTranslator->trPackages());
...@@ -1358,7 +1369,7 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h ...@@ -1358,7 +1369,7 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h
if (hierarchyClasses>0) if (hierarchyClasses>0)
{ {
startQuickIndexItem(t,"hierarchy"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"hierarchy"+Doxygen::htmlFileExtension,
hli==HLI_Hierarchy,compact,first); hli==HLI_Hierarchy,compact,first,relPath);
t << fixSpaces(theTranslator->trClassHierarchy()); t << fixSpaces(theTranslator->trClassHierarchy());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
...@@ -1367,54 +1378,54 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h ...@@ -1367,54 +1378,54 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h
if (Config_getBool("ALPHABETICAL_INDEX")) if (Config_getBool("ALPHABETICAL_INDEX"))
{ {
startQuickIndexItem(t,"classes"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"classes"+Doxygen::htmlFileExtension,
hli==HLI_Classes,compact,first); hli==HLI_Classes,compact,first,relPath);
t << fixSpaces(theTranslator->trAlphabeticalList()); t << fixSpaces(theTranslator->trAlphabeticalList());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
startQuickIndexItem(t,"annotated"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"annotated"+Doxygen::htmlFileExtension,
hli==HLI_Annotated,compact,first); hli==HLI_Annotated,compact,first,relPath);
t << fixSpaces(theTranslator->trCompoundList()); t << fixSpaces(theTranslator->trCompoundList());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (documentedHtmlFiles>0) if (documentedHtmlFiles>0)
{ {
startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
hli==HLI_Files,compact,first); hli==HLI_Files,compact,first,relPath);
t << fixSpaces(theTranslator->trFileList()); t << fixSpaces(theTranslator->trFileList());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (documentedNamespaceMembers[NMHL_All]>0) if (documentedNamespaceMembers[NMHL_All]>0)
{ {
startQuickIndexItem(t,"namespacemembers"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"namespacemembers"+Doxygen::htmlFileExtension,
hli==HLI_NamespaceMembers,compact,first); hli==HLI_NamespaceMembers,compact,first,relPath);
t << fixSpaces(theTranslator->trNamespaceMembers()); t << fixSpaces(theTranslator->trNamespaceMembers());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (documentedClassMembers[CMHL_All]>0) if (documentedClassMembers[CMHL_All]>0)
{ {
startQuickIndexItem(t,"functions"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"functions"+Doxygen::htmlFileExtension,
hli==HLI_Functions,compact,first); hli==HLI_Functions,compact,first,relPath);
t << fixSpaces(theTranslator->trCompoundMembers()); t << fixSpaces(theTranslator->trCompoundMembers());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (documentedFileMembers[FMHL_All]>0) if (documentedFileMembers[FMHL_All]>0)
{ {
startQuickIndexItem(t,"globals"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"globals"+Doxygen::htmlFileExtension,
hli==HLI_Globals,compact,first); hli==HLI_Globals,compact,first,relPath);
t << fixSpaces(theTranslator->trFileMembers()); t << fixSpaces(theTranslator->trFileMembers());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (indexedPages>0) if (indexedPages>0)
{ {
startQuickIndexItem(t,"pages"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"pages"+Doxygen::htmlFileExtension,
hli==HLI_Pages,compact,first); hli==HLI_Pages,compact,first,relPath);
t << fixSpaces(theTranslator->trRelatedPages()); t << fixSpaces(theTranslator->trRelatedPages());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
if (Doxygen::exampleSDict->count()>0) if (Doxygen::exampleSDict->count()>0)
{ {
startQuickIndexItem(t,"examples"+Doxygen::htmlFileExtension, startQuickIndexItem(t,"examples"+Doxygen::htmlFileExtension,
hli==HLI_Examples,compact,first); hli==HLI_Examples,compact,first,relPath);
t << fixSpaces(theTranslator->trExamples()); t << fixSpaces(theTranslator->trExamples());
endQuickIndexItem(t); endQuickIndexItem(t);
} }
...@@ -1454,7 +1465,7 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h ...@@ -1454,7 +1465,7 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,HighlightedItem h
void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli) void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli)
{ {
writeDefaultQuickLinks(t,compact,hli); writeDefaultQuickLinks(t,compact,hli,relPath);
} }
void HtmlGenerator::writeSearchPage() void HtmlGenerator::writeSearchPage()
...@@ -1471,7 +1482,7 @@ void HtmlGenerator::writeSearchPage() ...@@ -1471,7 +1482,7 @@ void HtmlGenerator::writeSearchPage()
#endif #endif
if (g_header.isEmpty()) if (g_header.isEmpty())
{ {
writeDefaultHeaderFile(t,"Search"); writeDefaultHeaderFile(t,"Search",0);
} }
else else
{ {
...@@ -1481,7 +1492,7 @@ void HtmlGenerator::writeSearchPage() ...@@ -1481,7 +1492,7 @@ void HtmlGenerator::writeSearchPage()
<< versionString << " -->" << endl; << versionString << " -->" << endl;
if (!Config_getBool("DISABLE_INDEX")) if (!Config_getBool("DISABLE_INDEX"))
{ {
writeDefaultQuickLinks(t,TRUE,HLI_Search); writeDefaultQuickLinks(t,TRUE,HLI_Search,"");
} }
t << "\n<?php\n\n"; t << "\n<?php\n\n";
...@@ -1514,7 +1525,7 @@ void HtmlGenerator::writeSearchPage() ...@@ -1514,7 +1525,7 @@ void HtmlGenerator::writeSearchPage()
t << search_script; t << search_script;
t << "\n"; t << "\n";
t << "?>\n"; t << "?>\n";
writePageFooter(t,"Search"); writePageFooter(t,"Search","");
} }
} }
} }
......
...@@ -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 *) {}
......
...@@ -74,24 +74,33 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr ...@@ -74,24 +74,33 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
return result; return result;
} }
static void writeDefArgumentList(OutputList &ol,ClassDef *cd, static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
const QCString & /*scopeName*/,MemberDef *md) const QCString & /*scopeName*/,MemberDef *md)
{ {
ArgumentList *defArgList=md->isDocsForDefinition() ? ArgumentList *defArgList=md->isDocsForDefinition() ?
md->argumentList() : md->declArgumentList(); md->argumentList() : md->declArgumentList();
//printf("writeDefArgumentList `%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition()); //printf("writeDefArgumentList `%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
if (defArgList==0) return; // member has no function like argument list if (defArgList==0)
{
return FALSE; // member has no function like argument list
}
if (!md->isDefine()) ol.docify(" "); if (!md->isDefine()) ol.docify(" ");
//printf("writeDefArgList(%d)\n",defArgList->count()); //printf("writeDefArgList(%d)\n",defArgList->count());
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.endMemberDocName(); {
ol.startParameterList(!md->isObjCMethod()); // html
ol.endMemberDocName();
ol.startParameterList(!md->isObjCMethod());
}
ol.enableAll(); ol.enableAll();
ol.disable(OutputGenerator::Html); ol.disable(OutputGenerator::Html);
if (!md->isObjCMethod()) ol.docify("("); // start argument list {
ol.endMemberDocName(); // other formats
if (!md->isObjCMethod()) ol.docify("("); // start argument list
ol.endMemberDocName();
}
ol.popGeneratorState(); ol.popGeneratorState();
//printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine()); //printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine());
...@@ -227,6 +236,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -227,6 +236,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{ {
ol.docify(" volatile"); ol.docify(" volatile");
} }
return TRUE;
} }
static void writeTemplatePrefix(OutputList &ol,ArgumentList *al) static void writeTemplatePrefix(OutputList &ol,ArgumentList *al)
...@@ -1168,124 +1178,145 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1168,124 +1178,145 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
) )
{ {
// if this member is in a group find the real scope name. // if this member is in a group find the real scope name.
bool hasParameterList = FALSE;
bool hasDocs = isDetailedSectionVisible(inGroup); bool hasDocs = isDetailedSectionVisible(inGroup);
//printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n", //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n",
// name().data(),hasDocs,container->definitionType(),inGroup); // name().data(),hasDocs,container->definitionType(),inGroup);
if ( hasDocs ) if ( !hasDocs ) return;
QCString scopeName = scName;
if (container->definitionType()==TypeGroup)
{ {
QCString scopeName = scName; if (getClassDef()) scopeName=getClassDef()->name();
if (container->definitionType()==TypeGroup) else if (getNamespaceDef()) scopeName=getNamespaceDef()->name();
{ else if (getFileDef()) scopeName=getFileDef()->name();
if (getClassDef()) scopeName=getClassDef()->name(); }
else if (getNamespaceDef()) scopeName=getNamespaceDef()->name();
else if (getFileDef()) scopeName=getFileDef()->name();
}
QCString cname = container->name();
QCString cfname = getOutputFileBase();
//ol.addIndexItem(name(),cname); QCString cname = container->name();
//ol.addIndexItem(cname,name()); QCString cfname = getOutputFileBase();
if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) //ol.addIndexItem(name(),cname);
{ //ol.addIndexItem(cname,name());
HtmlHelp *htmlHelp = HtmlHelp::getInstance();
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
// get member name if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
QCString doxyName=name().copy(); {
// prepend scope if there is any. TODO: make this optional for C only docs HtmlHelp *htmlHelp = HtmlHelp::getInstance();
if (scopeName) doxyName.prepend((QCString)scopeName+"::"); htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
// get member name
QCString doxyName=name().copy();
// prepend scope if there is any. TODO: make this optional for C only docs
if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QCString ldef = definition(); QCString ldef = definition();
//printf("member `%s' def=`%s'\n",name().data(),ldef.data()); //printf("member `%s' def=`%s'\n",name().data(),ldef.data());
if (isEnumerate()) if (isEnumerate())
{
if (name().at(0)=='@')
{ {
if (name().at(0)=='@') ldef = "anonymous enum";
{
ldef = "anonymous enum";
}
else
{
ldef.prepend("enum ");
}
} }
int i=0,l; else
static QRegExp r("@[0-9]+"); {
ldef.prepend("enum ");
}
}
int i=0,l;
static QRegExp r("@[0-9]+");
if (isEnumValue()) return; if (isEnumValue()) return;
ol.pushGeneratorState(); ol.pushGeneratorState();
bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
if ((isVariable() || isTypedef()) && (i=r.match(ldef,0,&l))!=-1) if ((isVariable() || isTypedef()) && (i=r.match(ldef,0,&l))!=-1)
{
// find enum type and insert it in the definition
MemberListIterator vmli(*ml);
MemberDef *vmd;
bool found=FALSE;
for ( ; (vmd=vmli.current()) && !found ; ++vmli)
{ {
// find enum type and insert it in the definition if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
MemberListIterator vmli(*ml);
MemberDef *vmd;
bool found=FALSE;
for ( ; (vmd=vmli.current()) && !found ; ++vmli)
{ {
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp)
{
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i));
//ol+=*vmd->enumDecl();
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-i-l));
found=TRUE;
}
}
if (!found) // anonymous compound
{
//printf("Anonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,anchor());
} }
// strip anonymous compound names from definition linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i));
int si=ldef.find(' '),pi,ei=i+l; //ol+=*vmd->enumDecl();
if (si==-1) si=0; vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
while ((pi=r.match(ldef,i+l,&l))!=-1) ei=i=pi+l; linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-i-l));
// first si characters of ldef contain compound type name
ol.startMemberDocName(isObjCMethod()); found=TRUE;
ol.docify(ldef.left(si));
ol.docify(" { ... } ");
// last ei characters of ldef contain pointer/reference specifiers
int ni=ldef.find("::",si);
if (ni>=ei) ei=ni+2;
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-ei));
} }
} }
else // not an enum value if (!found) // anonymous compound
{ {
//printf("Anonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,anchor());
} }
// strip anonymous compound names from definition
int si=ldef.find(' '),pi,ei=i+l;
if (si==-1) si=0;
while ((pi=r.match(ldef,i+l,&l))!=-1) ei=i=pi+l;
// first si characters of ldef contain compound type name
ol.startMemberDocName(isObjCMethod());
ol.docify(ldef.left(si));
ol.docify(" { ... } ");
// last ei characters of ldef contain pointer/reference specifiers
int ni=ldef.find("::",si);
if (ni>=ei) ei=ni+2;
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-ei));
}
}
else // not an enum value
{
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
ol.startMemberDoc(cname,name(),anchor(),name());
if (hasHtmlHelp)
{
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
ClassDef *cd=getClassDef(); ClassDef *cd=getClassDef();
if (!Config_getBool("HIDE_SCOPE_NAMES")) if (!Config_getBool("HIDE_SCOPE_NAMES"))
{
bool first=TRUE;
if (m_defTmpArgLists)
// definition has explicit template parameter declarations
{
QListIterator<ArgumentList> ali(*m_defTmpArgLists);
ArgumentList *tal;
for (ali.toFirst();(tal=ali.current());++ali)
{
if (tal->count()>0)
{
if (!first) ol.docify(" ");
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,tal);
ol.endMemberDocPrefixItem();
}
}
}
else // definition gets it template parameters from its class
// (since no definition was found)
{ {
bool first=TRUE; if (cd)
if (m_defTmpArgLists)
// definition has explicit template parameter declarations
{ {
QListIterator<ArgumentList> ali(*m_defTmpArgLists); QList<ArgumentList> tempParamLists;
cd->getTemplateParameterLists(tempParamLists);
//printf("#tempParamLists=%d\n",tempParamLists.count());
QListIterator<ArgumentList> ali(tempParamLists);
ArgumentList *tal; ArgumentList *tal;
for (ali.toFirst();(tal=ali.current());++ali) for (ali.toFirst();(tal=ali.current());++ali)
{ {
...@@ -1298,499 +1329,485 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1298,499 +1329,485 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
} }
} }
else // definition gets it template parameters from its class if (tArgList) // function template prefix
// (since no definition was found)
{ {
if (cd) ol.startMemberDocPrefixItem();
{ writeTemplatePrefix(ol,tArgList);
QList<ArgumentList> tempParamLists; ol.endMemberDocPrefixItem();
cd->getTemplateParameterLists(tempParamLists);
//printf("#tempParamLists=%d\n",tempParamLists.count());
QListIterator<ArgumentList> ali(tempParamLists);
ArgumentList *tal;
for (ali.toFirst();(tal=ali.current());++ali)
{
if (tal->count()>0)
{
if (!first) ol.docify(" ");
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,tal);
ol.endMemberDocPrefixItem();
}
}
}
if (tArgList) // function template prefix
{
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,tArgList);
ol.endMemberDocPrefixItem();
}
} }
} }
ol.startMemberDocName(isObjCMethod()); }
if (isObjCMethod()) ol.startMemberDocName(isObjCMethod());
if (cd && cd->isObjectiveC())
{
// strip scope name
int ep = ldef.find("::");
if (ep!=-1)
{ {
// strip scope name int sp=ldef.findRev(' ',ep);
int ep = ldef.find("::"); if (sp!=-1)
if (ep!=-1)
{
int sp=ldef.findRev(' ',ep);
if (sp!=-1)
{
ldef=ldef.left(sp+1)+ldef.mid(ep+2);
}
}
// strip keywords
int dp = ldef.find(':');
if (dp!=-1)
{
ldef=ldef.left(dp+1);
}
int l=ldef.length();
//printf("start >%s<\n",ldef.data());
int i=l-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace(ldef.at(i))) i--;
if (i>0)
{ {
// insert braches around the type ldef=ldef.left(sp+1)+ldef.mid(ep+2);
QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
ldef=tmp;
} }
//printf("end >%s< i=%d\n",ldef.data(),i);
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
} }
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef); // strip keywords
writeDefArgumentList(ol,cd,scopeName,this); int dp = ldef.find(':');
if (hasOneLineInitializer()) // add initializer if (dp!=-1)
{ {
if (!isDefine()) ldef=ldef.left(dp+1);
{
ol.docify(" = ");
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),init.simplifyWhiteSpace());
}
else
{
ol.writeNonBreakableSpace(3);
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),init);
}
} }
if (excpString()) // add exception list int l=ldef.length();
//printf("start >%s<\n",ldef.data());
int i=l-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
if (i>0)
{ {
ol.docify(" "); // insert braches around the type
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),excpString()); QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
ldef=tmp;
} }
//printf("end >%s< i=%d\n",ldef.data(),i);
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
} }
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef);
Specifier lvirt=virtualness(); hasParameterList=writeDefArgumentList(ol,cd,scopeName,this);
if (hasOneLineInitializer()) // add initializer
if (!isObjCMethod() &&
(protection()!=Public || lvirt!=Normal ||
isFriend() || isRelated() || isExplicit() ||
isMutable() || (isInline() && Config_getBool("INLINE_INFO")) ||
isSignal() || isSlot() ||
isStatic() || (classDef && classDef!=container) ||
isSettable() || isGettable() || isReadable() || isWritable()
)
)
{ {
// write the member specifier list if (!isDefine())
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [");
QStrList sl;
if (isFriend()) sl.append("friend");
else if (isRelated()) sl.append("related");
else
{ {
if (Config_getBool("INLINE_INFO") && isInline()) ol.docify(" = ");
sl.append("inline"); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),init.simplifyWhiteSpace());
if (isExplicit()) sl.append("explicit");
if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static");
if (isGettable()) sl.append("get");
if (isSettable()) sl.append("set");
if (isReadable()) sl.append("read");
if (isWritable()) sl.append("write");
if (protection()==Protected) sl.append("protected");
else if (protection()==Private) sl.append("private");
else if (protection()==Package) sl.append("package");
if (lvirt==Virtual) sl.append("virtual");
else if (lvirt==Pure) sl.append("pure virtual");
if (isSignal()) sl.append("signal");
if (isSlot()) sl.append("slot");
} }
if (classDef && classDef!=container) sl.append("inherited"); else
const char *s=sl.first();
while (s)
{ {
ol.docify(s); ol.writeNonBreakableSpace(3);
s=sl.next(); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),init);
if (s) ol.docify(", ");
} }
ol.docify("]");
ol.endTypewriter();
} }
else if (isObjCMethod() && isImplementation()) if (excpString()) // add exception list
{ {
ol.writeLatexSpacing(); ol.docify(" ");
ol.startTypewriter(); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),excpString());
ol.docify(" [implementation]");
ol.endTypewriter();
} }
if (!isDefine() && defArgList) ol.endParameterList(); }
ol.endMemberDoc();
ol.endDoxyAnchor(cfname,anchor());
ol.startIndent();
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.newParagraph();
ol.popGeneratorState();
/* write multi-line initializer (if any) */ Specifier lvirt=virtualness();
if (hasMultiLineInitializer()
//initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled if (!isObjCMethod() &&
// || initLines<userInitLines // explicitly enabled (protection()!=Public || lvirt!=Normal ||
// ) isFriend() || isRelated() || isExplicit() ||
) isMutable() || (isInline() && Config_getBool("INLINE_INFO")) ||
isSignal() || isSlot() ||
isStatic() || (classDef && classDef!=container) ||
isSettable() || isGettable() || isReadable() || isWritable()
)
)
{
// write the member specifier list
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [");
QStrList sl;
if (isFriend()) sl.append("friend");
else if (isRelated()) sl.append("related");
else
{ {
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data()); if (Config_getBool("INLINE_INFO") && isInline())
ol.startBold(); sl.append("inline");
if (mtype==Define) if (isExplicit()) sl.append("explicit");
ol.parseText(theTranslator->trDefineValue()); if (isMutable()) sl.append("mutable");
else if (isStatic()) sl.append("static");
ol.parseText(theTranslator->trInitialValue()); if (isGettable()) sl.append("get");
ol.endBold(); if (isSettable()) sl.append("set");
initParseCodeContext(); if (isReadable()) sl.append("read");
ol.startCodeFragment(); if (isWritable()) sl.append("write");
parseCode(ol,scopeName,init,FALSE,0); if (protection()==Protected) sl.append("protected");
ol.endCodeFragment(); else if (protection()==Private) sl.append("private");
else if (protection()==Package) sl.append("package");
if (lvirt==Virtual) sl.append("virtual");
else if (lvirt==Pure) sl.append("pure virtual");
if (isSignal()) sl.append("signal");
if (isSlot()) sl.append("slot");
} }
if (classDef && classDef!=container) sl.append("inherited");
QCString brief = m_templateMaster ? const char *s=sl.first();
m_templateMaster->briefDescription() : briefDescription(); while (s)
QCString detailed = m_templateMaster ? {
m_templateMaster->documentation() : documentation(); ol.docify(s);
ArgumentList *docArgList = m_templateMaster ? s=sl.next();
m_templateMaster->defArgList : defArgList; if (s) ol.docify(", ");
/* write brief description */
if (!brief.isEmpty() &&
(Config_getBool("REPEAT_BRIEF") ||
!Config_getBool("BRIEF_MEMBER_DESC")
)
)
{
ol.parseDoc(briefFile(),briefLine(),getOuterScope()?getOuterScope():container,this,brief,FALSE,FALSE);
ol.newParagraph();
} }
ol.docify("]");
ol.endTypewriter();
}
else if (isObjCMethod() && isImplementation())
{
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [implementation]");
ol.endTypewriter();
}
if (hasParameterList)
{
ol.endParameterList();
ol.endMemberDoc(TRUE);
}
else
{
ol.endMemberDocName();
ol.endMemberDoc(FALSE);
}
ol.endDoxyAnchor(cfname,anchor());
ol.startIndent();
/* write detailed description */ ol.pushGeneratorState();
if (!detailed.isEmpty()) ol.disable(OutputGenerator::RTF);
{ ol.newParagraph();
ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE); ol.popGeneratorState();
ol.pushGeneratorState();
if (!m_inbodyDocs.isEmpty()) /* write multi-line initializer (if any) */
{ if (hasMultiLineInitializer()
ol.newParagraph(); //initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_inbodyDocs+"\n",TRUE,FALSE); // || initLines<userInitLines // explicitly enabled
} // )
ol.disableAllBut(OutputGenerator::RTF); )
{
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
ol.startBold();
if (mtype==Define)
ol.parseText(theTranslator->trDefineValue());
else
ol.parseText(theTranslator->trInitialValue());
ol.endBold();
initParseCodeContext();
ol.startCodeFragment();
parseCode(ol,scopeName,init,FALSE,0);
ol.endCodeFragment();
}
QCString brief = m_templateMaster ?
m_templateMaster->briefDescription() : briefDescription();
QCString detailed = m_templateMaster ?
m_templateMaster->documentation() : documentation();
ArgumentList *docArgList = m_templateMaster ?
m_templateMaster->defArgList : defArgList;
/* write brief description */
if (!brief.isEmpty() &&
(Config_getBool("REPEAT_BRIEF") ||
!Config_getBool("BRIEF_MEMBER_DESC")
)
)
{
ol.parseDoc(briefFile(),briefLine(),getOuterScope()?getOuterScope():container,this,brief,FALSE,FALSE);
ol.newParagraph();
}
/* write detailed description */
if (!detailed.isEmpty())
{
ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
ol.pushGeneratorState();
if (!m_inbodyDocs.isEmpty())
{
ol.newParagraph(); ol.newParagraph();
ol.popGeneratorState(); ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_inbodyDocs+"\n",TRUE,FALSE);
} }
else if(!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") || ol.disableAllBut(OutputGenerator::RTF);
!Config_getBool("BRIEF_MEMBER_DESC"))) ol.newParagraph();
ol.popGeneratorState();
}
else if(!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
!Config_getBool("BRIEF_MEMBER_DESC")))
{
if (!m_inbodyDocs.isEmpty())
{ {
if (!m_inbodyDocs.isEmpty())
{
ol.newParagraph();
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_inbodyDocs+"\n",TRUE,FALSE);
}
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.popGeneratorState(); ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_inbodyDocs+"\n",TRUE,FALSE);
} }
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.popGeneratorState();
}
//printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n", //printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n",
// defArgList, // defArgList,
// defArgList?defArgList->hasDocumentation():-1); // defArgList?defArgList->hasDocumentation():-1);
if (docArgList && docArgList->hasDocumentation()) if (docArgList && docArgList->hasDocumentation())
{
//printf("***** argumentList is documented\n");
ol.startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": ");
ol.writeDescItem();
ol.startDescTable();
ArgumentListIterator ali(*docArgList);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{ {
//printf("***** argumentList is documented\n"); if (a->hasDocumentation())
ol.startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": ");
ol.writeDescItem();
ol.startDescTable();
ArgumentListIterator ali(*docArgList);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{ {
if (a->hasDocumentation()) ol.startDescTableTitle();
{ ol.docify(a->name);
ol.startDescTableTitle(); ol.endDescTableTitle();
ol.docify(a->name); ol.startDescTableData();
ol.endDescTableTitle(); ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,a->docs+"\n",TRUE,FALSE);
ol.startDescTableData(); ol.endDescTableData();
ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,a->docs+"\n",TRUE,FALSE);
ol.endDescTableData();
}
} }
ol.endDescTable();
ol.endParamList();
} }
ol.endDescTable();
if (isEnumerate()) ol.endParamList();
}
if (isEnumerate())
{
bool first=TRUE;
MemberList *fmdl=enumFieldList();
if (fmdl)
{ {
bool first=TRUE; MemberDef *fmd=fmdl->first();
MemberList *fmdl=enumFieldList(); while (fmd)
if (fmdl)
{ {
MemberDef *fmd=fmdl->first(); if (fmd->isLinkable())
while (fmd)
{ {
if (fmd->isLinkable()) if (first)
{ {
if (first)
{
//ol.newParagraph();
ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": ");
ol.writeDescItem();
ol.startDescTable();
}
ol.addIndexItem(fmd->name(),cname);
ol.addIndexItem(cname,fmd->name());
if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
{
HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfname,fmd->anchor());
}
//ol.writeListItem();
ol.startDescTableTitle(); // this enables emphasis!
ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name());
first=FALSE;
//ol.startEmphasis();
ol.docify(fmd->name());
//ol.endEmphasis();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" ");
ol.enableAll();
ol.endDoxyAnchor(cfname,fmd->anchor());
ol.endDescTableTitle();
//ol.newParagraph(); //ol.newParagraph();
ol.startDescTableData(); ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": ");
ol.writeDescItem();
if (!fmd->briefDescription().isEmpty()) ol.startDescTable();
{
ol.parseDoc(fmd->briefFile(),fmd->briefLine(),getOuterScope()?getOuterScope():container,fmd,fmd->briefDescription(),TRUE,FALSE);
//ol.newParagraph();
}
if (!fmd->briefDescription().isEmpty() &&
!fmd->documentation().isEmpty())
{
ol.newParagraph();
}
if (!fmd->documentation().isEmpty())
{
ol.parseDoc(fmd->docFile(),fmd->docLine(),getOuterScope()?getOuterScope():container,fmd,fmd->documentation()+"\n",TRUE,FALSE);
}
ol.endDescTableData();
} }
fmd=fmdl->next();
}
}
if (!first)
{
//ol.endItemList();
ol.endDescTable();
ol.endSimpleSect();
ol.writeChar('\n');
}
}
MemberDef *bmd=reimplements(); ol.addIndexItem(fmd->name(),cname);
ClassDef *bcd=0; ol.addIndexItem(cname,fmd->name());
if (bmd && (bcd=bmd->getClassDef()))
{
// write class that contains a member that is reimplemented by this one
if (bcd->isLinkable())
{
ol.disable(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
QCString reimplFromLine; if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface)
{
reimplFromLine = theTranslator->trReimplementedFromList(1);
}
else
{
reimplFromLine = theTranslator->trImplementedFromList(1);
}
int markerPos = reimplFromLine.find("@0");
if (markerPos!=-1) // should always pass this.
{
ol.parseText(reimplFromLine.left(markerPos)); //text left from marker
if (bmd->isLinkable()) // replace marker with link
{ {
//Definition *bd=bmd->group; HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfname,fmd->anchor());
//if (bd==0) bd=bcd;
ol.writeObjectLink(bmd->getReference(),bmd->getOutputFileBase(),
bmd->anchor(),bcd->displayName());
//ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
// bmd->anchor(),bcd->name());
if ( bmd->isLinkableInProject() )
{
writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
}
} }
else //ol.writeListItem();
ol.startDescTableTitle(); // this enables emphasis!
ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name());
first=FALSE;
//ol.startEmphasis();
ol.docify(fmd->name());
//ol.endEmphasis();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" ");
ol.enableAll();
ol.endDoxyAnchor(cfname,fmd->anchor());
ol.endDescTableTitle();
//ol.newParagraph();
ol.startDescTableData();
if (!fmd->briefDescription().isEmpty())
{
ol.parseDoc(fmd->briefFile(),fmd->briefLine(),getOuterScope()?getOuterScope():container,fmd,fmd->briefDescription(),TRUE,FALSE);
//ol.newParagraph();
}
if (!fmd->briefDescription().isEmpty() &&
!fmd->documentation().isEmpty())
{ {
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), ol.newParagraph();
0,bcd->displayName());
if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
{
writePageRef(ol,bcd->getOutputFileBase(),0);
}
} }
ol.parseText(reimplFromLine.right( if (!fmd->documentation().isEmpty())
reimplFromLine.length()-markerPos-2)); // text right from marker {
ol.parseDoc(fmd->docFile(),fmd->docLine(),getOuterScope()?getOuterScope():container,fmd,fmd->documentation()+"\n",TRUE,FALSE);
ol.disableAllBut(OutputGenerator::RTF); }
ol.newParagraph(); ol.endDescTableData();
ol.enableAll();
}
else
{
err("Error: translation error: no marker in trReimplementsFromList()\n");
} }
fmd=fmdl->next();
} }
//ol.writeString(".");
} }
if (!first)
{
//ol.endItemList();
ol.endDescTable();
ol.endSimpleSect();
ol.writeChar('\n');
}
}
MemberList *bml=reimplementedBy(); MemberDef *bmd=reimplements();
if (bml) ClassDef *bcd=0;
if (bmd && (bcd=bmd->getClassDef()))
{
// write class that contains a member that is reimplemented by this one
if (bcd->isLinkable())
{ {
MemberListIterator mli(*bml); ol.disable(OutputGenerator::RTF);
MemberDef *bmd=0; ol.newParagraph();
uint count=0; ol.enableAll();
ClassDef *bcd=0;
for (mli.toFirst();(bmd=mli.current()) && (bcd=bmd->getClassDef());++mli) QCString reimplFromLine;
if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface)
{ {
// count the members that directly inherit from md and for reimplFromLine = theTranslator->trReimplementedFromList(1);
// which the member and class are visible in the docs.
if ( bmd->isLinkable() && bcd->isLinkable() )
{
count++;
}
} }
if (count>0) else
{ {
mli.toFirst(); reimplFromLine = theTranslator->trImplementedFromList(1);
// write the list of classes that overwrite this member }
ol.disable(OutputGenerator::RTF); int markerPos = reimplFromLine.find("@0");
ol.newParagraph(); if (markerPos!=-1) // should always pass this.
ol.enableAll(); {
ol.parseText(reimplFromLine.left(markerPos)); //text left from marker
QCString reimplInLine; if (bmd->isLinkable()) // replace marker with link
if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface))
{ {
reimplInLine = theTranslator->trImplementedInList(count); //Definition *bd=bmd->group;
//if (bd==0) bd=bcd;
ol.writeObjectLink(bmd->getReference(),bmd->getOutputFileBase(),
bmd->anchor(),bcd->displayName());
//ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
// bmd->anchor(),bcd->name());
if ( bmd->isLinkableInProject() )
{
writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
}
} }
else else
{ {
reimplInLine = theTranslator->trReimplementedInList(count); ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
} 0,bcd->displayName());
static QRegExp marker("@[0-9]+"); if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
int index=0,newIndex,matchLen;
// now replace all markers in reimplInLine with links to the classes
while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
{
ol.parseText(reimplInLine.mid(index,newIndex-index));
bool ok;
uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
//bmd=bml->at(entryIndex);
count=0;
// find the entryIndex-th documented entry in the inheritance list.
for (mli.toLast();(bmd=mli.current()) && (bcd=bmd->getClassDef());--mli)
{ {
if ( bmd->isLinkable() && bcd->isLinkable()) writePageRef(ol,bcd->getOutputFileBase(),0);
{
if (count==entryIndex) break;
count++;
}
} }
}
ol.parseText(reimplFromLine.right(
reimplFromLine.length()-markerPos-2)); // text right from marker
if (ok && bcd && bmd) // write link for marker
{
//ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
// bmd->anchor(),bcd->name());
ol.writeObjectLink(bmd->getReference(),bmd->getOutputFileBase(),
bmd->anchor(),bcd->displayName());
if (bmd->isLinkableInProject() )
{
writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
}
}
++mli;
index=newIndex+matchLen;
}
ol.parseText(reimplInLine.right(reimplInLine.length()-index));
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.enableAll(); ol.enableAll();
} }
else
{
err("Error: translation error: no marker in trReimplementsFromList()\n");
}
} }
// write the list of examples that use this member
if (hasExamples()) //ol.writeString(".");
}
MemberList *bml=reimplementedBy();
if (bml)
{
MemberListIterator mli(*bml);
MemberDef *bmd=0;
uint count=0;
ClassDef *bcd=0;
for (mli.toFirst();(bmd=mli.current()) && (bcd=bmd->getClassDef());++mli)
{ {
ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); // count the members that directly inherit from md and for
ol.writeDescItem(); // which the member and class are visible in the docs.
writeExample(ol,getExamples()); if ( bmd->isLinkable() && bcd->isLinkable() )
//ol.endDescItem(); {
ol.endSimpleSect(); count++;
}
} }
// write reference to the source if (count>0)
writeSourceDef(ol,cname); {
writeSourceRefs(ol,cname); mli.toFirst();
writeSourceReffedBy(ol,cname); // write the list of classes that overwrite this member
writeInlineCode(ol,cname); ol.disable(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
ol.disableAllBut(OutputGenerator::RTF); QCString reimplInLine;
ol.newParagraph(); if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface))
ol.enableAll(); {
reimplInLine = theTranslator->trImplementedInList(count);
}
else
{
reimplInLine = theTranslator->trReimplementedInList(count);
}
static QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen;
// now replace all markers in reimplInLine with links to the classes
while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
{
ol.parseText(reimplInLine.mid(index,newIndex-index));
bool ok;
uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
//bmd=bml->at(entryIndex);
count=0;
// find the entryIndex-th documented entry in the inheritance list.
for (mli.toLast();(bmd=mli.current()) && (bcd=bmd->getClassDef());--mli)
{
if ( bmd->isLinkable() && bcd->isLinkable())
{
if (count==entryIndex) break;
count++;
}
}
ol.endIndent(); if (ok && bcd && bmd) // write link for marker
// enable LaTeX again {
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex); //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
ol.popGeneratorState(); // bmd->anchor(),bcd->name());
ol.writeObjectLink(bmd->getReference(),bmd->getOutputFileBase(),
bmd->anchor(),bcd->displayName());
if (bmd->isLinkableInProject() )
{
writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
}
}
++mli;
index=newIndex+matchLen;
}
ol.parseText(reimplInLine.right(reimplInLine.length()-index));
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
}
}
// write the list of examples that use this member
if (hasExamples())
{
ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
ol.writeDescItem();
writeExample(ol,getExamples());
//ol.endDescItem();
ol.endSimpleSect();
}
// write reference to the source
writeSourceDef(ol,cname);
writeSourceRefs(ol,cname);
writeSourceReffedBy(ol,cname);
writeInlineCode(ol,cname);
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH")) ol.disableAllBut(OutputGenerator::RTF);
&& isFunction() && Config_getBool("HAVE_DOT") ol.newParagraph();
) ol.enableAll();
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
)
{
DotCallGraph callGraph(this,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!callGraph.isTrivial())
{ {
DotCallGraph callGraph(this,Config_getInt("MAX_DOT_GRAPH_DEPTH")); msg("Generating call graph for function %s\n",qualifiedName().data());
if (!callGraph.isTrivial()) ol.disable(OutputGenerator::Man);
{ ol.newParagraph();
msg("Generating call graph for function %s\n",qualifiedName().data()); ol.startCallGraph();
ol.disable(OutputGenerator::Man); ol.parseText(theTranslator->trCallGraph());
ol.newParagraph(); ol.endCallGraph(callGraph);
ol.startCallGraph(); ol.enableAll();
ol.parseText(theTranslator->trCallGraph());
ol.endCallGraph(callGraph);
ol.enableAll();
}
} }
} }
ol.endIndent();
// enable LaTeX again
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
} }
void MemberDef::warnIfUndocumented() void MemberDef::warnIfUndocumented()
...@@ -1969,7 +1986,7 @@ void MemberDef::setInitializer(const char *initializer) ...@@ -1969,7 +1986,7 @@ void MemberDef::setInitializer(const char *initializer)
{ {
init=initializer; init=initializer;
int p=init.length()-1; int p=init.length()-1;
while (p>=0 && isspace(init.at(p))) p--; while (p>=0 && isspace((uchar)init.at(p))) p--;
init=init.left(p+1); init=init.left(p+1);
initLines=init.contains('\n'); initLines=init.contains('\n');
} }
...@@ -2209,4 +2226,21 @@ bool MemberDef::isObjCMethod() const ...@@ -2209,4 +2226,21 @@ bool MemberDef::isObjCMethod() const
return FALSE; return FALSE;
} }
QCString MemberDef::qualifiedName() const
{
if (isObjCMethod())
{
QCString qm;
if (isStatic()) qm="+"; else qm="-";
qm+="[";
qm+=classDef->name()+" ";
qm+=name();
qm+="]";
return qm;
}
else
{
return Definition::qualifiedName();
}
}
...@@ -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();
......
...@@ -516,7 +516,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName) ...@@ -516,7 +516,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
int s=bi2+1; int s=bi2+1;
oldStyleArgType = current->args.left(s); oldStyleArgType = current->args.left(s);
int i=s; int i=s;
while (i<si && ((c=current->args.at(i))=='*' || isspace(c))) i++; while (i<si && ((c=current->args.at(i))=='*' || isspace((uchar)c))) i++;
oldStyleArgType += current->args.mid(s,i-s); oldStyleArgType += current->args.mid(s,i-s);
s=i; s=i;
while (i<si && isId(current->args.at(i))) i++; while (i<si && isId(current->args.at(i))) i++;
...@@ -529,7 +529,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName) ...@@ -529,7 +529,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
oldStyleArgType = current->args.left(s); oldStyleArgType = current->args.left(s);
s++; s++;
int i=s+1; int i=s+1;
while (i<si && ((c=current->args.at(i))=='*' || isspace(c))) i++; while (i<si && ((c=current->args.at(i))=='*' || isspace((uchar)c))) i++;
oldStyleArgType += current->args.mid(s,i-s); oldStyleArgType += current->args.mid(s,i-s);
s=i; s=i;
while (i<si && isId(current->args.at(i))) i++; while (i<si && isId(current->args.at(i))) i++;
...@@ -543,7 +543,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName) ...@@ -543,7 +543,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
while (i>=0 && isId(current->args.at(i))) i--; while (i>=0 && isId(current->args.at(i))) i--;
j=i+1; j=i+1;
// look for start of *'s // look for start of *'s
while (i>=0 && ((c=current->args.at(i))=='*' || isspace(c))) i--; while (i>=0 && ((c=current->args.at(i))=='*' || isspace((uchar)c))) i--;
i++; i++;
if (i!=l) if (i!=l)
{ {
...@@ -561,7 +561,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName) ...@@ -561,7 +561,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
{ {
int l=si,j=0; int l=si,j=0;
char c; char c;
while (j<l && ((c=current->args.at(j))=='*' || isspace(c))) j++; while (j<l && ((c=current->args.at(j))=='*' || isspace((uchar)c))) j++;
if (j>0) if (j>0)
{ {
oldStyleArgPtr=current->args.left(j); oldStyleArgPtr=current->args.left(j);
...@@ -750,7 +750,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -750,7 +750,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
%x PageDocArg2 %x PageDocArg2
%x FileDocArg1 %x FileDocArg1
%x FileDocArg2 %x FileDocArg2
%x ExampleDoc
%x ExampleDocArg1 %x ExampleDocArg1
%x EnumDocArg1 %x EnumDocArg1
%x FuncPtr %x FuncPtr
...@@ -1067,9 +1066,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -1067,9 +1066,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ObjCReturnType>")" { <ObjCReturnType>")" {
BEGIN( ObjCMethod ); BEGIN( ObjCMethod );
} }
<ObjCParams>{ID}/":" { // Keyword of parameter <ObjCParams>{ID}{BN}*/":" { // Keyword of parameter
current->argList->getLast()->attrib=(QCString)"["+yytext+"]"; lineCount();
current->name += yytext; QCString keyw = QCString(yytext).stripWhiteSpace();
current->name += keyw;
if (current->argList->getLast()->type.isEmpty())
{
current->argList->getLast()->type="id";
}
Argument *a = new Argument;
a->attrib=(QCString)"["+keyw+"]";
current->argList->append(a);
} }
<ObjCParams>{ID}{BN}* { // name of parameter <ObjCParams>{ID}{BN}* { // name of parameter
lineCount(); lineCount();
...@@ -1085,17 +1092,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -1085,17 +1092,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ObjCParams>"(" { <ObjCParams>"(" {
BEGIN( ObjCParamType ); BEGIN( ObjCParamType );
} }
<ObjCParams>{BN}* {
lineCount();
if (current->argList->getLast()->type.isEmpty())
{
current->argList->getLast()->type="id";
}
Argument *a = new Argument;
current->argList->append(a);
}
<ObjCParamType>[^)]* { <ObjCParamType>[^)]* {
current->argList->last()->type=yytext; current->argList->getLast()->type=yytext;
} }
<ObjCParamType>")"{B}* { <ObjCParamType>")"{B}* {
BEGIN( ObjCParams ); BEGIN( ObjCParams );
...@@ -1107,6 +1105,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -1107,6 +1105,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN( Function ); BEGIN( Function );
} }
<ObjCMethod,ObjCParams>"{" { // start of a method body <ObjCMethod,ObjCParams>"{" { // start of a method body
//printf("Type=%s Name=%s args=%s\n",
// current->type.data(),current->name.data(),argListToString(current->argList).data()
// );
unput('{'); unput('{');
BEGIN( Function ); BEGIN( Function );
} }
...@@ -3940,14 +3941,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3940,14 +3941,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->groupDocType = Entry::GROUPDOC_NORMAL; current->groupDocType = Entry::GROUPDOC_NORMAL;
BEGIN( GroupDocArg1 ); BEGIN( GroupDocArg1 );
} }
<Doc,PageDoc,ExampleDoc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ { <Doc,PageDoc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ {
current->section = Entry::GROUPDOC_SEC; current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
current->groupDocType = Entry::GROUPDOC_ADD; current->groupDocType = Entry::GROUPDOC_ADD;
BEGIN( GroupDocArg1 ); BEGIN( GroupDocArg1 );
} }
<Doc,PageDoc,ExampleDoc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ { <Doc,PageDoc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ {
current->section = Entry::GROUPDOC_SEC; current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
...@@ -4163,7 +4164,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4163,7 +4164,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
<ExampleDocArg1>{FILE} { <ExampleDocArg1>{FILE} {
current->name = stripQuotes(yytext); current->name = stripQuotes(yytext);
BEGIN( ExampleDoc ); BEGIN( PageDoc );
} }
<ClassDoc,Doc,JavaDoc>{B}*{CMD}"relate"[sd]{B}* { <ClassDoc,Doc,JavaDoc>{B}*{CMD}"relate"[sd]{B}* {
lastDocRelContext = YY_START; lastDocRelContext = YY_START;
...@@ -4362,22 +4363,22 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4362,22 +4363,22 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<PageDoc>{CMD}"refitem".*"\n" { <PageDoc>{CMD}"refitem".*"\n" {
current->doc+=yytext; current->doc+=yytext;
} }
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"section"{B}+ { <ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"section"{B}+ {
//sectionType=SectionInfo::Section; //sectionType=SectionInfo::Section;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsection"{B}+ { <ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsection"{B}+ {
//sectionType=SectionInfo::Subsection; //sectionType=SectionInfo::Subsection;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsubsection"{B}+ { <ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsubsection"{B}+ {
//sectionType=SectionInfo::Subsubsection; //sectionType=SectionInfo::Subsubsection;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"paragraph"{B}+ { <ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"paragraph"{B}+ {
//sectionType=SectionInfo::Paragraph; //sectionType=SectionInfo::Paragraph;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
...@@ -4418,7 +4419,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4418,7 +4419,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->brief.resize(0); current->brief.resize(0);
BEGIN(lastDocContext); BEGIN(lastDocContext);
} }
<ExampleDoc,Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ { <Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ {
lastAnchorContext = YY_START; lastAnchorContext = YY_START;
//sectionType=SectionInfo::Anchor; //sectionType=SectionInfo::Anchor;
current->doc+=yytext; current->doc+=yytext;
...@@ -4640,9 +4641,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4640,9 +4641,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
sectionTitle+=yytext; sectionTitle+=yytext;
current->doc+=yytext; current->doc+=yytext;
} }
<ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; } <PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; }
<ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; } <PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; }
<ExampleDoc,PageDoc>{CMD}"ingroup"{B}+ { <PageDoc>{CMD}"ingroup"{B}+ {
lastGroupContext = YY_START; lastGroupContext = YY_START;
lineCount(); lineCount();
BEGIN( GroupName ); BEGIN( GroupName );
...@@ -4663,20 +4664,20 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4663,20 +4664,20 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
endGroup(); endGroup();
memberGroupHeader.resize(0); memberGroupHeader.resize(0);
} }
<ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; } <PageDoc,ClassDoc>. { current->doc += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//" <Doc,JavaDoc,LineDoc,PageDoc,ClassDoc>^{B}*"//"
<Doc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; } <Doc,PageDoc,ClassDoc>"//" { current->doc += yytext; }
<LineDoc,JavaDoc,ClassDocBrief>"//" { current->brief += yytext; } <LineDoc,JavaDoc,ClassDocBrief>"//" { current->brief += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>("\\\\"|"@@")"f"[$\[\]] { <Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>("\\\\"|"@@")"f"[$\[\]] {
current->doc += yytext; current->doc += yytext;
} }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f$" { <Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f$" {
lastFormulaContext = YY_START; lastFormulaContext = YY_START;
formulaText="$"; formulaText="$";
insideFormula=TRUE; insideFormula=TRUE;
BEGIN(ReadFormulaShort); BEGIN(ReadFormulaShort);
} }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f[" { <Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f[" {
lastFormulaContext = YY_START; lastFormulaContext = YY_START;
formulaText="\\["; formulaText="\\[";
insideFormula=TRUE; insideFormula=TRUE;
...@@ -4742,7 +4743,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4742,7 +4743,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
<ReadFormulaLong>\n { formulaText+=*yytext; yyLineNr++; } <ReadFormulaLong>\n { formulaText+=*yytext; yyLineNr++; }
<ReadFormulaLong,ReadFormulaShort>. { formulaText+=*yytext; } <ReadFormulaLong,ReadFormulaShort>. { formulaText+=*yytext; }
<ExampleDoc,PageDoc,ClassDocBrief,ClassDoc,ReadFormulaShort,ReadFormulaLong>{B}*"*/" { <PageDoc,ClassDocBrief,ClassDoc,ReadFormulaShort,ReadFormulaLong>{B}*"*/" {
checkDocs(); checkDocs();
//printf("current->section=%x\n",current->section); //printf("current->section=%x\n",current->section);
if (YY_START==SkipCode) // premature end of code block if (YY_START==SkipCode) // premature end of code block
...@@ -4814,11 +4815,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4814,11 +4815,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<PageDocTitle>"</"{TITLE}">" { BEGIN( PageDoc ); } <PageDocTitle>"</"{TITLE}">" { BEGIN( PageDoc ); }
/* escaped versions of the conditional commands (for putting them in the docs) */ /* escaped versions of the conditional commands (for putting them in the docs) */
<ClassDoc,Doc,AfterDoc,PageDoc,ExampleDoc>{CMD}{CMD}"if"/[^a-z_A-Z0-9] { current->doc+=yytext; } <ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"if"/[^a-z_A-Z0-9] { current->doc+=yytext; }
<ClassDoc,Doc,AfterDoc,PageDoc,ExampleDoc>{CMD}{CMD}"ifnot"/[^a-z_A-Z0-9] { current->doc+=yytext; } <ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"ifnot"/[^a-z_A-Z0-9] { current->doc+=yytext; }
<ClassDoc,Doc,AfterDoc,PageDoc,ExampleDoc>{CMD}{CMD}"elseif"/[^a-z_A-Z0-9] { current->doc+=yytext; } <ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"elseif"/[^a-z_A-Z0-9] { current->doc+=yytext; }
<ClassDoc,Doc,AfterDoc,PageDoc,ExampleDoc>{CMD}{CMD}"else"/[^a-z_A-Z0-9] { current->doc+=yytext; } <ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"else"/[^a-z_A-Z0-9] { current->doc+=yytext; }
<ClassDoc,Doc,AfterDoc,PageDoc,ExampleDoc>{CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->doc+=yytext; } <ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->doc+=yytext; }
<LineDoc,JavaDoc>{CMD}{CMD}"if"/[^a-z_A-Z0-9] { current->brief+=yytext; } <LineDoc,JavaDoc>{CMD}{CMD}"if"/[^a-z_A-Z0-9] { current->brief+=yytext; }
<LineDoc,JavaDoc>{CMD}{CMD}"ifnot"/[^a-z_A-Z0-9] { current->brief+=yytext; } <LineDoc,JavaDoc>{CMD}{CMD}"ifnot"/[^a-z_A-Z0-9] { current->brief+=yytext; }
<LineDoc,JavaDoc>{CMD}{CMD}"elseif"/[^a-z_A-Z0-9] { current->brief+=yytext; } <LineDoc,JavaDoc>{CMD}{CMD}"elseif"/[^a-z_A-Z0-9] { current->brief+=yytext; }
...@@ -4826,15 +4827,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4826,15 +4827,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<LineDoc,JavaDoc>{CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->brief+=yytext; } <LineDoc,JavaDoc>{CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->brief+=yytext; }
/* conditional commands */ /* conditional commands */
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"if"{B}+ { <ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"if"{B}+ {
lastIfContext = YY_START; lastIfContext = YY_START;
BEGIN(IfGuard); BEGIN(IfGuard);
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"ifnot"{B}+ { <ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"ifnot"{B}+ {
lastIfContext = YY_START; lastIfContext = YY_START;
BEGIN(IfNotGuard); BEGIN(IfNotGuard);
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"if"(\r?)\n | <ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"if"(\r?)\n |
<IfGuard>\n { <IfGuard>\n {
warn(yyFileName,yyLineNr,"Missing guard for if statement!"); warn(yyFileName,yyLineNr,"Missing guard for if statement!");
yyLineNr++; yyLineNr++;
...@@ -4897,17 +4898,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4897,17 +4898,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
yyLineNr++; yyLineNr++;
} }
<SkipSection>"//"|"*/" <SkipSection>"//"|"*/"
<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"elseif"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"elseif"/[^a-z_A-Z0-9] {
// previous section enabled => skip now // previous section enabled => skip now
depthIf=1; depthIf=1;
BEGIN(SkipSection); BEGIN(SkipSection);
} }
<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"else"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"else"/[^a-z_A-Z0-9] {
// section was enabled => skip now // section was enabled => skip now
depthIf=1; depthIf=1;
BEGIN(SkipSection); BEGIN(SkipSection);
} }
<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"endif"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"endif"/[^a-z_A-Z0-9] {
// section enabled => absorb endif // section enabled => absorb endif
} }
...@@ -5222,7 +5223,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5222,7 +5223,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->doc+="\\internal"; current->doc+="\\internal";
} }
} }
<Doc,JavaDoc,ExampleDoc,PageDoc,ClassDoc,AfterDoc>{CMD}"internal" { <Doc,JavaDoc,PageDoc,ClassDoc,AfterDoc>{CMD}"internal" {
if (!Config_getBool("INTERNAL_DOCS")) if (!Config_getBool("INTERNAL_DOCS"))
{ {
lastInternalDocContext = YY_START; lastInternalDocContext = YY_START;
...@@ -5294,10 +5295,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5294,10 +5295,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput('/');unput('*'); unput('/');unput('*');
BEGIN( tmpDocType ); BEGIN( tmpDocType );
} }
<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"("#")?{B}+ { <Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"("#")?{B}+ {
current->doc += yytext; current->doc += yytext;
} }
<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n { <Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n {
current->doc += yytext; current->doc += yytext;
yyLineNr++; yyLineNr++;
} }
...@@ -5307,12 +5308,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5307,12 +5308,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ClassDocBrief,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n { <ClassDocBrief,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n {
current->brief += "."; yyLineNr++; current->brief += "."; yyLineNr++;
} }
<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+/[^/] <Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+/[^/]
<Doc,JavaDoc,ClassDoc,PageDoc,ExampleDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+{B}+ { <Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+{B}+ {
current->doc+=' '; current->doc+=' ';
} }
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text <Doc,ClassDoc,PageDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->doc+=yytext; current->doc+=yytext;
} }
/* /*
...@@ -5328,13 +5329,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5328,13 +5329,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
} }
*/ */
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}{CMD}[a-z_A-Z][a-z_A-Z0-9]* { /* escaped command */ <Doc,ClassDoc,PageDoc,AfterDoc,CopyArgComment>{CMD}{CMD}[a-z_A-Z][a-z_A-Z0-9]* { /* escaped command */
if (YY_START==CopyArgComment) if (YY_START==CopyArgComment)
fullArgString+=yytext; fullArgString+=yytext;
else else
current->doc+=yytext; current->doc+=yytext;
} }
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <Doc,ClassDoc,PageDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
bool handled=FALSE; bool handled=FALSE;
if ( useOverrideCommands) if ( useOverrideCommands)
{ {
...@@ -5422,7 +5423,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5422,7 +5423,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->brief+=yytext; current->brief+=yytext;
//} //}
} }
<DefLineDoc,LineDoc,ClassDoc,PageDoc,ExampleDoc,Doc>"/*"|"//" { current->doc += yytext; } <DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; }
<SkipCxxComment>.*/\n { <SkipCxxComment>.*/\n {
BEGIN( lastCContext ) ; BEGIN( lastCContext ) ;
} }
......
...@@ -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