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