Commit 9be75800 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.7.5

parent 64f0c97c
DOXYGEN Version 1.7.4-20110727
DOXYGEN Version 1.7.5
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (27 July 2011)
Dimitri van Heesch (14 August 2011)
DOXYGEN Version 1.7.4_20110727
DOXYGEN Version 1.7.5
Please read INSTALL for compilation instructions.
......@@ -26,4 +26,4 @@ forum.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (27 July 2011)
Dimitri van Heesch (dimitri@stack.nl) (14 August 2011)
......@@ -17,10 +17,10 @@
doxygen_version_major=1
doxygen_version_minor=7
doxygen_version_revision=4
doxygen_version_revision=5
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20110727
doxygen_version_mmn=NO
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
......@@ -161,6 +161,7 @@ documentation:
\refitem cmdsince \\since
\refitem cmdskip \\skip
\refitem cmdskipline \\skipline
\refitem cmdsnippet \\snippet
\refitem cmdstruct \\struct
\refitem cmdsubpage \\subpage
\refitem cmdsubsection \\subsection
......@@ -1862,6 +1863,10 @@ Commands for displaying examples
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
Alternatively, the \ref cmdsnippet "\\snippet" command can be used to
include only a fragment of a source file. For this to work the
fragment has to be marked.
\sa sections \ref cmdline "\\line", \ref cmdskip "\\skip",
\ref cmdskipline "\\skipline", \ref cmduntil "\\until", and
\ref cmdinclude "\\include".
......@@ -1894,6 +1899,10 @@ Commands for displaying examples
\ref cmdskipline "\\skipline",
and \\until commands.
Alternatively, the \ref cmdsnippet "\\snippet" command can be used to
include only a fragment of a source file. For this to work the
fragment has to be marked.
\note Doxygen's special commands do not work inside blocks of code.
It is allowed to nest C-style comments inside a code block though.
......@@ -1961,6 +1970,52 @@ Commands for displaying examples
See section \ref cmddontinclude "\\dontinclude" for an example.
<hr>
\section cmdsnippet \\snippet <file-name> ( block_id )
\addindex \\snippet
Where the \ref cmdinclude "\\include" command can be used to include
a complete file as source code, this command can be used to quote only
a fragment of a source file.
For example, the putting the following command in the documentation,
references a snippet in file \c example.cpp residing in a subdirectory
which should be pointed to by \ref cfg_example_path "EXAMPLE_PATH".
\verbatim
\snippet snippets/example.cpp Adding a resource
\endverbatim
The text following the file name is the unique identifier for the snippet.
This is used to delimit the quoted code in the relevant snippet file as
shown in the following example that corresponds to the above \\snippet
command:
\code
QImage image(64, 64, QImage::Format_RGB32);
image.fill(qRgb(255, 160, 128));
//! [Adding a resource]
document->addResource(QTextDocument::ImageResource,
QUrl("mydata://image.png"), QVariant(image));
//! [Adding a resource]
...
\endcode
Note that the lines containing the block markers will not be included,
so the output will be:
\code
document->addResource(QTextDocument::ImageResource,
QUrl("mydata://image.png"), QVariant(image));
\endcode
Note also that the [block_id] markers should appear exactly twice in the
source file.
see section \ref cmddontinclude "\\dontinclude" for an alternative way
to include fragments of a source file that does not require markers.
<hr>
\section cmduntil \\until ( pattern )
......
......@@ -20,9 +20,10 @@
A special documentation block is a C or C++ style comment block with some
additional markings, so doxygen knows it is a piece of documentation that
needs to end up in the generated documentation. For Python, VHDL, and Fortran
code there are different comment conventions, which can be found in sections
\ref pythonblocks, \ref vhdlblocks, and \ref fortranblocks respectively.
needs to end up in the generated documentation. For Python, VHDL, Fortran, and
Tcl code there are different comment conventions, which can be found in sections
\ref pythonblocks, \ref vhdlblocks, \ref fortranblocks, and \ref tclblocks
respectively.
For each code item there are two (or in some cases three) types of descriptions,
which together form the documentation: a \e brief description and \e detailed
......@@ -480,4 +481,71 @@ C> input parameter
end function A
\endverbatim
\section tclblocks Documentation blocks in Tcl
Doxygen documentation can be included in normal Tcl comments.
To start a new documentation block start a line with \c ## (two hashes).
All following comment lines and continuation lines will be added to this
block. The block ends with a line not starting with a \c # (hash sign).
A brief documentation can be added with \c ;#< (semicolon, hash and
lower then sign). The brief documentation also ends at a line not starting
with a \c # (hash sign).
Inside doxygen comment blocks all normal doxygen markings are supported.
The only expections are described in the following two paragraphs.
If a doxygen comment block ends with a line containing only
\c #\\code or \c #\@code all code until a line only containing \c #\\endcode
or \c #\@endcode is added to the generated documentation as code block.
If a doxygen comment block ends with a line containing only
\c #\\verbatim or \c #\@verbatim all code until a line only containing
\c #\\endverbatim or \c #\@endverbatim is added verbatim to the generated
documentation.
To detect namespaces, classes, functions and variables the following
Tcl commands are recognized. Documentation blocks can be put on the lines
before the command.
<ul>
<li><tt>namespace eval ..</tt> Namespace
<li><tt>proc ..</tt> Function
<li><tt>variable ..</tt> Variable
<li><tt>common ..</tt> Common variable
<li><tt>itcl::class ..</tt> Class
<li><tt>itcl::body ..</tt> Class method body definition
<li><tt>oo::class create ..</tt> Class
<li><tt>oo::define ..</tt> OO Class definition
<li><tt>method ..</tt> Class method definitions
<li><tt>constructor ..</tt> Class constructor
<li><tt>destructor ..</tt> Class destructor
<li><tt>public ..</tt> Set protection level
<li><tt>protected ..</tt> Set protection level
<li><tt>private ..</tt> Set protection level
</ul>
<!--
To use your own keywords you an map these keyword to the recognized commands
using the \ref cfg_tcl_subs "TCL_SUBST" entry in the config file.
The entry contain a list of word-keyword mappings. To use the itcl::*
commands without the leading namespace use p.e.:
\verbatim TCL_SUBST = class itcl:class body itcl:body \endverbatim
-->
Following is a example using doxygen style comments:
\include tclexample.tcl
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/tclexample/html/index.html">here</a>
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
\htmlonly
Go to the <a href="lists.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
......@@ -68,55 +68,55 @@ when the translator was updated.
<td>Armenian</td>
<td>Armen Tangamyan</td>
<td>armen dot tangamyan at anu dot edu dot au</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Brazilian Portuguese</td>
<td>Fabio "FJTC" Jun Takada Chino</td>
<td>jun-chino at uol dot com dot br</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Catalan</td>
<td>Maximiliano Pin<br/>Albert Mora</td>
<td>max dot pin at bitroit dot com<br/><span style="color: brown">[unreachable]</span></td>
<td>1.6.3</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Chinese</td>
<td>Lang Yang<br/>Li Daobing<br/>Wei Liu</td>
<td>Lian Yang<br/>Li Daobing<br/>Wei Liu</td>
<td>lian dot yang dot cn at gmail dot com<br/>lidaobing at gmail dot com<br/>liuwei at asiainfo dot com</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Chinese Traditional</td>
<td>Daniel YC Lin<br/>Gary Lee</td>
<td>dlin dot tw at gmail dot com<br/>garywlee at gmail dot com</td>
<td>1.6.0</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Croatian</td>
<td>Boris Bralo</td>
<td>boris dot bralo at gmail dot com</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Czech</td>
<td>Petr Přikryl</td>
<td>prikrylp at skil dot cz</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Danish</td>
<td>Poul-Erik Hansen<br/>Erik Søe Sørensen</td>
<td>pouhan at gnotometrics dot dk<br/>eriksoe+doxygen at daimi dot au dot dk</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Dutch</td>
<td>Dimitri van Heesch</td>
<td>dimitri at stack dot nl</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>English</td>
......@@ -146,13 +146,13 @@ when the translator was updated.
<td>German</td>
<td>Peter Grotrian<br/>Jens Seidel</td>
<td>Peter dot Grotrian at pdv-FS dot de<br/>jensseidel at users dot sf dot net</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Greek</td>
<td>Paul Gessos</td>
<td>gessos dot paul at yahoo dot gr</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Hungarian</td>
......@@ -188,7 +188,7 @@ when the translator was updated.
<td>Korean</td>
<td>Kim Taedong<br/>SooYoung Jung<br/>Richard Kim</td>
<td>fly1004 at gmail dot com<br/>jung5000 at gmail dot com<br/><span style="color: brown">[unreachable]</span></td>
<td>1.7.05</td>
<td>1.7.5</td>
</tr>
<tr bgcolor="#ffffff">
<td>KoreanEn</td>
......@@ -230,7 +230,7 @@ when the translator was updated.
<td>Portuguese</td>
<td>Rui Godinho Lopes<br/><span style="color: red; background-color: yellow">-- searching for the maintainer --</span></td>
<td><span style="color: brown">[resigned]</span><br/><span style="color: brown">[Please, try to help to find someone.]</span></td>
<td>1.3.3</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Romanian</td>
......@@ -260,7 +260,7 @@ when the translator was updated.
<td>Slovak</td>
<td>Kali+Laco Švec<br/>Petr Přikryl</td>
<td>the Slovak language advisors<br/>prikrylp at skil dot cz</td>
<td>1.7.5</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Slovene</td>
......@@ -319,28 +319,28 @@ when the translator was updated.
Arabic & Moaz Reyad & {\tt\tiny [resigned] moazreyad at yahoo dot com} & 1.4.6 \\
~ & -- searching for the maintainer -- & {\tt\tiny [Please, try to help to find someone.]} & ~ \\
\hline
Armenian & Armen Tangamyan & {\tt\tiny armen dot tangamyan at anu dot edu dot au} & 1.7.5 \\
Armenian & Armen Tangamyan & {\tt\tiny armen dot tangamyan at anu dot edu dot au} & up-to-date \\
\hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino at uol dot com dot br} & 1.7.5 \\
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino at uol dot com dot br} & up-to-date \\
\hline
Catalan & Maximiliano Pin & {\tt\tiny max dot pin at bitroit dot com} & 1.6.3 \\
Catalan & Maximiliano Pin & {\tt\tiny max dot pin at bitroit dot com} & up-to-date \\
~ & Albert Mora & {\tt\tiny [unreachable] amora at iua dot upf dot es} & ~ \\
\hline
Chinese & Lang Yang & {\tt\tiny lian dot yang dot cn at gmail dot com} & 1.7.5 \\
Chinese & Lian Yang & {\tt\tiny lian dot yang dot cn at gmail dot com} & up-to-date \\
~ & Li Daobing & {\tt\tiny lidaobing at gmail dot com} & ~ \\
~ & Wei Liu & {\tt\tiny liuwei at asiainfo dot com} & ~ \\
\hline
Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin dot tw at gmail dot com} & 1.6.0 \\
Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin dot tw at gmail dot com} & up-to-date \\
~ & Gary Lee & {\tt\tiny garywlee at gmail dot com} & ~ \\
\hline
Croatian & Boris Bralo & {\tt\tiny boris dot bralo at gmail dot com} & 1.7.5 \\
Croatian & Boris Bralo & {\tt\tiny boris dot bralo at gmail dot com} & up-to-date \\
\hline
Czech & Petr Přikryl & {\tt\tiny prikrylp at skil dot cz} & 1.7.5 \\
Czech & Petr Přikryl & {\tt\tiny prikrylp at skil dot cz} & up-to-date \\
\hline
Danish & Poul-Erik Hansen & {\tt\tiny pouhan at gnotometrics dot dk} & 1.7.5 \\
Danish & Poul-Erik Hansen & {\tt\tiny pouhan at gnotometrics dot dk} & up-to-date \\
~ & Erik Søe Sørensen & {\tt\tiny eriksoe+doxygen at daimi dot au dot dk} & ~ \\
\hline
Dutch & Dimitri van Heesch & {\tt\tiny dimitri at stack dot nl} & 1.7.5 \\
Dutch & Dimitri van Heesch & {\tt\tiny dimitri at stack dot nl} & up-to-date \\
\hline
English & Dimitri van Heesch & {\tt\tiny dimitri at stack dot nl} & up-to-date \\
\hline
......@@ -350,10 +350,10 @@ when the translator was updated.
\hline
French & Xavier Outhier & {\tt\tiny xouthier at yahoo dot fr} & 1.6.3 \\
\hline
German & Peter Grotrian & {\tt\tiny Peter dot Grotrian at pdv-FS dot de} & 1.7.5 \\
German & Peter Grotrian & {\tt\tiny Peter dot Grotrian at pdv-FS dot de} & up-to-date \\
~ & Jens Seidel & {\tt\tiny jensseidel at users dot sf dot net} & ~ \\
\hline
Greek & Paul Gessos & {\tt\tiny gessos dot paul at yahoo dot gr} & 1.7.5 \\
Greek & Paul Gessos & {\tt\tiny gessos dot paul at yahoo dot gr} & up-to-date \\
\hline
Hungarian & Ákos Kiss & {\tt\tiny akiss at users dot sourceforge dot net} & 1.4.6 \\
~ & Földvári György & {\tt\tiny [unreachable] foldvari lost at cyberspace} & ~ \\
......@@ -370,7 +370,7 @@ when the translator was updated.
\hline
JapaneseEn & see the Japanese language & {\tt\tiny ~} & English based \\
\hline
Korean & Kim Taedong & {\tt\tiny fly1004 at gmail dot com} & 1.7.05 \\
Korean & Kim Taedong & {\tt\tiny fly1004 at gmail dot com} & 1.7.5 \\
~ & SooYoung Jung & {\tt\tiny jung5000 at gmail dot com} & ~ \\
~ & Richard Kim & {\tt\tiny [unreachable] ryk at dspwiz dot com} & ~ \\
\hline
......@@ -391,7 +391,7 @@ when the translator was updated.
~ & Grzegorz Kowal & {\tt\tiny [unreachable] g\_kowal at poczta dot onet dot pl} & ~ \\
~ & Krzysztof Kral & {\tt\tiny krzysztof dot kral at gmail dot com} & ~ \\
\hline
Portuguese & Rui Godinho Lopes & {\tt\tiny [resigned] rgl at ruilopes dot com} & 1.3.3 \\
Portuguese & Rui Godinho Lopes & {\tt\tiny [resigned] rgl at ruilopes dot com} & up-to-date \\
~ & -- searching for the maintainer -- & {\tt\tiny [Please, try to help to find someone.]} & ~ \\
\hline
Romanian & Ionut Dumitrascu & {\tt\tiny reddumy at yahoo dot com} & 1.6.0 \\
......@@ -403,7 +403,7 @@ when the translator was updated.
\hline
SerbianCyrilic & Nedeljko Stefanovic & {\tt\tiny stenedjo at yahoo dot com} & 1.6.0 \\
\hline
Slovak & Kali+Laco Švec & {\tt\tiny the Slovak language advisors} & 1.7.5 \\
Slovak & Kali+Laco Švec & {\tt\tiny the Slovak language advisors} & up-to-date \\
~ & Petr Přikryl & {\tt\tiny prikrylp at skil dot cz} & ~ \\
\hline
Slovene & Matjaž Ostroveršnik & {\tt\tiny matjaz dot ostroversnik at ostri dot org} & 1.4.6 \\
......
......@@ -33,7 +33,7 @@ Maximiliano Pin: max dot pin at bitroit dot com
Albert Mora: [unreachable] amora at iua dot upf dot es
TranslatorChinese
Lang Yang: lian dot yang dot cn at gmail dot com
Lian Yang: lian dot yang dot cn at gmail dot com
Li Daobing: lidaobing at gmail dot com
Wei Liu: liuwei at asiainfo dot com
......
This diff is collapsed.
......@@ -24,6 +24,7 @@ all: class/html/index.html \
memgrp/html/index.html \
docstring/html/index.html \
pyexample/html/index.html \
tclexample/html/index.html \
mux/html/index.html \
manual/html/index.html
......@@ -34,7 +35,7 @@ clean:
rm -rf class define enum file func page relates author \
par overload example include qtstyle jdstyle structcmd \
autolink tag restypedef afterdoc template tag group diagrams \
memgrp docstring pyexample mux manual dbusxml
memgrp docstring pyexample mux manual dbusxml tclexample
class/html/index.html: class.h class.cfg
$(DOXYGEN)/bin/doxygen class.cfg
......@@ -107,6 +108,9 @@ memgrp/html/index.html: memgrp.cpp memgrp.cfg
pyexample/html/index.html: pyexample.py pyexample.cfg
$(DOXYGEN)/bin/doxygen pyexample.cfg
tclexample/html/index.html: tclexample.tcl tclexample.cfg
$(DOXYGEN)/bin/doxygen tclexample.cfg
mux/html/index.html: mux.vhdl mux.cfg
$(DOXYGEN)/bin/doxygen mux.cfg
......
......@@ -25,11 +25,12 @@ all: class/html/index.html \
memgrp/html/index.html \
docstring/html/index.html \
pyexample/html/index.html \
tclexample/html/index.html \
mux/html/index.html \
manual/html/index.html
clean:
del /s/y class define enum file pyexample docstring
del /s/y class define enum file pyexample tclexample docstring
del /s/y func page relates author
del /s/y par overload example include qtstyle
del /s/y jdstyle structcmd autolink resdefine mux manual
......@@ -104,6 +105,9 @@ memgrp/html/index.html: memgrp.cpp memgrp.cfg
pyexample/html/index.html: pyexample.py pyexample.cfg
$(DOXYDIR)\doxygen pyexample.cfg
tclexample/html/index.html: tclexample.tcl tclexample.cfg
$(DOXYDIR)\doxygen tclexample.cfg
mux/html/index.html: mux.vhdl mux.cfg
$(DOXYDIR)\doxygen mux.cfg
......
PROJECT_NAME = "Tcl"
OUTPUT_DIRECTORY = tclexample
GENERATE_LATEX = NO
GENERATE_MAN = NO
GENERATE_RTF = NO
CASE_SENSE_NAMES = NO
INPUT = tclexample.tcl
QUIET = YES
JAVADOC_AUTOBRIEF = YES
SEARCHENGINE = NO
INLINE_SOURCES = YES
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
## \file tclexample.tcl
# File documentation.
#\verbatim
# Startup code:\
exec tclsh "$0" "$@"
#\endverbatim
## Documented namespace \c ns .
# The code is inserted here:
#\code
namespace eval ns {
## Documented proc \c ns_proc .
# param[in] arg some argument
proc ns_proc {arg} {}
## Documented var \c ns_var .
# Some documentation.
variable ns_var
## Documented itcl class \c itcl_class .
itcl::class itcl_class {
## Create object.
constructor {args} {eval $args}
## Destroy object.
destructor {exit}
## Documented itcl method \c itcl_method_x .
# param[in] arg Argument
private method itcl_method_x {arg}
## Documented itcl method \c itcl_method_y .
# param[in] arg Argument
protected method itcl_method_y {arg} {}
## Documented itcl method \c itcl_method_z .
# param[in] arg Argument
public method itcl_method_z {arg} {}
## Documented common itcl var \c itcl_Var .
common itcl_Var
## \protectedsection
variable itcl_var1;#< Documented itcl var \c itcl_var1 .
variable itcl_var2;#< Documented itcl var \c itcl_var2 .
}
## Documented oo class \c oo_class .
oo::class create oo_class {
## Create object.
# Configure with args
constructor {args} {eval $args}
## Destroy object.
# Exit.
destructor {exit}
## Documented oo var \c oo_var .
# Defined inside class
variable oo_var
## \private Documented oo method \c oo_method_x .
# param[in] arg Argument
method oo_method_x {arg} {}
## \protected Documented oo method \c oo_method_y .
# param[in] arg Argument
method oo_method_y {arg} {}
## \public Documented oo method \c oo_method_z .
# param[in] arg Argument
method oo_method_z {arg} {}
}
}
#\endcode
itcl::body ::ns::itcl_class::itcl_method_x {argx} {
puts "$argx OK"
}
oo::define ns::oo_class {
## \public Outside defined variable \c oo_var_out .
# Inside oo_class
variable oo_var_out
}
## Documented global proc \c glob_proc .
# param[in] arg Argument
proc glob_proc {arg} {puts $arg}
variable glob_var;#< Documented global var \c glob_var\
with newline
#< and continued line
# end of file
......@@ -212,7 +212,7 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
GENERATE_XML = YES
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
......
......@@ -59,7 +59,7 @@ void QMutex::lock()
{
//printf("%p: QMutex::lock(): enter\n",this);
bool isLocked;
isLocked = d->contenders == 0 && d->contenders.testAndSet(0, 1);
isLocked = d->contenders.testAndSet(0, 1);
if (!isLocked)
{
isLocked = d->contenders.fetchAndAdd(1)==0;
......@@ -78,8 +78,7 @@ void QMutex::lock()
bool QMutex::tryLock()
{
bool isLocked = d->contenders == 0 &&
d->contenders.testAndSet(0, 1);
bool isLocked = d->contenders.testAndSet(0, 1);
return isLocked;
}
......
......@@ -49,6 +49,6 @@ distclean: clean
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp commentscan.cpp \
declinfo.cpp defargs.cpp commentcnv.cpp doctokenizer.cpp \
pycode.cpp pyscanner.cpp fortrancode.cpp fortranscanner.cpp \
vhdlscanner.cpp vhdlcode.cpp
vhdlscanner.cpp vhdlcode.cpp tclscanner.cpp
FORCE:
......@@ -36,21 +36,6 @@ const QCString CiteConsts::anchorPrefix("CITEREF_");
//--------------------------------------------------------------------------
static bool writeBstFile(const QString &fileName)
{
QCString bstData = doxygen_bst;
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("error: could not open file %s for writing\n",fileName.data());
return FALSE;
}
f.writeBlock(bstData, strlen(bstData));
return TRUE;
}
//--------------------------------------------------------------------------
CiteDict::CiteDict(int size) : m_entries(size, FALSE)
{
m_ordering.setAutoDelete(TRUE);
......@@ -119,14 +104,16 @@ bool CiteDict::writeAux()
bool CiteDict::writeBst()
{
//msg("..writing bst file\n");
QCString bstFileName = m_baseFileName + ".bst";
return writeBstFile(bstFileName);
}
void CiteDict::writeDefaultBibStyle()
{
writeBstFile("doxygen.bst");
msg("wrote doxygen.bst\n");
QCString fileName = m_baseFileName + ".bst";
QCString bstData = doxygen_bst;
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("error: could not open file %s for writing\n",fileName.data());
return FALSE;
}
f.writeBlock(bstData, bstData.length());
return TRUE;
}
void CiteDict::writeLatexBibliography(FTextStream &t)
......
......@@ -86,10 +86,6 @@ class CiteDict
*/
void writeLatexBibliography(FTextStream &t);
/** writes the default bibliography style to the output */
static void writeDefaultBibStyle();
private:
bool writeAux();
bool writeBst();
......
This diff is collapsed.
......@@ -267,10 +267,11 @@ class ClassDef : public Definition
QCString anchor() const;
bool isEmbeddedInOuterScope() const;
SrcLangExt getLanguage() const;
bool isSimple() const;
const ClassList *taggedInnerClasses() const;
ClassDef *tagLessReference() const;
//-----------------------------------------------------------------------------------
// --- setters ----
//-----------------------------------------------------------------------------------
......@@ -293,7 +294,6 @@ class ClassDef : public Definition
void addUsedClass(ClassDef *cd,const char *accessName,Protection prot);
void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot);
void setIsStatic(bool b);
void setLanguage(SrcLangExt lang);
void setCompoundType(CompoundType t);
void setClassName(const char *name);
......@@ -306,6 +306,9 @@ class ClassDef : public Definition
void setCategoryOf(ClassDef *cd);
void setUsedOnly(bool b);
void addTaggedInnerClass(ClassDef *cd);
void setTagLessReference(ClassDef *cd);
//-----------------------------------------------------------------------------------
// --- actions ----
//-----------------------------------------------------------------------------------
......@@ -328,6 +331,7 @@ class ClassDef : public Definition
void writeInlineDocumentation(OutputList &ol);
void writeDeclarationLink(OutputList &ol,bool &found,
const char *header,bool localNames);
void removeMemberFromLists(MemberDef *md);
bool visited;
......
......@@ -36,7 +36,7 @@ static int compItems(void *item1,void *item2)
ClassDef *c1=(ClassDef *)item1;
ClassDef *c2=(ClassDef *)item2;
static bool b = Config_getBool("SORT_BY_SCOPE_NAME");
//printf("compItems: %d %s<->%s\n",b,c1->qualifiedName().data(),c2->qualifiedName().data());
//printf("compItems: %d %s<->%s\n",b,c1->name().data(),c2->name().data());
if (b)
{
return stricmp(c1->name(),
......@@ -115,7 +115,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
}
}
void ClassSDict::writeDocumentation(OutputList &ol,Definition *container)
void ClassSDict::writeDocumentation(OutputList &ol,Definition * container)
{
static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
......@@ -131,14 +131,19 @@ void ClassSDict::writeDocumentation(OutputList &ol,Definition *container)
ClassDef *cd=0;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
//printf("%s:writeDocumentation() %p=%p embedded=%d\n",
// cd->name().data(),container,cd->getOuterScope(),cd->isEmbeddedInOuterScope());
//printf("%s:writeDocumentation() %p embedded=%d container=%p\n",
// cd->name().data(),cd->getOuterScope(),cd->isEmbeddedInOuterScope(),
// container);
if (cd->name().find('@')==-1 && cd->isEmbeddedInOuterScope() &&
(container==0 || // no container -> used for groups
cd->getOuterScope()==container || // correct container -> used for namespaces and classes
(container->definitionType()==Definition::TypeFile && cd->getOuterScope()==Doxygen::globalScope && cd->partOfGroups()==0) // non grouped class with file scope -> used for files
)
if (cd->name().find('@')==-1 &&
cd->isLinkableInProject() &&
cd->isEmbeddedInOuterScope() &&
(container==0 || cd->partOfGroups()==0) // if container==0 -> show as part of the group docs, otherwise only show if not part of a group
//&&
//(container==0 || // no container -> used for groups
// cd->getOuterScope()==container || // correct container -> used for namespaces and classes
// (container->definitionType()==Definition::TypeFile && cd->getOuterScope()==Doxygen::globalScope && cd->partOfGroups()==0) // non grouped class with file scope -> used for files
//)
)
{
if (!found)
......
......@@ -34,6 +34,7 @@ CommandMap cmdMap[] =
{ "copydoc", CMD_COPYDOC },
{ "copybrief", CMD_COPYBRIEF },
{ "copydetails", CMD_COPYDETAILS },
{ "copyright", CMD_COPYRIGHT },
{ "date", CMD_DATE },
{ "dontinclude", CMD_DONTINCLUDE },
{ "dotfile", CMD_DOTFILE },
......@@ -66,7 +67,6 @@ CommandMap cmdMap[] =
{ "param", CMD_PARAM },
{ "post", CMD_POST },
{ "pre", CMD_PRE },
{ "copyright", CMD_COPYRIGHT },
{ "ref", CMD_REF },
{ "refitem", CMD_SECREFITEM },
{ "remark", CMD_REMARK },
......@@ -78,6 +78,7 @@ CommandMap cmdMap[] =
{ "sa", CMD_SA },
{ "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION },
{ "snippet", CMD_SNIPPET },
{ "subpage", CMD_SUBPAGE },
{ "subsection", CMD_SUBSECTION },
{ "subsubsection", CMD_SUBSUBSECTION },
......
......@@ -118,6 +118,7 @@ enum CommandType
CMD_DCOLON = 84,
CMD_COPYRIGHT = 85 | SIMPLESECT_BIT,
CMD_CITE = 86,
CMD_SNIPPET = 87
};
enum HtmlTagType
......
......@@ -1264,6 +1264,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
int len=2;
int i=locFunc.findRev("::");
if (i==-1) i=locFunc.findRev("."),len=1;
if (i==-1) i=locFunc.findRev("\\"),len=1; // for PHP
if (i>0)
{
if (locScope.isEmpty())
......@@ -1715,12 +1716,14 @@ static int yyread(char *buf,int max_size)
B [ \t]
BN [ \t\n\r]
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPESEP ("::"|"\\"){BN}*
SCOPEPRE ({SCOPESEP}{ID}{BN}*)*{SCOPESEP}
SCOPENAME {SCOPEPRE}?(("~"{BN}*)?{ID})
TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME ((({ID}{TEMPLIST}?){BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*"::"{BN}*)+
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?("::"|"\\"){BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*("::"|"\\"){BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string")
CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast")
......@@ -2062,9 +2065,14 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( ClassVar );
}
<ClassName>{ID}("\\"{ID})* { // PHP namespace
g_curClassName=substitute(yytext,"\\","::");
addType();
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( ClassVar );
}
<PackageName>{ID}("."{ID})* {
g_curClassName=yytext;
g_curClassName=substitute(g_curClassName,".","::");
g_curClassName=substitute(yytext,".","::");
//printf("found package: %s\n",g_curClassName.data());
addType();
codifyLines(yytext);
......@@ -2124,7 +2132,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
//fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data());
if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0)
{
//printf("Adding new class %s\n",g_curClassName.data());
//fprintf(stderr,"Adding new class %s\n",g_curClassName.data());
ClassDef *ncd=new ClassDef("<code>",1,
g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict->append(g_curClassName,ncd);
......@@ -2406,11 +2414,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
addType();
g_name=varname;
}
<Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a()
<Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a() or A\B\foo()
addType();
generateFunctionLink(*g_code,yytext);
//printf("---> g_classScope=%s\n",g_classScope.data());
//g_theVarContext.addVariable(g_type,yytext);
g_bracketCount=0;
g_args.resize(0);
g_name+=yytext;
......@@ -2850,6 +2856,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
//g_theCallContext.popScope();
g_parmType.resize(0);g_parmName.resize(0);
int index = g_name.findRev("::");
//fprintf(stderr,"g_name=%s\n",g_name.data());
if (index!=-1)
{
QCString scope = g_name.left(index);
......
......@@ -300,7 +300,7 @@ void replaceComment(int offset);
}
}
<Scan>"!>" {
if (g_lang!=SrcLangExt_F90)
if (g_lang!=SrcLangExt_Fortran)
{
REJECT;
}
......@@ -384,7 +384,7 @@ void replaceComment(int offset);
}
}
<Scan>"!>" {
if (g_lang!=SrcLangExt_F90)
if (g_lang!=SrcLangExt_Fortran)
{
REJECT;
}
......@@ -587,7 +587,7 @@ void replaceComment(int offset);
}
}
<CComment>"\n"/[ \t]*[^!] { /* end of Fortran comment */
if (g_lang!=SrcLangExt_F90)
if (g_lang!=SrcLangExt_Fortran)
{
REJECT;
}
......@@ -690,7 +690,7 @@ void replaceComment(int offset);
//printf("** Adding start of comment!\n");
if (g_lang!=SrcLangExt_Python &&
g_lang!=SrcLangExt_VHDL &&
g_lang!=SrcLangExt_F90)
g_lang!=SrcLangExt_Fortran)
{
ADDCHAR('/');
ADDCHAR('*');
......@@ -709,7 +709,7 @@ void replaceComment(int offset);
//printf("** Adding terminator for comment!\n");
if (g_lang!=SrcLangExt_Python &&
g_lang!=SrcLangExt_VHDL &&
g_lang!=SrcLangExt_F90)
g_lang!=SrcLangExt_Fortran)
{
ADDCHAR('*');
ADDCHAR('/');
......
......@@ -1325,6 +1325,7 @@ void Config::check()
filePatternList.append("*.for");
filePatternList.append("*.vhd");
filePatternList.append("*.vhdl");
filePatternList.append("*.tcl");
if (portable_fileSystemIsCaseSensitive())
{
// unix => case sensitive match => also include useful uppercase versions
......@@ -1346,6 +1347,7 @@ void Config::check()
filePatternList.append("*.F");
filePatternList.append("*.VHD");
filePatternList.append("*.VHDL");
filePatternList.append("*.TCL");
}
}
......
......@@ -78,6 +78,8 @@ class DefinitionImpl
QCString defFileName;
int defLine;
QCString defFileExt;
SrcLangExt lang;
};
DefinitionImpl::DefinitionImpl()
......@@ -135,6 +137,7 @@ void DefinitionImpl::init(const char *df,int dl,
xrefListItems = 0;
hidden = FALSE;
isArtificial = FALSE;
lang = SrcLangExt_Unknown;
}
//-----------------------------------------------------------------------------------------
......@@ -540,13 +543,13 @@ void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int
static bool readCodeFragment(const char *fileName,
int &startLine,int &endLine,QCString &result)
{
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
//printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine);
if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name
QCString filter = getFileFilter(fileName,TRUE);
FILE *f=0;
bool usePipe = !filter.isEmpty() && filterSourceFiles;
SrcLangExt lang = getLanguageFromFileName(fileName);
if (!usePipe) // no filter given or wanted
{
f = portable_fopen(fileName,"r");
......@@ -557,7 +560,11 @@ static bool readCodeFragment(const char *fileName,
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data());
f = portable_popen(cmd,"r");
}
bool found=vhdlOpt; // for VHDL no bracket search is possible
bool found = lang==SrcLangExt_VHDL ||
lang==SrcLangExt_Tcl ||
lang==SrcLangExt_Python ||
lang==SrcLangExt_Fortran;
// for VHDL, TCL, Python, and Fortran no bracket search is possible
if (f)
{
int c=0;
......@@ -913,14 +920,7 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
//printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName);
if (!scope.isEmpty() && scope!=scopeName)
{
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
name.prepend(scope+".");
}
else
{
name.prepend(scope+"::");
}
name.prepend(scope+getLanguageSpecificSeparator(m_impl->lang));
}
if (!md->isObjCMethod() &&
(md->isFunction() || md->isSlot() ||
......@@ -1557,6 +1557,11 @@ void Definition::setReference(const char *r)
m_impl->ref=r;
}
SrcLangExt Definition::getLanguage() const
{
return m_impl->lang;
}
void Definition::_setSymbolName(const QCString &name)
{
m_symbolName=name;
......@@ -1584,6 +1589,10 @@ void Definition::makeResident() const
{
}
void Definition::setLanguage(SrcLangExt lang)
{
m_impl->lang=lang;
}
void Definition::flushToDisk() const
{
......@@ -1610,6 +1619,7 @@ void Definition::flushToDisk() const
marshalQCString (Doxygen::symbolStorage,m_impl->defFileName);
marshalInt (Doxygen::symbolStorage,m_impl->defLine);
marshalQCString (Doxygen::symbolStorage,m_impl->defFileExt);
marshalInt (Doxygen::symbolStorage,(int)m_impl->lang);
marshalUInt(Doxygen::symbolStorage,END_MARKER);
delete that->m_impl;
that->m_impl = 0;
......@@ -1642,6 +1652,7 @@ void Definition::loadFromDisk() const
m_impl->defFileName = unmarshalQCString (Doxygen::symbolStorage);
m_impl->defLine = unmarshalInt (Doxygen::symbolStorage);
m_impl->defFileExt = unmarshalQCString (Doxygen::symbolStorage);
m_impl->lang = (SrcLangExt)unmarshalInt(Doxygen::symbolStorage);
marker = unmarshalUInt(Doxygen::symbolStorage);
assert(marker==END_MARKER);
}
......
......@@ -24,6 +24,7 @@
#include <sys/types.h>
#include "lockingptr.h"
#include "util.h"
class FileDef;
class OutputList;
......@@ -240,6 +241,9 @@ class Definition : public DefinitionIntf, public LockableObj
*/
FileDef *getBodyDef();
/** Returns the programming language this definition was written in. */
SrcLangExt getLanguage() const;
LockingPtr<GroupList> partOfGroups() const;
LockingPtr< QList<ListItemInfo> > xrefListItems() const;
......@@ -250,6 +254,7 @@ class Definition : public DefinitionIntf, public LockableObj
LockingPtr<MemberSDict> getReferencesMembers() const;
LockingPtr<MemberSDict> getReferencedByMembers() const;
//-----------------------------------------------------------------------------------
// ---- setters -----
//-----------------------------------------------------------------------------------
......@@ -293,6 +298,7 @@ class Definition : public DefinitionIntf, public LockableObj
virtual void setHidden(bool b);
void setArtificial(bool b);
void setLanguage(SrcLangExt lang);
//-----------------------------------------------------------------------------------
// --- actions ----
......
This diff is collapsed.
......@@ -69,7 +69,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
/*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols.
*/
DocNode *validatingParseText(const char *input,bool forceBreaks=FALSE);
DocNode *validatingParseText(const char *input);
/*! Searches for section and anchor commands in the input */
void docFindSections(const char *input,
......@@ -396,35 +396,39 @@ class DocVerbatim : public DocNode
class DocInclude : public DocNode
{
public:
enum Type { Include, DontInclude, VerbInclude, HtmlInclude, IncWithLines };
enum Type { Include, DontInclude, VerbInclude, HtmlInclude, IncWithLines, Snippet };
DocInclude(DocNode *parent,const QCString &file,
const QCString context, Type t,
bool isExample,const QCString exampleFile) :
bool isExample,const QCString exampleFile,
const QCString blockId) :
m_file(file), m_context(context), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile) { m_parent = parent; }
Kind kind() const { return Kind_Include; }
m_isExample(isExample), m_exampleFile(exampleFile),
m_blockId(blockId) { m_parent = parent; }
Kind kind() const { return Kind_Include; }
QCString file() const { return m_file; }
QCString extension() const { int i=m_file.findRev('.');
if (i!=-1)
return m_file.right(m_file.length()-i);
else
return "";
}
Type type() const { return m_type; }
if (i!=-1)
return m_file.right(m_file.length()-i);
else
return "";
}
Type type() const { return m_type; }
QCString text() const { return m_text; }
QCString context() const { return m_context; }
bool isExample() const { return m_isExample; }
QCString blockId() const { return m_blockId; }
bool isExample() const { return m_isExample; }
QCString exampleFile() const { return m_exampleFile; }
void accept(DocVisitor *v) { v->visit(this); }
void accept(DocVisitor *v) { v->visit(this); }
void parse();
private:
QCString m_file;
QCString m_context;
QCString m_text;
Type m_type;
bool m_isExample;
Type m_type;
bool m_isExample;
QCString m_exampleFile;
QCString m_blockId;
};
/*! @brief Node representing a include/dontinclude operator block */
......@@ -1218,14 +1222,10 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
class DocText : public CompAccept<DocText>, public DocNode
{
public:
DocText(bool forceBreaks) : m_forceBreaks(forceBreaks) {}
DocText() {}
Kind kind() const { return Kind_Text; }
void accept(DocVisitor *v) { CompAccept<DocText>::accept(this,v); }
void parse();
bool forceBreaks() const { return m_forceBreaks; }
private:
bool m_forceBreaks;
};
/*! @brief Root node of documentation tree */
......
......@@ -254,7 +254,14 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,const char *)
// determine language
QCString lang;
SrcLangExt langExt = SrcLangExt_Cpp;
if (fd) langExt = getLanguageFromFileName(fd->name());
if (md)
{
langExt = md->getLanguage();
}
else if (context)
{
langExt = context->getLanguage();
}
switch (langExt)
{
case SrcLangExt_Cpp:
......@@ -277,9 +284,10 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,const char *)
case SrcLangExt_Java: lang="java"; break; // Java
case SrcLangExt_JS: lang="javascript"; break; // Javascript
case SrcLangExt_Python: lang="python"; break; // Python
case SrcLangExt_F90: lang="fortran"; break; // Fortran
case SrcLangExt_Fortran: lang="fortran"; break; // Fortran
case SrcLangExt_VHDL: lang="vhdl"; break; // VHDL
case SrcLangExt_XML: lang="xml"; break; // DBUS XML
case SrcLangExt_Tcl: lang="tcl"; break; // Tcl
case SrcLangExt_Unknown: lang="unknown"; break; // should not happen!
}
......
......@@ -149,5 +149,6 @@ void doctokenizerYYsetStateSkipTitle();
void doctokenizerYYsetStateAnchor();
void doctokenizerYYsetInsidePre(bool b);
void doctokenizerYYpushBackHtmlTag(const char *tag);
void doctokenizerYYsetStateSnippet();
#endif
......@@ -379,6 +379,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
%x St_Text
%x St_SkipTitle
%x St_Anchor
%x St_Snippet
%x St_Sections
%s St_SecLabel1
......@@ -961,6 +962,13 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
warn(g_fileName,yylineno,"warning: Unexpected character `%s' while looking for section label or title",yytext);
}
<St_Snippet>[^\n]+ |
<St_Snippet>[^\n]*\n {
g_token->name = yytext;
g_token->name = g_token->name.stripWhiteSpace();
return TK_WORD;
}
/* Generic rules that work for all states */
<*>\n {
......@@ -1126,6 +1134,11 @@ void doctokenizerYYsetStateAnchor()
BEGIN(St_Anchor);
}
void doctokenizerYYsetStateSnippet()
{
BEGIN(St_Snippet);
}
void doctokenizerYYcleanup()
{
yy_delete_buffer( YY_CURRENT_BUFFER );
......
......@@ -609,11 +609,14 @@ static void checkDotResult(const QCString &imgName)
{
if (Config_getEnum("DOT_IMAGE_FORMAT")=="png")
{
QFile f(imgName);
if (f.open(IO_ReadOnly))
//QFile f(imgName);
FILE *f = fopen(imgName,"rb");
//if (f.open(IO_ReadOnly))
if (f)
{
char data[4];
if (f.readBlock(data,4)==4)
if (fread(data,1,4,f)==4)
//if (f.readBlock(data,4)==4)
{
if (!(data[1]=='P' && data[2]=='N' && data[3]=='G'))
{
......@@ -628,6 +631,7 @@ static void checkDotResult(const QCString &imgName)
{
err("error: Could not read image `%s' generated by dot!\n",imgName.data());
}
fclose(f);
}
else
{
......@@ -757,8 +761,8 @@ void DotRunner::addPostProcessing(const char *cmd,const char *args)
bool DotRunner::run()
{
int exitCode=0;
static QCString dotExe = Config_getString("DOT_PATH")+"dot";
static bool multiTargets = Config_getBool("DOT_MULTI_TARGETS");
QCString dotExe = Config_getString("DOT_PATH")+"dot";
bool multiTargets = Config_getBool("DOT_MULTI_TARGETS");
QCString dotArgs;
QListIterator<QCString> li(m_jobs);
QCString *s;
......@@ -1139,21 +1143,24 @@ DotManager::DotManager() : m_dotMaps(1007)
m_queue = new DotRunnerQueue;
int i;
int numThreads = QMIN(32,Config_getInt("DOT_NUM_THREADS"));
if (numThreads==0) numThreads = QMAX(1,QThread::idealThreadCount()+1);
for (i=0;i<numThreads;i++)
if (numThreads!=1)
{
DotWorkerThread *thread = new DotWorkerThread(i,m_queue);
thread->start();
if (thread->isRunning())
if (numThreads==0) numThreads = QMAX(2,QThread::idealThreadCount()+1);
for (i=0;i<numThreads;i++)
{
m_workers.append(thread);
}
else // no more threads available!
{
delete thread;
DotWorkerThread *thread = new DotWorkerThread(i,m_queue);
thread->start();
if (thread->isRunning())
{
m_workers.append(thread);
}
else // no more threads available!
{
delete thread;
}
}
ASSERT(m_workers.count()>0);
}
ASSERT(m_workers.count()>0);
}
DotManager::~DotManager()
......@@ -1222,7 +1229,14 @@ bool DotManager::run()
uint numDotMaps = m_dotMaps.count();
if (numDotRuns+numDotMaps>1)
{
msg("Generating dot graphs using %d parallel threads...\n",QMIN(numDotRuns+numDotMaps,m_workers.count()));
if (m_workers.count()==0)
{
msg("Generating dot graphs in single threaded mode...\n");
}
else
{
msg("Generating dot graphs using %d parallel threads...\n",QMIN(numDotRuns+numDotMaps,m_workers.count()));
}
}
int i=1;
QListIterator<DotRunner> li(m_dotRuns);
......@@ -1246,41 +1260,53 @@ bool DotManager::run()
portable_sysTimerStart();
// fill work queue with dot operations
DotRunner *dr;
for (li.toFirst();(dr=li.current());++li)
{
m_queue->enqueue(dr);
}
int prev=1;
// wait for the queue to become empty
while ((i=m_queue->count())>0)
if (m_workers.count()==0) // no threads to work with
{
i = numDotRuns - i;
while (i>=prev)
for (li.toFirst();(dr=li.current());++li)
{
msg("Running dot for graph %d/%d\n",prev,numDotRuns);
dr->run();
prev++;
}
portable_sleep(100);
}
while ((int)numDotRuns>=prev)
else // use multiple threads to run instances of dot in parallel
{
msg("Running dot for graph %d/%d\n",prev,numDotRuns);
prev++;
}
// signal the workers we are done
for (i=0;i<(int)m_workers.count();i++)
{
m_queue->enqueue(0); // add terminator for each worker
}
// wait for the workers to finish
for (i=0;i<(int)m_workers.count();i++)
{
m_workers.at(i)->wait();
}
// clean up dot files from main thread
for (i=0;i<(int)m_workers.count();i++)
{
m_workers.at(i)->cleanup();
for (li.toFirst();(dr=li.current());++li)
{
m_queue->enqueue(dr);
}
// wait for the queue to become empty
while ((i=m_queue->count())>0)
{
i = numDotRuns - i;
while (i>=prev)
{
msg("Running dot for graph %d/%d\n",prev,numDotRuns);
prev++;
}
portable_sleep(100);
}
while ((int)numDotRuns>=prev)
{
msg("Running dot for graph %d/%d\n",prev,numDotRuns);
prev++;
}
// signal the workers we are done
for (i=0;i<(int)m_workers.count();i++)
{
m_queue->enqueue(0); // add terminator for each worker
}
// wait for the workers to finish
for (i=0;i<(int)m_workers.count();i++)
{
m_workers.at(i)->wait();
}
// clean up dot files from main thread
for (i=0;i<(int)m_workers.count();i++)
{
m_workers.at(i)->cleanup();
}
}
portable_sysTimerStop();
if (setPath)
......@@ -1572,7 +1598,7 @@ void DotNode::writeBox(FTextStream &t,
writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticMethods),m_classDef,TRUE);
writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priSlots),m_classDef);
}
if (m_classDef->getLanguage()!=SrcLangExt_F90 &&
if (m_classDef->getLanguage()!=SrcLangExt_Fortran &&
m_classDef->getMemberGroupSDict())
{
MemberGroupSDict::Iterator mgdi(*m_classDef->getMemberGroupSDict());
......@@ -3301,7 +3327,7 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
QCString tooltip = rmd->briefDescriptionAsTooltip();
bn = new DotNode(
m_curNodeNumber++,
linkToText(name,FALSE),
linkToText(rmd->getLanguage(),name,FALSE),
tooltip,
uniqueId,
0 //distance
......@@ -3388,7 +3414,7 @@ DotCallGraph::DotCallGraph(MemberDef *md,bool inverse)
name = md->qualifiedName();
}
m_startNode = new DotNode(m_curNodeNumber++,
linkToText(name,FALSE),
linkToText(md->getLanguage(),name,FALSE),
"",
uniqueId.data(),
TRUE // root node
......@@ -3837,8 +3863,11 @@ void writeDotImageMapFromFile(FTextStream &t,
if (imgExt=="svg") // vector graphics
{
writeSVGFigureLink(t,relPath,inFile,inFile+".svg");
DotFilePatcher patcher(inFile+".svg");
//writeSVGFigureLink(t,relPath,inFile,inFile+".svg");
//DotFilePatcher patcher(inFile+".svg");
QCString svgName=outDir+"/"+baseName+".svg";
writeSVGFigureLink(t,relPath,baseName,svgName);
DotFilePatcher patcher(svgName);
patcher.addSVGConversion(relPath,TRUE,context,TRUE,graphId);
patcher.run();
}
......
This diff is collapsed.
......@@ -92,9 +92,10 @@ FileDef::FileDef(const char *p,const char *nm,
{
docname.prepend(stripFromPath(path.copy()));
}
SrcLangExt lang = getLanguageFromFileName(name());
m_isJava = lang==SrcLangExt_Java;
m_isCSharp = lang==SrcLangExt_CSharp;
SrcLangExt lang = getLanguageFromFileName(name());
setLanguage(lang);
//m_isJava = lang==SrcLangExt_Java;
//m_isCSharp = lang==SrcLangExt_CSharp;
memberGroupSDict = 0;
acquireFileVersion();
m_subGrouping=Config_getBool("SUBGROUPING");
......@@ -264,7 +265,7 @@ void FileDef::writeIncludeFiles(OutputList &ol)
bool isIDLorJava = FALSE;
if (fd)
{
SrcLangExt lang = getLanguageFromFileName(fd->name());
SrcLangExt lang = fd->getLanguage();
isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
}
ol.startTypewriter();
......@@ -536,7 +537,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.parseText(pageTitleShort); // Html only
ol.enableAll();
ol.disable(OutputGenerator::Html);
ol.parseText(pageTitle,TRUE); // other output formats
ol.parseText(pageTitle); // other output formats
ol.popGeneratorState();
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),title);
......
......@@ -124,8 +124,8 @@ class FileDef : public Definition
}
bool isIncluded(const QCString &name) const;
bool isJava() const { return m_isJava; }
bool isCSharp() const { return m_isCSharp; }
//bool isJava() const { return m_isJava; }
//bool isCSharp() const { return m_isCSharp; }
void writeDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
......@@ -220,8 +220,8 @@ class FileDef : public Definition
QIntDict<Definition> *srcDefDict;
QIntDict<MemberDef> *srcMemberDict;
bool isSource;
bool m_isJava;
bool m_isCSharp;
//bool m_isJava;
//bool m_isCSharp;
QCString fileVersion;
PackageDef *package;
DirDef *dir;
......
......@@ -111,6 +111,10 @@ static const char *directionStrs[] =
{
"", "intent(in)", "intent(out)", "intent(inout)"
};
static const char *directionParam[] =
{
"", "[in]", "[out]", "[in,out]"
};
// }}}
......@@ -127,6 +131,8 @@ static QCString inputStringSemi; ///< Input string after command separet
static unsigned int inputPositionPrepass;
static int lineCountPrepass = 0;
static QList<Entry> subrCurrent;
struct CommentInPrepass {
int column;
QCString str;
......@@ -185,6 +191,7 @@ static QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers;
static int yyread(char *buf,int max_size);
static void startCommentBlock(bool);
static void handleCommentBlock(const QCString &doc,bool brief);
static void subrHandleCommentBlock(const QCString &doc,bool brief);
static void addCurrentEntry();
static void addModule(const char *name, bool isModule=FALSE);
static void addSubprogram(const char *text);
......@@ -405,7 +412,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
current->section=Entry::USINGDIR_SEC;
current_root->addSubEntry(current);
current = new Entry;
current->lang = SrcLangExt_F90;
current->lang = SrcLangExt_Fortran;
yy_pop_state();
}
<Use>{ID}/, {
......@@ -420,7 +427,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
current->section=Entry::USINGDECL_SEC;
current_root->addSubEntry(current);
current = new Entry ;
current->lang = SrcLangExt_F90;
current->lang = SrcLangExt_Fortran;
}
<Use,UseOnly>"\n" {
yyColNr -= 1;
......@@ -430,6 +437,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
/* INTERFACE definitions */
<Start,ModuleBody,SubprogBody>{
^{BS}interface{IDSYM}+ { /* variable with interface prefix */ }
^{BS}interface { ifType = IF_SPECIFIC;
yy_push_state(InterfaceBody);
// do not start a scope here, every
......@@ -647,6 +655,7 @@ private {
if (!endScope(current_root))
yyterminate();
subrCurrent.remove(0u);
yy_pop_state() ;
}
<Start,ModuleBody,TypedefBody,SubprogBody>{
......@@ -757,8 +766,7 @@ private {
if (!argType.isNull()) parameter->type=argType.stripWhiteSpace();
if (!docBlock.isNull())
{
parameter->docs += "\n";
parameter->docs += docBlock;
subrHandleCommentBlock(docBlock,TRUE);
}
}
// save, it may be function return type
......@@ -769,7 +777,7 @@ private {
else
{
if ((current_root->name.lower() == argName.lower()) ||
(modifiers[current_root->parent()][current_root->name.lower()].returnName == argName.lower()))
(modifiers[current_root->parent()][current_root->name.lower()].returnName.lower() == argName.lower()))
{
int strt = current_root->type.find("function");
QString lft;
......@@ -981,7 +989,7 @@ private {
/*---- documentation comments --------------------------------------------------------------------*/
<Variable,SubprogBody,ModuleBody,TypedefBody>"!<" { /* backward docu comment (only one line) */
<Variable,SubprogBody,ModuleBody,TypedefBody>"!<" { /* backward docu comment */
if (v_type != V_IGNORE) {
current->docLine = yyLineNr;
docBlockJavaStyle = FALSE;
......@@ -992,7 +1000,16 @@ private {
}
}
<DocBackLine>.* { // contents of current comment line
docBlock=yytext;
docBlock+=yytext;
}
<DocBackLine>"\n"{BS}"!"("<"|"!"+) { // comment block (next line is also comment line)
docBlock+="\n"; // \n is necessary for lists
newLine();
}
<DocBackLine>"\n" { // comment block ends at the end of this line
//cout <<"3=========> comment block : "<< docBlock << endl;
yyColNr -= 1;
unput(*yytext);
if (v_type == V_VARIABLE)
{
Entry *tmp_entry = current;
......@@ -1002,11 +1019,12 @@ private {
}
else if (v_type == V_PARAMETER)
{
parameter->docs+=docBlock;
subrHandleCommentBlock(docBlock,TRUE);
}
yy_pop_state();
}
yy_pop_state();
docBlock.resize(0);
}
<Start,SubprogBody,ModuleBody,TypedefBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains,TypedefBodyContains>"!>" {
yy_push_state(YY_START);
current->docLine = yyLineNr;
......@@ -1831,7 +1849,7 @@ static void initEntry()
current->mtype = mtype;
current->virt = virt;
current->stat = gstat;
current->lang = SrcLangExt_F90;
current->lang = SrcLangExt_Fortran;
initGroupInfo(current);
}
......@@ -1882,6 +1900,7 @@ static void addModule(const char *name, bool isModule)
static void addSubprogram(const char *text)
{
//fprintf(stderr,"1=========> got subprog, type: %s\n",text);
subrCurrent.prepend(current);
current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
current->type += " " + subtype;
......@@ -1978,7 +1997,8 @@ static void startCommentBlock(bool brief)
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
static void handleCommentBlock(const QCString &doc,bool brief)
{
docBlockInBody = FALSE;
......@@ -2010,6 +2030,29 @@ static void handleCommentBlock(const QCString &doc,bool brief)
if (needsEntry) addCurrentEntry();
}
//----------------------------------------------------------------------------
static void subrHandleCommentBlock(const QCString &doc,bool brief)
{
Entry *tmp_entry = current;
current = subrCurrent.first(); // temporarily switch to the entry of the subroutine / function
if (docBlock.stripWhiteSpace().find("\\param") == 0)
{
handleCommentBlock(doc,brief);
}
else if (docBlock.stripWhiteSpace().find("@param") == 0)
{
handleCommentBlock(doc,brief);
}
else
{
int dir1 = modifiers[current_root][argName.lower()].direction;
handleCommentBlock(QCString("@param ") + directionParam[dir1] + " " +
argName + " " + doc,brief);
}
current=tmp_entry;
}
//----------------------------------------------------------------------------
static int level=0;
static void debugCompounds(Entry *rt) // print Entry structure (for debugging)
......@@ -2067,13 +2110,13 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
groupEnterFile(yyFileName,yyLineNr);
current = new Entry;
current->lang = SrcLangExt_F90;
current->lang = SrcLangExt_Fortran;
current->name = yyFileName;
current->section = Entry::SOURCE_SEC;
current_root->addSubEntry(current);
file_root = current;
current = new Entry;
current->lang = SrcLangExt_F90;
current->lang = SrcLangExt_Fortran;
fscanYYrestart( fscanYYin );
{
......
......@@ -145,11 +145,42 @@ bool GroupDef::addClass(const ClassDef *cd)
if (cd->isHidden()) return FALSE;
if (classSDict->find(cd->qualifiedName())==0)
{
//printf("addClass %s sort=%d\n",cd->qualifiedName().data(),sortBriefDocs);
QCString qn = cd->qualifiedName();
//printf("--- addClass %s sort=%d\n",qn.data(),sortBriefDocs);
if (sortBriefDocs)
{
classSDict->inSort(cd->qualifiedName(),cd);
}
else
classSDict->append(cd->qualifiedName(),cd);
{
int i=qn.findRev("::");
if (i==-1) i=qn.find('.');
bool found=FALSE;
//printf("i=%d\n",i);
if (i!=-1)
{
// add nested classes (e.g. A::B, A::C) after their parent (A) in
// order of insertion
QCString scope = qn.left(i);
int j=classSDict->findAt(scope);
if (j!=-1)
{
while (j<(int)classSDict->count() &&
classSDict->at(j)->qualifiedName().left(i)==scope)
{
//printf("skipping over %s\n",classSDict->at(j)->qualifiedName().data());
j++;
}
//printf("Found scope at index %d\n",j);
classSDict->insertAt(j,cd->qualifiedName(),cd);
found=TRUE;
}
}
if (!found) // no insertion point found -> just append
{
classSDict->append(cd->qualifiedName(),cd);
}
}
return TRUE;
}
return FALSE;
......
......@@ -446,6 +446,25 @@ void HtmlDocVisitor::visit(DocInclude *inc)
m_t << PREFRAG_END;
forceStartParagraph(inc);
break;
case DocInclude::Snippet:
{
forceEndParagraph(inc);
m_t << PREFRAG_START;
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
inc->isExample(),
inc->exampleFile(),
0,
-1, // startLine
-1, // endLine
TRUE // inlineFragment
);
m_t << PREFRAG_END;
forceStartParagraph(inc);
}
break;
}
}
......
......@@ -979,7 +979,16 @@ static QCString substituteHtmlKeywords(const QCString &s,const char *title,
if (mathJax)
{
mathJaxJs = "<script src=\"$relpath$MathJax.js\">\n"
QCString path = Config_getString("MATHJAX_RELPATH");
if (!path.isEmpty() && path.at(path.length()-1)!='/')
{
path+="/";
}
if (path.isEmpty() || path.left(2)=="..") // relative path
{
path.prepend(relPath);
}
mathJaxJs = "<script src=\"" + path + "MathJax.js\">\n"
" MathJax.Hub.Config({\n"
" extensions: [\"tex2jax.js\"";
QStrList &mathJaxExtensions = Config_getList("MATHJAX_EXTENSIONS");
......
......@@ -338,11 +338,9 @@ void endFile(OutputList &ol,bool skipNavIndex)
static bool classHasVisibleChildren(ClassDef *cd)
{
bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
BaseClassList *bcl;
if (vhdl) // reverse baseClass/subClass relation
if (cd->getLanguage()==SrcLangExt_VHDL) // reverse baseClass/subClass relation
{
if (cd->baseClasses()==0) return FALSE;
bcl=cd->baseClasses();
......@@ -366,8 +364,6 @@ static bool classHasVisibleChildren(ClassDef *cd)
void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,FTVHelp* ftv)
{
static bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (bcl==0) return;
BaseClassListIterator bcli(*bcl);
bool started=FALSE;
......@@ -375,7 +371,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,F
{
ClassDef *cd=bcli.current()->classDef;
bool b;
if (vhdl)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
b=hasVisibleRoot(cd->subClasses());
}
......@@ -428,7 +424,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,F
//printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited);
bool wasVisited=cd->visited;
cd->visited=TRUE;
if (vhdl)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
writeClassTree(ol,cd->baseClasses(),wasVisited,level+1,ftv);
}
......@@ -494,8 +490,6 @@ void writeClassTree(BaseClassList *cl,int level)
void writeClassTreeNode(ClassDef *cd,bool &started,int level)
{
//printf("writeClassTreeNode(%s) visited=%d\n",cd->name().data(),cd->visited);
static bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (cd->isVisibleInHierarchy() && !cd->visited)
{
if (!started)
......@@ -510,7 +504,7 @@ void writeClassTreeNode(ClassDef *cd,bool &started,int level)
}
if (hasChildren)
{
if (vhdl)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
writeClassTree(cd->baseClasses(),level+1);
}
......@@ -557,7 +551,6 @@ void writeClassTree(ClassSDict *d,int level)
static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FTVHelp* ftv)
{
static bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
ClassSDict::Iterator cli(*cl);
for (;cli.current(); ++cli)
{
......@@ -568,7 +561,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT
// cd->isVisibleInHierarchy()
// );
bool b;
if (vhdl)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
......@@ -621,7 +614,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT
if (ftv)
ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0);
}
if (vhdl && hasChildren)
if (cd->getLanguage()==SrcLangExt_VHDL && hasChildren)
{
writeClassTree(ol,cd->baseClasses(),cd->visited,1,ftv);
cd->visited=TRUE;
......@@ -1142,8 +1135,7 @@ void writeAnnotatedClassList(OutputList &ol)
{
QCString type=cd->compoundTypeString();
ol.startIndexKey();
static bool vhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (vhdl)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
QCString prot= VhdlDocGen::getProtectionName((VhdlDocGen::VhdlClasses)cd->protection());
ol.docify(prot.data());
......@@ -1422,13 +1414,15 @@ void writeAlphabeticalClassList(OutputList &ol)
//QCString cname=cd->className();
extractNamespaceName(cd->name(),cname,namesp);
QCString nsDispName;
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
SrcLangExt lang = cd->getLanguage();
QCString sep = getLanguageSpecificSeparator(lang);
if (sep!="::")
{
nsDispName=substitute(namesp,"::",".");
nsDispName=substitute(namesp,"::",sep);
}
else
{
nsDispName=namesp.copy();
nsDispName=namesp;
}
if (cname.right(2)=="-g" || cname.right(2)=="-p")
{
......@@ -1701,10 +1695,10 @@ void initClassMemberIndices()
void addClassMemberNameToIndex(MemberDef *md)
{
static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
ClassDef *cd=0;
if (vhdlOpt && (VhdlDocGen::isRecord(md) || VhdlDocGen::isUnit(md)))
if (md->getLanguage()==SrcLangExt_VHDL &&
(VhdlDocGen::isRecord(md) || VhdlDocGen::isUnit(md)))
{
VhdlDocGen::adjustRecordMember(md);
}
......@@ -2068,7 +2062,6 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
void writeClassMemberIndex(OutputList &ol)
{
//bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
writeClassMemberIndexFiltered(ol,CMHL_All);
writeClassMemberIndexFiltered(ol,CMHL_Functions);
writeClassMemberIndexFiltered(ol,CMHL_Variables);
......@@ -2120,7 +2113,6 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
if (documentedFileMembers[hl]==0) return;
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
//static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
static bool disableIndex = Config_getBool("DISABLE_INDEX");
bool multiPageIndex=FALSE;
......@@ -2898,9 +2890,9 @@ void writeJavascriptSearchIndex()
else if (md && (md->getClassDef() || md->getNamespaceDef()))
// member in class or namespace scope
{
static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
t << convertToXML(d->getOuterScope()->qualifiedName()) << (optimizeOutputJava ? "." : "::");
t << prefix;
SrcLangExt lang = md->getLanguage();
t << convertToXML(d->getOuterScope()->qualifiedName())
<< getLanguageSpecificSeparator(lang) << prefix;
found = TRUE;
}
else if (scope) // some thing else? -> show scope
......
......@@ -262,7 +262,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_PT
else if (L_EQUAL("portuguese"))
{
theTranslator=new TranslatorDecoder(new TranslatorPortuguese);
theTranslator=new TranslatorPortuguese;
}
#endif
#ifdef LANG_HU
......@@ -298,7 +298,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_CN
else if (L_EQUAL("chinese"))
{
theTranslator=new TranslatorDecoder(new TranslatorChinese);
theTranslator=new TranslatorChinese;
}
#endif
#ifdef LANG_TW
......
......@@ -47,28 +47,6 @@ static QCString escapeLabelName(const char *s)
return result;
}
static bool isSymbol(const char *s)
{
int l=0; // word length
int nCaps=0; // number of captials
int nCamels=0; // number of lowerCase+upperCase combos
int nUnscore=0; // number of underscores
const char *p=s;
char c;
bool plo=FALSE;
while ((c=*p++))
{
bool lo=c>='a' && c<='z';
bool up=c>='A' && c<='Z';
if (c=='_') nUnscore++;
if (up) nCaps++;
if (up && plo) nCamels++;
plo=lo;
l++;
}
return l>=20 || nCaps>=4 || nCamels>=2 || nUnscore>0;
}
const int maxLevels=5;
static const char *secLabels[maxLevels] =
{ "section","subsection","subsubsection","paragraph","subparagraph" };
......@@ -123,7 +101,7 @@ LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt,bool insideTabbing)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_insideItem(FALSE), m_hide(FALSE), m_insideTabbing(insideTabbing),
m_forceBreaks(FALSE), m_langExt(langExt), m_currentColumn(0),
m_langExt(langExt), m_currentColumn(0),
m_inRowspan(FALSE)
{
}
......@@ -135,14 +113,14 @@ LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
void LatexDocVisitor::visit(DocWord *w)
{
if (m_hide) return;
filter(w->word(),isSymbol(w->word()));
filter(w->word());
}
void LatexDocVisitor::visit(DocLinkedWord *w)
{
if (m_hide) return;
startLink(w->ref(),w->file(),w->anchor());
filter(w->word(),isSymbol(w->word()));
filter(w->word());
endLink(w->ref(),w->file(),w->anchor());
}
......@@ -437,6 +415,19 @@ void LatexDocVisitor::visit(DocInclude *inc)
m_t << inc->text();
m_t << "\\end{DoxyVerbInclude}\n";
break;
case DocInclude::Snippet:
{
m_t << "\n\\begin{DoxyCodeInclude}\n";
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
inc->isExample(),
inc->exampleFile()
);
m_t << "\\end{DoxyCodeInclude}" << endl;
}
break;
}
}
......@@ -1368,18 +1359,17 @@ void LatexDocVisitor::visitPost(DocCopy *)
{
}
void LatexDocVisitor::visitPre(DocText *t)
void LatexDocVisitor::visitPre(DocText *)
{
m_forceBreaks = t->forceBreaks();
}
void LatexDocVisitor::visitPost(DocText *)
{
}
void LatexDocVisitor::filter(const char *str,bool forceBreaks)
void LatexDocVisitor::filter(const char *str)
{
filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem,m_forceBreaks || forceBreaks);
filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem);
}
void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
......
......@@ -138,7 +138,7 @@ class LatexDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
void filter(const char *str,bool forceBreaks=FALSE);
void filter(const char *str);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink(const QCString &ref,const QCString &file,
......@@ -166,7 +166,6 @@ class LatexDocVisitor : public DocVisitor
bool m_insideItem;
bool m_hide;
bool m_insideTabbing;
bool m_forceBreaks;
QStack<bool> m_enabled;
QCString m_langExt;
QMap<int, int> m_rowspanIndices;
......
......@@ -158,7 +158,7 @@ void LatexGenerator::init()
<< "pdf: refman.pdf" << endl << endl;
t << "refman.pdf: clean refman.tex" << endl;
t << "\tpdflatex refman" << endl;
t << "\tmakeindex refman" << endl;
t << "\t" << mkidx_command << " refman.tex" << endl;
if (generateBib)
{
t << "\tbibtex refman" << endl;
......@@ -281,7 +281,10 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\setcounter{tocdepth}{3}\n"
"\\renewcommand{\\footrulewidth}{0.4pt}\n"
"\\renewcommand{\\familydefault}{\\sfdefault}\n"
"\\hfuzz=10pt\n" // allow a bit of overflow to go unnoticed
"\\hfuzz=15pt\n" // allow a bit of overflow to go unnoticed
"\\setlength{\\emergencystretch}{15pt}\n"
"\\hbadness=750\n"
"\\tolerance=750\n"
"\\begin{document}\n";
static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
......@@ -486,7 +489,7 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
"\\newenvironment{DoxyCode}{%\n";
if (latexSourceCode)
{
t << "\n\n\\begin{footnotesize}\\begin{alltt}%" << endl;
t << "\n\n\\begin{scriptsize}\\begin{alltt}%" << endl;
}
else
{
......@@ -496,7 +499,7 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
t << "}{%\n";
if (latexSourceCode)
{
t << "\\end{alltt}\\end{footnotesize}%" << endl;
t << "\\end{alltt}\\end{scriptsize}%" << endl;
}
else
{
......@@ -1873,7 +1876,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
void LatexGenerator::docify(const char *str)
{
filterLatexString(t,str,insideTabbing,FALSE,FALSE,TRUE);
filterLatexString(t,str,insideTabbing,FALSE,FALSE);
}
void LatexGenerator::codify(const char *str)
......@@ -1882,62 +1885,82 @@ void LatexGenerator::codify(const char *str)
{
const char *p=str;
char c;
char cs[5];
//char cs[5];
int spacesToNextTabStop;
static int tabSize = Config_getInt("TAB_SIZE");
while (*p)
const int maxLineLen = 80;
QCString result(4*maxLineLen+1); // worst case for 1 line of 4-byte chars
int i;
while ((c=*p))
{
//static bool MultiByte = FALSE;
c=*p++;
switch(c)
{
case 0x0c: break; // remove ^L
case 0x0c: p++; // remove ^L
break;
case '\t': spacesToNextTabStop =
tabSize - (col%tabSize);
t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
p++;
break;
case '\n': t << '\n'; col=0; break;
default: cs[0]=c;
cs[1]=0;
int bytes=1;
if (c<0) // multibyte utf-8 character
case '\n': t << '\n'; col=0; p++;
break;
default:
i=0;
#undef COPYCHAR
// helper macro to copy a single utf8 character, dealing with multibyte chars.
#define COPYCHAR() do { \
result[i++]=c; p++; \
if (c<0) /* multibyte utf-8 character */ \
{ \
/* 1xxx.xxxx: >=2 byte character */ \
result[i++]=*p++; \
if (((uchar)c&0xE0)==0xE0) \
{ \
/* 111x.xxxx: >=3 byte character */ \
result[i++]=*p++; \
} \
if (((uchar)c&0xF0)==0xF0) \
{ \
/* 1111.xxxx: 4 byte character */ \
result[i++]=*p++; \
} \
} \
col++; \
} while(0)
// gather characters until we find whitespace or are at
// the end of a line
COPYCHAR();
if (col>=maxLineLen) // force line break
{
t << "\n ";
col=0;
}
else // copy more characters
{
bytes++; // 1xxx.xxxx: >=2 byte character
cs[1]=*p;
cs[2]=0;
if (((uchar)c&0xE0)==0xE0)
while (col<maxLineLen && (c=*p) &&
c!=0x0c && c!='\t' && c!='\n' && c!=' '
)
{
bytes++; // 111x.xxxx: >=3 byte character
cs[2]=*(p+1);
cs[3]=0;
COPYCHAR();
}
if (((uchar)c&0xF0)==0xF0)
if (col>=maxLineLen) // force line break
{
bytes++; // 1111.xxxx: 4 byte character
cs[2]=*(p+2);
cs[4]=0;
t << "\n ";
col=0;
}
}
result[i]=0; // add terminator
if (m_prettyCode)
{
filterLatexString(t,cs,insideTabbing,TRUE);
}
else
{
t << cs;
}
if (col>=80)
{
t << "\n ";
col=0;
filterLatexString(t,result,insideTabbing,TRUE);
}
else
{
col++;
t << result;
}
p+=(bytes-1); // skip to next character
break;
}
}
......@@ -2320,66 +2343,73 @@ void LatexGenerator::endConstraintList()
void LatexGenerator::escapeLabelName(const char *s)
{
if (s==0) return;
const char *p=s;
char str[2];
str[1]=0;
char c;
QCString result(strlen(s)+1); // worst case allocation
int i;
while ((c=*p++))
{
switch (c)
{
case '%': t << "\\%"; break;
//case '|': t << "\\tt{\"|}"; break;
//case '!': t << "\"!"; break;
default: str[0]=c; docify(str); break;
// NOTE: adding a case here, means adding it to while below as well!
default:
i=0;
// collect as long string as possible, before handing it to docify
result[i++]=c;
while ((c=*p) && c!='%')
{
result[i++]=c;
p++;
}
result[i]=0;
docify(result);
break;
}
}
}
void LatexGenerator::escapeMakeIndexChars(const char *s)
{
if (s==0) return;
const char *p=s;
char str[2];
str[1]=0;
char c;
QCString result(strlen(s)+1); // worst case allocation
int i;
while ((c=*p++))
{
switch (c)
{
//case '!': t << "\"!"; break;
case '"': t << "\"\""; break;
case '@': t << "\"@"; break;
//case '|': t << "\\tt{\"|}"; break;
case '[': t << "["; break;
case ']': t << "]"; break;
default: str[0]=c; docify(str); break;
// NOTE: adding a case here, means adding it to while below as well!
default:
i=0;
// collect as long string as possible, before handing it to docify
result[i++]=c;
while ((c=*p) && c!='"' && c!='@' && c!='[' && c!=']')
{
result[i++]=c;
p++;
}
result[i]=0;
docify(result);
break;
}
}
}
void LatexGenerator::startCodeFragment()
{
//if (m_prettyCode)
//{
// t << endl << endl;
// t << "\\begin{footnotesize}\\begin{alltt}\n";
//}
//else
//{
t << "\n\\begin{DoxyCode}\n";
//}
t << "\n\\begin{DoxyCode}\n";
}
void LatexGenerator::endCodeFragment()
{
//if (m_prettyCode)
//{
// t << "\\end{alltt}\\end{footnotesize}" << endl;
//}
//else
//{
t << "\\end{DoxyCode}\n";
//}
t << "\\end{DoxyCode}\n";
}
void LatexGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
......
......@@ -1123,24 +1123,25 @@ class LayoutParser : public QXmlDefaultHandler
class LayoutErrorHandler : public QXmlErrorHandler
{
public:
LayoutErrorHandler(const char *fn) : fileName(fn) {}
bool warning( const QXmlParseException &exception )
{
err("error: at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
err("warning: at line %d column %d of %s: %s\n",
exception.lineNumber(),exception.columnNumber(),fileName.data(),
exception.message().data());
return FALSE;
}
bool error( const QXmlParseException &exception )
{
err("error: at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
err("error: at line %d column %d of %s: %s\n",
exception.lineNumber(),exception.columnNumber(),fileName.data(),
exception.message().data());
return FALSE;
}
bool fatalError( const QXmlParseException &exception )
{
err("error: at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
err("fatal error: at line %d column %d of %s: %s\n",
exception.lineNumber(),exception.columnNumber(),fileName.data(),
exception.message().data());
return FALSE;
}
......@@ -1148,6 +1149,7 @@ class LayoutErrorHandler : public QXmlErrorHandler
private:
QString errorMsg;
QString fileName;
};
//---------------------------------------------------------------------------------
......@@ -1175,7 +1177,7 @@ LayoutDocManager::LayoutDocManager()
void LayoutDocManager::init()
{
// parse the default layout
LayoutErrorHandler errorHandler;
LayoutErrorHandler errorHandler( "layout_default.xml" );
QXmlInputSource source;
source.setData( layout_default );
QXmlSimpleReader reader;
......@@ -1216,9 +1218,9 @@ void LayoutDocManager::clear(LayoutDocManager::LayoutPart p)
d->docEntries[(int)p].clear();
}
void LayoutDocManager::parse(QTextStream &t)
void LayoutDocManager::parse(QTextStream &t,const char *fileName)
{
LayoutErrorHandler errorHandler;
LayoutErrorHandler errorHandler(fileName);
QXmlInputSource source( t );
QXmlSimpleReader reader;
reader.setContentHandler( &LayoutParser::instance() );
......
......@@ -175,7 +175,7 @@ class LayoutDocManager
LayoutNavEntry *rootNavEntry() const;
/** Parses a user provided layout */
void parse(QTextStream &t);
void parse(QTextStream &t,const char *fileName);
void init();
private:
void addEntry(LayoutPart p,LayoutDocEntry*e);
......
......@@ -119,6 +119,7 @@ HEADERS = bufstr.h \
sortdict.h \
store.h \
tagreader.h \
tclscanner.h \
textdocvisitor.h \
translator.h \
translator_adapter.h \
......@@ -176,6 +177,7 @@ SOURCES = ce_lex.cpp \
commentcnv.cpp \
commentscan.cpp \
cppvalue.cpp \
dbusxmlscanner.cpp \
debug.cpp \
defgen.cpp \
declinfo.cpp \
......@@ -241,6 +243,7 @@ SOURCES = ce_lex.cpp \
searchindex.cpp \
store.cpp \
tagreader.cpp \
tclscanner.cpp \
textdocvisitor.cpp \
translator.cpp \
util.cpp \
......@@ -249,13 +252,13 @@ SOURCES = ce_lex.cpp \
vhdldocgen.cpp \
vhdlscanner.cpp \
xmldocvisitor.cpp \
xmlgen.cpp \
dbusxmlscanner.cpp \
xmlgen.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
linux-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
TMAKE_CXXFLAGS += -DYY_TYPEDEF_YY_SIZE_T -Dyy_size_t=int
INCLUDEPATH += ../qtools
#INCLUDEPATH += ../libpng
INCLUDEPATH += ../libmd5
......
......@@ -69,6 +69,9 @@ sub GenerateDep {
#$ GenerateDep("vhdlcode.cpp","vhdlcode.l");
$(LEX) -i -PvhdlcodeYY -t vhdlcode.l | $(INCBUFSIZE) >vhdlcode.cpp
#$ GenerateDep("tclscanner.cpp","tclscanner.l");
$(LEX) -i -PtclscanYY -t tclscanner.l | $(INCBUFSIZE) >tclscanner.cpp
#$ GenerateDep("pre.cpp","pre.l");
$(LEX) -PpreYY -t pre.l | $(INCBUFSIZE) >pre.cpp
......
......@@ -281,6 +281,22 @@ void ManDocVisitor::visit(DocInclude *inc)
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
case DocInclude::Snippet:
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
inc->isExample(),
inc->exampleFile()
);
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
}
}
......@@ -949,6 +965,7 @@ void ManDocVisitor::filter(const char *str)
{
switch(c)
{
case '.': m_t << "'\\&."; break; // see bug652277
case '\\': m_t << "\\\\"; break;
case '"': c = '\''; // fall through
default: m_t << c; break;
......
......@@ -279,6 +279,7 @@ void ManGenerator::docify(const char *str)
{
switch(c)
{
case '.': t << "\\&."; break; // see bug652277
case '\\': t << "\\\\"; col++; break;
case '\n': t << "\n"; col=0; break;
case '\"': c = '\''; // no break!
......@@ -304,6 +305,7 @@ void ManGenerator::codify(const char *str)
c=*p++;
switch(c)
{
case '.': t << "\\&."; break; // see bug652277
case '\t': spacesToNextTabStop =
Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
t << Doxygen::spaces.left(spacesToNextTabStop);
......
......@@ -644,8 +644,9 @@ MemberSDict *unmarshalMemberSDict(StorageIntf *s)
//printf(" unmarshaling key %s\n",key.data());
MemberDef *md = (MemberDef *)unmarshalObjPointer(s);
//printf(" unmarshalMemberSDict i=%d key=%s md=%p\n",i,key.data(),md);
result->inSort(key,md); // note: this can lead to unmarshalling another object!
result->append(key,md); // note: this can lead to unmarshalling another object!
}
result->sort();
//printf("--- end unmarshalMemberSDict\n");
return result;
}
......
This diff is collapsed.
......@@ -128,6 +128,7 @@ class MemberDef : public Definition
bool isEnumValue() const;
bool isTypedef() const;
bool isFunction() const;
bool isFunctionPtr() const;
bool isDefine() const;
bool isFriend() const;
bool isDCOP() const;
......@@ -296,6 +297,7 @@ class MemberDef : public Definition
void setDeclArgumentList(ArgumentList *al);
void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists);
void setTypeConstraints(ArgumentList *al);
void setType(const char *t);
// namespace related members
void setNamespace(NamespaceDef *nd);
......@@ -336,7 +338,7 @@ class MemberDef : public Definition
void setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine);
void setHidden(bool b);
//-----------------------------------------------------------------------------------
// --- actions ----
//-----------------------------------------------------------------------------------
......
......@@ -546,6 +546,7 @@ void MemberList::writeSimpleDocumentation(OutputList &ol,
Definition *container)
{
countDocMembers(FALSE);
//printf("MemberList count=%d\n",numDocMembers());
if (numDocMembers()==0) return;
ol.startMemberDocSimple();
......
......@@ -57,7 +57,6 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
memberGroupSDict->setAutoDelete(TRUE);
visited=FALSE;
m_subGrouping=Config_getBool("SUBGROUPING");
m_isCSharp = df && getLanguageFromFileName(df)==SrcLangExt_CSharp;
}
NamespaceDef::~NamespaceDef()
......@@ -416,16 +415,17 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol)
void NamespaceDef::writeDocumentation(OutputList &ol)
{
static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
//static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
//static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
SrcLangExt lang = getLanguage();
QCString pageTitle;
if (outputJava)
if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
{
pageTitle = theTranslator->trPackage(displayName());
}
else if (fortranOpt)
else if (lang==SrcLangExt_Fortran)
{
pageTitle = theTranslator->trModuleReference(displayName());
}
......@@ -445,7 +445,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
startTitle(ol,getOutputFileBase(),this);
ol.parseText(pageTitle,TRUE);
ol.parseText(pageTitle);
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),displayName());
ol.startContents();
......@@ -715,12 +715,14 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
void NamespaceDef::addListReferences()
{
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
//bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
{
LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems();
addRefItem(xrefItems.pointer(),
qualifiedName(),
fortranOpt?theTranslator->trModule(TRUE,TRUE):theTranslator->trNamespace(TRUE,TRUE),
getLanguage()==SrcLangExt_Fortran ?
theTranslator->trModule(TRUE,TRUE) :
theTranslator->trNamespace(TRUE,TRUE),
getOutputFileBase(),displayName(),
0
);
......@@ -745,10 +747,13 @@ void NamespaceDef::addListReferences()
QCString NamespaceDef::displayName() const
{
QCString result=name();
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
SrcLangExt lang = getLanguage();
QCString sep = getLanguageSpecificSeparator(lang);
if (sep!="::")
{
result = substitute(result,"::",".");
result = substitute(result,"::",sep);
}
//printf("NamespaceDef::displayName() %s->%s lang=%d\n",name().data(),result.data(),lang);
return result;
}
......@@ -821,22 +826,8 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
// write list of namespaces
ol.startMemberHeader("namespaces");
bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
#if 0
if (javaOpt)
{
ol.parseText(theTranslator->trPackages());
}
else if (fortranOpt)
{
ol.parseText(theTranslator->trModules());
}
else
{
ol.parseText(theTranslator->trNamespaces());
}
#endif
//bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
//bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
ol.parseText(title);
ol.endMemberHeader();
ol.startMemberList();
......@@ -844,12 +835,13 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
{
if (nd->isLinkable())
{
SrcLangExt lang = nd->getLanguage();
ol.startMemberItem(0);
if (javaOpt)
if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
{
ol.docify("package ");
}
else if (fortranOpt)
else if (lang==SrcLangExt_Fortran)
{
ol.docify("module ");
}
......@@ -975,7 +967,7 @@ bool NamespaceDef::isLinkableInProject() const
return TRUE;
}
return !name().isEmpty() && name().at(i)!='@' && // not anonymous
(hasDocumentation() || m_isCSharp) && // documented
(hasDocumentation() || getLanguage()==SrcLangExt_CSharp) && // documented
!isReference() && // not an external reference
!isHidden() && // not hidden
!isArtificial() && // or artificial
......
......@@ -119,7 +119,6 @@ class NamespaceDef : public Definition
ClassSDict *classSDict;
NamespaceSDict *namespaceSDict;
bool m_subGrouping;
bool m_isCSharp;
};
class NamespaceList : public QList<NamespaceDef>
......
......@@ -173,7 +173,7 @@ void OutputList::parseDoc(const char *fileName,int startLine,
delete root;
}
void OutputList::parseText(const QCString &textStr,bool forceBreaks)
void OutputList::parseText(const QCString &textStr)
{
int count=0;
OutputGenerator *og=outputs->first();
......@@ -184,7 +184,7 @@ void OutputList::parseText(const QCString &textStr,bool forceBreaks)
}
if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseText(textStr,forceBreaks);
DocNode *root = validatingParseText(textStr);
og=outputs->first();
while (og)
......
......@@ -68,7 +68,7 @@ class OutputList : public OutputDocInterface
Definition *ctx,MemberDef *md,const QCString &docStr,
bool indexWords,bool isExample,const char *exampleName=0,
bool singleLine=FALSE,bool linkFromIndex=FALSE);
void parseText(const QCString &textStr,bool forceBreaks=FALSE);
void parseText(const QCString &textStr);
void startIndexSection(IndexSections is)
......
......@@ -683,6 +683,7 @@ void PerlModDocVisitor::visit(DocInclude *inc)
case DocInclude::DontInclude: return;
case DocInclude::HtmlInclude: type = "htmlonly"; break;
case DocInclude::VerbInclude: type = "preformatted"; break;
case DocInclude::Snippet: return;
}
openItem(type);
m_output.addFieldQuotedString("content", inc->text());
......
......@@ -184,6 +184,7 @@ class PrintDocVisitor : public DocVisitor
case DocInclude::DontInclude: printf("dontinclude"); break;
case DocInclude::HtmlInclude: printf("htmlinclude"); break;
case DocInclude::VerbInclude: printf("verbinclude"); break;
case DocInclude::Snippet: printf("snippet"); break;
}
printf("\"/>");
}
......
......@@ -57,7 +57,7 @@ static Definition * g_currentDefinition;
static MemberDef * g_currentMemberDef;
static bool g_includeCodeFragment;
static QCString g_realScope;
static bool g_insideBody;
//static bool g_insideBody;
static int g_bodyCurlyCount;
static bool g_searchingForBody;
static QCString g_classScope;
......@@ -346,7 +346,7 @@ static void startCodeLine()
{
g_currentDefinition = d;
g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr);
g_insideBody = FALSE;
//g_insideBody = FALSE;
g_searchingForBody = TRUE;
g_realScope = d->name().copy();
g_classScope = d->name().copy();
......@@ -473,21 +473,20 @@ static void codifyLines(char *text)
static void addDocCrossReference(MemberDef *src,MemberDef *dst)
{
static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION");
static bool callerGraph = Config_getBool("CALLER_GRAPH");
static bool referencesRelation = Config_getBool("REFERENCES_RELATION");
static bool callGraph = Config_getBool("CALL_GRAPH");
if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
//printf("addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
if ((Config_getBool("REFERENCED_BY_RELATION") || Config_getBool("CALLER_GRAPH")) &&
(src->isFunction() || src->isSlot())
)
if ((referencedByRelation || callerGraph) && (src->isFunction() || src->isSlot()))
{
dst->addSourceReferencedBy(src);
}
if ((Config_getBool("REFERENCES_RELATION") || Config_getBool("CALL_GRAPH")) &&
(src->isFunction() || src->isSlot())
)
if ((referencesRelation || callGraph) && (src->isFunction() || src->isSlot()))
{
src->addSourceReferences(dst);
}
}
......@@ -508,21 +507,21 @@ static bool getLinkInScope(const QCString &c, // scope
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
md->isLinkable())
{
//printf("Found!\n");
//Definition *d=0;
//if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
//printf("Found! d=%s\n",d?d->name().data():"<none>");
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString()));
//printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
// g_currentDefinition,g_currentMemberDef,g_insideBody);
//printf("g_currentDefinition=%p g_currentMemberDef=%p\n",
// g_currentDefinition,g_currentMemberDef);
if (g_currentDefinition && g_currentMemberDef &&
md!=g_currentMemberDef && g_insideBody)
md!=g_currentMemberDef)
{
addDocCrossReference(g_currentMemberDef,md);
}
......@@ -575,12 +574,12 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
// Don't do anything for empty text
if (className.isEmpty()) return;
//printf("generateClassOrGlobalLink(className=%s)\n",className.data());
ClassDef *cd=0,*lcd=0; /** Class def that we may find */
MemberDef *md=0; /** Member def that we may find */
bool isLocal=FALSE;
// printf("generateClassOrGlobalLink(className=%s)\n",className.data());
if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable
{
Definition *d = g_currentDefinition;
......@@ -625,6 +624,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
}
else // not a class, maybe a global member
{
//printf("Checking if '%s' is a global function\n",clName);
/*
This code requires a going-over in order to
......@@ -734,6 +734,10 @@ static bool findMemberLink(CodeOutputInterface &ol,Definition *sym,const char *s
if (sym->definitionType()==Definition::TypeMember)
{
anchor=((MemberDef *)sym)->anchor();
if (g_currentMemberDef)
{
addDocCrossReference(g_currentMemberDef,(MemberDef*)sym);
}
}
// TODO: find the nearest base class in case cd is a base class of
......@@ -967,6 +971,10 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
codify(yytext);
endFontClass();
}
"self."{IDENTIFIER}/"(" {
codify("self.");
findMemberLink(*g_code,&yytext[5]);
}
"self."{IDENTIFIER} {
codify("self.");
findMemberLink(*g_code,&yytext[5]);
......@@ -1104,9 +1112,12 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
codify(yytext);
endFontClass();
}
({IDENTIFIER}".")*{IDENTIFIER}/"(" {
generateClassOrGlobalLink(*g_code,yytext);
}
{IDENTIFIER} {
codify(yytext);
//generateClassOrGlobalLink(*g_code,yytext);
}
}
......
......@@ -434,7 +434,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
DBG_RTF("{\\comment RTFDocVisitor::visit(DocInclude)}\n");
switch(inc->type())
{
case DocInclude::IncWithLines:
case DocInclude::IncWithLines:
{
m_t << "{" << endl;
m_t << "\\par" << endl;
......@@ -450,7 +450,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "}" << endl;
}
break;
case DocInclude::Include:
case DocInclude::Include:
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
......@@ -473,6 +473,19 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "\\par";
m_t << "}" << endl;
break;
case DocInclude::Snippet:
m_t << "{" << endl;
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
inc->isExample(),
inc->exampleFile()
);
m_t << "}";
break;
}
m_lastIsPara=TRUE;
}
......
......@@ -2243,6 +2243,37 @@ void RTFGenerator::endMemberSubtitle()
//}
//
bool isLeadBytes(int c)
{
bool result;
QCString codePage = theTranslator->trRTFansicp();
if (codePage == "932") // cp932 (Japanese Shift-JIS)
{
result = (0x81<=c && c<=0x9f) || (0xe0<=c && c<=0xfc);
}
else if (codePage == "936") // cp936 (Simplified Chinese GBK)
{
result = 0x81<=c && c<=0xFE;
}
else if (codePage == "949") // cp949 (Korean)
{
result = 0x81<=c && c<=0xFE;
}
else if (codePage == "950") // cp950 (Traditional Chinese Big5)
{
result = 0x81<=c && c<=0xFE;
}
else // for SBCS Codepages (cp1252,1251 etc...)
{
result = false;
}
return result;
}
// note: function is not reentrant!
static void encodeForOutput(FTextStream &t,const QCString &s)
{
......@@ -2276,14 +2307,26 @@ static void encodeForOutput(FTextStream &t,const QCString &s)
enc.resize(l);
}
uint i;
bool multiByte = FALSE;
for (i=0;i<enc.size();i++)
{
uchar c = (uchar)enc.at(i);
if (c>=0x80)
if (c>=0x80 || multiByte)
{
char esc[10];
sprintf(esc,"\\'%X",c);
sprintf(esc,"\\'%X",c); // escape sequence for SBCS and DBCS(1st&2nd bytes).
t << esc;
if (!multiByte)
{
multiByte = isLeadBytes(c); // It may be DBCS Codepages.
}
else
{
multiByte = FALSE; // end of Double Bytes Character.
}
}
else
{
......
......@@ -977,6 +977,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<CliPropertyIndex>. {
current->name+=yytext;
}
/*
<FindMembers>{B}*"property"{BN}+ {
if (!current->type.isEmpty())
{
......@@ -988,6 +989,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
lineCount();
}
}
*/
<FindMembers>{B}*"@private"{BN}+ {
current->protection = protection = Private ;
current->mtype = mtype = Method;
......@@ -1211,6 +1213,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
<PackageName>{ID}(("."|"\\"){ID})* {
isTypedef=FALSE;
//printf("Found namespace %s lang=%d\n",yytext,current->lang);
current->name = yytext;
current->name = substitute(current->name,".","::");
current->name = substitute(current->name,"\\","::");
......@@ -1663,40 +1666,56 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<NSAliasArg>";" {
BEGIN( FindMembers );
}
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID}/{BN}+"as" {
lineCount();
aliasName=yytext;
//current->fileName = yyFileName;
//current->section=Entry::USINGDIR_SEC;
//current_root->addSubEntry(current);
//current = new Entry;
//initEntry();
BEGIN(PHPUseAs);
}
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
lineCount();
current->name=removeRedundantWhiteSpace(substitute(yytext,"\\","::"));
//printf("PHP: adding use relation: %s\n",current->name.data());
current->fileName = yyFileName;
current->section=Entry::USINGDIR_SEC;
current_root->addSubEntry(current);
current = new Entry;
initEntry();
aliasName.resize(0);
}
<PHPUseAs>{BN}+"as"{BN}+ {
lineCount();
}
<PHPUseAs>{ID} {
//printf("PHP: adding use as relation: %s->%s\n",yytext,aliasName.data());
Doxygen::namespaceAliasDict.insert(yytext,
new QCString(removeRedundantWhiteSpace(
substitute(aliasName,"\\","::"))));
aliasName.resize(0);
}
<PHPUseAs>[,;] {
<PHPUse,PHPUseAs>[,;] {
/*
if (!aliasName.isEmpty())
{
int i=aliasName.findRev('\\');
QCString an = removeRedundantWhiteSpace(
if (i!=-1)
{
QCString an = removeRedundantWhiteSpace(
substitute(aliasName,"\\","::"));
Doxygen::namespaceAliasDict.insert(aliasName.mid(i+1),
new QCString(an));
current->name = an;
current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC;
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
printf("PHP: adding use relation: %s->%s\n",aliasName.mid(i+1).data(),an.data());
Doxygen::namespaceAliasDict.insert(aliasName.mid(i+1),
new QCString(an));
current->name = an;
current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC;
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
}
else if (i==0)
{
}
}
*/
if (*yytext==',')
{
BEGIN(PHPUse);
......@@ -3050,6 +3069,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
else // probably a redundant ,
{
current->reset();
initEntry();
}
}
<FindFields>"[" { // attribute list in IDL
......@@ -3287,7 +3307,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
BEGIN(FindMembers);
}
<MemberSpec>[,;] {
//printf("current->name=`%s' msName=`%s'\n",current->name.data(),msName.data());
if (msName.isEmpty() && !current->name.isEmpty())
{
// see if the compound does not have a name or is inside another
......@@ -3417,6 +3436,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->doc.resize(0);
current->brief.resize(0);
}
}
<MemberSpec>"=" {
lastInitializerContext=YY_START;
......@@ -4557,6 +4577,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
unput(';');
current->reset();
initEntry();
if (isTypedef) // typedef of a class, put typedef keyword back
{
current->type.prepend("typedef");
......@@ -4575,6 +4596,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<CompoundName>{SCOPENAME}/{BN}*"," { // multiple forward declarations on one line
// e.g. @protocol A,B;
current->reset();
initEntry();
}
<CompoundName>{SCOPENAME} {
current->name = yytext ;
......@@ -5729,7 +5751,7 @@ static void parseCompounds(Entry *rt)
//current->reset();
if (current) delete current;
current = new Entry;
current->lang = language;
initEntry();
gstat = FALSE;
int ni=ce->name.findRev("::"); if (ni==-1) ni=0; else ni+=2;
// set default protection based on the compound type
......@@ -5846,6 +5868,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
current = new Entry;
}
current->reset();
initEntry();
scanYYrestart( scanYYin );
if ( insidePHP )
{
......
......@@ -207,6 +207,18 @@ class SDict
#endif
}
void insertAt(int i,const char *key,const T *d)
{
m_list->insert(i,d);
m_dict->insert(key,d);
#if AUTORESIZE
if (m_dict->size()>SDict_primes[m_sizeIndex])
{
m_dict->resize(SDict_primes[++m_sizeIndex]);
}
#endif
}
/*! Indicates whether or not the dictionary owns its elements */
void setAutoDelete(bool val)
{
......@@ -230,6 +242,12 @@ class SDict
{
return m_dict->find(key);
}
int findAt(const QCString &key)
{
T *item = find(key);
if (item==0) return -1;
return m_list->find(item);
}
/*! Equavalent to find(). */
T *operator[](const char *key) const
......
This diff is collapsed.
......@@ -109,6 +109,7 @@ class Store : public StorageIntf
void printFreeList();
FILE *m_file;
portable_off_t m_front;
portable_off_t m_cur;
Node *m_head;
State m_state;
int m_reads;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -50,7 +50,7 @@
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
*/
class TranslatorKorean : public TranslatorAdapter_1_6_3
class TranslatorKorean : public TranslatorAdapter_1_7_5
{
protected:
friend class TranslatorAdapterBase;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1672,6 +1672,7 @@ ENDPROTECEDBODY "end"{BR}+"protected"{BR}+"body"{BR}+{NAME}
static void initEntry(Entry *e)
{
e->fileName = yyFileName;
e->lang = SrcLangExt_VHDL;
initGroupInfo(e);
}
......
This diff is collapsed.
This diff is collapsed.
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