Commit 640babbb authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.3.3-20030915

parent 79ad8414
DOXYGEN Version 1.3.3-20030909
DOXYGEN Version 1.3.3-20030915
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (09 September 2003)
Dimitri van Heesch (15 September 2003)
DOXYGEN Version 1.3.3_20030909
DOXYGEN Version 1.3.3_20030915
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) (09 September 2003)
Dimitri van Heesch (dimitri@stack.nl) (15 September 2003)
1.3.3-20030909
1.3.3-20030915
......@@ -48,3 +48,4 @@ PERL_PATH = /usr/local/bin/perl
SEARCHENGINE = NO
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
STRIP_CODE_COMMENTS = NO
......@@ -56,12 +56,14 @@ documentation:
\refitem cmddefgroup \\defgroup
\refitem cmddeprecated \\deprecated
\refitem cmddontinclude \\dontinclude
\refitem cmddot \\dot
\refitem cmddotfile \\dotfile
\refitem cmde \\e
\refitem cmdelse \\else
\refitem cmdelseif \\elseif
\refitem cmdem \\em
\refitem cmdendcode \\endcode
\refitem cmdenddot \\enddot
\refitem cmdendhtmlonly \\endhtmlonly
\refitem cmdendif \\endif
\refitem cmdendlatexonly \\endlatexonly
......@@ -1508,6 +1510,40 @@ ALIASES = "english=\if english" \
The copydoc command can be used recursively, but cycles in the copydoc
relation will be broken and flagged as an error.
<hr>
\section cmddot \dot
\addindex \\dot
Starts a text fragment which should contain a valid description of a
dot graph. The text fragment ends with \ref cmdenddot "\\enddot".
Doxygen will pass the text on to dot and include the resulting
image (and image map) into the output.
The nodes of a graph can be made clickable by using the URL attribute.
By using the command \\ref inside the URL value you can conveniently
link to an item inside doxygen. Here is an example:
\code
/*! class B */
class B {};
/*! class C */
class C {};
/*! \mainpage
*
* Class relations expressed via an inline dot graph:
* \dot
* digraph example {
* node [shape=record, fontname=Helvetica, fontsize=10];
* b [ label="class B" URL="\ref B"];
* c [ label="class C" URL="\ref C"];
* b -> c [ arrowhead="open", style="dashed" ];
* }
* \enddot
* Note that the classes in the above graph are clickable
* (in the HTML output).
*/
\endcode
<hr>
\section cmddotfile \dotfile <file> ["caption"]
......@@ -1568,6 +1604,12 @@ ALIASES = "english=\if english" \
Ends a block of code.
\sa section \ref cmdcode "\\code"
<hr>
\section cmdenddot \enddot
\addindex \\enddot
Ends a blocks that was started with \ref cmddot "\\dot".
<hr>
\section cmdendhtmlonly \endhtmlonly
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.3.3-20030904), 29 languages
Currently (version 1.3.3), 29 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
......@@ -115,7 +115,7 @@ when the translator was updated.
<TD>French</TD>
<TD>Xavier Outhier</TD>
<TD>xouthier@NOSPAM.yahoo.fr</TD>
<TD>1.3.3</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>German</TD>
......@@ -215,8 +215,8 @@ when the translator was updated.
</TR>
<TR BGCOLOR="#ffffff">
<TD>Swedish</TD>
<TD>XeT Erixon</TD>
<TD>xet@NOSPAM.hem.passagen.se</TD>
<TD>Mikael Hallin</TD>
<TD>mikaelhallin@NOSPAM.yahoo.se</TD>
<TD>1.3.3</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -258,7 +258,7 @@ when the translator was updated.
\hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\
\hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & 1.3.3 \\
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
\hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.3.1 \\
\hline
......@@ -295,7 +295,7 @@ when the translator was updated.
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.3.3 \\
\hline
Swedish & XeT Erixon & {\tt xet@hem.passagen.se} & 1.3.3 \\
Swedish & Mikael Hallin & {\tt mikaelhallin@yahoo.se} & 1.3.3 \\
\hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & 1.2.11 \\
\hline
......
......@@ -85,7 +85,8 @@ Spanish
Francisco Oltra Thennet: foltra@puc.cl
Swedish
XeT Erixon: xet@hem.passagen.se
Mikael Hallin: mikaelhallin@yahoo.se
Ukrainian
Olexij Tkatchenko: olexij.tkatchenko@gmx.de
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.3_20030909
Version: 1.3.3_20030915
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -101,6 +101,8 @@ CommandMap cmdMap[] =
{ "%", CMD_PERCENT },
{ "~", CMD_LANGSWITCH },
{ "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
{ "enddot", CMD_ENDDOT },
{ 0, 0 }
};
......
......@@ -101,7 +101,9 @@ enum CommandType
CMD_VERSION = 67 | SIMPLESECT_BIT,
CMD_WARNING = 68 | SIMPLESECT_BIT,
CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70
CMD_XMLONLY = 70,
CMD_DOT = 71,
CMD_ENDDOT = 72
};
enum HtmlTagType
......
......@@ -313,6 +313,7 @@
<xsd:element name="small" type="docMarkupType" />
<xsd:element name="htmlonly" type="xsd:string" />
<xsd:element name="latexonly" type="xsd:string" />
<xsd:element name="dot" type="xsd:string" />
<xsd:element name="anchor" type="docAnchorType" />
<xsd:element name="formula" type="docFormulaType" />
<xsd:element name="ref" type="docRefTextType" />
......
......@@ -313,6 +313,7 @@
" <xsd:element name=\"small\" type=\"docMarkupType\" />\n"
" <xsd:element name=\"htmlonly\" type=\"xsd:string\" />\n"
" <xsd:element name=\"latexonly\" type=\"xsd:string\" />\n"
" <xsd:element name=\"dot\" type=\"xsd:string\" />\n"
" <xsd:element name=\"anchor\" type=\"docAnchorType\" />\n"
" <xsd:element name=\"formula\" type=\"docFormulaType\" />\n"
" <xsd:element name=\"ref\" type=\"docRefTextType\" />\n"
......
......@@ -3686,12 +3686,22 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara();
}
break;
case CMD_DOT:
{
doctokenizerYYsetStateDot();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Dot,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: dot section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_ENDCODE:
case CMD_ENDHTMLONLY:
case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
case CMD_ENDLINK:
case CMD_ENDVERBATIM:
case CMD_ENDDOT:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break;
case CMD_PARAM:
......@@ -4585,6 +4595,7 @@ int DocSection::parse()
void DocText::parse()
{
DBG(("DocText::parse() start\n"));
g_nodeStack.push(this);
doctokenizerYYsetStateText();
......@@ -4658,6 +4669,7 @@ void DocText::parse()
DocNode *n = g_nodeStack.pop();
ASSERT(n==this);
DBG(("DocText::parse() end\n"));
}
......@@ -4665,6 +4677,7 @@ void DocText::parse()
void DocRoot::parse()
{
DBG(("DocRoot::parse() start\n"));
g_nodeStack.push(this);
doctokenizerYYsetStatePara();
int retval=0;
......@@ -4717,7 +4730,7 @@ void DocRoot::parse()
}
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid anchor id `%s'",g_token->sectionId.data());
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid anchor id `%s'; ignoring section",g_token->sectionId.data());
retval = 0;
}
}
......@@ -4734,6 +4747,7 @@ void DocRoot::parse()
DocNode *n = g_nodeStack.pop();
ASSERT(n==this);
DBG(("DocRoot::parse() end\n"));
}
//--------------------------------------------------------------------------
......
......@@ -349,7 +349,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode
{
public:
enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim };
enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim, Dot };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile) :
......@@ -373,6 +373,7 @@ class DocVerbatim : public DocNode
QString m_exampleFile;
};
/*! @brief Node representing an included text block from file */
class DocInclude : public DocNode
{
......@@ -595,7 +596,6 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode
QString height() const { return m_height; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); }
private:
DocNode *m_parent;
QString m_name;
......
......@@ -123,6 +123,7 @@ void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim();
void doctokenizerYYsetStateDot();
void doctokenizerYYsetStateParam();
void doctokenizerYYsetStateXRefItem();
void doctokenizerYYsetStateFile();
......
......@@ -327,6 +327,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_LatexOnly
%x St_XmlOnly
%x St_Verbatim
%x St_Dot
%x St_Param
%x St_XRefItem
%x St_XRefItem2
......@@ -525,6 +526,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_Verbatim>. { /* Verbatim text */
g_token->verb+=yytext;
}
<St_Dot>{CMD}"enddot" {
return RetVal_OK;
}
<St_Dot>[^\\@\n]+ |
<St_Dot>\n |
<St_Dot>. { /* dot text */
g_token->verb+=yytext;
}
<St_Title>"\"" { // quoted title
BEGIN(St_TitleQ);
}
......@@ -746,6 +755,10 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
g_endMarker="endverbatim";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"dot" {
g_endMarker="enddot";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"htmlonly" {
g_endMarker="endhtmlonly";
BEGIN(St_SecSkip);
......@@ -885,6 +898,12 @@ void doctokenizerYYsetStateVerbatim()
BEGIN(St_Verbatim);
}
void doctokenizerYYsetStateDot()
{
g_token->verb="";
BEGIN(St_Dot);
}
void doctokenizerYYsetStateParam()
{
BEGIN(St_Param);
......
......@@ -26,6 +26,7 @@
#include "language.h"
#include "scanner.h"
#include "defargs.h"
#include "docparser.h"
#include <qdir.h>
#include <qfile.h>
......@@ -96,6 +97,8 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
const int maxLineLen=1024;
char buf[maxLineLen];
char url[maxLineLen];
char ref[maxLineLen];
bool isRef = FALSE;
int x1,y1,x2,y2;
while (!f.atEnd())
{
......@@ -106,6 +109,13 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
{
// obtain the url and the coordinates in the order used by graphviz-1.5
sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2);
if ( strcmp(url,"\\ref") == 0 )
{
isRef = TRUE;
sscanf(buf,"rect %s %s %d,%d %d,%d",ref,url,&x1,&y1,&x2,&y2);
}
// later versions of graphviz corrected the y coordinate order
// the rule is that y2>=y1, so test and switch if needed
if (y2<y1)
......@@ -124,9 +134,27 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
}
if (urlOnly)
{
t << "<area href=\"" << url << "\" shape=\"rect\" coords=\""
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\""
<< " alt=\"\">" << endl;
t << "<area href=\"";
if ( isRef )
{
// handle doxygen \ref tag URL reference
QCString *dest;
DocRef *df = new DocRef( (DocNode*) 0, url );
if (!df->ref().isEmpty())
{
if ((dest=Doxygen::tagDestinationDict[df->ref()])) t << *dest << "/";
}
if (!df->file().isEmpty()) t << df->file() << Doxygen::htmlFileExtension;
if (!df->anchor().isEmpty()) t << "#" << df->anchor();
}
else
{
t << url;
}
t << "\" shape=\"rect\" coords=\""
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\""
<< " alt=\"\">" << endl;
}
else // name and external reference are separated by a $
{
......@@ -2220,7 +2248,7 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir)
QTextOStream tmpout(&result);
convertMapFile(tmpout, outFile, TRUE);
QDir().remove(outFile);
//printf("result=%s\n",result.data());
// printf("result=%s\n",result.data());
QDir::setCurrent(oldDir);
return result;
......
......@@ -16,6 +16,7 @@
*
*/
#include <qdir.h>
#include "htmldocvisitor.h"
#include "docparser.h"
#include "language.h"
......@@ -180,6 +181,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
}
}
void HtmlDocVisitor::visit(DocVerbatim *s)
{
if (m_hide) return;
......@@ -202,6 +204,31 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly:
/* nothing */
break;
case DocVerbatim::Dot:
{
static int dotindex = 1;
QCString fileName(4096);
fileName.sprintf("%s%d",
(Config_getString("HTML_OUTPUT")+"/inline_dotgraph_").data(),
dotindex++
);
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",fileName.data());
}
file.writeBlock( s->text(), s->text().length() );
file.close();
m_t << "<div align=\"center\">" << endl;
writeDotFile(fileName);
m_t << "</div>" << endl;
file.remove();
}
break;
}
}
......@@ -701,22 +728,8 @@ void HtmlDocVisitor::visitPost(DocImage *img)
void HtmlDocVisitor::visitPre(DocDotFile *df)
{
if (m_hide) return;
QString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QString outDir = Config_getString("HTML_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,BITMAP);
writeDotFile(df->file());
m_t << "<div align=\"center\">" << endl;
QString mapName = baseName+".map";
QString mapFile = df->file()+".map";
m_t << "<img src=\"" << baseName << "."
<< Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
<< baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
QString imap = getDotImageMapFromFile(df->file(),outDir);
m_t << "<map name=\"" << mapName << "\">" << imap << "</map>" << endl;
if (df->hasCaption())
{
m_t << "<p><strong>";
......@@ -1000,3 +1013,22 @@ void HtmlDocVisitor::popEnabled()
delete v;
}
void HtmlDocVisitor::writeDotFile(const QString &fileName)
{
QString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QString outDir = Config_getString("HTML_OUTPUT");
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
QString mapName = baseName+".map";
QString mapFile = fileName+".map";
m_t << "<img src=\"" << baseName << "."
<< Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
<< baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
QString imap = getDotImageMapFromFile(fileName,outDir);
m_t << "<map name=\"" << mapName << "\">" << imap << "</map>" << endl;
}
......@@ -137,6 +137,7 @@ class HtmlDocVisitor : public DocVisitor
void startLink(const QString &ref,const QString &file,
const QString &anchor);
void endLink();
void writeDotFile(const QString &fileName);
void pushEnabled();
void popEnabled();
......
......@@ -263,6 +263,31 @@ void LatexDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::LatexOnly:
m_t << s->text();
break;
case DocVerbatim::Dot:
{
static int dotindex = 1;
QCString fileName(4096);
fileName.sprintf("%s%d",
(Config_getString("LATEX_OUTPUT")+"/inline_dotgraph_").data(),
dotindex++
);
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",fileName.data());
}
file.writeBlock( s->text(), s->text().length() );
file.close();
m_t << "\\begin{center}\n";
startDotFile(fileName,"","",FALSE);
endDotFile(FALSE);
m_t << "\\end{center}\n";
file.remove();
}
break;
}
}
......@@ -742,58 +767,13 @@ void LatexDocVisitor::visitPost(DocImage *img)
void LatexDocVisitor::visitPre(DocDotFile *df)
{
if (m_hide) return;
QString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
if (baseName.right(4)==".eps" || baseName.right(4)==".pdf")
{
baseName=baseName.left(baseName.length()-4);
}
if (baseName.right(4)==".dot")
{
baseName=baseName.left(baseName.length()-4);
}
QString outDir = Config_getString("LATEX_OUTPUT");
QString name = df->file();
writeDotGraphFromFile(name,outDir,baseName,EPS);
if (df->hasCaption())
{
m_t << "\\begin{figure}[H]" << endl;
m_t << "\\begin{center}" << endl;
}
else
{
m_t << "\\mbox{";
}
m_t << "\\includegraphics";
if (!df->width().isEmpty())
{
m_t << "[width=" << df->width() << "]";
}
else if (!df->height().isEmpty())
{
m_t << "[height=" << df->height() << "]";
}
m_t << "{" << baseName << "}";
if (df->hasCaption())
{
m_t << "\\caption{";
}
startDotFile(df->file(),df->width(),df->height(),df->hasCaption());
}
void LatexDocVisitor::visitPost(DocDotFile *df)
{
if (m_hide) return;
m_t << "}" << endl; // end mbox or caption
if (df->hasCaption())
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
endDotFile(df->hasCaption());
}
void LatexDocVisitor::visitPre(DocLink *lnk)
......@@ -1016,3 +996,63 @@ void LatexDocVisitor::popEnabled()
delete v;
}
void LatexDocVisitor::startDotFile(const QString &fileName,
const QString &width,
const QString &height,
bool hasCaption
)
{
QString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
if (baseName.right(4)==".eps" || baseName.right(4)==".pdf")
{
baseName=baseName.left(baseName.length()-4);
}
if (baseName.right(4)==".dot")
{
baseName=baseName.left(baseName.length()-4);
}
QString outDir = Config_getString("LATEX_OUTPUT");
QString name = fileName;
writeDotGraphFromFile(name,outDir,baseName,EPS);
if (hasCaption)
{
m_t << "\\begin{figure}[H]" << endl;
m_t << "\\begin{center}" << endl;
}
else
{
m_t << "\\mbox{";
}
m_t << "\\includegraphics";
if (!width.isEmpty())
{
m_t << "[width=" << width << "]";
}
else if (!height.isEmpty())
{
m_t << "[height=" << height << "]";
}
m_t << "{" << baseName << "}";
if (hasCaption)
{
m_t << "\\caption{";
}
}
void LatexDocVisitor::endDotFile(bool hasCaption)
{
if (m_hide) return;
m_t << "}" << endl; // end mbox or caption
if (hasCaption)
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
}
......@@ -138,6 +138,9 @@ class LatexDocVisitor : public DocVisitor
void endLink(const QString &ref,const QString &file,
const QString &anchor);
QString escapeMakeIndexChars(const char *s);
void startDotFile(const QString &fileName,const QString &width,
const QString &height, bool hasCaption);
void endDotFile(bool hasCaption);
void pushEnabled();
void popEnabled();
......
......@@ -328,8 +328,8 @@ static void writeDefaultStyleSheetPart1(QTextStream &t)
t << "\\RequirePackage{calc}\n";
t << "\\RequirePackage{array}\n";
t << "\\pagestyle{fancyplain}\n";
t << "\\addtolength{\\headwidth}{\\marginparsep}\n";
t << "\\addtolength{\\headwidth}{\\marginparwidth}\n";
//t << "\\addtolength{\\headwidth}{\\marginparsep}\n";
//t << "\\addtolength{\\headwidth}{\\marginparwidth}\n";
t << "\\newcommand{\\clearemptydoublepage}{\\newpage{\\pagestyle{empty}";
t << "\\cleardoublepage}}\n";
if (!Config_getBool("COMPACT_LATEX"))
......
......@@ -201,6 +201,7 @@ void ManDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::Dot:
/* nothing */
break;
}
......
......@@ -621,6 +621,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
case DocVerbatim::Dot: type = "dot"; break;
}
openItem(type);
m_output.addFieldQuotedString("content", s->text());
......
......@@ -143,6 +143,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
}
printf("%s",s->text().data());
switch(s->type())
......@@ -152,6 +153,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
}
}
void visit(DocAnchor *a)
......
......@@ -315,6 +315,28 @@ void RTFDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly:
/* nothing */
break;
case DocVerbatim::Dot:
{
static int dotindex = 1;
QCString fileName(4096);
fileName.sprintf("%s%d",
(Config_getString("RTF_OUTPUT")+"/inline_dotgraph_").data(),
dotindex++
);
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",fileName.data());
}
file.writeBlock( s->text(), s->text().length() );
file.close();
m_t << "\\par{\\qc "; // center picture
writeDotFile(fileName);
m_t << "} ";
file.remove();
}
break;
}
}
......@@ -865,21 +887,7 @@ void RTFDocVisitor::visitPost(DocImage *)
void RTFDocVisitor::visitPre(DocDotFile *df)
{
QString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QString outDir = Config_getString("RTF_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,BITMAP);
m_t << "\\par" << endl;
m_t << "{" << endl;
m_t << rtf_Style_Reset << endl;
m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
m_t << outDir << "\\" << baseName;
m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "}" << endl;
writeDotFile(df->file());
// hide caption since it is not supported at the moment
pushEnabled();
......@@ -1199,3 +1207,22 @@ void RTFDocVisitor::popEnabled()
delete v;
}
void RTFDocVisitor::writeDotFile(const QString &fileName)
{
QString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QString outDir = Config_getString("RTF_OUTPUT");
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
m_t << "\\par" << endl;
m_t << "{" << endl;
m_t << rtf_Style_Reset << endl;
m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
m_t << outDir << "\\" << baseName;
m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "}" << endl;
}
......@@ -142,6 +142,7 @@ class RTFDocVisitor : public DocVisitor
void pushEnabled();
void popEnabled();
void writeDotFile(const QString &fileName);
//--------------------------------------
// state variables
......
......@@ -495,7 +495,7 @@ static int yyread(char *buf,int max_size)
/* start command character */
CMD ("\\"|"@")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"latexonly"|"htmlonly"|"xmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"details"|"typedef"|"def"|"overload")|("<"{PRE}">")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"latexonly"|"htmlonly"|"xmlonly"|"{"|"verbatim"|"dotfile"|"dot"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"details"|"typedef"|"def"|"overload")|("<"{PRE}">")
BN [ \t\n\r]
BL [ \t\r]*"\n"
B [ \t]
......@@ -2571,6 +2571,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lineCount() ;
current->args += ' ' ;
}
<Function,FuncQual,FuncRound,FuncFunc>"#" { if (insidePHP)
REJECT;
lastCPPContext = YY_START;
BEGIN(SkipCPP);
}
<FuncQual,FuncRound,FuncFunc>. { current->args += *yytext; }
<FuncQual>{BN}*"try"{BN}+ { /* try-function-block */
insideTryBlock=TRUE;
......@@ -2624,11 +2629,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
roundCount=0;
BEGIN( FuncRound ) ;
}
<Function>"#" { if (insidePHP)
REJECT;
lastCPPContext = YY_START;
BEGIN(SkipCPP);
}
<Function>":" {
if (!insidePHP) BEGIN(SkipInits);
}
......@@ -3836,22 +3836,22 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<PageDoc>{CMD}"refitem".*"\n" {
current->doc+=yytext;
}
<PageDoc>{CMD}"section"{B}+ {
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"section"{B}+ {
//sectionType=SectionInfo::Section;
current->doc+=yytext;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"subsection"{B}+ {
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsection"{B}+ {
//sectionType=SectionInfo::Subsection;
current->doc+=yytext;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"subsubsection"{B}+ {
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsubsection"{B}+ {
//sectionType=SectionInfo::Subsubsection;
current->doc+=yytext;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"paragraph"{B}+ {
<ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"paragraph"{B}+ {
//sectionType=SectionInfo::Paragraph;
current->doc+=yytext;
BEGIN(SectionLabel);
......@@ -3898,10 +3898,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->doc+=yytext;
BEGIN(AnchorLabel);
}
<Doc,PageDoc,ClassDoc>("\\\\"|"@@")("verbatim"|"latexonly"|"htmlonly")/[^a-z_A-Z0-9] {
<Doc,PageDoc,ClassDoc>("\\\\"|"@@")("verbatim"|"latexonly"|"htmlonly"|"dot")/[^a-z_A-Z0-9] {
current->doc+=yytext;
}
<JavaDoc>("\\\\"|"@@")("verbatim"|"latexonly"|"htmlonly")/[^a-z_A-Z0-9] {
<JavaDoc>("\\\\"|"@@")("verbatim"|"latexonly"|"htmlonly"|"dot")/[^a-z_A-Z0-9] {
current->brief+=yytext;
}
<Doc,PageDoc,ClassDoc>{CMD}"verbatim"/[^a-z_A-Z0-9] {
......@@ -3956,27 +3956,51 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastCodeState=YY_START;
current->doc+="\\code";
pSkipDoc=&current->doc;
g_skipBlockName="code";
BEGIN(SkipCode);
}
<JavaDoc>{CMD}"code"/[^a-z_A-Z0-9] {
lastCodeState=YY_START;
current->brief+="\\code";
pSkipDoc=&current->brief;
g_skipBlockName="code";
BEGIN(SkipCode);
}
<Doc,PageDoc,ClassDoc>("\\\\"|"@@")"dot"/[^a-z_A-Z0-9] {
current->doc+="\\\\dot";
}
<JavaDoc>("\\\\"|"@@")"dot"/[^a-z_A-Z0-9] {
current->brief+="\\\\dot";
}
<Doc,PageDoc,ClassDoc>{CMD}"dot"/[^a-z_A-Z0-9] {
lastCodeState=YY_START;
current->doc+="\\dot";
pSkipDoc=&current->doc;
g_skipBlockName="dot";
BEGIN(SkipCode);
}
<JavaDoc>{CMD}"dot"/[^a-z_A-Z0-9] {
lastCodeState=YY_START;
current->brief+="\\dot";
pSkipDoc=&current->brief;
g_skipBlockName="dot";
BEGIN(SkipCode);
}
<Doc,PageDoc,ClassDoc>"<"{PRE}{ATTR}">" {
lastCodeState=YY_START;
current->doc+="<PRE>";
pSkipDoc=&current->doc;
g_skipBlockName="pre";
BEGIN(SkipCode);
}
<JavaDoc>"<"{PRE}{ATTR}">" {
lastCodeState=YY_START;
current->brief+="<PRE>";
pSkipDoc=&current->brief;
g_skipBlockName="pre";
BEGIN(SkipCode);
}
<SkipVerbatim>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly")/[^a-z_A-Z0-9] {
<SkipVerbatim>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot")/[^a-z_A-Z0-9] {
current->doc+=yytext;
BEGIN(lastVerbState);
}
......@@ -4012,11 +4036,24 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<SkipCode>{CMD}"endcode"/[^a-z_A-Z0-9] {
*pSkipDoc+="\\endcode";
BEGIN(lastCodeState);
if (g_skipBlockName=="code")
{
BEGIN(lastCodeState);
}
}
<SkipCode>"</"{PRE}{ATTR}">" {
*pSkipDoc+="</PRE>";
BEGIN(lastCodeState);
if (g_skipBlockName=="pre")
{
BEGIN(lastCodeState);
}
}
<SkipCode>{CMD}"enddot"/[^a-z_A-Z0-9] {
*pSkipDoc+="\\enddot";
if (g_skipBlockName=="dot")
{
BEGIN(lastCodeState);
}
}
<SkipCode>^"//"({B}*"*"+)? {
if (!removeSlashes)
......@@ -4041,7 +4078,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<SkipCode><<EOF>> {
warn(yyFileName,yyLineNr,
"Warning: reached end of file while inside a @code block; check for missing @endcode!"
"Warning: reached end of file while inside a %s block; check for missing end tag!",
g_skipBlockName.data()
);
yyterminate();
}
......
......@@ -50,11 +50,13 @@
* -------------+------------------------------------------------------------
* 2003-06-10 | Update for new since 1.3.1
* -------------+------------------------------------------------------------
* 2003-09-12 | Update for new since 1.3.3
* -------------+------------------------------------------------------------
*/
#ifndef TRANSLATOR_FR_H
#define TRANSLATOR_FR_H
class TranslatorFrench : public TranslatorAdapter_1_3_3
class TranslatorFrench : public Translator
{
public:
QCString idLanguage()
......@@ -1366,6 +1368,58 @@ class TranslatorFrench : public TranslatorAdapter_1_3_3
return "Voici le graphique d'appel pour cette fonction:";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3.3
//////////////////////////////////////////////////////////////////////////
/*! When the search engine is enabled this text is put in the header
* of each page before the field where one can enter the text to search
* for.
*/
virtual QCString trSearchForIndex()
{
return "Rechercher";
}
/*! This string is used as the title for the page listing the search
* results.
*/
virtual QCString trSearchResultsTitle()
{
return "Resultats de la recherche";
}
/*! This string is put just before listing the search results. The
* text can be different depending on the number of documents found.
* Inside the text you can put the special marker $num to insert
* the number representing the actual number of search results.
* The @a numDocuments parameter can be either 0, 1 or 2, where the
* value 2 represents 2 or more matches. HTML markup is allowed inside
* the returned string.
*/
virtual QCString trSearchResults(int numDocuments)
{
if (numDocuments==0)
{
return "Sorry, no documents matching your query.";
}
else if (numDocuments==1)
{
return "Trouvé <b>1</b> document correspondant à votre requète.";
}
else
{
return "Trouvé <b>$num</b> documents correspondant à votre requète.. "
"Classé par ordre de pertinence décroissant.";
}
}
/*! This string is put before the list of matched words, for each search
* result. What follows is the list of words that matched the query.
*/
virtual QCString trSearchMatches()
{
return "Correspondances:";
}
};
#endif
......@@ -189,6 +189,11 @@ void XmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly:
m_t << s->text();
break;
case DocVerbatim::Dot:
m_t << "<dot>";
filter(s->text());
m_t << "</dot>";
break;
}
}
......
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