Commit 51502afe authored by dimitri's avatar dimitri

Release-1.3.3-20030915

parent 5042f145
DOXYGEN Version 1.3.3-20030909 DOXYGEN Version 1.3.3-20030915
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (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. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (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 ...@@ -48,3 +48,4 @@ PERL_PATH = /usr/local/bin/perl
SEARCHENGINE = NO SEARCHENGINE = NO
PDF_HYPERLINKS = YES PDF_HYPERLINKS = YES
USE_PDFLATEX = YES USE_PDFLATEX = YES
STRIP_CODE_COMMENTS = NO
...@@ -56,12 +56,14 @@ documentation: ...@@ -56,12 +56,14 @@ documentation:
\refitem cmddefgroup \\defgroup \refitem cmddefgroup \\defgroup
\refitem cmddeprecated \\deprecated \refitem cmddeprecated \\deprecated
\refitem cmddontinclude \\dontinclude \refitem cmddontinclude \\dontinclude
\refitem cmddot \\dot
\refitem cmddotfile \\dotfile \refitem cmddotfile \\dotfile
\refitem cmde \\e \refitem cmde \\e
\refitem cmdelse \\else \refitem cmdelse \\else
\refitem cmdelseif \\elseif \refitem cmdelseif \\elseif
\refitem cmdem \\em \refitem cmdem \\em
\refitem cmdendcode \\endcode \refitem cmdendcode \\endcode
\refitem cmdenddot \\enddot
\refitem cmdendhtmlonly \\endhtmlonly \refitem cmdendhtmlonly \\endhtmlonly
\refitem cmdendif \\endif \refitem cmdendif \\endif
\refitem cmdendlatexonly \\endlatexonly \refitem cmdendlatexonly \\endlatexonly
...@@ -1508,6 +1510,40 @@ ALIASES = "english=\if english" \ ...@@ -1508,6 +1510,40 @@ ALIASES = "english=\if english" \
The copydoc command can be used recursively, but cycles in the copydoc The copydoc command can be used recursively, but cycles in the copydoc
relation will be broken and flagged as an error. 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> <hr>
\section cmddotfile \dotfile <file> ["caption"] \section cmddotfile \dotfile <file> ["caption"]
...@@ -1568,6 +1604,12 @@ ALIASES = "english=\if english" \ ...@@ -1568,6 +1604,12 @@ ALIASES = "english=\if english" \
Ends a block of code. Ends a block of code.
\sa section \ref cmdcode "\\code" \sa section \ref cmdcode "\\code"
<hr>
\section cmdenddot \enddot
\addindex \\enddot
Ends a blocks that was started with \ref cmddot "\\dot".
<hr> <hr>
\section cmdendhtmlonly \endhtmlonly \section cmdendhtmlonly \endhtmlonly
......
...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means ...@@ -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 that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. 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): are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish, Czech, Danish, Dutch, English, Finnish,
...@@ -115,7 +115,7 @@ when the translator was updated. ...@@ -115,7 +115,7 @@ when the translator was updated.
<TD>French</TD> <TD>French</TD>
<TD>Xavier Outhier</TD> <TD>Xavier Outhier</TD>
<TD>xouthier@NOSPAM.yahoo.fr</TD> <TD>xouthier@NOSPAM.yahoo.fr</TD>
<TD>1.3.3</TD> <TD>up-to-date</TD>
</TR> </TR>
<TR BGCOLOR="#ffffff"> <TR BGCOLOR="#ffffff">
<TD>German</TD> <TD>German</TD>
...@@ -215,8 +215,8 @@ when the translator was updated. ...@@ -215,8 +215,8 @@ when the translator was updated.
</TR> </TR>
<TR BGCOLOR="#ffffff"> <TR BGCOLOR="#ffffff">
<TD>Swedish</TD> <TD>Swedish</TD>
<TD>XeT Erixon</TD> <TD>Mikael Hallin</TD>
<TD>xet@NOSPAM.hem.passagen.se</TD> <TD>mikaelhallin@NOSPAM.yahoo.se</TD>
<TD>1.3.3</TD> <TD>1.3.3</TD>
</TR> </TR>
<TR BGCOLOR="#ffffff"> <TR BGCOLOR="#ffffff">
...@@ -258,7 +258,7 @@ when the translator was updated. ...@@ -258,7 +258,7 @@ when the translator was updated.
\hline \hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\ Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\
\hline \hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & 1.3.3 \\ French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
\hline \hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.3.1 \\ German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.3.1 \\
\hline \hline
...@@ -295,7 +295,7 @@ when the translator was updated. ...@@ -295,7 +295,7 @@ when the translator was updated.
\hline \hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.3.3 \\ Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.3.3 \\
\hline \hline
Swedish & XeT Erixon & {\tt xet@hem.passagen.se} & 1.3.3 \\ Swedish & Mikael Hallin & {\tt mikaelhallin@yahoo.se} & 1.3.3 \\
\hline \hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & 1.2.11 \\ Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & 1.2.11 \\
\hline \hline
......
...@@ -85,7 +85,8 @@ Spanish ...@@ -85,7 +85,8 @@ Spanish
Francisco Oltra Thennet: foltra@puc.cl Francisco Oltra Thennet: foltra@puc.cl
Swedish Swedish
XeT Erixon: xet@hem.passagen.se Mikael Hallin: mikaelhallin@yahoo.se
Ukrainian Ukrainian
Olexij Tkatchenko: olexij.tkatchenko@gmx.de Olexij Tkatchenko: olexij.tkatchenko@gmx.de
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.3_20030909 Version: 1.3.3_20030915
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -101,6 +101,8 @@ CommandMap cmdMap[] = ...@@ -101,6 +101,8 @@ CommandMap cmdMap[] =
{ "%", CMD_PERCENT }, { "%", CMD_PERCENT },
{ "~", CMD_LANGSWITCH }, { "~", CMD_LANGSWITCH },
{ "_internalref", CMD_INTERNALREF }, { "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
{ "enddot", CMD_ENDDOT },
{ 0, 0 } { 0, 0 }
}; };
......
...@@ -101,7 +101,9 @@ enum CommandType ...@@ -101,7 +101,9 @@ enum CommandType
CMD_VERSION = 67 | SIMPLESECT_BIT, CMD_VERSION = 67 | SIMPLESECT_BIT,
CMD_WARNING = 68 | SIMPLESECT_BIT, CMD_WARNING = 68 | SIMPLESECT_BIT,
CMD_XREFITEM = 69 | SIMPLESECT_BIT, CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70 CMD_XMLONLY = 70,
CMD_DOT = 71,
CMD_ENDDOT = 72
}; };
enum HtmlTagType enum HtmlTagType
......
...@@ -313,6 +313,7 @@ ...@@ -313,6 +313,7 @@
<xsd:element name="small" type="docMarkupType" /> <xsd:element name="small" type="docMarkupType" />
<xsd:element name="htmlonly" type="xsd:string" /> <xsd:element name="htmlonly" type="xsd:string" />
<xsd:element name="latexonly" 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="anchor" type="docAnchorType" />
<xsd:element name="formula" type="docFormulaType" /> <xsd:element name="formula" type="docFormulaType" />
<xsd:element name="ref" type="docRefTextType" /> <xsd:element name="ref" type="docRefTextType" />
......
...@@ -313,6 +313,7 @@ ...@@ -313,6 +313,7 @@
" <xsd:element name=\"small\" type=\"docMarkupType\" />\n" " <xsd:element name=\"small\" type=\"docMarkupType\" />\n"
" <xsd:element name=\"htmlonly\" type=\"xsd:string\" />\n" " <xsd:element name=\"htmlonly\" type=\"xsd:string\" />\n"
" <xsd:element name=\"latexonly\" 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=\"anchor\" type=\"docAnchorType\" />\n"
" <xsd:element name=\"formula\" type=\"docFormulaType\" />\n" " <xsd:element name=\"formula\" type=\"docFormulaType\" />\n"
" <xsd:element name=\"ref\" type=\"docRefTextType\" />\n" " <xsd:element name=\"ref\" type=\"docRefTextType\" />\n"
......
...@@ -3686,12 +3686,22 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3686,12 +3686,22 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
break; 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_ENDCODE:
case CMD_ENDHTMLONLY: case CMD_ENDHTMLONLY:
case CMD_ENDLATEXONLY: case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY: case CMD_ENDXMLONLY:
case CMD_ENDLINK: case CMD_ENDLINK:
case CMD_ENDVERBATIM: case CMD_ENDVERBATIM:
case CMD_ENDDOT:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break; break;
case CMD_PARAM: case CMD_PARAM:
...@@ -4585,6 +4595,7 @@ int DocSection::parse() ...@@ -4585,6 +4595,7 @@ int DocSection::parse()
void DocText::parse() void DocText::parse()
{ {
DBG(("DocText::parse() start\n"));
g_nodeStack.push(this); g_nodeStack.push(this);
doctokenizerYYsetStateText(); doctokenizerYYsetStateText();
...@@ -4658,6 +4669,7 @@ void DocText::parse() ...@@ -4658,6 +4669,7 @@ void DocText::parse()
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
ASSERT(n==this); ASSERT(n==this);
DBG(("DocText::parse() end\n"));
} }
...@@ -4665,6 +4677,7 @@ void DocText::parse() ...@@ -4665,6 +4677,7 @@ void DocText::parse()
void DocRoot::parse() void DocRoot::parse()
{ {
DBG(("DocRoot::parse() start\n"));
g_nodeStack.push(this); g_nodeStack.push(this);
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
int retval=0; int retval=0;
...@@ -4717,7 +4730,7 @@ void DocRoot::parse() ...@@ -4717,7 +4730,7 @@ void DocRoot::parse()
} }
else 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; retval = 0;
} }
} }
...@@ -4734,6 +4747,7 @@ void DocRoot::parse() ...@@ -4734,6 +4747,7 @@ void DocRoot::parse()
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
ASSERT(n==this); ASSERT(n==this);
DBG(("DocRoot::parse() end\n"));
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
......
...@@ -349,7 +349,7 @@ class DocWhiteSpace : public DocNode ...@@ -349,7 +349,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode class DocVerbatim : public DocNode
{ {
public: public:
enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim }; enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim, Dot };
DocVerbatim(DocNode *parent,const QString &context, DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample, const QString &text, Type t,bool isExample,
const QString &exampleFile) : const QString &exampleFile) :
...@@ -373,6 +373,7 @@ class DocVerbatim : public DocNode ...@@ -373,6 +373,7 @@ class DocVerbatim : public DocNode
QString m_exampleFile; QString m_exampleFile;
}; };
/*! @brief Node representing an included text block from file */ /*! @brief Node representing an included text block from file */
class DocInclude : public DocNode class DocInclude : public DocNode
{ {
...@@ -595,7 +596,6 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode ...@@ -595,7 +596,6 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode
QString height() const { return m_height; } QString height() const { return m_height; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QString m_name; QString m_name;
......
...@@ -123,6 +123,7 @@ void doctokenizerYYsetStateHtmlOnly(); ...@@ -123,6 +123,7 @@ void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateLatexOnly(); void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly(); void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim(); void doctokenizerYYsetStateVerbatim();
void doctokenizerYYsetStateDot();
void doctokenizerYYsetStateParam(); void doctokenizerYYsetStateParam();
void doctokenizerYYsetStateXRefItem(); void doctokenizerYYsetStateXRefItem();
void doctokenizerYYsetStateFile(); void doctokenizerYYsetStateFile();
......
...@@ -327,6 +327,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -327,6 +327,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_LatexOnly %x St_LatexOnly
%x St_XmlOnly %x St_XmlOnly
%x St_Verbatim %x St_Verbatim
%x St_Dot
%x St_Param %x St_Param
%x St_XRefItem %x St_XRefItem
%x St_XRefItem2 %x St_XRefItem2
...@@ -525,6 +526,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -525,6 +526,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_Verbatim>. { /* Verbatim text */ <St_Verbatim>. { /* Verbatim text */
g_token->verb+=yytext; 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 <St_Title>"\"" { // quoted title
BEGIN(St_TitleQ); BEGIN(St_TitleQ);
} }
...@@ -746,6 +755,10 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -746,6 +755,10 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
g_endMarker="endverbatim"; g_endMarker="endverbatim";
BEGIN(St_SecSkip); BEGIN(St_SecSkip);
} }
<St_Sections>{CMD}"dot" {
g_endMarker="enddot";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"htmlonly" { <St_Sections>{CMD}"htmlonly" {
g_endMarker="endhtmlonly"; g_endMarker="endhtmlonly";
BEGIN(St_SecSkip); BEGIN(St_SecSkip);
...@@ -885,6 +898,12 @@ void doctokenizerYYsetStateVerbatim() ...@@ -885,6 +898,12 @@ void doctokenizerYYsetStateVerbatim()
BEGIN(St_Verbatim); BEGIN(St_Verbatim);
} }
void doctokenizerYYsetStateDot()
{
g_token->verb="";
BEGIN(St_Dot);
}
void doctokenizerYYsetStateParam() void doctokenizerYYsetStateParam()
{ {
BEGIN(St_Param); BEGIN(St_Param);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "language.h" #include "language.h"
#include "scanner.h" #include "scanner.h"
#include "defargs.h" #include "defargs.h"
#include "docparser.h"
#include <qdir.h> #include <qdir.h>
#include <qfile.h> #include <qfile.h>
...@@ -96,6 +97,8 @@ static bool convertMapFile(QTextStream &t,const char *mapName, ...@@ -96,6 +97,8 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
const int maxLineLen=1024; const int maxLineLen=1024;
char buf[maxLineLen]; char buf[maxLineLen];
char url[maxLineLen]; char url[maxLineLen];
char ref[maxLineLen];
bool isRef = FALSE;
int x1,y1,x2,y2; int x1,y1,x2,y2;
while (!f.atEnd()) while (!f.atEnd())
{ {
...@@ -106,6 +109,13 @@ static bool convertMapFile(QTextStream &t,const char *mapName, ...@@ -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 // 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); 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 // later versions of graphviz corrected the y coordinate order
// the rule is that y2>=y1, so test and switch if needed // the rule is that y2>=y1, so test and switch if needed
if (y2<y1) if (y2<y1)
...@@ -124,9 +134,27 @@ static bool convertMapFile(QTextStream &t,const char *mapName, ...@@ -124,9 +134,27 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
} }
if (urlOnly) if (urlOnly)
{ {
t << "<area href=\"" << url << "\" shape=\"rect\" coords=\"" t << "<area href=\"";
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\""
<< " alt=\"\">" << endl; 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 $ else // name and external reference are separated by a $
{ {
...@@ -2220,7 +2248,7 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir) ...@@ -2220,7 +2248,7 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir)
QTextOStream tmpout(&result); QTextOStream tmpout(&result);
convertMapFile(tmpout, outFile, TRUE); convertMapFile(tmpout, outFile, TRUE);
QDir().remove(outFile); QDir().remove(outFile);
//printf("result=%s\n",result.data()); // printf("result=%s\n",result.data());
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
return result; return result;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* *
*/ */
#include <qdir.h>
#include "htmldocvisitor.h" #include "htmldocvisitor.h"
#include "docparser.h" #include "docparser.h"
#include "language.h" #include "language.h"
...@@ -180,6 +181,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s) ...@@ -180,6 +181,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
} }
} }
void HtmlDocVisitor::visit(DocVerbatim *s) void HtmlDocVisitor::visit(DocVerbatim *s)
{ {
if (m_hide) return; if (m_hide) return;
...@@ -202,6 +204,31 @@ void HtmlDocVisitor::visit(DocVerbatim *s) ...@@ -202,6 +204,31 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly: case DocVerbatim::XmlOnly:
/* nothing */ /* nothing */
break; 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) ...@@ -701,22 +728,8 @@ void HtmlDocVisitor::visitPost(DocImage *img)
void HtmlDocVisitor::visitPre(DocDotFile *df) void HtmlDocVisitor::visitPre(DocDotFile *df)
{ {
if (m_hide) return; if (m_hide) return;
QString baseName=df->file(); writeDotFile(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);
m_t << "<div align=\"center\">" << endl; 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()) if (df->hasCaption())
{ {
m_t << "<p><strong>"; m_t << "<p><strong>";
...@@ -1000,3 +1013,22 @@ void HtmlDocVisitor::popEnabled() ...@@ -1000,3 +1013,22 @@ void HtmlDocVisitor::popEnabled()
delete v; 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 ...@@ -137,6 +137,7 @@ class HtmlDocVisitor : public DocVisitor
void startLink(const QString &ref,const QString &file, void startLink(const QString &ref,const QString &file,
const QString &anchor); const QString &anchor);
void endLink(); void endLink();
void writeDotFile(const QString &fileName);
void pushEnabled(); void pushEnabled();
void popEnabled(); void popEnabled();
......
...@@ -263,6 +263,31 @@ void LatexDocVisitor::visit(DocVerbatim *s) ...@@ -263,6 +263,31 @@ void LatexDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::LatexOnly: case DocVerbatim::LatexOnly:
m_t << s->text(); m_t << s->text();
break; 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) ...@@ -742,58 +767,13 @@ void LatexDocVisitor::visitPost(DocImage *img)
void LatexDocVisitor::visitPre(DocDotFile *df) void LatexDocVisitor::visitPre(DocDotFile *df)
{ {
if (m_hide) return; if (m_hide) return;
QString baseName=df->file(); startDotFile(df->file(),df->width(),df->height(),df->hasCaption());
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{";
}
} }
void LatexDocVisitor::visitPost(DocDotFile *df) void LatexDocVisitor::visitPost(DocDotFile *df)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "}" << endl; // end mbox or caption endDotFile(df->hasCaption());
if (df->hasCaption())
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
} }
void LatexDocVisitor::visitPre(DocLink *lnk) void LatexDocVisitor::visitPre(DocLink *lnk)
...@@ -1016,3 +996,63 @@ void LatexDocVisitor::popEnabled() ...@@ -1016,3 +996,63 @@ void LatexDocVisitor::popEnabled()
delete v; 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 ...@@ -138,6 +138,9 @@ class LatexDocVisitor : public DocVisitor
void endLink(const QString &ref,const QString &file, void endLink(const QString &ref,const QString &file,
const QString &anchor); const QString &anchor);
QString escapeMakeIndexChars(const char *s); 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 pushEnabled();
void popEnabled(); void popEnabled();
......
...@@ -328,8 +328,8 @@ static void writeDefaultStyleSheetPart1(QTextStream &t) ...@@ -328,8 +328,8 @@ static void writeDefaultStyleSheetPart1(QTextStream &t)
t << "\\RequirePackage{calc}\n"; t << "\\RequirePackage{calc}\n";
t << "\\RequirePackage{array}\n"; t << "\\RequirePackage{array}\n";
t << "\\pagestyle{fancyplain}\n"; t << "\\pagestyle{fancyplain}\n";
t << "\\addtolength{\\headwidth}{\\marginparsep}\n"; //t << "\\addtolength{\\headwidth}{\\marginparsep}\n";
t << "\\addtolength{\\headwidth}{\\marginparwidth}\n"; //t << "\\addtolength{\\headwidth}{\\marginparwidth}\n";
t << "\\newcommand{\\clearemptydoublepage}{\\newpage{\\pagestyle{empty}"; t << "\\newcommand{\\clearemptydoublepage}{\\newpage{\\pagestyle{empty}";
t << "\\cleardoublepage}}\n"; t << "\\cleardoublepage}}\n";
if (!Config_getBool("COMPACT_LATEX")) if (!Config_getBool("COMPACT_LATEX"))
......
...@@ -201,6 +201,7 @@ void ManDocVisitor::visit(DocVerbatim *s) ...@@ -201,6 +201,7 @@ void ManDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly: case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly: case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly: case DocVerbatim::LatexOnly:
case DocVerbatim::Dot:
/* nothing */ /* nothing */
break; break;
} }
......
...@@ -621,6 +621,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s) ...@@ -621,6 +621,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly: type = "htmlonly"; break; case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break; case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break; case DocVerbatim::XmlOnly: type = "xmlonly"; break;
case DocVerbatim::Dot: type = "dot"; break;
} }
openItem(type); openItem(type);
m_output.addFieldQuotedString("content", s->text()); m_output.addFieldQuotedString("content", s->text());
......
...@@ -143,6 +143,7 @@ class PrintDocVisitor : public DocVisitor ...@@ -143,6 +143,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break; case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break; case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break; case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
} }
printf("%s",s->text().data()); printf("%s",s->text().data());
switch(s->type()) switch(s->type())
...@@ -152,6 +153,7 @@ class PrintDocVisitor : public DocVisitor ...@@ -152,6 +153,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break; case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break; case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break; case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
} }
} }
void visit(DocAnchor *a) void visit(DocAnchor *a)
......
...@@ -315,6 +315,28 @@ void RTFDocVisitor::visit(DocVerbatim *s) ...@@ -315,6 +315,28 @@ void RTFDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly: case DocVerbatim::XmlOnly:
/* nothing */ /* nothing */
break; 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 *) ...@@ -865,21 +887,7 @@ void RTFDocVisitor::visitPost(DocImage *)
void RTFDocVisitor::visitPre(DocDotFile *df) void RTFDocVisitor::visitPre(DocDotFile *df)
{ {
QString baseName=df->file(); writeDotFile(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;
// hide caption since it is not supported at the moment // hide caption since it is not supported at the moment
pushEnabled(); pushEnabled();
...@@ -1199,3 +1207,22 @@ void RTFDocVisitor::popEnabled() ...@@ -1199,3 +1207,22 @@ void RTFDocVisitor::popEnabled()
delete v; 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 ...@@ -142,6 +142,7 @@ class RTFDocVisitor : public DocVisitor
void pushEnabled(); void pushEnabled();
void popEnabled(); void popEnabled();
void writeDotFile(const QString &fileName);
//-------------------------------------- //--------------------------------------
// state variables // state variables
......
...@@ -495,7 +495,7 @@ static int yyread(char *buf,int max_size) ...@@ -495,7 +495,7 @@ static int yyread(char *buf,int max_size)
/* start command character */ /* start command character */
CMD ("\\"|"@") 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] BN [ \t\n\r]
BL [ \t\r]*"\n" BL [ \t\r]*"\n"
B [ \t] B [ \t]
...@@ -2571,6 +2571,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2571,6 +2571,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lineCount() ; lineCount() ;
current->args += ' ' ; current->args += ' ' ;
} }
<Function,FuncQual,FuncRound,FuncFunc>"#" { if (insidePHP)
REJECT;
lastCPPContext = YY_START;
BEGIN(SkipCPP);
}
<FuncQual,FuncRound,FuncFunc>. { current->args += *yytext; } <FuncQual,FuncRound,FuncFunc>. { current->args += *yytext; }
<FuncQual>{BN}*"try"{BN}+ { /* try-function-block */ <FuncQual>{BN}*"try"{BN}+ { /* try-function-block */
insideTryBlock=TRUE; insideTryBlock=TRUE;
...@@ -2624,11 +2629,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2624,11 +2629,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
roundCount=0; roundCount=0;
BEGIN( FuncRound ) ; BEGIN( FuncRound ) ;
} }
<Function>"#" { if (insidePHP)
REJECT;
lastCPPContext = YY_START;
BEGIN(SkipCPP);
}
<Function>":" { <Function>":" {
if (!insidePHP) BEGIN(SkipInits); if (!insidePHP) BEGIN(SkipInits);
} }
...@@ -3836,22 +3836,22 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3836,22 +3836,22 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<PageDoc>{CMD}"refitem".*"\n" { <PageDoc>{CMD}"refitem".*"\n" {
current->doc+=yytext; current->doc+=yytext;
} }
<PageDoc>{CMD}"section"{B}+ { <ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"section"{B}+ {
//sectionType=SectionInfo::Section; //sectionType=SectionInfo::Section;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<PageDoc>{CMD}"subsection"{B}+ { <ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsection"{B}+ {
//sectionType=SectionInfo::Subsection; //sectionType=SectionInfo::Subsection;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<PageDoc>{CMD}"subsubsection"{B}+ { <ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsubsection"{B}+ {
//sectionType=SectionInfo::Subsubsection; //sectionType=SectionInfo::Subsubsection;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<PageDoc>{CMD}"paragraph"{B}+ { <ExampleDoc,ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"paragraph"{B}+ {
//sectionType=SectionInfo::Paragraph; //sectionType=SectionInfo::Paragraph;
current->doc+=yytext; current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
...@@ -3898,10 +3898,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3898,10 +3898,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->doc+=yytext; current->doc+=yytext;
BEGIN(AnchorLabel); 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; 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; current->brief+=yytext;
} }
<Doc,PageDoc,ClassDoc>{CMD}"verbatim"/[^a-z_A-Z0-9] { <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_;] ...@@ -3956,27 +3956,51 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastCodeState=YY_START; lastCodeState=YY_START;
current->doc+="\\code"; current->doc+="\\code";
pSkipDoc=&current->doc; pSkipDoc=&current->doc;
g_skipBlockName="code";
BEGIN(SkipCode); BEGIN(SkipCode);
} }
<JavaDoc>{CMD}"code"/[^a-z_A-Z0-9] { <JavaDoc>{CMD}"code"/[^a-z_A-Z0-9] {
lastCodeState=YY_START; lastCodeState=YY_START;
current->brief+="\\code"; current->brief+="\\code";
pSkipDoc=&current->brief; pSkipDoc=&current->brief;
g_skipBlockName="code";
BEGIN(SkipCode); 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}">" { <Doc,PageDoc,ClassDoc>"<"{PRE}{ATTR}">" {
lastCodeState=YY_START; lastCodeState=YY_START;
current->doc+="<PRE>"; current->doc+="<PRE>";
pSkipDoc=&current->doc; pSkipDoc=&current->doc;
g_skipBlockName="pre";
BEGIN(SkipCode); BEGIN(SkipCode);
} }
<JavaDoc>"<"{PRE}{ATTR}">" { <JavaDoc>"<"{PRE}{ATTR}">" {
lastCodeState=YY_START; lastCodeState=YY_START;
current->brief+="<PRE>"; current->brief+="<PRE>";
pSkipDoc=&current->brief; pSkipDoc=&current->brief;
g_skipBlockName="pre";
BEGIN(SkipCode); 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; current->doc+=yytext;
BEGIN(lastVerbState); BEGIN(lastVerbState);
} }
...@@ -4012,11 +4036,24 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4012,11 +4036,24 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
<SkipCode>{CMD}"endcode"/[^a-z_A-Z0-9] { <SkipCode>{CMD}"endcode"/[^a-z_A-Z0-9] {
*pSkipDoc+="\\endcode"; *pSkipDoc+="\\endcode";
BEGIN(lastCodeState); if (g_skipBlockName=="code")
{
BEGIN(lastCodeState);
}
} }
<SkipCode>"</"{PRE}{ATTR}">" { <SkipCode>"</"{PRE}{ATTR}">" {
*pSkipDoc+="</PRE>"; *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}*"*"+)? { <SkipCode>^"//"({B}*"*"+)? {
if (!removeSlashes) if (!removeSlashes)
...@@ -4041,7 +4078,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -4041,7 +4078,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
<SkipCode><<EOF>> { <SkipCode><<EOF>> {
warn(yyFileName,yyLineNr, 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(); yyterminate();
} }
......
...@@ -50,11 +50,13 @@ ...@@ -50,11 +50,13 @@
* -------------+------------------------------------------------------------ * -------------+------------------------------------------------------------
* 2003-06-10 | Update for new since 1.3.1 * 2003-06-10 | Update for new since 1.3.1
* -------------+------------------------------------------------------------ * -------------+------------------------------------------------------------
* 2003-09-12 | Update for new since 1.3.3
* -------------+------------------------------------------------------------
*/ */
#ifndef TRANSLATOR_FR_H #ifndef TRANSLATOR_FR_H
#define TRANSLATOR_FR_H #define TRANSLATOR_FR_H
class TranslatorFrench : public TranslatorAdapter_1_3_3 class TranslatorFrench : public Translator
{ {
public: public:
QCString idLanguage() QCString idLanguage()
...@@ -1366,6 +1368,58 @@ class TranslatorFrench : public TranslatorAdapter_1_3_3 ...@@ -1366,6 +1368,58 @@ class TranslatorFrench : public TranslatorAdapter_1_3_3
return "Voici le graphique d'appel pour cette fonction:"; 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 #endif
...@@ -189,6 +189,11 @@ void XmlDocVisitor::visit(DocVerbatim *s) ...@@ -189,6 +189,11 @@ void XmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly: case DocVerbatim::XmlOnly:
m_t << s->text(); m_t << s->text();
break; 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