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

Release-1.3.6-20040324

parent ce05925c
DOXYGEN Version 1.3.6-20040307
DOXYGEN Version 1.3.6-20040324
Please read the installation section of the manual
(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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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:
\refitem cmdlt \\\<
\refitem cmdgt \\\>
\refitem cmdhash \\\#
\refitem cmdperc \\\%
\endsecreflist
The following subsections provide a list of all commands that are recognized by
......@@ -1956,6 +1957,15 @@ class C {};
\f$\mbox{\LaTeX}\f$ output. This
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>
<h2>\htmlonly <center> --- \endhtmlonly
Commands included for Qt compatibility
......
......@@ -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_compact_latex COMPACT_LATEX
\refitem cfg_compact_rtf COMPACT_RTF
\refitem cfg_create_subdirs CREATE_SUBDIRS
\refitem cfg_details_at_top DETAILS_AT_TOP
\refitem cfg_disable_index DISABLE_INDEX
\refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC
......@@ -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
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
<dt>\c OUTPUT_LANGUAGE <dd>
\addindex OUTPUT_LANGUAGE
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.6_20040307
Version: 1.3.6_20040324
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -1186,7 +1186,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
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.endHtmlLink();
ol.writeString("]</font></center>");
......@@ -1220,7 +1220,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
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.endHtmlLink();
ol.writeString("]</font></center>");
......
......@@ -1319,6 +1319,17 @@ void Config::create()
"where doxygen was started. If left blank the current directory will be used.\n"
);
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(
"OUTPUT_LANGUAGE",
"The OUTPUT_LANGUAGE tag is used to specify the language in which all \n"
......
......@@ -65,7 +65,11 @@ static void addTypeName()
{
//printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
// 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+=' ';
type+=name;
name.resize(0);
......
......@@ -266,7 +266,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if (l>0)
{
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--;
//printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i);
Argument *a = new Argument;
......
......@@ -58,7 +58,7 @@ class Definition
/*! Returns the base name of the output file that contains this
* definition.
*/
QCString qualifiedName() const;
virtual QCString qualifiedName() const;
QCString localName() const;
virtual QCString getOutputFileBase() const = 0;
/*! Returns the name of the source listing of this file. */
......
......@@ -84,6 +84,7 @@ static QStack<DocStyleChange> g_styleStack;
static QStack<DocStyleChange> g_initialStyleStack;
static QList<Definition> g_copyStack;
static QString g_fileName;
static QString g_relPath;
struct DocParserContext
{
......@@ -96,6 +97,7 @@ struct DocParserContext
QList<Definition> copyStack;
MemberDef *memberDef;
QString fileName;
QString relPath;
};
static QStack<DocParserContext> g_parserStack;
......@@ -114,6 +116,7 @@ static void docParserPushContext()
ctx->initialStyleStack = g_initialStyleStack;
ctx->copyStack = g_copyStack;
ctx->fileName = g_fileName;
ctx->relPath = g_relPath;
g_parserStack.push(ctx);
}
......@@ -128,6 +131,7 @@ static void docParserPopContext()
g_initialStyleStack = ctx->initialStyleStack;
g_copyStack = ctx->copyStack;
g_fileName = ctx->fileName;
g_relPath = ctx->relPath;
delete ctx;
doctokenizerYYpopContext();
}
......@@ -1191,7 +1195,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word,
const QString &ref,const QString &file,
const QString &anchor) :
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());
if (!g_searchUrl.isEmpty())
......@@ -1281,7 +1285,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match
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;
}
......@@ -1306,7 +1310,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match
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;
}
......@@ -1334,7 +1338,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match
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;
}
......@@ -1361,7 +1365,7 @@ void DocIncOperator::parse()
if (nonEmpty) break; // we have a pattern to match
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;
}
......@@ -1635,7 +1639,7 @@ endsecreflist:
//---------------------------------------------------------------------------
DocInternalRef::DocInternalRef(DocNode *parent,const QString &ref)
: m_parent(parent)
: m_parent(parent), m_relPath(g_relPath)
{
int i=ref.find('#');
if (i!=-1)
......@@ -1691,6 +1695,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
Definition *compound = 0;
QCString anchor;
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
SectionInfo *sec = Doxygen::sectionDict[target];
if (sec) // ref to section or anchor
{
......@@ -1779,6 +1784,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
//PageInfo *page;
QCString anchor;
m_refText = target;
m_relPath = g_relPath;
if (!m_refText.isEmpty() && m_refText.at(0)=='#')
{
m_refText = m_refText.right(m_refText.length()-1);
......@@ -4889,6 +4895,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
}
g_fileName = fileName;
g_relPath = ctx ? relativePathToRoot(ctx->getOutputFileBase()) : QString("");
g_memberDef = md;
g_nodeStack.clear();
g_styleStack.clear();
......@@ -4940,6 +4947,7 @@ DocNode *validatingParseText(const char *input)
g_token = new TokenInfo;
g_context = "";
g_fileName = "<parseText>";
g_relPath = "";
g_memberDef = 0;
g_nodeStack.clear();
g_styleStack.clear();
......
......@@ -203,6 +203,7 @@ class DocLinkedWord : public DocNode
Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; }
QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString ref() const { return m_ref; }
QString anchor() const { return m_anchor; }
void accept(DocVisitor *v) { v->visit(this); }
......@@ -212,6 +213,7 @@ class DocLinkedWord : public DocNode
QString m_word;
QString m_ref;
QString m_file;
QString m_relPath;
QString m_anchor;
};
......@@ -614,6 +616,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode
QString parse(bool);
Kind kind() const { return Kind_Link; }
QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString ref() const { return m_ref; }
QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; }
......@@ -622,6 +625,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode
private:
DocNode *m_parent;
QString m_file;
QString m_relPath;
QString m_ref;
QString m_anchor;
QString m_refText;
......@@ -635,6 +639,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode
void parse();
Kind kind() const { return Kind_Ref; }
QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString ref() const { return m_ref; }
QString anchor() const { return m_anchor; }
QString targetTitle() const { return m_text; }
......@@ -649,6 +654,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode
bool m_refToSection;
bool m_refToAnchor;
QString m_file;
QString m_relPath;
QString m_ref;
QString m_anchor;
QString m_text;
......@@ -662,6 +668,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
void parse();
Kind kind() const { return Kind_Ref; }
QString file() const { return m_file; }
QString relPath() const { return m_relPath; }
QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); }
......@@ -669,6 +676,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
private:
DocNode * m_parent;
QString m_file;
QString m_relPath;
QString m_anchor;
};
......
......@@ -292,7 +292,8 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&]
FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&]
SCOPESEP "::"|"#"|"."
SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP}
SCOPEMASK {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")?
SCOPEKEYS ":"({ID}":")*
SCOPEMASK {SCOPEPRE}*(~)?{ID}{SCOPEKEYS}?("<"{TEMPCHAR}*">")?
FUNCARG "("{FUNCCHAR}*")"
OPNEW {BLANK}+"new"({BLANK}*"[]")?
OPDEL {BLANK}+"delete"({BLANK}*"[]")?
......
......@@ -1610,6 +1610,7 @@ QCString DotClassGraph::diskName() const
QCString DotClassGraph::writeGraph(QTextStream &out,
GraphOutputFormat format,
const char *path,
const char *relPath,
bool isTBRank,
bool generateImageMap)
{
......@@ -1643,7 +1644,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
}
baseName = convertNameToFile(diskName());
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString md5 = computeMd5Signature(m_startNode, // root
m_graphType, // gt
......@@ -1722,7 +1722,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
if (format==BITMAP && generateImageMap) // run dot to create a image map
{
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=\"#"
<< mapLabel << "\" alt=\"";
switch (m_graphType)
......@@ -1816,7 +1816,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
doc = bfd->isLinkable();
src = bfd->generateSourceFile();
}
if (doc || src)
if (doc || src || !Config_getBool("HIDE_UNDOC_RELATIONS"))
{
QCString url="";
if (bfd) url=bfd->getOutputFileBase().copy();
......@@ -1833,8 +1833,8 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
}
else
{
QCString tmp_url="";
if (bfd) tmp_url=bfd->getReference()+"$"+url;
QCString tmp_url;
if (bfd) tmp_url=doc || src ? bfd->getReference()+"$"+url : QCString();
bn = new DotNode(
m_curNodeNumber++,
ii->includeName,
......@@ -1890,6 +1890,7 @@ QCString DotInclDepGraph::diskName() const
QCString DotInclDepGraph::writeGraph(QTextStream &out,
GraphOutputFormat format,
const char *path,
const char *relPath,
bool generateImageMap
)
{
......@@ -1900,7 +1901,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
err("Error: Output dir %s does not exist!\n",path); exit(1);
}
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 thisDir;
......@@ -1995,7 +1996,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
if (format==BITMAP && generateImageMap)
{
out << "<p><center><img src=\"" << baseName << "."
out << "<p><center><img src=\"" << relPath << baseName << "."
<< imgExt << "\" border=\"0\" usemap=\"#"
<< mapName << "_map\" alt=\"";
if (m_inverse) out << "Included by dependency graph"; else out << "Include dependency graph";
......@@ -2081,7 +2082,7 @@ DotCallGraph::~DotCallGraph()
}
QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
const char *path,bool generateImageMap)
const char *path,const char *relPath,bool generateImageMap)
{
QDir d(path);
// store the original directory
......@@ -2177,7 +2178,7 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
if (format==BITMAP && generateImageMap)
{
out << "<p><center><img src=\"" << baseName << "."
out << "<p><center><img src=\"" << relPath << baseName << "."
<< imgExt << "\" border=\"0\" usemap=\"#"
<< mapName << "_map\" alt=\"";
out << "\">";
......
......@@ -137,7 +137,7 @@ class DotClassGraph
~DotClassGraph();
bool isTrivial() const;
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 writeDEF(QTextStream &t);
......@@ -163,6 +163,7 @@ class DotInclDepGraph
DotInclDepGraph(FileDef *fd,int maxRecusionDepth,bool inverse);
~DotInclDepGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path,
const char *relPath,
bool writeImageMap=TRUE);
bool isTrivial() const;
QCString diskName() const;
......@@ -185,7 +186,7 @@ class DotCallGraph
DotCallGraph(MemberDef *md,int maxRecursionDepth);
~DotCallGraph();
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);
bool isTrivial() const;
......
......@@ -118,12 +118,14 @@ QTime Doxygen::runningTime;
SearchIndex * Doxygen::searchIndex=0;
SDict<DefinitionList> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0;
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds
static OutputList *outputList = 0; // list of output generating objects
void clearAll()
{
inputFiles.clear();
......
......@@ -101,6 +101,7 @@ class Doxygen
static SearchIndex *searchIndex;
static SDict<DefinitionList> *symbolMap;
static bool outputToWizard;
static QDict<int> *htmlDirMap;
};
void initDoxygen();
......
......@@ -61,7 +61,7 @@ void HtmlDocVisitor::visit(DocWord *w)
void HtmlDocVisitor::visit(DocLinkedWord *w)
{
if (m_hide) return;
startLink(w->ref(),w->file(),w->anchor());
startLink(w->ref(),w->file(),w->relPath(),w->anchor());
filter(w->word());
endLink();
}
......@@ -750,7 +750,7 @@ void HtmlDocVisitor::visitPost(DocDotFile *df)
void HtmlDocVisitor::visitPre(DocLink *lnk)
{
if (m_hide) return;
startLink(lnk->ref(),lnk->file(),lnk->anchor());
startLink(lnk->ref(),lnk->file(),lnk->relPath(),lnk->anchor());
}
void HtmlDocVisitor::visitPost(DocLink *)
......@@ -762,7 +762,10 @@ void HtmlDocVisitor::visitPost(DocLink *)
void HtmlDocVisitor::visitPre(DocRef *ref)
{
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());
}
......@@ -891,7 +894,7 @@ void HtmlDocVisitor::visitPost(DocXRefItem *)
void HtmlDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
startLink(0,ref->file(),ref->anchor());
startLink(0,ref->file(),ref->relPath(),ref->anchor());
}
void HtmlDocVisitor::visitPost(DocInternalRef *)
......@@ -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;
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
m_t << "href=\"";
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 (!anchor.isEmpty()) m_t << "#" << anchor;
......
......@@ -135,7 +135,7 @@ class HtmlDocVisitor : public DocVisitor
void filter(const char *str);
void filterQuotedCdataAttr(const char* str);
void startLink(const QString &ref,const QString &file,
const QString &anchor);
const QString &relPath,const QString &anchor);
void endLink();
void writeDotFile(const QString &fileName);
......
This diff is collapsed.
......@@ -128,7 +128,7 @@ class HtmlGenerator : public OutputGenerator
void lineBreak() { t << "<br>" << endl; }
void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc();
void endMemberDoc(bool);
void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name);
void endDoxyAnchor(const char *fName,const char *anchor);
......@@ -214,6 +214,7 @@ class HtmlGenerator : public OutputGenerator
private:
QCString lastTitle;
QCString lastFile;
QCString relPath;
HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g);
......
......@@ -904,7 +904,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hyperlink{" << x->file() << "_" << x->anchor() << "}{";
m_t << "\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
}
else
{
......@@ -960,7 +960,7 @@ void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QSt
if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hyperlink{";
if (!file.isEmpty()) m_t << file;
if (!file.isEmpty()) m_t << stripPath(file);
if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
if (!anchor.isEmpty()) m_t << anchor;
m_t << "}{";
......
......@@ -51,6 +51,7 @@
// return result;
//}
static QCString escapeLabelName(const char *s)
{
QCString result;
......@@ -222,6 +223,8 @@ void LatexGenerator::init()
t << endl
<< "clean:" << endl
<< "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf" << endl;
createSubDirs(d);
}
static void writeDefaultHeaderPart1(QTextStream &t)
......@@ -441,6 +444,7 @@ void LatexGenerator::writeStyleSheetFile(QFile &f)
void LatexGenerator::startFile(const char *name,const char *,const char *)
{
QCString fileName=name;
relPath = relativePathToRoot(fileName);
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
startPlainFile(fileName);
}
......@@ -926,7 +930,7 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor)
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\hyperlink{";
if (f) t << f;
if (f) t << stripPath(f);
if (anchor) t << "_" << anchor;
t << "}{";
}
......@@ -947,7 +951,7 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f,
if (!ref && Config_getBool("PDF_HYPERLINKS"))
{
t << "\\hyperlink{";
if (f) t << f;
if (f) t << stripPath(f);
if (f && anchor) t << "_";
if (anchor) t << anchor;
t << "}{";
......@@ -986,7 +990,7 @@ void LatexGenerator::startTitleHead(const char *fileName)
{
if (Config_getBool("PDF_HYPERLINKS") && fileName)
{
t << "\\hypertarget{" << fileName << "}{" << endl;
t << "\\hypertarget{" << stripPath(fileName) << "}{" << endl;
}
if (Config_getBool("COMPACT_LATEX"))
{
......@@ -1100,7 +1104,7 @@ void LatexGenerator::startMemberDoc(const char *clname,
t << "{\\setlength{\\rightskip}{0pt plus 5cm}";
}
void LatexGenerator::endMemberDoc()
void LatexGenerator::endMemberDoc(bool)
{
t << "}";
if (Config_getBool("COMPACT_LATEX")) t << "\\hfill";
......@@ -1112,7 +1116,7 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\hypertarget{";
if (fName) t << fName;
if (fName) t << stripPath(fName);
if (anchor) t << "_" << anchor;
t << "}{" << endl;
}
......@@ -1136,7 +1140,7 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name)
t << "\\label{" << name << "}" << endl;
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
{
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\hypertarget{" << lab << "}{}";
t << "\\hypertarget{" << stripPath(lab) << "}{}";
}
t << "\\";
if (Config_getBool("COMPACT_LATEX"))
......@@ -1380,7 +1384,7 @@ void LatexGenerator::startDotGraph()
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()
......@@ -1389,7 +1393,7 @@ void LatexGenerator::startInclDepGraph()
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()
......@@ -1398,7 +1402,7 @@ void LatexGenerator::startCallGraph()
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()
......
......@@ -142,7 +142,7 @@ class LatexGenerator : public OutputGenerator
void endDescItem();
void lineBreak() { t << "\\par\n"; }
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 endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {}
......@@ -299,6 +299,7 @@ class LatexGenerator : public OutputGenerator
bool insideTabbing;
bool firstDescItem;
bool insidePre;
QCString relPath;
};
#endif
......@@ -35,10 +35,9 @@ static QCString getExtension()
{
QCString ext = Config_getString("MAN_EXTENSION");
if( ext.length() >= 2 &&
ext.data()[0] == '.' &&
isdigit( ext.data()[1] ) )
ext.data()[0] == '.')
{
ext = ext.mid(1, 1);
ext = ext.mid(1, ext.length()-1);
}
else
{
......@@ -95,6 +94,7 @@ void ManGenerator::init()
err("Could not create output directory %s/man%s\n",manOutput.data(),ext.data());
exit(1);
}
createSubDirs(d);
}
static QCString buildFileName(const char *name)
......@@ -405,7 +405,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
linkfile.close();
}
void ManGenerator::endMemberDoc()
void ManGenerator::endMemberDoc(bool)
{
t << "\"";
}
......
......@@ -135,7 +135,7 @@ class ManGenerator : public OutputGenerator
void lineBreak() { t << "\n.br" << endl; }
void writeChar(char c);
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 endDoxyAnchor(const char *,const char *) {}
void startCodeAnchor(const char *) {}
......
......@@ -74,24 +74,33 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
return result;
}
static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
const QCString & /*scopeName*/,MemberDef *md)
{
ArgumentList *defArgList=md->isDocsForDefinition() ?
md->argumentList() : md->declArgumentList();
//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(" ");
//printf("writeDefArgList(%d)\n",defArgList->count());
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
{
// html
ol.endMemberDocName();
ol.startParameterList(!md->isObjCMethod());
}
ol.enableAll();
ol.disable(OutputGenerator::Html);
{
// other formats
if (!md->isObjCMethod()) ol.docify("("); // start argument list
ol.endMemberDocName();
}
ol.popGeneratorState();
//printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine());
......@@ -227,6 +236,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
ol.docify(" volatile");
}
return TRUE;
}
static void writeTemplatePrefix(OutputList &ol,ArgumentList *al)
......@@ -1168,11 +1178,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
)
{
// if this member is in a group find the real scope name.
bool hasParameterList = FALSE;
bool hasDocs = isDetailedSectionVisible(inGroup);
//printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n",
// name().data(),hasDocs,container->definitionType(),inGroup);
if ( hasDocs )
{
if ( !hasDocs ) return;
QCString scopeName = scName;
if (container->definitionType()==TypeGroup)
{
......@@ -1328,7 +1338,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
ol.startMemberDocName(isObjCMethod());
if (isObjCMethod())
if (cd && cd->isObjectiveC())
{
// strip scope name
int ep = ldef.find("::");
......@@ -1350,7 +1360,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//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--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
if (i>0)
{
// insert braches around the type
......@@ -1361,7 +1371,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
}
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
hasParameterList=writeDefArgumentList(ol,cd,scopeName,this);
if (hasOneLineInitializer()) // add initializer
{
if (!isDefine())
......@@ -1438,8 +1448,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.docify(" [implementation]");
ol.endTypewriter();
}
if (!isDefine() && defArgList) ol.endParameterList();
ol.endMemberDoc();
if (hasParameterList)
{
ol.endParameterList();
ol.endMemberDoc(TRUE);
}
else
{
ol.endMemberDocName();
ol.endMemberDoc(FALSE);
}
ol.endDoxyAnchor(cfname,anchor());
ol.startIndent();
......@@ -1768,11 +1786,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.newParagraph();
ol.enableAll();
ol.endIndent();
// enable LaTeX again
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
)
......@@ -1789,7 +1802,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.enableAll();
}
}
}
ol.endIndent();
// enable LaTeX again
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
}
......@@ -1969,7 +1986,7 @@ void MemberDef::setInitializer(const char *initializer)
{
init=initializer;
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);
initLines=init.contains('\n');
}
......@@ -2209,4 +2226,21 @@ bool MemberDef::isObjCMethod() const
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
const char *getGroupFileName() const { return groupFileName; }
int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; }
QCString qualifiedName() const;
// direct kind info
Protection protection() const { return prot; }
......
......@@ -316,7 +316,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void insertMemberAlign() = 0;
virtual void startMemberDoc(const char *,const char *,
const char *,const char *) = 0;
virtual void endMemberDoc() = 0;
virtual void endMemberDoc(bool) = 0;
virtual void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
......
......@@ -207,8 +207,8 @@ class OutputList : public OutputDocInterface
void startMemberDoc(const char *clName,const char *memName,
const char *anchor,const char *title)
{ forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); }
void endMemberDoc()
{ forall(&OutputGenerator::endMemberDoc); }
void endMemberDoc(bool hasArgs)
{ forall(&OutputGenerator::endMemberDoc,hasArgs); }
void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor, const char *name)
{ forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name); }
......
......@@ -190,6 +190,8 @@ void RTFGenerator::init()
{
loadExtensions(rtfExtensionsFile);
}
createSubDirs(d);
}
static QCString makeIndexName(const char *s,int i)
......@@ -322,6 +324,7 @@ void RTFGenerator::beginRTFSection()
void RTFGenerator::startFile(const char *name,const char *,const char *)
{
QCString fileName=name;
relPath = relativePathToRoot(fileName);
if (fileName.right(4)!=".rtf" ) fileName+=".rtf";
startPlainFile(fileName);
......@@ -1357,7 +1360,7 @@ void RTFGenerator::startMemberDoc(const char *clname,
t << endl;
}
void RTFGenerator::endMemberDoc()
void RTFGenerator::endMemberDoc(bool)
{
DBG_RTF(t << "{\\comment endMemberDoc}" << endl)
t << "}" << endl;
......@@ -2188,7 +2191,7 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
newParagraph();
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
t << "{" << endl;
......@@ -2210,7 +2213,8 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
{
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
t << "{" << endl;
......@@ -2231,7 +2235,8 @@ void RTFGenerator::endCallGraph(DotCallGraph &g)
{
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
t << "{" << endl;
......
......@@ -134,7 +134,7 @@ class RTFGenerator : public OutputGenerator
void endDescItem();
void lineBreak();
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 endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {};
......@@ -282,6 +282,7 @@ class RTFGenerator : public OutputGenerator
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?
int m_numCols; // number of columns in a table
QCString relPath;
void beginRTFDocument();
void beginRTFChapter();
......
This diff is collapsed.
......@@ -1127,7 +1127,7 @@ static bool findOperator(const QCString &s,int i)
while (b<i) // check if there are only spaces inbetween
// the operator and the >
{
if (!isspace(s.at(b))) return FALSE;
if (!isspace((uchar)s.at(b))) return FALSE;
b++;
}
return TRUE;
......@@ -1147,20 +1147,20 @@ QCString removeRedundantWhiteSpace(const QCString &s)
char c=s.at(i);
if (csp<6 && c==constScope[csp]) csp++; else csp=0;
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"
)
{
result+="< "; // insert extra space for layouting (nested) templates
}
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"
)
{
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-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
......@@ -1186,7 +1186,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result+=" :";
csp=0;
}
else if (!isspace(c) ||
else if (!isspace((uchar)c) ||
( 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)) || (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,
}
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
{
......@@ -2274,7 +2274,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
}
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
{
......@@ -2646,7 +2646,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
{
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
{
//printf(" >Searching for arbitrary member\n");
......@@ -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
// member will do
{
......@@ -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
// member will do
......@@ -3548,11 +3548,12 @@ QCString escapeCharsInString(const char *name,bool allowDots)
}
/*! 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.
*/
QCString convertNameToFile(const char *name,bool allowDots)
{
QCString result;
if (Config_getBool("SHORT_NAMES"))
{
static QDict<void> usedNames(10007);
......@@ -3569,13 +3570,75 @@ QCString convertNameToFile(const char *name,bool allowDots)
{
num = *(int*)&value;
}
QCString result;
result.sprintf("a%05d",num);
return result;
}
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)
//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;
struct ListItemInfo;
class PageDef;
struct SectionInfo;
class QDir;
//--------------------------------------------------------------------
......@@ -213,6 +214,11 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item);
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
const QCString &explicitScopePart);
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
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