Commit 1c72ffcb authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.17-20020915

parent 228f1d8a
DOXYGEN Version 1.2.17-20020901
DOXYGEN Version 1.2.17-20020915
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (01 September 2002)
Dimitri van Heesch (15 September 2002)
DOXYGEN Version 1.2.17_20020901
DOXYGEN Version 1.2.17_20020915
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) (01 September 2002)
Dimitri van Heesch (dimitri@stack.nl) (15 September 2002)
1.2.17-20020901
1.2.17-20020915
......@@ -116,6 +116,7 @@ documentation:
\refitem cmdskipline \\skipline
\refitem cmdstruct \\struct
\refitem cmdsubsection \\subsection
\refitem cmdsubsubsection \\subsubsection
\refitem cmdtest \\test
\refitem cmdthrow \\throw
\refitem cmdtodo \\todo
......@@ -1106,13 +1107,46 @@ ALIASES = "english=\if english" \
subsection should be specified as the second argument of the \\subsection
command.
\warning This command only works inside related page documentation and
\warning This command only works inside a section of a related page
documentation block and
\e not in other documentation blocks!
\sa
Section \ref cmdpage "\\page" for an example of the
\ref cmdsubsection "\\subsection" command.
<hr>
\section cmdsubsubsection \subsubsection <subsubsection-name> (subsubsection title)
\addindex \\subsubsection
Creates a subsubsection with name \<subsubsection-name\>. The title of the
subsubsection should be specified as the second argument of the
\\subsubsection command.
\warning This command only works inside a subsection of a
related page documentation block and
\e not in other documentation blocks!
\sa
Section \ref cmdpage "\\page" for an example of the
\ref cmdsubsubsection "\\subsubsection" command.
<hr>
\section cmdparagraph \paragraph <paragraph-name> (paragraph title)
\addindex \\paragraph
Creates a named paragraph with name \<paragraph-name\>. The title of the
paragraph should be specified as the second argument of the
\\paragraph command.
\warning This command only works inside a subsubsection of a
related page documentation block and
\e not in other documentation blocks!
\sa
Section \ref cmdpage "\\page" for an example of the
\ref cmdparagraph "\\paragraph" command.
<hr>
<h2>\htmlonly <center> --- \endhtmlonly
......
......@@ -113,6 +113,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_generate_testlist GENERATE_TESTLIST
\refitem cfg_generate_todolist GENERATE_TODOLIST
\refitem cfg_generate_treeview GENERATE_TREEVIEW
\refitem cfg_generate_xml GENERATE_XML
\refitem cfg_graphical_hierarchy GRAPHICAL_HIERARCHY
\refitem cfg_have_dot HAVE_DOT
\refitem cfg_hhc_location HHC_LOCATION
......@@ -190,6 +191,8 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_warn_if_undocumented WARN_IF_UNDOCUMENTED
\refitem cfg_warn_logfile WARN_LOGFILE
\refitem cfg_warnings WARNINGS
\refitem cfg_xml_dtd XML_DTD
\refitem cfg_xml_schema XML_SCHEMA
\endsecreflist
\section config_general General options
......@@ -1132,6 +1135,32 @@ EXTRA_PACKAGES = times
</dl>
\section xml_output XML related options
\anchor cfg_generate_xml
<dl>
<dt>\c GENERATE_XML <dd>
\addindex GENERATE_XML
If the GENERATE_XML tag is set to YES Doxygen will
generate an XML file that captures the structure of
the code including all documentation.
\anchor cfg_xml_schema
<dt>\c XML_SCHEMA <dd>
\addindex XML_SCHEMA
The XML_SCHEMA file can be used to specify an XML schema,
which can be used by a validating XML parser to check the
syntax of the XML files.
\anchor cfg_xml_dtd
<dt>\c XML_DTD <dd>
\addindex XML_DTD
The XML_DTD file can be used to specify an XML DTD,
which can be used by a validating XML parser to check the
syntax of the XML files.
</dl>
\section config_prepro Preprocessor related options
\anchor cfg_enable_preprocessing
<dl>
......
......@@ -180,7 +180,7 @@ Thanks go to:
All language maintainers for providing translations into many languages.
<li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a>, Mark
Roddy, Paul Schwartz, Charles Duffy, Vadym Voznyuk, Philip Walton,
Dwight Browne, and Andreas Fredriksson for donating money.
Dwight Browne, Andreas Fredriksson, and Karel Lindveld for donating money.
<li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating
an ultra cool <a href="http://www.psion.com/revoplus">Revo plus</a>
organizer!
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.2.17_20020901
Version: 1.2.17_20020915
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -1186,12 +1186,31 @@ void Config::check()
}
#undef PUTENV
#undef GETENV
#undef SEP
#if defined(_WIN32) && !defined(__GNUC__) && (__BORLANDC__ < 0x0550)
#define PUTENV _putenv
#else
#define GETENV _getenv
#define SEP ";"
#else
#define PUTENV putenv
#define GETENV getenv
#define SEP ":"
#endif
if (Config_getBool("HAVE_DOT")) PUTENV("DOTFONTPATH=.");
if (Config_getBool("HAVE_DOT"))
{
char *curFontPath = GETENV("DOTFONTPATH");
int l=curFontPath ? strlen(curFontPath)+1 : 0;
static char *buf = 0;
buf = (char *)realloc(buf,strlen("DOTFONTPATH=.")+l+1);
strcpy(buf,"DOTFONTPATH=.");
if (l>0)
{
strcat(buf,SEP);
strcat(buf,curFontPath);
}
PUTENV(buf);
}
}
......@@ -2148,6 +2167,18 @@ void Config::create()
"moment. \n",
FALSE
);
cs = addString(
"XML_SCHEMA",
"The XML_SCHEMA file can be used to specify an XML schema, \n"
"which can be used by a validating XML parser to check the \n"
"syntax of the XML files. \n"
);
cs = addString(
"XML_DTD",
"The XML_DTD file can be used to specify an XML DTD, \n"
"which can be used by a validating XML parser to check the \n"
"syntax of the XML files. \n"
);
//--------------------------------------------------------------------------
addInfo( "DEF","configuration options for the AutoGen Definitions output");
//--------------------------------------------------------------------------
......
......@@ -2763,7 +2763,7 @@ LINKMASK [^ \t\n\r\\@<&$]+("("[^\n)]*")")?({B}*("const"|"volatile"))?
{
outDoc->newParagraph();
}
if (ib && currentListIndent.top()=="P")
if (ib && *currentListIndent.top()=='P')
{ // inside paragraph block
endBlock();
}
......
This diff is collapsed.
......@@ -27,6 +27,7 @@
#include "doctokenizer.h"
class DocNode;
class MemberDef;
//---------------------------------------------------------------------------
......@@ -40,7 +41,8 @@ class DocNode;
* pointer is handed over to the caller.
*/
DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context, const char *input);
const char *context, MemberDef *md,
const char *input);
//---------------------------------------------------------------------------
......@@ -380,9 +382,10 @@ class DocFormula : public DocNode
{
public:
DocFormula(DocNode *parent,int id);
Kind kind() const { return Kind_Formula; }
QCString name() const { return m_name; }
QCString text() const { return m_text; }
Kind kind() const { return Kind_Formula; }
QCString name() const { return m_name; }
QCString text() const { return m_text; }
int id() const { return m_id; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
......@@ -390,39 +393,42 @@ class DocFormula : public DocNode
DocNode *m_parent;
QCString m_name;
QCString m_text;
int m_id;
};
//-----------------------------------------------------------------------
/*! @brief Node representing a entry in the index. */
class DocCopy : public CompAccept<DocCopy>, public DocNode
/*! @brief Node representing an entry in the index. */
class DocIndexEntry : public DocNode
{
public:
DocCopy(DocNode *parent,const QCString &link)
: m_parent(parent), m_link(link) { }
DocIndexEntry(DocNode *parent) : m_parent(parent) { }
Kind kind() const { return Kind_IndexEntry; }
QCString link() const { return m_link; }
void parse();
int parse();
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); }
void accept(DocVisitor *v) { v->visit(this); }
QCString entry() { return m_entry; }
private:
DocNode *m_parent;
QCString m_link;
QCString m_entry;
};
//-----------------------------------------------------------------------
/*! @brief Node representing a entry in the index. */
class DocIndexEntry : public CompAccept<DocIndexEntry>, public DocNode
class DocCopy : public CompAccept<DocCopy>, public DocNode
{
public:
DocIndexEntry(DocNode *parent) : m_parent(parent) { }
DocCopy(DocNode *parent,const QCString &link)
: m_parent(parent), m_link(link) { }
Kind kind() const { return Kind_IndexEntry; }
int parse();
QCString link() const { return m_link; }
void parse();
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocIndexEntry>::accept(this,v); }
void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); }
private:
DocNode *m_parent;
QCString m_link;
};
/*! @brief Node representing an auto List */
......@@ -866,7 +872,8 @@ class DocPara : public CompAccept<DocPara>, public DocNode
class DocParamList : public DocNode
{
public:
DocParamList(DocNode *parent) : m_parent(parent)
DocParamList(DocNode *parent,DocParamSect::Type t)
: m_parent(parent) , m_type(t)
{ m_paragraph=new DocPara(this); }
virtual ~DocParamList()
{ delete m_paragraph; }
......@@ -874,6 +881,7 @@ class DocParamList : public DocNode
Kind kind() const { return Kind_ParamList; }
DocNode *parent() const { return m_parent; }
const QStrList &parameters() { return m_params; }
DocParamSect::Type type() const { return m_type; }
void accept(DocVisitor *v)
{
v->visitPre(this);
......@@ -882,9 +890,10 @@ class DocParamList : public DocNode
}
private:
DocNode *m_parent;
DocPara *m_paragraph;
QStrList m_params;
DocNode *m_parent;
DocPara *m_paragraph;
QStrList m_params;
DocParamSect::Type m_type;
};
/*! @brief Node representing an item of a auto list */
......@@ -1049,7 +1058,15 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
}
return cols;
}
void accept(DocVisitor *v) { CompAccept<DocHtmlTable>::accept(this,v); }
void accept(DocVisitor *v)
{
v->visitPre(this);
QListIterator<DocNode> cli(m_children);
DocNode *n;
for (cli.toFirst();(n=cli.current());++cli) n->accept(v);
if (m_caption) m_caption->accept(v);
v->visitPost(this);
}
private:
DocNode * m_parent;
......
......@@ -87,6 +87,7 @@ class DocVisitor
virtual void visit(DocIncOperator *) = 0;
virtual void visit(DocFormula *) = 0;
virtual void visit(DocLinkedWord *) = 0;
virtual void visit(DocIndexEntry *) = 0;
/*! @name Visitor functions for internal nodes */
virtual void visitPre(DocAutoList *) = 0;
......@@ -127,8 +128,6 @@ class DocVisitor
virtual void visitPost(DocHtmlTable *) = 0;
virtual void visitPre(DocHtmlCaption *) = 0;
virtual void visitPost(DocHtmlCaption *) = 0;
virtual void visitPre(DocIndexEntry *) = 0;
virtual void visitPost(DocIndexEntry *) = 0;
virtual void visitPre(DocInternal *) = 0;
virtual void visitPost(DocInternal *) = 0;
virtual void visitPre(DocHRef *) = 0;
......
......@@ -1777,6 +1777,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
QCString oldDir = convertToQCString(QDir::currentDirPath());
// go to the html output directory (i.e. path)
QDir::setCurrent(outDir);
//printf("Going to dir %s\n",QDir::currentDirPath().data());
//{ // copy input file to output dir.
// QFile inf(inFile,IO_ReadOnly);
......
......@@ -23,6 +23,7 @@
#include "outputgen.h"
#include "code.h"
#include "dot.h"
#include "message.h"
HtmlDocVisitor::HtmlDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
......@@ -82,18 +83,20 @@ void HtmlDocVisitor::visit(DocSymbol *s)
case DocSymbol::Circ: m_t << "&" << s->letter() << "circ;"; break;
case DocSymbol::Tilde: m_t << "&" << s->letter() << "tilde;"; break;
case DocSymbol::Szlig: m_t << "&szlig;"; break;
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedul;"; break;
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break;
case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break;
case DocSymbol::Nbsp: m_t << "&nbsp;"; break;
default:
printf("Error: unknown symbol found\n");
err("Error: unknown symbol found\n");
}
}
void HtmlDocVisitor::visit(DocURL *u)
{
if (m_hide) return;
m_t << "<a href=\"" << u->url() << "\">" << u->url() << "</a>";
m_t << "<a href=\"" << u->url() << "\">";
filter(u->url());
m_t << "</a>";
}
void HtmlDocVisitor::visit(DocLineBreak *)
......@@ -161,10 +164,10 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
}
}
void HtmlDocVisitor::visit(DocAnchor *)
void HtmlDocVisitor::visit(DocAnchor *anc)
{
if (m_hide) return;
m_t << "<a name=\"%s\"/></a>";
m_t << "<a name=\"" /*<< anc->file() << "#"*/ << anc->anchor() << "\"/></a>";
}
void HtmlDocVisitor::visit(DocInclude *inc)
......@@ -233,6 +236,10 @@ void HtmlDocVisitor::visit(DocFormula *f)
m_t << " ";
}
void HtmlDocVisitor::visit(DocIndexEntry *)
{
}
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
......@@ -376,8 +383,8 @@ void HtmlDocVisitor::visitPre(DocSection *s)
{
m_t << "<h" << s->level()+1 << ">";
m_t << "<a name=\"" << s->anchor();
m_t << "\"></a>" << endl;
filter(s->title());
m_t << "\"</a>" << endl;
m_t << "</h" << s->level()+1 << ">\n";
}
......@@ -493,16 +500,6 @@ void HtmlDocVisitor::visitPost(DocHtmlCaption *)
m_t << "</caption>\n";
}
void HtmlDocVisitor::visitPre(DocIndexEntry *)
{
m_hide = TRUE;
}
void HtmlDocVisitor::visitPost(DocIndexEntry *)
{
m_hide = FALSE;
}
void HtmlDocVisitor::visitPre(DocInternal *)
{
m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>" << endl;
......
......@@ -48,6 +48,7 @@ class HtmlDocVisitor : public DocVisitor
void visit(DocInclude *);
void visit(DocIncOperator *);
void visit(DocFormula *);
void visit(DocIndexEntry *);
//--------------------------------------
// visitor functions for compound nodes
......@@ -91,8 +92,6 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocHtmlCell *);
void visitPre(DocHtmlCaption *);
void visitPost(DocHtmlCaption *);
void visitPre(DocIndexEntry *);
void visitPost(DocIndexEntry *);
void visitPre(DocInternal *);
void visitPost(DocInternal *);
void visitPre(DocHRef *);
......
......@@ -526,9 +526,11 @@ void HtmlGenerator::startSection(const char *lab,const char *,SectionInfo::Secti
{
switch(type)
{
case SectionInfo::Page: t << "<h1>"; break;
case SectionInfo::Section: t << "<h2>"; break;
case SectionInfo::Subsection: t << "<h3>"; break;
case SectionInfo::Page: t << "<h1>"; break;
case SectionInfo::Section: t << "<h2>"; break;
case SectionInfo::Subsection: t << "<h3>"; break;
case SectionInfo::Subsubsection: t << "<h4>"; break;
case SectionInfo::Paragraph: t << "<h5>"; break;
default: ASSERT(0); break;
}
t << "<a name=\"" << lab << "\">";
......@@ -539,9 +541,11 @@ void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
t << "</a>" << endl;
switch(type)
{
case SectionInfo::Page: t << "</h1>"; break;
case SectionInfo::Section: t << "</h2>"; break;
case SectionInfo::Subsection: t << "</h3>"; break;
case SectionInfo::Page: t << "</h1>"; break;
case SectionInfo::Section: t << "</h2>"; break;
case SectionInfo::Subsection: t << "</h3>"; break;
case SectionInfo::Subsubsection: t << "</h4>"; break;
case SectionInfo::Paragraph: t << "</h5>"; break;
default: ASSERT(0); break;
}
}
......
......@@ -24,6 +24,48 @@
#include "code.h"
#include "dot.h"
#include "util.h"
#include "message.h"
static QCString escapeLabelName(const char *s)
{
QCString result;
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
case '%': result+="\\%"; break;
case '|': result+="\\texttt{\"|}"; break;
case '!': result+="\"!"; break;
default: result+=c;
}
}
return result;
}
QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
{
QCString result;
const char *p=s;
char str[2]; str[1]=0;
char c;
while ((c=*p++))
{
switch (c)
{
case '!': m_t << "\"!"; break;
case '"': m_t << "\"\""; break;
case '@': m_t << "\"@"; break;
case '|': m_t << "\\texttt{\"|}"; break;
case '[': m_t << "["; break;
case ']': m_t << "]"; break;
default: str[0]=c; filter(str); break;
}
}
return result;
}
LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
......@@ -107,7 +149,7 @@ void LatexDocVisitor::visit(DocSymbol *s)
case DocSymbol::Ring: m_t << "\\" << s->letter() << s->letter(); break;
case DocSymbol::Nbsp: m_t << "\\ "; break;
default:
printf("Error: unknown symbol found\n");
err("Error: unknown symbol found\n");
}
}
......@@ -249,6 +291,13 @@ void LatexDocVisitor::visit(DocFormula *f)
m_t << f->text();
}
void LatexDocVisitor::visit(DocIndexEntry *i)
{
m_t << "\\index{" << escapeLabelName(i->entry()) << "@{";
escapeMakeIndexChars(i->entry());
m_t << "}}";
}
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
......@@ -390,26 +439,24 @@ void LatexDocVisitor::visitPre(DocSection *s)
{
m_t << "\\hypertarget{" << s->file() << "_" << s->anchor() << "}{}";
}
if (s->level()==1)
if (Config_getBool("COMPACT_LATEX"))
{
if (Config_getBool("COMPACT_LATEX"))
{
m_t << "\\subsubsection{";
}
else
switch(s->level())
{
m_t << "\\subsection{";
case 1: m_t << "\\subsubsection{"; break;
case 2: m_t << "\\paragraph{"; break;
case 3: m_t << "\\subparagraph{"; break;
case 4: m_t << "\\subparagraph{"; break;
}
}
else if (s->level()==2)
else
{
if (Config_getBool("COMPACT_LATEX"))
{
m_t << "\\paragraph{";
}
else
switch(s->level())
{
m_t << "\\subsubsection{";
case 1: m_t << "\\subsection{"; break;
case 2: m_t << "\\subsubsection{"; break;
case 3: m_t << "\\paragraph{"; break;
case 4: m_t << "\\subparagraph{"; break;
}
}
filter(s->title());
......@@ -534,16 +581,6 @@ void LatexDocVisitor::visitPost(DocHtmlCell *c)
if (!c->isLast()) m_t << "&";
}
void LatexDocVisitor::visitPre(DocIndexEntry *)
{
m_hide = TRUE;
}
void LatexDocVisitor::visitPost(DocIndexEntry *)
{
m_hide = FALSE;
}
void LatexDocVisitor::visitPre(DocInternal *)
{
m_t << "\\begin{Desc}" << endl
......@@ -577,18 +614,18 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header)
{
switch(header->level())
{
case 1: m_t << "\\subsection{"; break;
case 2: m_t << "\\subsubsection{"; break;
case 3: m_t << "\\paragraph{"; break;
case 1: m_t << "\\subsection*{"; break;
case 2: m_t << "\\subsubsection*{"; break;
case 3: m_t << "\\paragraph*{"; break;
}
}
else
{
switch(header->level())
{
case 1: m_t << "\\section{"; break;
case 2: m_t << "\\subsection{"; break;
case 3: m_t << "\\subsubsection{"; break;
case 1: m_t << "\\section*{"; break;
case 2: m_t << "\\subsection*{"; break;
case 3: m_t << "\\subsubsection*{"; break;
}
}
}
......
......@@ -48,6 +48,7 @@ class LatexDocVisitor : public DocVisitor
void visit(DocInclude *);
void visit(DocIncOperator *);
void visit(DocFormula *);
void visit(DocIndexEntry *);
//--------------------------------------
// visitor functions for compound nodes
......@@ -91,8 +92,6 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocHtmlRow *) ;
void visitPre(DocHtmlCell *);
void visitPost(DocHtmlCell *);
void visitPre(DocIndexEntry *);
void visitPost(DocIndexEntry *);
void visitPre(DocInternal *);
void visitPost(DocInternal *);
void visitPre(DocHRef *);
......@@ -134,6 +133,7 @@ class LatexDocVisitor : public DocVisitor
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink();
QCString escapeMakeIndexChars(const char *s);
//--------------------------------------
// state variables
......
......@@ -1209,9 +1209,11 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect
{
switch(type)
{
case SectionInfo::Page: t << "subsection"; break;
case SectionInfo::Section: t << "subsubsection"; break;
case SectionInfo::Subsection: t << "paragraph"; break;
case SectionInfo::Page: t << "subsection"; break;
case SectionInfo::Section: t << "subsubsection"; break;
case SectionInfo::Subsection: t << "paragraph"; break;
case SectionInfo::Subsubsection: t << "subparagraph"; break;
case SectionInfo::Paragraph: t << "subparagraph"; break;
default: ASSERT(0); break;
}
t << "{";
......@@ -1220,9 +1222,11 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect
{
switch(type)
{
case SectionInfo::Page: t << "section"; break;
case SectionInfo::Section: t << "subsection"; break;
case SectionInfo::Subsection: t << "subsubsection"; break;
case SectionInfo::Page: t << "section"; break;
case SectionInfo::Section: t << "subsection"; break;
case SectionInfo::Subsection: t << "subsubsection"; break;
case SectionInfo::Subsubsection: t << "paragraph"; break;
case SectionInfo::Paragraph: t << "subparagraph"; break;
default: ASSERT(0); break;
}
t << "{";
......
......@@ -114,7 +114,8 @@ HEADERS = bufstr.h \
unistd.h \
util.h \
version.h \
xmlgen.h
xmldocvisitor.h \
xmlgen.h
SOURCES = ce_lex.cpp \
ce_parse.cpp \
classdef.cpp \
......@@ -174,6 +175,7 @@ SOURCES = ce_lex.cpp \
translator.cpp \
util.cpp \
version.cpp \
xmldocvisitor.cpp \
xmlgen.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
......
......@@ -28,6 +28,7 @@
#include "util.h"
#include "doxygen.h"
#include <string.h>
#include "docparser.h"
static QCString getExtension()
{
......@@ -542,9 +543,11 @@ void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionTy
{
switch(type)
{
case SectionInfo::Page: startGroupHeader(); break;
case SectionInfo::Section: startGroupHeader(); break;
case SectionInfo::Subsection: startMemberHeader(); break;
case SectionInfo::Page: startGroupHeader(); break;
case SectionInfo::Section: startGroupHeader(); break;
case SectionInfo::Subsection: startMemberHeader(); break;
case SectionInfo::Subsubsection: startMemberHeader(); break;
case SectionInfo::Paragraph: startMemberHeader(); break;
default: ASSERT(0); break;
}
}
......@@ -556,9 +559,11 @@ void ManGenerator::endSection(const char *,SectionInfo::SectionType type)
{
switch(type)
{
case SectionInfo::Page: endGroupHeader(); break;
case SectionInfo::Section: endGroupHeader(); break;
case SectionInfo::Subsection: endMemberHeader(); break;
case SectionInfo::Page: endGroupHeader(); break;
case SectionInfo::Section: endGroupHeader(); break;
case SectionInfo::Subsection: endMemberHeader(); break;
case SectionInfo::Subsubsection: endMemberHeader(); break;
case SectionInfo::Paragraph: endMemberHeader(); break;
default: ASSERT(0); break;
}
}
......@@ -608,3 +613,7 @@ void ManGenerator::endParamList()
{
}
void ManGenerator::printDoc(DocNode *)
{
}
......@@ -39,6 +39,8 @@ class ManGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Man && active); }
OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; }
void printDoc(DocNode *);
static void init();
void startFile(const char *name,const char *manName,
const char *title,bool external);
......
......@@ -323,7 +323,7 @@ class OutputGenerator : public BaseOutputDocInterface
void pushGeneratorState();
void popGeneratorState();
virtual void printDoc(DocNode *) {}
virtual void printDoc(DocNode *) = 0;
///////////////////////////////////////////////////////////////
// structural output interface
......
......@@ -192,13 +192,22 @@ void OutputList::popGeneratorState()
}
void OutputList::parseDoc(const char *fileName,int startLine,
const char * clName,MemberDef * /*md*/,
const char * clName,MemberDef * md,
const QCString &docStr)
{
DocNode *root = validatingParseDoc(fileName,startLine,clName,docStr);
int count=0;
OutputGenerator *og=outputs->first();
while (og)
{
if (og->isEnabled()) count++;
og=outputs->next();
}
if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine,clName,md,docStr);
og=outputs->first();
while (og)
{
if (og->isEnabled()) og->printDoc(root);
og=outputs->next();
......
......@@ -98,6 +98,7 @@ static bool g_nospaces; // add extra spaces during macro expansion
static bool g_macroExpansion; // from the configuration
static bool g_expandOnlyPredef; // from the configuration
static int g_commentCount;
static void setFileName(const char *name)
......@@ -1613,6 +1614,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defText+=' ';
g_defLitText+=' ';
g_lastCContext=YY_START;
g_commentCount=1;
BEGIN(SkipCComment);
}
<DefineText>"//" {
......@@ -1622,16 +1624,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipCPPComment);
}
<SkipCComment>"*/" {
outputChar('*');outputChar('/');
BEGIN(g_lastCContext);
if (--g_commentCount<=0)
{
outputChar('*');outputChar('/');
BEGIN(g_lastCContext);
}
}
<SkipCComment>"//" {
outputChar('/');outputChar('/');
}
<SkipCComment>"/*" {
outputChar('/');outputChar('*');
g_commentCount++;
}
<SkipCComment>[^*\n]+ {
<SkipCComment>[^*\n\/]+ {
outputArray(yytext,yyleng);
}
<SkipCComment>\n {
......@@ -1809,6 +1815,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<*>"/*" {
outputChar('/');outputChar('*');
g_lastCContext=YY_START;
g_commentCount=1;
BEGIN(SkipCComment);
}
<*>"//" {
......
......@@ -178,6 +178,11 @@ class PrintDocVisitor : public DocVisitor
indent_leaf();
printf("<formula name=%s test=%s/>",f->name().data(),f->text().data());
}
void visit(DocIndexEntry *i)
{
indent_leaf();
printf("<indexentry>%s</indexentry\n",i->entry().data());
}
//--------------------------------------
......@@ -408,16 +413,6 @@ class PrintDocVisitor : public DocVisitor
indent_post();
printf("</caption>\n");
}
void visitPre(DocIndexEntry *)
{
indent_pre();
printf("<indexentry>\n");
}
void visitPost(DocIndexEntry *)
{
indent_post();
printf("</indexentry>\n");
}
void visitPre(DocInternal *)
{
indent_pre();
......
This diff is collapsed.
......@@ -48,6 +48,7 @@ class RTFDocVisitor : public DocVisitor
void visit(DocInclude *);
void visit(DocIncOperator *);
void visit(DocFormula *);
void visit(DocIndexEntry *);
//--------------------------------------
// visitor functions for compound nodes
......@@ -91,8 +92,6 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocHtmlRow *) ;
void visitPre(DocHtmlCell *);
void visitPost(DocHtmlCell *);
void visitPre(DocIndexEntry *);
void visitPost(DocIndexEntry *);
void visitPre(DocInternal *);
void visitPost(DocInternal *);
void visitPre(DocHRef *);
......@@ -135,6 +134,8 @@ class RTFDocVisitor : public DocVisitor
const QCString &anchor);
void endLink(const QCString &ref);
QCString getStyle(const char *name);
void incIndentLevel();
void decIndentLevel();
//--------------------------------------
// state variables
......
......@@ -34,13 +34,12 @@
#include "version.h"
#include "page.h"
#include "rtfstyle.h"
#include "rtfdocvisitor.h"
#include "docparser.h"
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
// used for table column width calculation
#define PAGEWIDTH 8748
static QCString dateToRTFDateString()
{
const QDateTime &d = QDateTime::currentDateTime();
......@@ -870,7 +869,7 @@ void RTFGenerator::startItemList()
DBG_RTF(t << "{\\comment (startItemList level=" << m_listLevel << ") }" << endl)
t << "{";
incrementIndentLevel();
listItemInfo[m_listLevel].isEnum = FALSE;
rtf_listItemInfo[m_listLevel].isEnum = FALSE;
}
/*! end bullet list */
......@@ -889,8 +888,8 @@ void RTFGenerator::startEnumList() // starts an enumeration list
DBG_RTF(t << "{\\comment (startEnumList)}" << endl)
t << "{" << endl;
incrementIndentLevel();
listItemInfo[m_listLevel].isEnum = TRUE;
listItemInfo[m_listLevel].number = 1;
rtf_listItemInfo[m_listLevel].isEnum = TRUE;
rtf_listItemInfo[m_listLevel].number = 1;
}
/*! end enumeration list */
......@@ -909,11 +908,11 @@ void RTFGenerator::writeListItem()
DBG_RTF(t << "{\\comment (writeListItem)}" << endl)
newParagraph();
t << rtf_Style_Reset;
if (listItemInfo[m_listLevel].isEnum)
if (rtf_listItemInfo[m_listLevel].isEnum)
{
t << rtf_EList_DepthStyle() << endl;
t << listItemInfo[m_listLevel].number << ".\\tab ";
listItemInfo[m_listLevel].number++;
t << rtf_listItemInfo[m_listLevel].number << ".\\tab ";
rtf_listItemInfo[m_listLevel].number++;
}
else
{
......@@ -1099,12 +1098,14 @@ void RTFGenerator::endSubsubsection()
void RTFGenerator::startTable(bool,int colNumbers)
{
DBG_RTF(t << "{\\comment startTable}\n";)
m_numCols=colNumbers;
t << "\\par\n";
}
void RTFGenerator::endTable(bool hasCaption)
{
DBG_RTF(t << "{\\comment endTable}\n";)
if (!hasCaption)
t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
t << "\\pard\n" << endl;
......@@ -1112,22 +1113,25 @@ void RTFGenerator::endTable(bool hasCaption)
void RTFGenerator::startCaption()
{
DBG_RTF(t << "{\\comment startCaption}\n";)
endTableRow();
t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10" << endl;
t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<PAGEWIDTH<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright " << endl;
t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<rtf_pageWidth<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright " << endl;
nextTableColumn();
}
void RTFGenerator::endCaption()
{
DBG_RTF(t << "{\\comment endCaption}\n";)
endTableColumn();
endTableRow();
}
void RTFGenerator::nextTableRow()
{
DBG_RTF(t << "{\\comment nextTableRow}\n";)
ASSERT(m_numCols>0 && m_numCols<25);
uint columnWidth=PAGEWIDTH/m_numCols;
uint columnWidth=rtf_pageWidth/m_numCols;
t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 "
"\\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 "
"\\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 "
......@@ -1143,16 +1147,19 @@ void RTFGenerator::nextTableRow()
void RTFGenerator::endTableRow()
{
DBG_RTF(t << "{\\comment endTableRow}\n";)
t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
}
void RTFGenerator::nextTableColumn()
{
DBG_RTF(t << "{\\comment nextTableColumn}\n";)
t << "{ ";
}
void RTFGenerator::endTableColumn()
{
DBG_RTF(t << "{\\comment endTableColumn}\n";)
t << " \\cell }";
}
......@@ -1516,9 +1523,11 @@ void RTFGenerator::startSection(const char *,const char *title,SectionInfo::Sect
int num=4;
switch(type)
{
case SectionInfo::Page: num=2; break;
case SectionInfo::Section: num=3; break;
case SectionInfo::Subsection: num=4; break;
case SectionInfo::Page: num=2; break;
case SectionInfo::Section: num=3; break;
case SectionInfo::Subsection: num=4; break;
case SectionInfo::Subsubsection: num=4; break;
case SectionInfo::Paragraph: num=4; break;
default: ASSERT(0); break;
}
QCString heading;
......@@ -1883,10 +1892,10 @@ void RTFGenerator::endDescTableData()
void RTFGenerator::incrementIndentLevel()
{
m_listLevel++;
if (m_listLevel>indentLevels-1)
if (m_listLevel>rtf_maxIndentLevels-1)
{
warn_cont("Warning: Maximum indent level (%d) exceeded while generating RTF output!\n",indentLevels);
m_listLevel=indentLevels-1;
warn_cont("Warning: Maximum indent level (%d) exceeded while generating RTF output!\n",rtf_maxIndentLevels);
m_listLevel=rtf_maxIndentLevels-1;
}
}
......@@ -2398,3 +2407,10 @@ void RTFGenerator::endParamList()
t << "}";
}
void RTFGenerator::printDoc(DocNode *n)
{
RTFDocVisitor *visitor = new RTFDocVisitor(t,*this);
n->accept(visitor);
delete visitor;
}
......@@ -42,6 +42,8 @@ class RTFGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==RTF && active); }
OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; }
void printDoc(DocNode *);
void startFile(const char *name,const char *manName,
const char *title, bool external);
void writeFooter(int,bool) {}
......
......@@ -25,7 +25,7 @@
#include "message.h"
RTFListItemInfo listItemInfo[indentLevels];
RTFListItemInfo rtf_listItemInfo[rtf_maxIndentLevels];
QCString rtf_title;
QCString rtf_subject;
......
......@@ -23,6 +23,9 @@
#include <qregexp.h>
#include <qdict.h>
// used for table column width calculation
const int rtf_pageWidth = 8748;
extern QCString rtf_title;
extern QCString rtf_subject;
extern QCString rtf_comments;
......@@ -40,9 +43,9 @@ struct RTFListItemInfo
int number;
};
const int indentLevels = 10;
const int rtf_maxIndentLevels = 10;
extern RTFListItemInfo listItemInfo[indentLevels];
extern RTFListItemInfo rtf_listItemInfo[rtf_maxIndentLevels];
struct Rtf_Style_Default
{
......
......@@ -282,10 +282,10 @@ static void addSection()
{
//printf("New section pageName=%s label=%s title=%s\n",
// current->name.data(),sectionLabel.data(),sectionTitle.data());
if (current->name.isEmpty() || current->section != Entry::PAGEDOC_SEC)
if (current->name.isEmpty() /*|| current->section != Entry::PAGEDOC_SEC */)
{
warn(yyFileName,yyLineNr,"Warning: found section or anchor with label `%s' "
"outside of \\page context!\n",sectionLabel.data());
//warn(yyFileName,yyLineNr,"Warning: found section or anchor with label `%s' "
// "outside of \\page context!\n",sectionLabel.data());
return;
}
if (sectionLabel.isEmpty()) return;
......@@ -453,6 +453,7 @@ static void addSpecialItem(const char *listName)
ASSERT(item!=0);
item->text += " <p>";
item->text += current->brief;
//printf("%s: text +=%s\n",listName,item->text.data());
}
else // new item
{
......@@ -473,6 +474,7 @@ static void addSpecialItem(const char *listName)
sectionLabel=anchorLabel;
addSection();
current->name = tmpName;
//printf("%s: text %s doc %s\n",listName,item->text.data(),cmdString.data());
}
current->brief = slString.copy(); // restore orginial brief desc.
}
......@@ -3223,6 +3225,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->section = Entry::MAINPAGEDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->name = "mainpage";
BEGIN( PageDocArg2 );
}
<Doc,JavaDoc>{B}*{CMD}"file"{B}* {
......@@ -3517,6 +3520,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
sectionType=SectionInfo::Subsection;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"subsubsection"{B}+ {
sectionType=SectionInfo::Subsubsection;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"paragraph"{B}+ {
sectionType=SectionInfo::Paragraph;
BEGIN(SectionLabel);
}
<GroupHeader>. { memberGroupHeader+=*yytext; }
<GroupHeader>"*/" {
unput('/');unput('*');
......@@ -3970,7 +3981,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<DocBaseClass>\n { yyLineNr++; BEGIN( ClassDoc ); }
<ClassDocBrief>{BS}({BL}|"\\n\\n") {
current->brief=current->brief.stripWhiteSpace();
if (!current->doc.isEmpty()) current->doc+=" <p>";
//if (!current->doc.isEmpty()) current->doc+=" <p>";
if (lastBriefContext==TodoParam ||
lastBriefContext==TestParam ||
lastBriefContext==BugParam ||
......
......@@ -29,7 +29,7 @@ class PageInfo;
struct SectionInfo
{
enum SectionType { Page, Section, Subsection, Anchor };
enum SectionType { Page, Section, Subsection, Subsubsection, Paragraph, Anchor };
SectionInfo(const char *l,const char *t,SectionType st,const char *r=0)
{ label=l; title=t; type=st; ref=r; definition=0; pageRef=0; generated=FALSE; }
~SectionInfo() {}
......
......@@ -3519,7 +3519,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
doc += "</dt>\n<dd>";
doc += item->text;
doc += "</dd></dl>\n";
addRelatedPage(refList->listName(),refList->pageTitle(),doc,0,"generated",1,0,0,0);
addRelatedPage(refList->listName(),refList->pageTitle(),doc,0,refList->listName(),1,0,0,0);
item->written=TRUE;
}
}
......@@ -3937,7 +3937,7 @@ QCString rtfFormatBmkStr(const char *name)
{
if ( ( ++(*nxtTag) ) > 'Z' )
{
(*nxtTag) = 'A';
*nxtTag = 'A';
}
else
{
......
This diff is collapsed.
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef _XMLDOCVISITOR_H
#define _XMLDOCVISITOR_H
#include "docvisitor.h"
class QTextStream;
class BaseCodeDocInterface;
class QCString;
/*! @brief Concrete visitor implementation for HTML output. */
class XmlDocVisitor : public DocVisitor
{
public:
XmlDocVisitor(QTextStream &t,BaseCodeDocInterface &ci);
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
void visit(DocWord *);
void visit(DocLinkedWord *);
void visit(DocWhiteSpace *);
void visit(DocSymbol *);
void visit(DocURL *);
void visit(DocLineBreak *);
void visit(DocHorRuler *);
void visit(DocStyleChange *);
void visit(DocVerbatim *);
void visit(DocAnchor *);
void visit(DocInclude *);
void visit(DocIncOperator *);
void visit(DocFormula *);
void visit(DocIndexEntry *);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
void visitPre(DocAutoList *);
void visitPost(DocAutoList *);
void visitPre(DocAutoListItem *);
void visitPost(DocAutoListItem *);
void visitPre(DocPara *) ;
void visitPost(DocPara *);
void visitPre(DocRoot *);
void visitPost(DocRoot *);
void visitPre(DocSimpleSect *);
void visitPost(DocSimpleSect *);
void visitPre(DocTitle *);
void visitPost(DocTitle *);
void visitPre(DocSimpleList *);
void visitPost(DocSimpleList *);
void visitPre(DocSimpleListItem *);
void visitPost(DocSimpleListItem *);
void visitPre(DocSection *);
void visitPost(DocSection *);
void visitPre(DocHtmlList *);
void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
void visitPost(DocHtmlDescTitle *);
void visitPre(DocHtmlDescData *);
void visitPost(DocHtmlDescData *);
void visitPre(DocHtmlTable *);
void visitPost(DocHtmlTable *);
void visitPre(DocHtmlRow *);
void visitPost(DocHtmlRow *) ;
void visitPre(DocHtmlCell *);
void visitPost(DocHtmlCell *);
void visitPre(DocHtmlCaption *);
void visitPost(DocHtmlCaption *);
void visitPre(DocInternal *);
void visitPost(DocInternal *);
void visitPre(DocHRef *);
void visitPost(DocHRef *);
void visitPre(DocHtmlHeader *);
void visitPost(DocHtmlHeader *);
void visitPre(DocImage *);
void visitPost(DocImage *);
void visitPre(DocDotFile *);
void visitPost(DocDotFile *);
void visitPre(DocLink *);
void visitPost(DocLink *);
void visitPre(DocRef *);
void visitPost(DocRef *);
void visitPre(DocSecRefItem *);
void visitPost(DocSecRefItem *);
void visitPre(DocSecRefList *);
void visitPost(DocSecRefList *);
void visitPre(DocLanguage *);
void visitPost(DocLanguage *);
void visitPre(DocParamSect *);
void visitPost(DocParamSect *);
void visitPre(DocParamList *);
void visitPost(DocParamList *);
void visitPre(DocXRefItem *);
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
private:
//--------------------------------------
// helper functions
//--------------------------------------
void filter(const char *str);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink();
//--------------------------------------
// state variables
//--------------------------------------
QTextStream &m_t;
BaseCodeDocInterface &m_ci;
bool m_insidePre;
bool m_hide;
};
#endif
This diff is collapsed.
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