Commit 5edb3c85 authored by dimitri's avatar dimitri

Release-1.3.6-20040222

parent a9b8e482
DOXYGEN Version 1.3.6
DOXYGEN Version 1.3.6-20040222
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (12 February 2004)
Dimitri van Heesch (22 February 2004)
DOXYGEN Version 1.3.6
DOXYGEN Version 1.3.6_20040222
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (12 February 2004)
Dimitri van Heesch (dimitri@stack.nl) (22 February 2004)
1.3.6
1.3.6-20040222
......@@ -204,7 +204,8 @@ int main(int argc,char **argv)
{
numParams++;
}
if (strcmp(mem->typeString()->latin1(),"void")!=0)
const char *type = mem->typeString()->latin1();
if (type && strcmp(type, "void"))
{
numParams++; // count non-void return types as well
}
......
......@@ -224,30 +224,33 @@ fi
#- check for qt --------------------------------------------------------------
if test "$f_wizard" = YES; then
echo -n " Checking for Qt..."
if test -d "/usr/lib/qt3/lib"; then
if test -d "/usr/lib/qt3/include"; then
if test -x "/usr/lib/qt3/bin/moc"; then
QTDIR="/usr/lib/qt3";
if test -z "$QTDIR"; then
echo " QTDIR environment variable not set!"
echo -n " Checking for Qt..."
if test -d "/usr/lib/qt3/lib"; then
if test -d "/usr/lib/qt3/include"; then
if test -x "/usr/lib/qt3/bin/moc"; then
QTDIR="/usr/lib/qt3";
fi
fi
fi
fi
if test -d "/usr/lib/qt2/lib"; then
if test -d "/usr/lib/qt2/include"; then
if test -x "/usr/lib/qt2/bin/moc"; then
QTDIR="/usr/lib/qt2";
if test -d "/usr/lib/qt2/lib"; then
if test -d "/usr/lib/qt2/include"; then
if test -x "/usr/lib/qt2/bin/moc"; then
QTDIR="/usr/lib/qt2";
fi
fi
fi
fi
if test -d "/usr/lib/qt/lib"; then
if test -d "/usr/lib/qt/include"; then
if test -x "/usr/lib/qt/bin/moc"; then
QTDIR="/usr/lib/qt";
if test -d "/usr/lib/qt/lib"; then
if test -d "/usr/lib/qt/include"; then
if test -x "/usr/lib/qt/bin/moc"; then
QTDIR="/usr/lib/qt";
fi
fi
fi
fi
if test -z "$QTDIR"; then
echo "QTDIR not set!"
echo "QTDIR not set and Qt not found at standard locations!"
echo
echo "tmake requires the QTDIR environment variable to be set."
echo "check your Qt installation!"
......
......@@ -30,7 +30,7 @@ clean:
language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.pl
$(ENV) VERSION=$(VERSION) DOXYGEN_DOCDIR=. $(PERL) translator.pl
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py
python translator.pl
FORCE:
......@@ -68,6 +68,7 @@ documentation:
\refitem cmdendif \\endif
\refitem cmdendlatexonly \\endlatexonly
\refitem cmdendlink \\endlink
\refitem cmdendmanonly \\endmanonly
\refitem cmdendverbatim \\endverbatim
\refitem cmdendxmlonly \\endxmlonly
\refitem cmdenum \\enum
......@@ -94,6 +95,7 @@ documentation:
\refitem cmdline \\line
\refitem cmdlink \\link
\refitem cmdmainpage \\mainpage
\refitem cmdmanonly \\manonly
\refitem cmdn \\n
\refitem cmdname \\name
\refitem cmdnamespace \\namespace
......@@ -1626,6 +1628,14 @@ class C {};
\sa section \ref cmdlatexonly "\\latexonly".
<hr>
\section cmdendmanonly \endmanonly
\addindex \\endmanonly
Ends a block of text that was started with a \\manonly command.
\sa section \ref cmdmanonly "\\manonly".
<hr>
\section cmdendverbatim \endverbatim
......@@ -1685,7 +1695,7 @@ class C {};
environment variables (like \$(HOME) ) are resolved inside a
HTML-only block.
\sa section \ref cmdhtmlonly "\\htmlonly" and section
\sa section \ref cmdmanonly "\\manonly" and section
\ref cmdlatexonly "\\latexonly".
<hr>
......@@ -1763,6 +1773,22 @@ class C {};
\sa section \ref cmdlatexonly "\\latexonly"
and section \ref cmdhtmlonly "\\htmlonly".
<hr>
\section cmdmanonly \manonly
\addindex \\manonly
Starts a block of text that will be verbatim included in the
generated MAN documentation only. The block ends with a
endmanonly command.
This command can be used to include groff code directly into
MAN pages. You can use the \\htmlonly and \\latexonly and
\\endhtmlonly and \\endlatexonly pairs to provide proper
HTML and \f$\mbox{\LaTeX}\f$ alternatives.
\sa section \ref cmdhtmlonly "\\htmlonly" and section
\ref cmdlatexonly "\\latexonly".
<hr>
\section cmdli \li { item-description }
......
......@@ -676,7 +676,7 @@ function's detailed documentation block.
in the directories. If left blank the following patterns are tested:
<code>
*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
*.h++ *.idl *.odl *.cs
*.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
</code>
\anchor cfg_recursive
......
/******************************************************************************
* Warning: this file was generated from the language.tpl template
* and the maintainers.txt files by the translator.pl script.
*
* Do not edit this file. Edit the above mentioned files!
*
* Do not edit this file. It was generated by the translator.py script.
*
* Copyright (C) 1997-2004 by Dimitri van Heesch.
*
......@@ -16,23 +12,24 @@
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
* $Id$
*/
/*! \page langhowto Internationalization
<h3>Support for multiple languages</h3>
Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Doxygen has built-in support for multiple languages. This means that the
text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile).
Currently (version 1.3.5-20040202), 30 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
French, German, Greek, Hungarian, Italian,
Japanese, JapaneseEn, Korean, KoreanEn, Norwegian,
Polish, Portuguese, Romanian, Russian, Serbian,
Slovak, Slovene, Spanish, Swedish, and Ukrainian.
Currently (version 1.3.6), 28 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish, French, German, Greek,
Hungarian, Italian, Japanese (+En), Korean (+En), Norwegian, Polish,
Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
Swedish, and Ukrainian..
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
......@@ -40,273 +37,279 @@ was generated from sources and shows approximately the last version
when the translator was updated.
\htmlonly
<TABLE ALIGN=center CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR BGCOLOR="#000000">
<TD>
<TABLE CELLSPACING=1 CELLPADDING=2 BORDER=0>
<TR BGCOLOR="#4040c0">
<TD ><b><font size=+1 color="#ffffff"> Language </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Maintainer </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Contact address </font>
<font size=-2 color="#ffffff">(remove the NOSPAM.)</font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Status </font></b></TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Brazilian Portuguese</TD>
<TD>Fabio "FJTC" Jun Takada Chino</TD>
<TD>chino@NOSPAM.icmc.sc.usp.br</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Catalan</TD>
<TD>Albert Mora</TD>
<TD>amora@NOSPAM.iua.upf.es</TD>
<TD>1.2.17</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Chinese</TD>
<TD>Wei Liu<br>Wang Weihan</TD>
<TD>liuwei@NOSPAM.asiainfo.com<br>wangweihan@NOSPAM.capinfo.com.cn</TD>
<TD>1.2.13</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Chinese Traditional</TD>
<TD>Daniel YC Lin<br>Gary Lee</TD>
<TD>daniel@NOSPAM.twpda.com<br>garylee@NOSPAM.ecosine.com.tw</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Croatian</TD>
<TD>Boris Bralo</TD>
<TD>boris.bralo@NOSPAM.zg.tel.hr</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Czech</TD>
<TD>Petr P&#x0159;ikryl</TD>
<TD>prikrylp@NOSPAM.skil.cz</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Danish</TD>
<TD>Erik S&oslash;e S&oslash;rensen</TD>
<TD>erik@NOSPAM.mail.nu</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Dutch</TD>
<TD>Dimitri van Heesch</TD>
<TD>dimitri@NOSPAM.stack.nl</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>English</TD>
<TD>Dimitri van Heesch</TD>
<TD>dimitri@NOSPAM.stack.nl</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Finnish</TD>
<TD>Olli Korhonen</TD>
<TD>Olli.Korhonen@NOSPAM.ccc.fi</TD>
<TD>obsolete</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>French</TD>
<TD>Xavier Outhier</TD>
<TD>xouthier@NOSPAM.yahoo.fr</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>German</TD>
<TD>Jens Seidel</TD>
<TD>jensseidel@NOSPAM.users.sf.net</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Greek</TD>
<TD>Harry Kalogirou</TD>
<TD>harkal@NOSPAM.rainbow.cs.unipi.gr</TD>
<TD>1.2.11</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Hungarian</TD>
<TD>F&ouml;ldv&aacute;ri Gy&ouml;rgy<br>&Aacute;kos Kiss</TD>
<TD>foldvari@NOSPAM.diatronltd.com<br>akiss@NOSPAM.users.sourceforge.net</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Italian</TD>
<TD>Alessandro Falappa<br>Ahmed Aldo Faisal</TD>
<TD>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Japanese</TD>
<TD>Ryunosuke Satoh<br>Kenji Nagamatsu</TD>
<TD>sun594@NOSPAM.hotmail.com<br>naga@NOSPAM.joyful.club.ne.jp</TD>
<TD>1.3.3</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>JapaneseEn</TD>
<TD>unknown</TD>
<TD>unknown</TD>
<TD>obsolete</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Korean</TD>
<TD>Richard Kim</TD>
<TD>ryk@NOSPAM.dspwiz.com</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>KoreanEn</TD>
<TD>unknown</TD>
<TD>unknown</TD>
<TD>obsolete</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Norwegian</TD>
<TD>Lars Erik Jordet</TD>
<TD>lej@NOSPAM.circuitry.no</TD>
<TD>1.2.2</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Polish</TD>
<TD>Piotr Kaminski<br>Grzegorz Kowal</TD>
<TD>Piotr.Kaminski@NOSPAM.ctm.gdynia.pl<br>g_kowal@NOSPAM.poczta.onet.pl</TD>
<TD>1.3</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Portuguese</TD>
<TD>Rui Godinho Lopes</TD>
<TD>ruiglopes@NOSPAM.yahoo.com</TD>
<TD>1.3.3</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Romanian</TD>
<TD>Alexandru Iosup</TD>
<TD>aiosup@NOSPAM.yahoo.com</TD>
<TD>1.2.16</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Russian</TD>
<TD>Alexandr Chelpanov</TD>
<TD>cav@NOSPAM.cryptopro.ru</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Serbian</TD>
<TD>Dejan Milosavljevic</TD>
<TD>dmilos@NOSPAM.email.com</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Slovak</TD>
<TD>Stanislav Kudl&aacute;&#x010d;</TD>
<TD>skudlac@NOSPAM.pobox.sk</TD>
<TD>1.2.18</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Slovene</TD>
<TD>Matjaz Ostroversnik</TD>
<TD>matjaz.ostroversnik@NOSPAM.zrs-tk.si</TD>
<TD>1.2.16</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Spanish</TD>
<TD>Francisco Oltra Thennet</TD>
<TD>foltra@NOSPAM.puc.cl</TD>
<TD>1.3.3</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Swedish</TD>
<TD>Mikael Hallin</TD>
<TD>mikaelhallin@NOSPAM.yahoo.se</TD>
<TD>1.3.3</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Ukrainian</TD>
<TD>Olexij Tkatchenko</TD>
<TD>olexij.tkatchenko@NOSPAM.gmx.de</TD>
<TD>1.2.11</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<table align=center cellspacing=0 cellpadding=0 border=0>
<tr bgcolor="#000000">
<td>
<table cellspacing=1 cellpadding=2 border=0>
<tr bgcolor="#4040c0">
<td ><b><font size=+1 color="#ffffff"> Language </font></b></td>
<td ><b><font size=+1 color="#ffffff"> Maintainer </font></b></td>
<td ><b><font size=+1 color="#ffffff"> Contact address </font>
<font size=-2 color="#ffffff">(remove the NOSPAM.)</font></b></td>
<td ><b><font size=+1 color="#ffffff"> Status </font></b></td>
</tr>
<!-- table content begin -->
<tr bgcolor="#ffffff">
<td>Brazilian Portuguese</td>
<td>Fabio "FJTC" Jun Takada Chino</td>
<td>chino@NOSPAM.icmc.sc.usp.br</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Catalan</td>
<td>Albert Mora</td>
<td>amora@NOSPAM.iua.upf.es</td>
<td>1.2.17</td>
</tr>
<tr bgcolor="#ffffff">
<td>Chinese</td>
<td>Wei Liu<br>Wang Weihan</td>
<td>liuwei@NOSPAM.asiainfo.com<br>wangweihan@NOSPAM.capinfo.com.cn</td>
<td>1.2.13</td>
</tr>
<tr bgcolor="#ffffff">
<td>Chinese Traditional</td>
<td>Daniel YC Lin<br>Gary Lee</td>
<td>daniel@NOSPAM.twpda.com<br>garylee@NOSPAM.ecosine.com.tw</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Croatian</td>
<td>Boris Bralo</td>
<td>boris.bralo@NOSPAM.zg.tel.hr</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Czech</td>
<td>Petr P&#x0159;ikryl</td>
<td>prikrylp@NOSPAM.skil.cz</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Danish</td>
<td>Erik S&oslash;e S&oslash;rensen</td>
<td>erik@NOSPAM.mail.nu</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Dutch</td>
<td>Dimitri van Heesch</td>
<td>dimitri@NOSPAM.stack.nl</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>English</td>
<td>Dimitri van Heesch</td>
<td>dimitri@NOSPAM.stack.nl</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Finnish</td>
<td>Olli Korhonen</td>
<td>Olli.Korhonen@NOSPAM.ccc.fi</td>
<td>obsolete</td>
</tr>
<tr bgcolor="#ffffff">
<td>French</td>
<td>Xavier Outhier</td>
<td>xouthier@NOSPAM.yahoo.fr</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>German</td>
<td>Jens Seidel</td>
<td>jensseidel@NOSPAM.users.sf.net</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Greek</td>
<td>Harry Kalogirou</td>
<td>harkal@NOSPAM.rainbow.cs.unipi.gr</td>
<td>1.2.11</td>
</tr>
<tr bgcolor="#ffffff">
<td>Hungarian</td>
<td>F&ouml;ldv&aacute;ri Gy&ouml;rgy<br>&Aacute;kos Kiss</td>
<td>foldvari@NOSPAM.diatronltd.com<br>akiss@NOSPAM.users.sourceforge.net</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Italian</td>
<td>Alessandro Falappa<br>Ahmed Aldo Faisal</td>
<td>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Japanese</td>
<td>Ryunosuke Satoh<br>Kenji Nagamatsu</td>
<td>sun594@NOSPAM.hotmail.com<br>naga@NOSPAM.joyful.club.ne.jp</td>
<td>1.3.3</td>
</tr>
<tr bgcolor="#ffffff">
<td>JapaneseEn</td>
<td>see the Japanese language</td>
<td>&nbsp;</td>
<td>English based</td>
</tr>
<tr bgcolor="#ffffff">
<td>Korean</td>
<td>Richard Kim</td>
<td>ryk@NOSPAM.dspwiz.com</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>KoreanEn</td>
<td>see the Korean language</td>
<td>&nbsp;</td>
<td>English based</td>
</tr>
<tr bgcolor="#ffffff">
<td>Norwegian</td>
<td>Lars Erik Jordet</td>
<td>lej@NOSPAM.circuitry.no</td>
<td>1.2.2</td>
</tr>
<tr bgcolor="#ffffff">
<td>Polish</td>
<td>Piotr Kaminski<br>Grzegorz Kowal</td>
<td>Piotr.Kaminski@NOSPAM.ctm.gdynia.pl<br>g_kowal@NOSPAM.poczta.onet.pl</td>
<td>1.3</td>
</tr>
<tr bgcolor="#ffffff">
<td>Portuguese</td>
<td>Rui Godinho Lopes</td>
<td>ruiglopes@NOSPAM.yahoo.com</td>
<td>1.3.3</td>
</tr>
<tr bgcolor="#ffffff">
<td>Romanian</td>
<td>Alexandru Iosup</td>
<td>aiosup@NOSPAM.yahoo.com</td>
<td>1.2.16</td>
</tr>
<tr bgcolor="#ffffff">
<td>Russian</td>
<td>Alexandr Chelpanov</td>
<td>cav@NOSPAM.cryptopro.ru</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Serbian</td>
<td>Dejan Milosavljevic</td>
<td>dmilos@NOSPAM.email.com</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Slovak</td>
<td>Stanislav Kudl&aacute;&#x010d;</td>
<td>skudlac@NOSPAM.pobox.sk</td>
<td>1.2.18</td>
</tr>
<tr bgcolor="#ffffff">
<td>Slovene</td>
<td>Matjaz Ostroversnik</td>
<td>matjaz.ostroversnik@NOSPAM.zrs-tk.si</td>
<td>1.2.16</td>
</tr>
<tr bgcolor="#ffffff">
<td>Spanish</td>
<td>Francisco Oltra Thennet</td>
<td>foltra@NOSPAM.puc.cl</td>
<td>up-to-date</td>
</tr>
<tr bgcolor="#ffffff">
<td>Swedish</td>
<td>Mikael Hallin</td>
<td>mikaelhallin@NOSPAM.yahoo.se</td>
<td>1.3.3</td>
</tr>
<tr bgcolor="#ffffff">
<td>Ukrainian</td>
<td>Olexij Tkatchenko</td>
<td>olexij.tkatchenko@NOSPAM.gmx.de</td>
<td>1.2.11</td>
</tr>
<!-- table content end -->
</table>
</td>
</tr>
</table>
\endhtmlonly
\latexonly
\begin{tabular}{|l|l|l|l|}
\hline
{\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
\hline
\hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & up-to-date \\
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny chino@icmc.sc.usp.br} & up-to-date \\
\hline
Catalan & Albert Mora & {\tt amora@iua.upf.es} & 1.2.17 \\
Catalan & Albert Mora & {\tt\tiny amora@iua.upf.es} & 1.2.17 \\
\hline
Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & 1.2.13 \\
& Wang Weihan & {\tt wangweihan@capinfo.com.cn} & \\
Chinese & Wei Liu & {\tt\tiny liuwei@asiainfo.com} & 1.2.13 \\
~ & Wang Weihan & {\tt\tiny wangweihan@capinfo.com.cn} & ~ \\
\hline
Chinese Traditional & Daniel YC Lin & {\tt daniel@twpda.com} & up-to-date \\
& Gary Lee & {\tt garylee@ecosine.com.tw} & \\
Chinese Traditional & Daniel YC Lin & {\tt\tiny daniel@twpda.com} & up-to-date \\
~ & Gary Lee & {\tt\tiny garylee@ecosine.com.tw} & ~ \\
\hline
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\
Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.tel.hr} & up-to-date \\
\hline
Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\
Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & up-to-date \\
\hline
Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & up-to-date \\
Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny erik@mail.nu} & up-to-date \\
\hline
Dutch & Dimitri van Heesch & {\tt dimitri@stack.nl} & up-to-date \\
Dutch & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & up-to-date \\
\hline
English & Dimitri van Heesch & {\tt dimitri@stack.nl} & up-to-date \\
English & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & up-to-date \\
\hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\
Finnish & Olli Korhonen & {\tt\tiny Olli.Korhonen@ccc.fi} & obsolete \\
\hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
French & Xavier Outhier & {\tt\tiny xouthier@yahoo.fr} & up-to-date \\
\hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\
German & Jens Seidel & {\tt\tiny jensseidel@users.sf.net} & up-to-date \\
\hline
Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\
Greek & Harry Kalogirou & {\tt\tiny harkal@rainbow.cs.unipi.gr} & 1.2.11 \\
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & up-to-date \\
& \'{A}kos Kiss & {\tt akiss@users.sourceforge.net} & \\
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny foldvari@diatronltd.com} & up-to-date \\
~ & \'{A}kos Kiss & {\tt\tiny akiss@users.sourceforge.net} & ~ \\
\hline
Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & up-to-date \\
& Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\
Italian & Alessandro Falappa & {\tt\tiny alessandro@falappa.net} & up-to-date \\
~ & Ahmed Aldo Faisal & {\tt\tiny aaf23@cam.ac.uk} & ~ \\
\hline
Japanese & Ryunosuke Satoh & {\tt sun594@hotmail.com} & 1.3.3 \\
& Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & \\
Japanese & Ryunosuke Satoh & {\tt\tiny sun594@hotmail.com} & 1.3.3 \\
~ & Kenji Nagamatsu & {\tt\tiny naga@joyful.club.ne.jp} & ~ \\
\hline
JapaneseEn & unknown & {\tt unknown} & obsolete \\
JapaneseEn & see the Japanese language & {\tt\tiny ~} & English based \\
\hline
Korean & Richard Kim & {\tt ryk@dspwiz.com} & up-to-date \\
Korean & Richard Kim & {\tt\tiny ryk@dspwiz.com} & up-to-date \\
\hline
KoreanEn & unknown & {\tt unknown} & obsolete \\
KoreanEn & see the Korean language & {\tt\tiny ~} & English based \\
\hline
Norwegian & Lars Erik Jordet & {\tt lej@circuitry.no} & 1.2.2 \\
Norwegian & Lars Erik Jordet & {\tt\tiny lej@circuitry.no} & 1.2.2 \\
\hline
Polish & Piotr Kaminski & {\tt Piotr.Kaminski@ctm.gdynia.pl} & 1.3 \\
& Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & \\
Polish & Piotr Kaminski & {\tt\tiny Piotr.Kaminski@ctm.gdynia.pl} & 1.3 \\
~ & Grzegorz Kowal & {\tt\tiny g\_kowal@poczta.onet.pl} & ~ \\
\hline
Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.3.3 \\
Portuguese & Rui Godinho Lopes & {\tt\tiny ruiglopes@yahoo.com} & 1.3.3 \\
\hline
Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.16 \\
Romanian & Alexandru Iosup & {\tt\tiny aiosup@yahoo.com} & 1.2.16 \\
\hline
Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} & up-to-date \\
Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & up-to-date \\
\hline
Serbian & Dejan Milosavljevic & {\tt dmilos@email.com} & up-to-date \\
Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & up-to-date \\
\hline
Slovak & Stanislav Kudl\'{a}\v{c} & {\tt skudlac@pobox.sk} & 1.2.18 \\
Slovak & Stanislav Kudl\'{a}\v{c} & {\tt\tiny skudlac@pobox.sk} & 1.2.18 \\
\hline
Slovene & Matjaz Ostroversnik & {\tt matjaz.ostroversnik@zrs-tk.si} & 1.2.16 \\
Slovene & Matjaz Ostroversnik & {\tt\tiny matjaz.ostroversnik@zrs-tk.si} & 1.2.16 \\
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.3.3 \\
Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & up-to-date \\
\hline
Swedish & Mikael Hallin & {\tt mikaelhallin@yahoo.se} & 1.3.3 \\
Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.3.3 \\
\hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & 1.2.11 \\
Ukrainian & Olexij Tkatchenko & {\tt\tiny olexij.tkatchenko@gmx.de} & 1.2.11 \\
\hline
\end{tabular}
\endlatexonly
......@@ -322,7 +325,7 @@ please read the next section.
<h3>Adding a new language to doxygen</h3>
This short HOWTO explains how to add support for a new language to Doxygen:
This short HOWTO explains how to add support for the new language to Doxygen:
Just follow these steps:
<ol>
......@@ -351,7 +354,7 @@ Just follow these steps:
\endverbatim
Remember to use the same symbol LANG_xx that you added to \c lang_cfg.h.
I.e., the \c xx should be capital letters that identify your language.
On the other hand, the \c xx inside your \c translator_xx.h should be
On the other hand, the \c xx inside your \c translator_xx.h should use
lower case.
<p>Now, in <code>setTranslator()</code> add
\verbatim
......@@ -526,19 +529,19 @@ maintainers should try to reach the state with the minimal number of
translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl
for the supported languages, the \c translator.py Python
script was developed (located in \c doxygen/doc directory).
It extracts the important information about obsolete and
new methods from the source files for each of the languages.
The information is stored in the <em>translator report</em> ASCII file
(<code>doxygen/doc/translator_report.txt</code>). \htmlonly If you compiled this documentation
(translator_report.txt). \htmlonly If you compiled this documentation
from sources and if you have also doxygen sources available the
link <a href="../doc/translator_report.txt">
<code>doxygen/doc/translator_report.txt</code></a> should be valid.\endhtmlonly
link <a href="../doc/translator_report.txt"
><code>doxygen/doc/translator_report.txt</code></a> should be valid.\endhtmlonly
Looking at the base class of the language translator, the script
guesses also the status of the translator -- see the last column of
the table with languages above. The \c translator.pl is called
the table with languages above. The \c translator.py is called
automatically when the doxygen documentation is generated. You can
also run the script manualy whenever you feel that it can help you.
Of course, you are not forced to use the results of the script. You
......@@ -573,49 +576,48 @@ implement anything else than the methods required by the Translator
class (i.e. the pure virtual methods of the \c Translator -- they
end with <code>=0;</code>).
If everything compiles fine, try to run \c translator.pl, and have a
If everything compiles fine, try to run \c translator.py, and have a
look at the translator report (ASCII file) at the \c doxygen/doc
directory. Even if your translator is marked as up-to-date, there
still may be some remarks related to your souce code. Namely, the
directory. Even if your translator is marked as up-to-date, there
still may be some remarks related to your souce code. Namely, the
obsolete methods--that are not used at all--may be listed in the
section for your language. Simply, remove their code (and run the
\c translator.pl again).
section for your language. Simply, remove their code (and run the \c
translator.py again). Also, you will be informed when you forgot to
change the base class of your translator class to some newer adapter
class or directly to the Translator class.
<b>If you do not have time to finish all the updates</b> you should
still start with <em>the most radical approach</em> as described
above. You can always change the base class to the translator
adapter class that implements all of the not-yet-implemented methods.
<b>If you prefer to update your translator gradually</b>, look
at the <em>translator report</em> generated by the \c translator.pl script
and choose one of the missing method that is implemented by the
translator adapter, that is used as your base class. When there is
not such a method in your translator adapter base class, you probably
can change the translator adapter base to the newer one.
Probably the easiest approach of the gradual update is to look at
the translator report to the part where the list of the implemented
translator adapters is shown. Then:
- Look how many required methods each adapter implements and guess
how many methods you are willing to update (to spend the time
with).
- Choose the related oldest translator adapters to be removed (i.e.
not used by your translator).
- Change the base class of your translator class to the translator
adapter that you want to use.
- Implement the methods that were implemented by the older translator
adapters.
Notice: Do not blindly implement all methods that are implemented by
your translator adapter base class. The reason is that the adapter
classes implement also obsolete methods. Another reason is that
some of the methods could become obsolete from some newer adapter
on. Focus on the methods listed as \e required.
<b>The really obsolete language translators</b> may lead to too much
complicated adapters. Because of that, doxygen developers may decide
to derive such translators from the \c TranslatorEnglish class, which
is by definition always up-to-date.
<b>If you prefer to update your translator gradually</b>, have a look
at \c TranslatorEnglish (the \c translator_en.h file). Inside, you
will find the comments like <code>new since 1.2.4</code> that separate
always a number of methods that were implemented in the stated
version. Do implement the group of methods that are placed below the
comment that uses the same version numbers as your translator adapter
class. (For example, your translator class have to use the \c
TranslatorAdapter_1_2_4, if it does not implement the methods below
the comment <code>new since 1.2.4</code>. When you implement them,
your class should use newer translator adapter.
Run the \c translator.py script occasionaly and give it your \c xx
identification (from \c translator_xx.h) to create the translator
report shorter (also produced faster) -- it will contain only the
information related to your translator. Once you reach the state when
the base class should be changed to some newer adapter, you will see
the note in the translator report.
Warning: Don't forget to compile Doxygen to discover, whether it is
compilable. The \c translator.py does not check if everything is
correct with respect to the compiler. Because of that, it may lie
sometimes about the necessary base class.
<b>The most obsolete language translators</b> would lead to
implementation of too complicated adapters. Because of that, doxygen
developers may decide to derive such translators from the \c
TranslatorEnglish class, which is by definition always up-to-date.
When doing so, all the missing methods will be replaced by the
English translation. This means that not-implemented methods will
......
ATTENTION! This is the template for generating language.doc. If you want to
change the language.doc, make the changes here and inside maintainers.txt.
/******************************************************************************
* <notice>This is the template for generating language.doc.
* Edit manually this file, not the language.doc!</notice>
*
* %(editnote)s
*
* Copyright (C) 1997-2004 by Dimitri van Heesch.
*
......@@ -14,25 +16,27 @@
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
* $Id$
*/
/*! \page langhowto Internationalization
<h3>Support for multiple languages</h3>
Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Doxygen has built-in support for multiple languages. This means that the
text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile).
Currently (version $version), $numlang languages
are supported (sorted alphabetically):
$languages.
Currently (version %(doxVersion)s), %(numLangStr)s languages
are supported (sorted alphabetically):
%(supportedLangReadableStr)s.
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
was generated from sources and shows approximately the last version
when the translator was updated.
$information_table
%(informationTable)s
Most people on the list have indicated that they were also busy
doing other things, so if you want to help to speed things up please
......@@ -44,7 +48,7 @@ please read the next section.
<h3>Adding a new language to doxygen</h3>
This short HOWTO explains how to add support for a new language to Doxygen:
This short HOWTO explains how to add support for the new language to Doxygen:
Just follow these steps:
<ol>
......@@ -73,7 +77,7 @@ Just follow these steps:
\endverbatim
Remember to use the same symbol LANG_xx that you added to \c lang_cfg.h.
I.e., the \c xx should be capital letters that identify your language.
On the other hand, the \c xx inside your \c translator_xx.h should be
On the other hand, the \c xx inside your \c translator_xx.h should use
lower case.
<p>Now, in <code>setTranslator()</code> add
\verbatim
......@@ -248,18 +252,18 @@ maintainers should try to reach the state with the minimal number of
translator adapter classes.
<b>To simplify the maintenance of the language translator classes</b>
for the supported languages, the \c translator.pl perl
for the supported languages, the \c translator.py Python
script was developed (located in \c doxygen/doc directory).
It extracts the important information about obsolete and
new methods from the source files for each of the languages.
The information is stored in the <em>translator report</em> ASCII file
($translator_report_file_name). \htmlonly If you compiled this documentation
(%(translatorReportFileName)s). \htmlonly If you compiled this documentation
from sources and if you have also doxygen sources available the
link $translator_report_link should be valid.\endhtmlonly
link %(translatorReportLink)s should be valid.\endhtmlonly
Looking at the base class of the language translator, the script
guesses also the status of the translator -- see the last column of
the table with languages above. The \c translator.pl is called
the table with languages above. The \c translator.py is called
automatically when the doxygen documentation is generated. You can
also run the script manualy whenever you feel that it can help you.
Of course, you are not forced to use the results of the script. You
......@@ -294,49 +298,48 @@ implement anything else than the methods required by the Translator
class (i.e. the pure virtual methods of the \c Translator -- they
end with <code>=0;</code>).
If everything compiles fine, try to run \c translator.pl, and have a
If everything compiles fine, try to run \c translator.py, and have a
look at the translator report (ASCII file) at the \c doxygen/doc
directory. Even if your translator is marked as up-to-date, there
still may be some remarks related to your souce code. Namely, the
directory. Even if your translator is marked as up-to-date, there
still may be some remarks related to your souce code. Namely, the
obsolete methods--that are not used at all--may be listed in the
section for your language. Simply, remove their code (and run the
\c translator.pl again).
section for your language. Simply, remove their code (and run the \c
translator.py again). Also, you will be informed when you forgot to
change the base class of your translator class to some newer adapter
class or directly to the Translator class.
<b>If you do not have time to finish all the updates</b> you should
still start with <em>the most radical approach</em> as described
above. You can always change the base class to the translator
adapter class that implements all of the not-yet-implemented methods.
<b>If you prefer to update your translator gradually</b>, look
at the <em>translator report</em> generated by the \c translator.pl script
and choose one of the missing method that is implemented by the
translator adapter, that is used as your base class. When there is
not such a method in your translator adapter base class, you probably
can change the translator adapter base to the newer one.
Probably the easiest approach of the gradual update is to look at
the translator report to the part where the list of the implemented
translator adapters is shown. Then:
- Look how many required methods each adapter implements and guess
how many methods you are willing to update (to spend the time
with).
- Choose the related oldest translator adapters to be removed (i.e.
not used by your translator).
- Change the base class of your translator class to the translator
adapter that you want to use.
- Implement the methods that were implemented by the older translator
adapters.
Notice: Do not blindly implement all methods that are implemented by
your translator adapter base class. The reason is that the adapter
classes implement also obsolete methods. Another reason is that
some of the methods could become obsolete from some newer adapter
on. Focus on the methods listed as \e required.
<b>The really obsolete language translators</b> may lead to too much
complicated adapters. Because of that, doxygen developers may decide
to derive such translators from the \c TranslatorEnglish class, which
is by definition always up-to-date.
<b>If you prefer to update your translator gradually</b>, have a look
at \c TranslatorEnglish (the \c translator_en.h file). Inside, you
will find the comments like <code>new since 1.2.4</code> that separate
always a number of methods that were implemented in the stated
version. Do implement the group of methods that are placed below the
comment that uses the same version numbers as your translator adapter
class. (For example, your translator class have to use the \c
TranslatorAdapter_1_2_4, if it does not implement the methods below
the comment <code>new since 1.2.4</code>. When you implement them,
your class should use newer translator adapter.
Run the \c translator.py script occasionaly and give it your \c xx
identification (from \c translator_xx.h) to create the translator
report shorter (also produced faster) -- it will contain only the
information related to your translator. Once you reach the state when
the base class should be changed to some newer adapter, you will see
the note in the translator report.
Warning: Don't forget to compile Doxygen to discover, whether it is
compilable. The \c translator.py does not check if everything is
correct with respect to the compiler. Because of that, it may lie
sometimes about the necessary base class.
<b>The most obsolete language translators</b> would lead to
implementation of too complicated adapters. Because of that, doxygen
developers may decide to derive such translators from the \c
TranslatorEnglish class, which is by definition always up-to-date.
When doing so, all the missing methods will be replaced by the
English translation. This means that not-implemented methods will
......
% $Id$
%
% Comments start with % sign at the beginning.
% XML entities like &auml; are used for special characters.
% There is one record for each language. The records are separated
% by the empty line and they do not contain empty lines.
% First line of the record identifies the language.
% First line of the record identifies the translator class for the language.
% The following one or more lines contain information about
% the maintainer(s) for the language (one line, one maintainer)
% in the form: <readable name><colon><e-mail>
Brazilian
TranslatorBrazilian
Fabio "FJTC" Jun Takada Chino: chino@icmc.sc.usp.br
Catalan
TranslatorCatalan
Albert Mora: amora@iua.upf.es
Chinese
TranslatorChinese
Wei Liu: liuwei@asiainfo.com
Wang Weihan: wangweihan@capinfo.com.cn
ChineseTraditional
TranslatorChinesetraditional
Daniel YC Lin: daniel@twpda.com
Gary Lee: garylee@ecosine.com.tw
Croatian
TranslatorCroatian
Boris Bralo: boris.bralo@zg.tel.hr
Czech
TranslatorCzech
Petr P&rcaron;ikryl: prikrylp@skil.cz
Danish
TranslatorDanish
Erik S&oslash;e S&oslash;rensen: erik@mail.nu
Dutch
TranslatorDutch
Dimitri van Heesch: dimitri@stack.nl
English
TranslatorEnglish
Dimitri van Heesch: dimitri@stack.nl
Finnish
TranslatorFinnish
Olli Korhonen: Olli.Korhonen@ccc.fi
French
TranslatorFrench
Xavier Outhier: xouthier@yahoo.fr
German
TranslatorGerman
Jens Seidel: jensseidel@users.sf.net
Greek
TranslatorGreek
Harry Kalogirou: harkal@rainbow.cs.unipi.gr
Hungarian
TranslatorHungarian
F&ouml;ldv&aacute;ri Gy&ouml;rgy: foldvari@diatronltd.com
&Aacute;kos Kiss: akiss@users.sourceforge.net
Italian
TranslatorItalian
Alessandro Falappa: alessandro@falappa.net
Ahmed Aldo Faisal: aaf23@cam.ac.uk
Japanese
TranslatorJapanese
Ryunosuke Satoh: sun594@hotmail.com
Kenji Nagamatsu: naga@joyful.club.ne.jp
Korean
TranslatorKorean
Richard Kim: ryk@dspwiz.com
Norwegian
TranslatorNorwegian
Lars Erik Jordet: lej@circuitry.no
Polish
TranslatorPolish
Piotr Kaminski: Piotr.Kaminski@ctm.gdynia.pl
Grzegorz Kowal: g_kowal@poczta.onet.pl
Portuguese
TranslatorPortuguese
Rui Godinho Lopes: ruiglopes@yahoo.com
Romanian
TranslatorRomanian
Alexandru Iosup: aiosup@yahoo.com
Russian
TranslatorRussian
Alexandr Chelpanov: cav@cryptopro.ru
Serbian
TranslatorSerbian
Dejan Milosavljevic: dmilos@email.com
Slovak
TranslatorSlovak
Stanislav Kudl&aacute;&ccaron;: skudlac@pobox.sk
Slovene
TranslatorSlovene
Matjaz Ostroversnik: matjaz.ostroversnik@zrs-tk.si
Spanish
TranslatorSpanish
Francisco Oltra Thennet: foltra@puc.cl
Swedish
TranslatorSwedish
Mikael Hallin: mikaelhallin@yahoo.se
Ukrainian
TranslatorUkrainian
Olexij Tkatchenko: olexij.tkatchenko@gmx.de
@call perl -w translator.pl
#! /usr/bin/perl -w
# -*- mode: perl; mode: fold -*-
# This is a Perl script for Doxygen developers.
# Its main purpose is to extract the information from sources
# related to internationalization (the translator classes).
# It uses the information to generate documentation (language.doc,
# translator_report.txt) from templates (language.tpl, maintainers.txt).
#
# Petr Prikryl (prikrylp@skil.cz)
# History:
# --------
# 2001/04/27
# - First version of the script.
#
# 2001/05/02
# - Update to accept updateNeededMessage() in the Translator class.
# - First version that generates doc/language.doc.
#
# 2001/05/07
# - Environment variable $doxygenrootdir now points to the
# Doxygen's root directory.
#
# 2001/05/11
# - Updated to reflect using TranslatorAdapterCVS as the base
# class for "almost up-to-date" translators.
# - $doxygenrootdir and other global variables for storing
# directories determined from DOXYGEN_DOCDIR environment
# variable. The change was done because the DOXYGEN_DOCDIR
# was already used before.
# - $version mark can be used in the language.tpl template.
#
# 2001/05/18
# - Character entity &oslash; recognized in maintainers.txt.
#
# 2001/06/06
# - Implementation of the methods recognized even when the
# argument list does not contain argument identifiers
# (i.e., when it contains type information only).
#
# 2001/06/11
# - Character entity &ccaron; recognized in maintainers.txt.
#
# 2001/07/17
# - Perl version checking is less confusing now. The script stops
# immediately after the first command below when your perl
# is older that required.
# - The information below the table of languages is not produced
# with the table. Another symbol replacement is done, so language.tpl
# can be updated so that the generated language.doc does not contain
# the link to the translator_report.txt.
#
# 2001/08/20
# - StripArgIdentifiers() enhanced to be more robust in producing
# equal prototypes from the base class and from the derived
# classes (if they should be considered equal).
#
# 2001/08/28
# - "see details" added to the up-to-date translator list
# (in translator report) to translators for which some details
# are listed below in the report. This is usually the case
# when the up-to-date translator still implements a obsolete
# method that will never be called (i.e. the code should be removed).
#
# 2001/09/10
# - The script now always exits with 0. If the sources are not
# found, translator report is not generated. If the $flangdoc
# is not also found and no sources are available, the simplified
# result with remarks inside is generated from the template.
# The consequences, translator.pl should never break the "make",
# and the language.doc should always be present after running
# this script -- no problem should occur when generating doxygen
# documentation.
#
# 2001/09/11
# - Minor (say cosmetic) enhancement. The code for generating
# the simplified language.doc from the template was moved to
# the separate function CopyTemplateToLanguageDoc().
#
# 2001/10/17
# - Minor update of GetInfoFrom() to ignore spaces between the
# method identifier and the opening parenthesis to match better
# the method prototype with the one in the translator.h.
#
# 2001/11/06
# - TranslatorAdapterCVS is not used any more. There is nothing
# like "almost up-to-date" any more. The script was simplified
# to reflect the changes.
#
# 2001/11/26
# - Information about version of doxygen added to the top
# of the translator report (the ASCII file).
# - TranslatorEnglish can be used to solve really obsolete translators
# to make adapter classes simpler. Such translators are marked
# as "obsolete" in the status (i.e. no guessing when it was last updated).
# The translator report include the notice about that situation.
#
# 2002/01/03
# - Minor correction of regexp to obtain the list of translator_xx.h files.
# - Translator report ASCII file now lists the implemented translator
# adapter classes; so you can check how many steps behind the up-to-date
# status your translator is.
#
# 2002/01/07
# - The list of the implemented translator-adapter classes now shows
# how many and what required methods the translator adapter implements.
#
# 2002/01/08
# - The mistake in comments inside the translator report corrected.
# The older translator adapters are derived from newer ones.
# The mistaken comment said the opposite.
#
# 2002/01/23
# - The nasty bug corrected. GetAdapterClassesInfo() did not
# strip trailing blanks from the method prototype; consequently,
# the required methods implemented by a translator adapter was
# not recognized as the required one (i.e. not listed).
# - Some defined() operators used on hash elements were replaced
# by exists() operators where appropriate.
#
# 2002/05/21
# - Changes to display languages with two words more naturally
# (like "Chinese Traditional" instead of "Chinesetraditional"
# or "Brazilian Portuguese" instead of "Brazilian").
#
# ATTENTION! Development of this script is stopped. Only the errors
# are going to be fixed. Look for the translator.py as the replacement.
#
# 2003/12/18
# - Fixed the bug for maintainers with name starting with special
# character (like &Aacute;).
# - The &Aacute; translation to LaTeX.
#
################################################################
use 5.005;
use strict;
use Carp;
# Global variables
#
my $doxygenrootdir = 'directory set at the beginning of the body';
my $srcdir = 'directory set at the beginning of the body';
my $docdir = 'directory set at the beginning of the body';
my $doxversion = 'set at the beginning of the body';
# Names of the output files.
#
my $ftranslatortxt = "translator_report.txt";
my $flangdoc = "language.doc";
# Names of the template files and other intput files.
#
my $flangtpl = "language.tpl"; # template for language.doc
my $fmaintainers = "maintainers.txt"; # database of local lang. maintainers
################################################################
# GetPureVirtual returns the list of pure virtual method prototypes
# as separate strings (one prototype, one line, one list item).
# The input argument is the full name of the source file.
#
sub GetPureVirtualFrom ##{{{
{
my $fin = shift; # Get the file name.
# Let's open the file and read it into a single string.
#
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
my $cont = join("", @content);
# Remove comments and empty lines.
#
$cont =~ s{\s*//.*$}{}mg; # remove one-line comments
while ($cont =~ s{/\*.+?\*/}{}sg ) {} # remove C comments
$cont =~ s{\n\s*\n}{\n}sg; # remove empty lines
# Remove the beginning up to the first virtual method.
# Remove also the text behind the class.
#
$cont =~ s/^.*?virtual/virtual/s;
$cont =~ s/\n\};.*$//s;
# Erase anything between "=0;" and "virtual". Only the pure
# virtual methods will remain. Remove also the text behind
# the last "= 0;"
#
$cont =~ s{(=\s*0\s*;).*?(virtual)}{$1 $2}sg;
$cont =~ s{^(.+=\s*0\s*;).*?$}{$1}s;
# Remove the empty implementation of the updateNeededMessage()
# method which is to be implemented by adapters only, not by
# translators.
#
$cont =~ s{\s*virtual
\s+QCString
\s+updateNeededMessage\(\)
\s+\{\s*return\s+"";\s*\}
}
{}xs;
# Replace all consequent white spaces (including \n) by a single
# space. Trim also the leading and the trailing space.
#
$cont =~ s{\s+}{ }sg;
$cont =~ s{^\s+}{}s;
$cont =~ s{\s+$}{}s;
# Split the result to the lines again. Remove the "= 0;".
#
$cont =~ s{\s*=\s*0\s*;\s*}{\n}sg;
# Remove the keyword "virtual" because the derived classes
# may not use it.
#
$cont =~ s{^virtual\s+}{}mg;
# Split the string into array of lines and return it as
# the output list.
#
return split(/\n/, $cont);
}
##}}}
################################################################
# StripArgIdentifiers takes a method prototype (one line string),
# removes the argument identifiers, and returns only the necessary
# form of the prototype as the function result.
#
sub StripArgIdentifiers ##{{{
{
my $prototype = shift; # Get the prototype string.
# Extract the list of arguments from the prototype.
#
$prototype =~ s{^(.+\()(.*)(\).*)$}{$1#ARGS#$3};
my $a = (defined $2) ? $2 : '';
# Split the list of arguments.
#
my @a = split(/,/, $a);
# Strip each of the arguments.
#
my @stripped = ();
foreach my $arg (@a) {
# Only the type of the identifier is important...
#
$arg =~ s{^(\s* # there can be spaces behind comma,
(const\s+)? # possibly const at the beginning
[A-Za-z0-9_:]+ # type identifier can be qualified
(\s*[*&])? # could be reference or pointer
) # ... the above is important,
.*$ # the rest contains the identifier
}
{$1}x; # remember only the important things
# People may differ in opinion whether a space should
# or should not be written between a type identifier and
# the '*' or '&' (when the argument is a pointer or a reference).
#
$arg =~ s{\s*([*&])}{ $1};
# Whitespaces are not only spaces. Moreover, the difference
# may be in number of them in a sequence or in the type
# of a whitespace. This is the reason to replace each sequence
# of whitespaces by a single, real space.
#
$arg =~ s{\s+}{ }g;
# Remember the stripped form of the arguments
push(@stripped, $arg);
}
# Join the stripped arguments into one line again, and
# insert it back.
#
$a = join(',', @stripped);
$prototype =~ s{#ARGS#}{$a};
# Finally, return the stripped prototype.
#
return $prototype;
}
##}}}
################################################################
# GetInfoFrom returns the list of information related to the
# parsed source file. The input argument is the name of the
# translator_xx.h file including path.
#
# The output list contains the following items:
# - class identifier
# - base class identifier
# - method prototypes (each in a separate item)
#
sub GetInfoFrom ##{{{
{
# Get the file name.
#
my $fin = shift;
# Let's open the file and read it into a single string.
#
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
my $cont = join("", @content);
# Remove comments and empty lines.
#
$cont =~ s{\s*//.*$}{}mg; # remove one-line comments
$cont =~ s{/\*.+?\*/}{}sg; # remove C comments
$cont =~ s{\n\s*\n}{\n}sg; # remove empty lines
# Extract the class and base class identifiers. Remove the
# opening curly brace. Remove also the first "public:"
# Put the class and the base class into the output list.
#
$cont =~ s{^.*class\s+(Translator\w+)[^:]*:
\s*public\s+(\w+)\b.*?\{\s*
(public\s*:\s+)?
}
{}sx;
@content = ($1, $2);
# Cut the things after the class.
#
$cont =~ s{\}\s*;\s*#endif\s*$}{}s;
# Remove the "virtual" keyword, because some the derived class
# is not forced to use it.
#
$cont =~ s{^\s*virtual\s+}{}mg;
# Remove all strings from lines.
#
$cont =~ s{".*?"}{}mg;
# Remove all bodies of methods;
#
while ($cont =~ s/{[^{}]+?}//sg) {}
# Remove all private methods, i.e. from "private:" to "public:"
# included. Later, remove also all from "private:" to the end.
#
$cont =~ s{private\s*:.*?public\s*:}{}sg;
$cont =~ s{private\s*:.*$}{}s;
# Some of the translators use conditional compilation where
# the branches define the body of the method twice. Remove
# the ifdef/endif block content.
#
$cont =~ s{#ifdef.*?#endif}{}sg;
# Now the string should containt only method prototypes.
# Let's unify their format by removing all spaces that
# are not necessary. Then let's put all of them on separate
# lines (one protototype -- one line; no empty lines).
#
$cont =~ s{\s+}{ }sg;
$cont =~ s{^\s+}{}s;
$cont =~ s{\s+$}{}s;
$cont =~ s{\s+\(}{(}g;
$cont =~ s{\)\s*}{)\n}g;
# Split the string and add it to the ouptut list.
#
@content = (@content, split(/\n/, $cont));
return @content;
}
##}}}
################################################################
# GetAdapterClassesInfo returns the list of strings with information
# related to the adapter classes. Each one-line string contains the
# identifier of the adapter class and the number of required methods
# that are implemented by the adapter.
#
# The function takes one agument -- the reference to the hash with
# stripped prototypes of the required methods.
#
sub GetAdapterClassesInfo ##{{{
{
# Get the reference to the hash with required prototypes.
#
my $reqref = shift;
# Let's open the file with the translator adapter classes.
#
my $fin = "$srcdir/translator_adapter.h";
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
my $cont = join("", @content);
# Prepare the list that will be returned as result.
#
my @result = ();
# Remove the preprocessor directives.
#
$cont =~ s{^\s*#\w+.+$}{}mg;
# Remove comments and empty lines.
#
$cont =~ s{\s*//.*$}{}mg; # remove one-line comments
$cont =~ s{/\*.+?\*/}{}sg; # remove C comments
$cont =~ s{\n\s*\n}{\n}sg; # remove empty lines
# Place delimiters to separate the classes, and remove
# the TranslatorAdapterBase class.
#
$cont =~ s{\};\s*class\s+}{<class>}sg;
$cont =~ s{class\s+TranslatorAdapterBase\s+.+?<class>}{<class>}s;
$cont =~ s{\};}{}sg;
# Remove the base classes and the beginning of the the class
# definitions.
#
$cont =~ s{(TranslatorAdapter[_0-9]+)\s*:.+?\{\s*(public\s*:)?}{$1}sg;
# Remove all bodies of methods;
#
while ($cont =~ s/{[^{}]+?}//sg) {}
# Remove the "virtual" keywords.
#
$cont =~ s{^\s*virtual\s+}{}mg;
# Remove the empty lines.
#
$cont =~ s{\n\s*\n}{\n}sg;
# Trim the spaces.
#
$cont =~ s{^\s+}{}mg;
$cont =~ s{\s+$}{}mg;
# Split the string into the lines again.
#
@content = split(/\n/, $cont);
# Now the list contains only two kinds of lines. The first
# kind of lines starts with the <class> tag and contains the
# identifier of the class. The following lines list the
# non-stripped prototypes of implemented methods without the
# "virtual" keyword.
#
# Now we will produce the result by looping through all the
# lines and counting the prototypes of the required methods
# that are implemented by the adapter class.
#
my $info = '';
my $cnt = 0;
my $methods = '';
foreach my $line (@content)
{
if ($line =~ m{^<class>(\w+)\s*$}i )
{
# Another adapter class found.
#
my $adapter_class = $1;
# If the $info is not empty then it contains partial
# information about the previously processed adapter.
#
if ($info ne '')
{
# Complete the $info and push it into the @result.
#
$info .= sprintf("\timplements %2d required method%s...\n",
$cnt, (($cnt != 1) ? 's' : ''));
$methods .= "\n";
push(@result, "$info$methods");
}
# Initialize the counter and store the adapter class identifier
# in the $info.
#
$info = $adapter_class;
$cnt = 0;
$methods = '';
}
else
{
# The line contains the prototype of the implemented method.
# If it is the required method, count it, and add it to the
# string of methods.
#
my $stripped_prototype = StripArgIdentifiers($line);
if (exists($$reqref{$stripped_prototype}))
{
++$cnt;
$methods .= " $line\n";
}
}
}
# If the $info is not empty then it contains partial
# information about the last processed adapter.
#
if ($info ne '')
{
# Complete the $info and push it into the @result.
#
$info .= sprintf("\timplements %2d required method%s...\n",
$cnt, (($cnt != 1) ? 's' : ''));
$methods .= "\n";
push(@result, "$info$methods");
}
# Return the result list.
#
return @result;
}
##}}}
################################################################
# GenerateLanguageDoc takes document templates and code sources
# generates the content as expected in the $flangdoc file (the
# part of the Doxygen documentation), and returns the result as a
# string.
#
sub GenerateLanguageDoc ##{{{
{
# Get the references to the hash of class/base class.
#
my $rcb = shift;
# Define templates for HTML table parts of the documentation. #{{{
#
my $htmlTableHead = <<'xxxTABLE_HEADxxx';
\htmlonly
<TABLE ALIGN=center CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR BGCOLOR="#000000">
<TD>
<TABLE CELLSPACING=1 CELLPADDING=2 BORDER=0>
<TR BGCOLOR="#4040c0">
<TD ><b><font size=+1 color="#ffffff"> Language </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Maintainer </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Contact address </font>
<font size=-2 color="#ffffff">(remove the NOSPAM.)</font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Status </font></b></TD>
</TR>
xxxTABLE_HEADxxx
my $htmlTableRow = <<'xxxTABLE_ROWxxx';
<TR BGCOLOR="#ffffff">
<TD>$lang</TD>
<TD>$maintainer</TD>
<TD>$email</TD>
<TD>$status</TD>
</TR>
xxxTABLE_ROWxxx
my $htmlTableFoot = <<'xxxTABLE_FOOTxxx';
</TABLE>
</TD>
</TR>
</TABLE>
\endhtmlonly
xxxTABLE_FOOTxxx
##}}}
# Define templates for LaTeX table parts of the documentation. #{{{
#
my $latexTableHead = <<'xxxTABLE_HEADxxx';
\latexonly
\begin{tabular}{|l|l|l|l|}
\hline
{\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
\hline
xxxTABLE_HEADxxx
my $latexTableRow = <<'xxxTABLE_ROWxxx';
$lang & $maintainer & {\tt $email} & $status \\
xxxTABLE_ROWxxx
my $latexTableFoot = <<'xxxTABLE_FOOTxxx';
\hline
\end{tabular}
\endlatexonly
xxxTABLE_FOOTxxx
##}}}
# Read the template of the documentation, and join the content
# to a single string. #{{{
#
my $fin = "$docdir/$flangtpl";
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
my $output = join("", @content);
##}}}
# Make and substitute the list of supported languages and their
# number. #{{{
#
my @languages = sort grep { s{^Translator}{} } keys %{$rcb};
my $numlang = @languages;
$output =~ s{\$numlang}{$numlang};
my $languages = join(", ", @languages);
$languages =~ s{((\w+,\s){5})}{$1\n}g;
$languages =~ s{Brazilian}{Brazilian Portuguese};
$languages =~ s{Chinesetraditional}{Chinese Traditional};
$languages =~ s{(,\s+)(\w+)$}{$1and $2}s;
$output =~ s{\$languages}{$languages};
##}}}
# Create the hash of languages with the initial info. #{{{
#
my %language = ();
foreach (@languages) {
$language{$_} = $$rcb{"Translator$_"} . "<msep/>unknown: unknown";
}
##}}}
# Read the information related to maintainers into the
# string using suitable separators -- one line, one language. #{{{
#
$fin = "$docdir/$fmaintainers";
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @maintainers = <FIN>;
close FIN;
my $maintainers = join("", @maintainers);
# Trim the spaces on the lines. Strip the comment lines that
# start with % sign.
#
$maintainers =~ s{^[ \t]+}{}mg;
$maintainers =~ s{[ \t]+$}{}mg;
$maintainers =~ s{^%.*$}{}mg;
# Join the information for one language into one line,
# and remove empty lines.
#
$maintainers =~ s{\b\n(\S)}{<sep/>$1}sg;
$maintainers =~ s{\n{2,}}{\n}sg;
$maintainers =~ s{^\n+}{}s;
$maintainers =~ s{\n+$}{}s;
##}}}
# Split the string back to the list, and update the information
# in the hash with information for languages. #{{{
#
foreach my $line (sort split(/\n/, $maintainers)) {
# Split the line for one language to separate lines for
# the language and one or more maintainers.
#
my @info = split(/<sep\/>/, $line);
my $lang = shift @info;
# Ensure that the language starts with uppercase and
# continues with lowercase.
#
$lang =~ s{^(\w)(\w+)}{\U$1\L$2\E};
# Add information to the %language hash. If the language
# was not defined in sources, add the question mark to the
# language identifier.
#
if (exists($language{$lang})) {
$language{$lang} = $$rcb{"Translator$lang"} . '<msep/>'
. join("<sep/>", @info);
}
else {
$lang .= " (?)";
$language{$lang} = "unknown<msep/>" . join("<sep/>", @info);
}
}
##}}}
# Now, the %language hash contains all the information needed for
# generating the tables (HTML and LaTeX). Define string variables
# for each of the tables, and initialize them. #{{{
#
my $tableHTML = $htmlTableHead;
my $tableLATEX = $latexTableHead;
##}}}
# Loop through sorted keys for the languages, parse the
# information, and add it to the tables. #{{{
#
foreach my $lang (sort keys %language) {
# Transform the key for the language into more human readable
# form. Basically, only languages with two words are going to be
# corrected. #{{{
#
my $lang_readable = $lang;
$lang_readable =~ s{Brazilian}{Brazilian Portuguese};
$lang_readable =~ s{Chinesetraditional}{Chinese Traditional};
##}}}
# Read the line with info for the language and separate
# the status. #{{{
#
my @list = split(/<msep\/>/, $language{$lang});
my $status = shift @list;
my $i = $status =~ s{^Translator$}{up-to-date};
if ($i == 0) {
$i = $status =~ s{^TranslatorAdapter_(\d)_(\d)_(\d)}
{$1.$2.$3}x;
}
if ($i == 0) {
$i = $status =~ s{^TranslatorAdapter_(\d)_(\d)}
{$1.$2}x;
}
if ($i == 0) {
$i = $status =~ s{^TranslatorEnglish$}
{obsolete}x;
}
if ($i == 0) { $status = 'strange'; }
##}}}
# Split the rest of the list (should be a single item) into
# the list with one or more maintainers -- one line, one
# maintainer. #{{{
#
my $rest = shift @list;
@list = split(/<sep\/>/, $rest);
##}}}
# In HTML table, maintainer names are placed in the same
# cell. Also their e-mails are placed in a single cell.
# Extract the string with concatenated names and the string
# with concatenated e-mails. Add the row to the HTML
# table. #{{{
#
my $name = '';
my $email = '';
foreach my $maintainer (@list) {
if ($name ne '') { $name .= '<br>'; }
if ($email ne '') { $email .= '<br>'; }
$maintainer =~ m{^\s*(.+?)\s*:\s*(.+?)\s*$};
$name .= $1;
$email .= $2;
}
# Prepare the HTML row template, modify it, and add the
# result to the HTML table.
#
my $item = $htmlTableRow;
$item =~ s{\$lang}{$lang_readable};
$item =~ s{\$maintainer}{$name};
$item =~ s{\$email}{$email};
$item =~ s{\$status}{$status};
$tableHTML .= $item;
##}}}
# For LaTeX, more maintainers for the same language are
# placed on separate rows in the table. The line separator
# in the table is placed explicitly above the first
# maintainer. Add rows for all maintainers to the LaTeX
# table. #{{{
#
# Prepare the LATEX row template, modify it, and add the
# result to the LATEX table.
#
$item = $latexTableRow;
my $first = shift @list; # the first maintainer.
$first =~ m{^\s*(.+?)\s*:\s*(.+?)\s*$};
$name = $1;
$email = $2;
$item =~ s{\$lang}{$lang_readable};
$item =~ s{\$maintainer}{$name};
$item =~ s{\$email}{$email};
$item =~ s{\$status}{$status};
$tableLATEX .= " \\hline\n" . $item;
# List the other maintainers for the language. Do not set
# lang and status for them.
#
while (@list) {
my $next = shift @list;
$next =~ m{^\s*(.+?)\s*:\s*(.+?)\s*$};
my $name = $1;
my $email = $2;
my $item = $latexTableRow;
$item =~ s{\$lang}{};
$item =~ s{\$maintainer}{$name};
$item =~ s{\$email}{$email};
$item =~ s{\$status}{};
$tableLATEX .= $item;
}
##}}}
}
##}}}
# Finish the tables, and substitute the mark in the doc
# template by the concatenation of the tables. Add NOSPAM to
# email addresses in the HTML table. Replace the special
# character sequences. #{{{
#
$tableHTML .= $htmlTableFoot;
$tableLATEX .= $latexTableFoot;
$tableHTML =~ s{@}{\@NOSPAM.}sg;
$tableHTML =~ s{&ccaron;}{&#x010d;}sg;
$tableHTML =~ s{&rcaron;}{&#x0159;}sg;
$tableLATEX =~ s/&aacute;/\\'{a}/sg;
$tableLATEX =~ s/&Aacute;/\\'{A}/sg;
$tableLATEX =~ s/&auml;/\\"{a}/sg;
$tableLATEX =~ s/&ouml;/\\"{o}/sg;
$tableLATEX =~ s/&oslash;/\\o{}/sg;
$tableLATEX =~ s/&ccaron;/\\v{c}/sg;
$tableLATEX =~ s/&rcaron;/\\v{r}/sg;
$tableLATEX =~ s/_/\\_/sg;
$output =~ s{\$information_table}{$tableHTML$tableLATEX};
##}}}
# Replace the other symbols in the template by the expected
# information. ##{{{
#
$output =~ s{\$version}{$doxversion};
$output =~ s{\$translator_report_file_name}
{<code>doxygen/doc/$ftranslatortxt</code>}x;
$output =~ s{\$translator_report_link}
{<a href=\"../doc/$ftranslatortxt\">
<code>doxygen/doc/$ftranslatortxt</code></a>}x;
##}}}
# Replace the introduction notice in the output. #{{{
#
$output =~ s{<notice>.+?</notice>}
{Warning: this file was generated from the $flangtpl template
* and the $fmaintainers files by the $0 script.
*
* Do not edit this file. Edit the above mentioned files!}sx;
##}}}
# Return the content of the generated output file.
#
return $output;
}
##}}}
################################################################
# CopyTemplateToLanguageDoc takes the $flangtpl template and
# generates $flangdoc without using information from other
# sources. This function is called when source files were not found.
# The marks inside the template are replaced by warning-like
# explanations that something could not be done because sources
# were not available. Writes directly to the file, returns nothing.
#
sub CopyTemplateToLanguageDoc ##{{{
{
# The template file will be the source.
#
my $fin = "$docdir/$flangtpl";
# Let's open the template and read it all into one string.
#
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
my $cont = join("", @content);
# Replace the template marks by some notices.
#
$cont =~ s{<notice>.+?</notice>}
{Warning: this file was generated from the $flangtpl template
* by the $0 script. As doxygen sources were not available
* in that time, some information could not be extracted
* and inserted into this file.
*
* Do not edit this file. Edit the above mentioned files!}sx;
$cont =~ s{\$version}{$doxversion};
$cont =~ s{\$numlang}
{<b>[number of supported languages could not be extracted -- no sources]</b>};
$cont =~ s{\$languages}
{<b>[names of languages could not be extracted -- no sources]</b>};
$cont =~ s{\$information_table}
{<b>[Information table could not be extracted -- no sources.]</b>};
$cont =~ s{\$translator_report_file_name}
{$ftranslatortxt <b>[translator report could not be
generated -- no sources]</b>}x;
$cont =~ s{\$translator_report_link}{<b>[no sources, no link]</b>};
# Let's open the output file and copy the template content there.
#
my $fout = "$docdir/$flangdoc";
open(FOUT, "> $fout") or die "\nError when open > $fout: $!";
print FOUT $cont;
close FOUT;
}
##}}}
################################################################
# Body
#
{
# Set the content of global variables using the environment
# variables. #{{{
#
$docdir = (defined $ENV{'DOXYGEN_DOCDIR'})
? $ENV{'DOXYGEN_DOCDIR'} : '.';
$docdir =~ s{\\}{/}g;
$docdir =~ s{/$}{};
$doxygenrootdir = ($docdir eq '.') ? '..' : $docdir;
$doxygenrootdir =~ s{/doc$}{};
$srcdir = "$doxygenrootdir/src";
=pod
# Show the environment variables (for debugging only).
#
foreach (sort keys %ENV) { print STDERR "$_=$ENV{$_}\n"; }
print STDERR "\n\n";
=cut
$doxversion = (defined $ENV{'VERSION'}) ? $ENV{'VERSION'} : 'unknown';
##}}}
# The translator base class must be present. Exit otherwise,
# but be kind to those who already have the documentation
# generated by this script ready, but who do not have sources.
# If no $flangdoc is present, copy the template to it. #{{{
#
if (!-f "$srcdir/translator.h") {
print STDERR "\nThe $0 warning:\n"
. "\tThe translator.h not found in $srcdir.\n"
. "\tThe $ftranslatortxt will not be "
. "generated (you don't need it).\n";
# $flangdoc is present, copy the template to it.
#
if (!-f "$docdir/$flangdoc") {
# Copy the template document to $flandoc with simplified
# replacement of the markers inside the template.
#
CopyTemplateToLanguageDoc();
# Generate the warning about $flangdoc content.
#
print STDERR "\nThe $0 warning:\n"
. "\tThe $flangdoc not found in the '$docdir' directory.\n"
. "\tThe $flangtpl template content copied into it.\n"
. "\tAs the sources are not available, some information\n"
. "\tcould not be extracted and inserted into $flangdoc.\n";
}
# Exit as if nothing happened.
#
exit 0;
}
##}}}
# Find all translator_xx.h file names. #{{{
#
my @entries = (); # init
opendir DIR, $srcdir or confess "opendir error for $srcdir: $!";
foreach (readdir(DIR)) { if (!/^\./) { push @entries, $_; } }
closedir DIR; # ignore names with dot at the beginning
my @files = sort
grep { ! m{^translator_adapter\.h$}i }
grep { -f "$srcdir/$_" && m{^translator_\w+\.h$}i }
@entries;
##}}}
# Get only the pure virtual methods from the Translator class
# into a hash structure for later testing present/not present.
#
my @expected = GetPureVirtualFrom("$srcdir/translator.h");
# The details for translators will be collected into the output
# string. If some details are listed for a translator, the flag
# will be set to produce possible warning to the list of
# up-to-date translators.
#
my $output = '';
my %details = ();
# Initialize the list of the required methods.
#
my %required = ();
# Remove the argument identifiers from the method prototypes
# to get only the required form of the prototype. Fill the
# hash with them. #{{{
#
foreach (@expected) {
my $prototype = StripArgIdentifiers($_);
$required{$prototype} = 1;
}
##}}}
# Collect base classes of translators in the hash. CB stands
# for Class and Base.
#
my %cb = ();
# Loop through all translator files. Extract the implemented
# virtual methods and compare it with the requirements. Prepare
# the output.
#
foreach (@files) {
# Get the information from the sources. Remember the base
# class for each of the classes. Clear the flag for
# details for the class. #{{{
#
my @info = GetInfoFrom("$srcdir/$_");
my $class = shift @info;
my $base = shift @info;
$cb{$class} = $base;
$details{$class} = 0;
##}}}
# Set the value of the required methods to 1 (true). Let
# this indicate that the method was not defined in the
# translator class.
#
foreach (keys %required) { $required{$_} = 1; }
# Loop through all items and compare the prototypes. Mark
# the implemented method and collect the old ones. #{{{
#
my @old_methods = ();
foreach my $implemented (@info) {
# Get only the necessary form of the prototype.
#
my $prototype = StripArgIdentifiers($implemented);
# Mark as recognized when the prototype is required.
# Otherwise, remember it as old method which is
# implemented, but not required.
#
if (exists($required{$prototype})) {
$required{$prototype} = 0; # satisfaction
}
else {
push(@old_methods, $implemented);
}
}
##}}}
# Loop through the list of expected methods and collect
# the missing (new) methods. Do this only when it derives
# from Translator or TranslatorAdapter classes (i.e. ignore
# any unusual kind of TranslatorXxxx implementation).
# Accept also deriving from TranslatorEnglish, that can
# be done by doxygen developers to solve problems with
# some really outdated translators. #{{{
#
my @missing_methods = ();
if ($base =~ m/^Translator(Adapter.*)?$/
|| $base =~ m/^TranslatorEnglish$/) {
foreach my $method (@expected) {
# Get the stripped version of the prototype.
#
my $prototype = StripArgIdentifiers($method);
# If the prototype is stored in the %required
# table, and if it was not marked as implemented,
# then it should be. It is a missing method.
#
if (defined $required{$prototype} && $required{$prototype}) {
push(@missing_methods, $method);
}
}
}
##}}}
# The detailed output will be produced only when it is
# needed. #{{{
#
if (@old_methods || @missing_methods
|| $base !~ m/^Translator(Adapter.*)?$/) {
$output .= "\n\n\n";
$output .= $class . " ($base)\n" . '-' x length($class) . "\n";
if ($base =~ m/^TranslatorEnglish$/) {
$output .= "\nThis translator is implemented via deriving "
. "from the English translator.\n"
. "This should be done only in the case when "
. "the language maintainer\n"
. "or the doxygen "
. "developers need to update some really old-dated "
. "translator.\n"
. "Otherwise, deriving from "
. "the translator adapter classes should be used\n"
. "for obsolete translators. "
. "If you still want some texts to be in English\n"
. "copy the sources of the English translator.\n\n"
. "The obsolete and missing method lists (below) "
. "reflect what have to be done\n"
. "to derive "
. "directly from the Translator class "
. "(i.e. to reach up-to-date status).\n";
}
elsif ($base !~ m/^Translator(Adapter.*)?$/) {
$output .= "\nThis is some unusual implementation of the "
. "translator class. It is derived\n"
. "from the $base base class. The usual translator"
. "class derives\n"
. "or from the Translator class or from some "
. "TranslatorAdapter_x_x_x classes.\n"
. "Because of that, nothing can be guessed about "
. "missing or obsolete methods.\n";
}
if (@missing_methods) {
$output .= "\nMissing methods (should be implemented):\n\n";
foreach (@missing_methods) { $output .= " $_\n"; }
}
if (@old_methods) {
$output .= "\nObsolete methods (should be removed):\n\n";
foreach (sort @old_methods) { $output .= " $_\n"; }
}
# Some details were listed, set the details flag for
# the class.
#
$details{$class} = 1;
}
##}}}
}
# Generate the ASCII output file.
#
my $fout = "$docdir/$ftranslatortxt";
# Open it first, and output the version information. #{{{
#
open(FOUT, "> $fout") or die "\nError when open > $fout: $!";
print FOUT "(version $doxversion)\n\n";
##}}}
# List the supported languages. #{{{
#
my @all_translators = keys %cb;
print FOUT "Doxygen supports the following (" . @all_translators
. ") languages (sorted alphabetically):\n\n";
my @languages = sort
grep { s/^Translator(\w+)\b.*$/$1/ }
@all_translators;
my $languages = join(", ", @languages);
$languages =~ s{((\w+,\s){5})}{$1\n}g;
$languages =~ s{Brazilian}{Brazilian Portuguese};
$languages =~ s{Chinesetraditional}{Chinese Traditional};
$languages =~ s{(,\s+)(\w+)$}{$1and $2.}s;
print FOUT "$languages\n";
##}}}
# If there are up-to-date translators, list them. #{{{
#
my @list = sort grep { $cb{$_} =~ m/^Translator$/ } keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "The following translator classes are up-to-date "
. "(sorted alphabetically).\n"
. "This means that they derive from the Translator class. "
. "Anyway, there still\n"
. "may be some details listed even for "
. "the up-to-date translators.\n"
. "Please, check the text below if the translator "
. "is marked so.\n\n";
foreach (@list) {
# Print the class name.
#
print FOUT " $_";
# If some details were listed for the translator class,
# add a notice.
#
if ($details{$_}) {
print FOUT "\t-- see details below in the report";
}
print FOUT "\n";
}
}
##}}}
# If there are obsolete translators, list them. #{{{
#
@list = sort grep { $cb{$_} =~ m/^TranslatorAdapter_/ } keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "The following translator classes are obsolete "
. "(sorted alphabetically).\n"
. "This means that they derive from some of "
. "the adapter classes.\n\n";
foreach (@list) { print FOUT " $_\t($cb{$_})\n"; }
}
##}}}
# If there are translators derived from TranslatorEnglish, list them
# and name them as obsolete. #{{{
#
@list = sort grep { $cb{$_} =~ m/^TranslatorEnglish$/ } keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "The following translator classes are implemented "
. "via deriving\n"
. "from the English translator. This should be done only "
. "in the case\n"
. "when the language maintainer or the doxygen "
. "developers need to update\n"
. "some really outdated translator. Otherwise, deriving "
. "from\n"
. "the translator adapter classes should be prefered "
. "for obsolete translators.\n"
. "See details below in the report.\n\n";
foreach (@list) { print FOUT " $_\t($cb{$_})\n"; }
}
##}}}
# If there are other translators, list them. #{{{
#
@list = sort
grep { $cb{$_} !~ m/^Translator$/ }
grep { $cb{$_} !~ m/^TranslatorAdapter_/ }
grep { $cb{$_} !~ m/^TranslatorEnglish$/ }
keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "The following translator classes are somehow different\n"
. "(sorted alphabetically). This means that they "
. "do not derive from\n"
. "the Translator class, nor from some of the adapter "
. "classes,\n"
. "nor from the TranslatorEnglish. Nothing can be guessed "
. "about the methods.\n\n";
foreach (@list) { print FOUT " $_\t($cb{$_})\n"; }
}
##}}}
# List all the translator adapter classes to show for which versions
# the adapters had to be created. Show, how many and what new methods
# are implemented by the adapters. #{{{
#
print FOUT "\n" .'-' x 70 . "\n";
print FOUT <<'xxxENDxxx';
The following translator adapter classes are implemented -- the older (with
lower number) are always derived from the newer. They implement the
listed required methods. Notice that some versions of doxygen did not
introduce any changes related to the language translators. From here you may
guess how much work should be done to update your translator:
xxxENDxxx
my @adapter_info = GetAdapterClassesInfo(\%required);
foreach (@adapter_info) { print FOUT " $_"; }
##}}}
# List the methods that are expected to be implemented. #{{{
#
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "Localized translators are expected to implement "
. "the following methods\n"
. "(prototypes sorted aplhabetically):\n\n";
foreach (sort @expected) { print FOUT "$_\n"; }
##}}}
# If there are some details for the translators, show them. #{{{
#
if ($output !~ m/^\s*$/) {
print FOUT "\n\n" .'=' x 70 . "\n";
print FOUT "Details related to specific translator classes follow.\n";
print FOUT $output . "\n";
}
##}}}
# Close the ASCII output file
#
close FOUT;
# Generate the language.doc file.
#
$fout = "$docdir/$flangdoc";
# Open it first for the output.
#
open(FOUT, "> $fout") or die "\nError when open > $fout: $!";
print FOUT GenerateLanguageDoc(\%cb);
# Close the output file
#
close FOUT;
exit 0;
}
# end of body
################################################################
This source diff could not be displayed because it is too large. You can view the blob instead.
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.6_20040222
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Patch: doxygen-1.2.7-redhat.patch
Patch1: doxygen-1.2.12-qt2.patch
Group: Development/Tools
License: GPL
Url: http://www.stack.nl/~dimitri/doxygen/index.html
Prefix: %{_prefix}
BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Doxygen can generate an online class browser (in HTML) and/or a
reference manual (in LaTeX) from a set of documented source files. The
documentation is extracted directly from the sources. Doxygen can
also be configured to extract the code structure from undocumented
source files.
%package doxywizard
Summary: A GUI for creating and editing configuration files.
Group: User Interface/X
Requires: %{name} = %{version}
BuildPrereq: qt-devel => 2.3.0
Requires: qt >= 2.3.0
%description doxywizard
Doxywizard is a GUI for creating and editing configuration files that
are used by doxygen.
%prep
%setup -q
%patch -p1 -b .redhat
%patch1 -p1 -b .qt2
%build
QTDIR="" && . /etc/profile.d/qt.sh
export OLD_PO_FILE_INPUT=yes
./configure --prefix %{_prefix} --shared --release --with-doxywizard
make all docs
%install
rm -rf ${RPM_BUILD_ROOT}
export OLD_PO_FILE_INPUT=yes
make install INSTALL=$RPM_BUILD_ROOT%{_prefix}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root)
%doc LANGUAGE.HOWTO README examples html
%{_bindir}/doxygen
%{_bindir}/doxytag
%files doxywizard
%defattr(-,root,root)
%{_bindir}/doxywizard
%changelog
* Sun Jan 06 2002 Than Ngo <than@redhat.com> 1.2.13.1-1
- update to 1.2.13.1
* Sun Dec 30 2001 Jeff Johnson <jbj@redhat.com> 1.2.13-1
- update to 1.2.13
* Sun Nov 18 2001 Than Ngo <than@redhat.com> 1.2.12-1
- update to 1.2.12
- s/Copyright/License
* Wed Sep 12 2001 Tim Powers <timp@redhat.com>
- rebuild with new gcc and binutils
* Wed Jun 13 2001 Than Ngo <than@redhat.com>
- update tp 1.2.8.1
- make doxywizard as separat package
- fix to use install as default
* Tue Jun 05 2001 Than Ngo <than@redhat.com>
- update to 1.2.8
* Tue May 01 2001 Than Ngo <than@redhat.com>
- update to 1.2.7
- clean up specfile
- patch to use RPM_OPT_FLAG
* Wed Mar 14 2001 Jeff Johnson <jbj@redhat.com>
- update to 1.2.6
* Wed Feb 28 2001 Trond Eivind Glomsrd <teg@redhat.com>
- rebuild
* Tue Dec 26 2000 Than Ngo <than@redhat.com>
- update to 1.2.4
- remove excludearch ia64
- bzip2 sources
* Mon Dec 11 2000 Than Ngo <than@redhat.com>
- rebuild with the fixed fileutils
* Mon Oct 30 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.2.3.
* Sun Oct 8 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.2.2.
- enable doxywizard.
* Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
- 1.2.1 is latest stable, so we upgrade before Winston is released.
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
* Tue Jul 4 2000 Jakub Jelinek <jakub@redhat.com>
- Rebuild with new C++
* Fri Jun 30 2000 Florian La Roche <laroche@redhat.de>
- fix QTDIR detection
* Fri Jun 09 2000 Preston Brown <pbrown@redhat.com>
- compile on x86 w/o optimization, revert when compiler fixed!!
* Wed Jun 07 2000 Preston Brown <pbrown@redhat.com>
- use newer RPM macros
* Tue Jun 6 2000 Jeff Johnson <jbj@redhat.com>
- add to distro.
* Tue May 9 2000 Tim Powers <timp@redhat.com>
- rebuilt for 7.0
* Wed Feb 2 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- recompile with current Qt (2.1.0/1.45)
* Wed Jan 5 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.0.0.
- recompile with qt-2.0.1 if available.
- relocatable package.
* Mon Nov 8 1999 Tim Powers <timp@redhat.com>
-updated to 0.49-991106
* Tue Jul 13 1999 Tim Powers <timp@redhat.com>
- updated source
- cleaned up some stuff in the spec file
* Thu Apr 22 1999 Jeff Johnson <jbj@redhat.com>
- Create Power Tools 6.0 package.
......@@ -934,6 +934,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
QCString pageTitle=displayName().copy();
QCString pageType;
QCString cType=compoundTypeString();
//printf("ClassDef::writeDocumentation() cType=%s\n",cType.data());
toupper(cType.at(0));
pageType+=" ";
pageType+=cType;
......@@ -941,7 +942,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (m_tempArgs) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
ol.parseText(theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0));
ol.parseText(theTranslator->trCompoundReference(displayName(),
m_isObjC && m_compType==Interface ? Class : m_compType,
m_tempArgs!=0));
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name());
......@@ -1039,7 +1042,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <compound kind=\"" << compoundTypeString();
Doxygen::tagFile << "\">" << endl;
Doxygen::tagFile << "\"";
if (isObjectiveC()) { Doxygen::tagFile << " objc=\"yes\""; }
Doxygen::tagFile << ">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
if (m_tempArgs)
......@@ -1371,7 +1376,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
{
ol.disable(OutputGenerator::Man);
ol.writeRuler();
ol.parseText(theTranslator->trGeneratedFromFiles(m_compType,m_files.count()==1));
ol.parseText(theTranslator->trGeneratedFromFiles(
m_isObjC && m_compType==Interface ? Class : m_compType,
m_files.count()==1));
bool first=TRUE;
const char *file = m_files.first();
......@@ -1498,7 +1505,7 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.parseText(theTranslator->trIncludingInheritedMembers());
//ol.startItemList();
ol.writeString("<table>\n");
ol.writeString("<p><table>\n");
//MemberNameInfo *mni=m_allMemberNameInfoList->first();
MemberNameInfoSDict::Iterator mnii(*m_allMemberNameInfoSDict);
......@@ -1526,24 +1533,45 @@ void ClassDef::writeMemberList(OutputList &ol)
QCString name=mi->ambiguityResolutionScope+md->name();
//ol.writeListItem();
ol.writeString(" <tr class=\"memlist\"><td>");
//Definition *bd = md->getGroupDef();
//if (bd==0) bd=cd;
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),name);
if ( md->isFunction() || md->isSignal() || md->isSlot() ||
(md->isFriend() && md->argsString()))
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
ol.docify(" class");
//ol.writeString("\n");
if (cd->isObjectiveC())
{
if (md->isObjCMethod())
{
if (md->isStatic())
ol.writeString("+&nbsp;</td><td>");
else
ol.writeString("-&nbsp;</td><td>");
}
else
ol.writeString("</td><td>");
}
if (md->isObjCMethod())
{
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),md->name());
}
else
{
//Definition *bd = md->getGroupDef();
//if (bd==0) bd=cd;
ol.writeObjectLink(md->getReference(),
md->getOutputFileBase(),
md->anchor(),name);
if ( md->isFunction() || md->isSignal() || md->isSlot() ||
(md->isFriend() && md->argsString()))
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
ol.docify(" class");
//ol.writeString("\n");
}
ol.writeString("</td>");
memberWritten=TRUE;
}
......@@ -1554,17 +1582,32 @@ void ClassDef::writeMemberList(OutputList &ol)
{
//ol.writeListItem();
ol.writeString(" <tr bgcolor=\"#f0f0f0\"><td>");
if (cd->isObjectiveC())
{
if (md->isObjCMethod())
{
if (md->isStatic())
ol.writeString("+&nbsp;</td><td>");
else
ol.writeString("-&nbsp;</td><td>");
}
else
ol.writeString("</td><td>");
}
ol.startBold();
ol.docify(md->name());
ol.endBold();
if ( md->isFunction() || md->isSignal() || md->isSlot() )
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
if (!md->isObjCMethod())
{
if ( md->isFunction() || md->isSignal() || md->isSlot() )
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue())
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
}
ol.writeString(" (");
ol.parseText(theTranslator->trDefinedIn()+" ");
if (cd->isLinkable())
......@@ -1589,7 +1632,8 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.writeString("</td>");
ol.writeString("<td>");
}
if ((prot!=Public || virt!=Normal ||
if (
(prot!=Public || virt!=Normal ||
md->isFriend() || md->isRelated() || md->isExplicit() ||
md->isMutable() || (md->isInline() && Config_getBool("INLINE_INFO")) ||
md->isSignal() || md->isSlot() ||
......
......@@ -103,6 +103,8 @@ CommandMap cmdMap[] =
{ "_internalref", CMD_INTERNALREF },
{ "dot", CMD_DOT },
{ "enddot", CMD_ENDDOT },
{ "manonly", CMD_MANONLY },
{ "endmanonly", CMD_ENDMANONLY },
{ 0, 0 }
};
......
......@@ -103,7 +103,9 @@ enum CommandType
CMD_XREFITEM = 69 | SIMPLESECT_BIT,
CMD_XMLONLY = 70,
CMD_DOT = 71,
CMD_ENDDOT = 72
CMD_ENDDOT = 72,
CMD_MANONLY = 73,
CMD_ENDMANONLY = 74
};
enum HtmlTagType
......
......@@ -1100,6 +1100,8 @@ void Config::check()
filePatternList.append("*.php");
filePatternList.append("*.php3");
filePatternList.append("*.inc");
filePatternList.append("*.m");
filePatternList.append("*.mm");
}
// add default pattern if needed
......@@ -1819,7 +1821,7 @@ void Config::create()
"and *.h) to filter out the source-files in the directories. If left \n"
"blank the following patterns are tested: \n"
"*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
"*.h++ *.idl *.odl *.cs *.php *.php3 *.inc\n"
"*.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm\n"
);
cb = addBool(
"RECURSIVE",
......
......@@ -128,6 +128,9 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
}
name.resize(0);
}
<Start>":" { // Objective-C argument separator
name+=yytext;
}
<Start>[*&]+ {
addType();
type+=yytext;
......
......@@ -826,6 +826,15 @@ reparsetoken:
doctokenizerYYsetStatePara();
}
break;
case CMD_MANONLY:
{
doctokenizerYYsetStateManOnly();
tok = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName));
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
......@@ -3664,6 +3673,15 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara();
}
break;
case CMD_MANONLY:
{
doctokenizerYYsetStateManOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::ManOnly,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: manonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
case CMD_LATEXONLY:
{
doctokenizerYYsetStateLatexOnly();
......@@ -3702,6 +3720,7 @@ int DocPara::handleCommand(const QString &cmdName)
break;
case CMD_ENDCODE:
case CMD_ENDHTMLONLY:
case CMD_ENDMANONLY:
case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
case CMD_ENDLINK:
......
......@@ -349,7 +349,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode
{
public:
enum Type { Code, HtmlOnly, LatexOnly, XmlOnly, Verbatim, Dot };
enum Type { Code, HtmlOnly, ManOnly, LatexOnly, XmlOnly, Verbatim, Dot };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t,bool isExample,
const QString &exampleFile) :
......
......@@ -120,6 +120,7 @@ void doctokenizerYYsetStatePara();
void doctokenizerYYsetStateTitle();
void doctokenizerYYsetStateCode();
void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateManOnly();
void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
void doctokenizerYYsetStateVerbatim();
......
......@@ -324,6 +324,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%x St_TitleV
%x St_Code
%x St_HtmlOnly
%x St_ManOnly
%x St_LatexOnly
%x St_XmlOnly
%x St_Verbatim
......@@ -502,6 +503,14 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_HtmlOnly>. {
g_token->verb+=yytext;
}
<St_ManOnly>{CMD}"endmanonly" {
return RetVal_OK;
}
<St_ManOnly>[^\\@\n$]+ |
<St_ManOnly>\n |
<St_ManOnly>. {
g_token->verb+=yytext;
}
<St_LatexOnly>{CMD}"endlatexonly" {
return RetVal_OK;
}
......@@ -880,6 +889,12 @@ void doctokenizerYYsetStateHtmlOnly()
BEGIN(St_HtmlOnly);
}
void doctokenizerYYsetStateManOnly()
{
g_token->verb="";
BEGIN(St_ManOnly);
}
void doctokenizerYYsetStateXmlOnly()
{
g_token->verb="";
......
......@@ -491,7 +491,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
}
else // put #include in the class documentation without link
{
cd->setIncludeFile(0,iName,local,FALSE);
cd->setIncludeFile(0,iName,local,TRUE);
}
}
}
......@@ -729,6 +729,10 @@ static void addClassToContext(Entry *root)
case Entry::PROTOCOLDOC_SEC:
sec=ClassDef::Protocol;
break;
case Entry::CATEGORY_SEC:
case Entry::CATEGORYDOC_SEC:
sec=ClassDef::Category;
break;
case Entry::EXCEPTION_SEC:
case Entry::EXCEPTIONDOC_SEC:
sec=ClassDef::Exception;
......@@ -811,6 +815,22 @@ static void addClassToContext(Entry *root)
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->insertUsedFile(root->fileName);
//int bi;
//if (root->objc && (bi=fullName.find('<'))!=-1 && root->extends->count()==0)
//{
// // add protocols as base classes
// int be=fullName.find('>'),len;
// static QRegExp re("[A-Z_a-z][A-Z_a-z0-9]*");
// int p=0;
// while ((p=re.match(fullName,bi+1,&len))!=-1 && p<be)
// {
// QCString baseName = fullName.mid(p,len);
// printf("Adding artifical base class %s to %s\n",baseName.data(),fullName.data());
// root->extends->append(new BaseInfo(baseName,Public,Normal));
// bi=p+len;
// }
//}
// add class to the list
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
Doxygen::classSDict.append(fullName,cd);
......@@ -824,7 +844,8 @@ static void addClassToContext(Entry *root)
static void buildClassList(Entry *root)
{
if (
(root->section & Entry::COMPOUND_MASK) && !root->name.isEmpty()
((root->section & Entry::COMPOUND_MASK) ||
root->section==Entry::OBJCIMPL_SEC) && !root->name.isEmpty()
)
{
addClassToContext(root);
......@@ -2232,11 +2253,12 @@ static void buildFunctionList(Entry *root)
)
)
{
Debug::print(Debug::Functions,0,"--> member of class %s!\n",rname.data(),cd->name().data());
Debug::print(Debug::Functions,0,"--> member %s of class %s!\n",
rname.data(),cd->name().data());
addMethodToClass(root,cd,rname,isFriend);
}
else if (root->parent &&
!(root->parent->section & Entry::COMPOUND_MASK) &&
!((root->parent->section & Entry::COMPOUND_MASK) || root->parent->section==Entry::OBJCIMPL_SEC) &&
!isMember &&
(root->relates.isEmpty() || root->relatesDup) &&
root->type.left(7)!="extern " &&
......@@ -2310,24 +2332,6 @@ static void buildFunctionList(Entry *root)
md->setDocsForDefinition(!root->proto);
ArgumentList *argList = new ArgumentList;
stringToArgumentList(root->args,argList);
//printf("root->argList=%p\n",root->argList);
//if (root->argList)
//{
// ArgumentListIterator ali1(*root->argList);
// ArgumentListIterator ali2(*argList);
// Argument *sa,*da;
// for (;(sa=ali1.current()) && (da=ali2.current());++ali1,++ali2)
// {
// printf("sa->name=%s (doc=%s) da->name=%s (doc=%s)\n",
// sa->name.data(),sa->docs.data(),
// da->name.data(),da->docs.data()
// );
// if (!sa->docs.isEmpty() && da->docs.isEmpty())
// {
// da->docs=sa->docs.copy();
// }
// }
//}
if (root->proto)
{
//printf("setDeclArgumentList to %p\n",argList);
......@@ -2359,19 +2363,6 @@ static void buildFunctionList(Entry *root)
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first()!=0)
{
//printf("new member is grouped, existing member not\n");
// if we do addMemberToGroups here an undocumented declaration may prevent
// the documented implementation below it from being added
//addMemberToGroups(root,md);
//GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()];
//if (gd)
//{
// bool success = gd->insertMember(md);
// if (success)
// {
// md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty());
// }
//}
addMemberToGroups(root,md);
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
......@@ -3302,6 +3293,7 @@ static bool findTemplateInstanceRelation(Entry *root,
ClassDef *instanceClass = templateClass->insertTemplateInstance(
root->fileName,root->startLine,templSpec,freshInstance);
if (isArtificial) instanceClass->setClassIsArtificial();
instanceClass->setIsObjectiveC(root->objc);
if (freshInstance)
{
......@@ -4207,9 +4199,16 @@ static bool findGlobalMember(Entry *root,
}
else // got docs for an undefined member!
{
warn(root->fileName,root->startLine,
"Warning: documented function `%s' was not defined.",decl
);
if (root->parent && root->parent->section==Entry::OBJCIMPL_SEC)
{
// probably a local member ObjC method not found in the interface
}
else
{
warn(root->fileName,root->startLine,
"Warning: documented function `%s' was not defined.",decl
);
}
}
return TRUE;
}
......@@ -4752,7 +4751,9 @@ static void findMember(Entry *root,
delete nl;
}
}
if (count==0 && !(isFriend && funcType=="class"))
if (count==0 && !(isFriend && funcType=="class") &&
(root->parent==0 || root->parent->section!=Entry::OBJCIMPL_SEC)
)
{
int candidates=0;
if (mn->count()>0)
......@@ -5192,6 +5193,32 @@ static void findMemberDocumentation(Entry *root)
}
}
//----------------------------------------------------------------------
static void findObjCMethodDefinitions(Entry *root)
{
EntryListIterator eli(*root->sublist);
Entry *objCImpl;
for (;(objCImpl=eli.current());++eli)
{
if (objCImpl->section==Entry::OBJCIMPL_SEC)
{
//printf("Found ObjC class implementation %s\n",objCImpl->name.data());
EntryListIterator seli(*objCImpl->sublist);
Entry *objCMethod;
for (;(objCMethod=seli.current());++seli)
{
if (objCMethod->section==Entry::FUNCTION_SEC)
{
//Printf(" Found ObjC method definition %s\n",objCMethod->name.data());
findMember(objCMethod, objCMethod->type+" "+objCImpl->name+"::"+objCMethod->name+" "+objCMethod->args, FALSE,TRUE);
objCMethod->section=Entry::EMPTY_SEC;
}
}
}
}
}
//----------------------------------------------------------------------
// find and add the enumeration to their classes, namespaces or files
......@@ -8129,6 +8156,7 @@ void parseInput()
findEnumDocumentation(root);
msg("Searching for member function documentation...\n");
findObjCMethodDefinitions(root);
findMemberDocumentation(root); // may introduce new members !
transferRelatedFunctionDocumentation();
transferFunctionDocumentation();
......
......@@ -200,8 +200,9 @@ Entry::~Entry()
void Entry::addSubEntry(Entry *current)
{
//printf("Entry %d with name %s type 0x%x added\n",
// current->num,current->name.data(),current->section);
//printf("Entry %d with name %s type 0x%x added to %s type 0x%x\n",
// current->num,current->name.data(),current->section,
// name.data(),section);
//printf("Entry::addSubEntry(%s) %p\n",current->name.data(),current->tArgList);
current->parent=this;
sublist->append(current);
......
......@@ -191,42 +191,45 @@ class Entry
PROTOCOL_SEC | CATEGORY_SEC,
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
CLASSDOC_SEC = 0x00000100,
STRUCTDOC_SEC = 0x00000200,
UNIONDOC_SEC = 0x00000400,
EXCEPTIONDOC_SEC = 0x00000800,
NAMESPACEDOC_SEC = 0x00001000,
INTERFACEDOC_SEC = 0x00002000,
PROTOCOLDOC_SEC = 0x00004000,
CLASSDOC_SEC = 0x00000800,
STRUCTDOC_SEC = 0x00001000,
UNIONDOC_SEC = 0x00002000,
EXCEPTIONDOC_SEC = 0x00004000,
NAMESPACEDOC_SEC = 0x00008000,
INTERFACEDOC_SEC = 0x00010000,
PROTOCOLDOC_SEC = 0x00020000,
CATEGORYDOC_SEC = 0x00040000,
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC |
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC,
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC |
CATEGORYDOC_SEC,
SOURCE_SEC = 0x00010000,
HEADER_SEC = 0x00020000,
SOURCE_SEC = 0x00400000,
HEADER_SEC = 0x00800000,
FILE_MASK = SOURCE_SEC | HEADER_SEC,
ENUMDOC_SEC = 0x00100000,
ENUM_SEC = 0x00200000,
EMPTY_SEC = 0x00300000,
PAGEDOC_SEC = 0x00400000,
VARIABLE_SEC = 0x00500000,
FUNCTION_SEC = 0x00600000,
TYPEDEF_SEC = 0x00700000,
MEMBERDOC_SEC = 0x00800000,
OVERLOADDOC_SEC = 0x00900000,
EXAMPLE_SEC = 0x00a00000,
VARIABLEDOC_SEC = 0x00b00000,
FILEDOC_SEC = 0x00c00000,
DEFINEDOC_SEC = 0x00d00000,
INCLUDE_SEC = 0x00e00000,
DEFINE_SEC = 0x00f00000,
GROUPDOC_SEC = 0x01000000,
USINGDIR_SEC = 0x01100000,
MAINPAGEDOC_SEC = 0x01200000,
MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000,
PACKAGE_SEC = 0x01500000,
PACKAGEDOC_SEC = 0x01600000
ENUMDOC_SEC = 0x01000000,
ENUM_SEC = 0x02000000,
EMPTY_SEC = 0x03000000,
PAGEDOC_SEC = 0x04000000,
VARIABLE_SEC = 0x05000000,
FUNCTION_SEC = 0x06000000,
TYPEDEF_SEC = 0x07000000,
MEMBERDOC_SEC = 0x08000000,
OVERLOADDOC_SEC = 0x09000000,
EXAMPLE_SEC = 0x0a000000,
VARIABLEDOC_SEC = 0x0b000000,
FILEDOC_SEC = 0x0c000000,
DEFINEDOC_SEC = 0x0d000000,
INCLUDE_SEC = 0x0e000000,
DEFINE_SEC = 0x0f000000,
GROUPDOC_SEC = 0x10000000,
USINGDIR_SEC = 0x11000000,
MAINPAGEDOC_SEC = 0x12000000,
MEMBERGRP_SEC = 0x13000000,
USINGDECL_SEC = 0x14000000,
PACKAGE_SEC = 0x15000000,
PACKAGEDOC_SEC = 0x16000000,
OBJCIMPL_SEC = 0x17000000
};
enum MemberSpecifier
{
......
......@@ -200,6 +200,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
m_t << s->text();
break;
case DocVerbatim::ManOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
/* nothing */
......
......@@ -43,7 +43,7 @@
static const char *defaultStyleSheet =
"H1 {\n"
" text-align: center;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"H2 {\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
......@@ -56,6 +56,7 @@ static const char *defaultStyleSheet =
" text-align: center;\n"
" margin: 2px;\n"
" padding: 2px;\n"
" line-height: 120%;\n"
"}\n"
"A.qindex {\n"
" text-decoration: none;\n"
......@@ -79,9 +80,9 @@ static const char *defaultStyleSheet =
" font-weight: bold;\n"
" background-color: #6666cc;\n"
" color: #ffffff;\n"
" padding: 2 6px;\n"
" padding: 2px 6px;\n"
" border: 1px double #9295C2;\n"
" }\n"
"}\n"
"A.qindexHL:hover {\n"
" text-decoration: none;\n"
" background-color: #6666cc;\n"
......@@ -116,7 +117,13 @@ static const char *defaultStyleSheet =
"TD.md { background-color: #F4F4FB; font-weight: bold; }\n"
"TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }\n"
"TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupHeader {\n"
" margin-left: 16px;\n"
" margin-top: 12px;\n"
" margin-bottom: 6px;\n"
" font-weight: bold;\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY {\n"
" background: white;\n"
......@@ -172,7 +179,7 @@ static const char *defaultStyleSheet =
"}\n"
".mdescLeft {\n"
" font-size: smaller;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 8px;\n"
" border-top: 1px none #E0E0E0;\n"
......@@ -183,7 +190,6 @@ static const char *defaultStyleSheet =
"}\n"
".mdescRight {\n"
" font-size: smaller;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 4px;\n"
......@@ -282,8 +288,16 @@ void HtmlGenerator::init()
exit(1);
}
writeLogo(dname);
if (!Config_getString("HTML_HEADER").isEmpty()) g_header=fileToString(Config_getString("HTML_HEADER"));
if (!Config_getString("HTML_FOOTER").isEmpty()) g_footer=fileToString(Config_getString("HTML_FOOTER"));
if (!Config_getString("HTML_HEADER").isEmpty())
{
g_header=fileToString(Config_getString("HTML_HEADER"));
//printf("g_header='%s'\n",g_header.data());
}
if (!Config_getString("HTML_FOOTER").isEmpty())
{
g_footer=fileToString(Config_getString("HTML_FOOTER"));
//printf("g_footer='%s'\n",g_footer.data());
}
}
void HtmlGenerator::writeStyleSheetFile(QFile &file)
......@@ -422,8 +436,7 @@ static void writePageFooter(QTextStream &t,const QCString lastTitle)
);
t << endl << "<a href=\"http://www.doxygen.org/index.html\">";
t << endl << "<img src=\"doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0 > " << endl <<
"</a>" << versionString <<" ";
<< "align=\"middle\" border=0 > " << "</a>" << versionString << " ";
t << "</small></address>\n</body>\n</html>\n";
}
else
......
......@@ -258,6 +258,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::ManOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
......
......@@ -198,6 +198,9 @@ void ManDocVisitor::visit(DocVerbatim *s)
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
case DocVerbatim::ManOnly:
m_t << s->text();
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly:
......
......@@ -153,6 +153,8 @@ void ManGenerator::endTitleHead(const char *,const char *name)
{
t << ".TH \"" << name << "\" " << getExtension() << " \""
<< dateToString(FALSE) << "\" \"";
if (!Config_getString("PROJECT_NUMBER").isEmpty())
t << "Version " << Config_getString("PROJECT_NUMBER") << "\" \"";
if (Config_getString("PROJECT_NAME").isEmpty())
t << "Doxygen";
else
......
......@@ -144,21 +144,24 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
QCString n=a->type;
if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
if (a->type!="...")
{
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
}
}
if (!md->isDefine())
{
ol.endParameterType();
ol.startParameterName(defArgList->count()<2);
}
if (!a->name.isEmpty()) // argument has a name
if (!a->name.isEmpty() || (a->name.isEmpty() && a->type=="...")) // argument has a name
{
ol.docify(" ");
ol.disable(OutputGenerator::Man);
ol.startEmphasis();
ol.enable(OutputGenerator::Man);
ol.docify(a->name);
if (a->name.isEmpty()) ol.docify(a->type); else ol.docify(a->name);
ol.disable(OutputGenerator::Man);
ol.endEmphasis();
ol.enable(OutputGenerator::Man);
......@@ -191,7 +194,8 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
//printf("Found parameter keyword %s\n",a->attrib.data());
// strip [ and ]
key=a->attrib.mid(1,a->attrib.length()-2)+":";
key=a->attrib.mid(1,a->attrib.length()-2);
if (key!=",") key+=":"; // for normal keywords add colon
}
ol.endParameterName(FALSE,FALSE);
ol.startParameterType(FALSE,key);
......@@ -800,9 +804,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (prot!=Public)
{
Doxygen::tagFile << "\" protection=\"";
if (prot==Protected) Doxygen::tagFile << "public";
if (prot==Protected) Doxygen::tagFile << "protected";
else if (prot==Package) Doxygen::tagFile << "package";
else /* Private */ Doxygen::tagFile << "protected";
else /* Private */ Doxygen::tagFile << "private";
}
if (virt!=Normal)
{
......@@ -1321,6 +1325,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName(isObjCMethod());
if (isObjCMethod())
{
// strip scope name
int ep = ldef.find("::");
if (ep!=-1)
{
int sp=ldef.findRev(' ',ep);
if (sp!=-1)
{
ldef=ldef.left(sp+1)+ldef.mid(ep+2);
}
}
// strip keywords
int dp = ldef.find(':');
if (dp!=-1)
{
......
......@@ -619,6 +619,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
return;
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::ManOnly: type = "manonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
case DocVerbatim::XmlOnly: type = "xmlonly"; break;
case DocVerbatim::Dot: type = "dot"; break;
......
......@@ -141,6 +141,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Code: printf("<code>"); break;
case DocVerbatim::Verbatim: printf("<verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("<htmlonly>"); break;
case DocVerbatim::ManOnly: printf("<manonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
......@@ -151,6 +152,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Code: printf("</code>"); break;
case DocVerbatim::Verbatim: printf("</verbatim>"); break;
case DocVerbatim::HtmlOnly: printf("</htmlonly>"); break;
case DocVerbatim::ManOnly: printf("</manonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
......
......@@ -313,6 +313,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::ManOnly:
/* nothing */
break;
case DocVerbatim::Dot:
......
......@@ -167,6 +167,7 @@ static QCString oldStyleArgType;
static QCString docBackup;
static QCString briefBackup;
//-----------------------------------------------------------------------------
static void initParser()
......@@ -439,11 +440,12 @@ static void setContext()
insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" ||
fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java";
insideCS = fileName.right(3)==".cs";
insideD = fileName.right(3)==".d";
insideCS = fileName.right(3)==".cs"; // for normal keywords add colon
insideD = fileName.right(3)==".d"; // for normal keywords add colon
insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" ||
fileName.right(4)==".inc" || fileName.right(6)==".phtml";
insideObjC = fileName.right(2)==".m";
insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" ||
fileName.right(3)==".mm";
if ( insidePHP )
{
useOverrideCommands = TRUE;
......@@ -1024,6 +1026,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
else
{
lineCount();
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
current->section = Entry::FUNCTION_SEC;
current->protection = protection = Public ;
current->stat=yytext[0]=='+';
current->mtype = mtype = Method;
......@@ -1044,7 +1051,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
current->name = yytext;
}
<ObjCMethod>":" { // start of parameter list
<ObjCMethod>":"{B}* { // start of parameter list
current->name += ':';
Argument *a = new Argument;
current->argList->append(a);
......@@ -1060,11 +1067,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->argList->getLast()->attrib=(QCString)"["+yytext+"]";
current->name += yytext;
}
<ObjCParams>{ID} { // name of parameter
current->argList->getLast()->name=yytext;
<ObjCParams>{ID}{BN}* { // name of parameter
lineCount();
current->argList->getLast()->name=QCString(yytext).stripWhiteSpace();
}
<ObjCParams>"..." { // name of parameter
current->argList->getLast()->name=yytext;
current->argList->getLast()->attrib="[,]";
current->argList->getLast()->type="...";
}
<ObjCParams>":" {
current->name += ':';
......@@ -1084,7 +1093,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ObjCParamType>[^)]* {
current->argList->last()->type=yytext;
}
<ObjCParamType>")" {
<ObjCParamType>")"{B}* {
BEGIN( ObjCParams );
}
<ObjCMethod,ObjCParams>";" { // end of method declaration
......@@ -1093,6 +1102,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput(';');
BEGIN( Function );
}
<ObjCMethod,ObjCParams>"{" { // start of a method body
unput('{');
BEGIN( Function );
}
<FindMembers>{BN}{1,80} {
lineCount();
}
......@@ -1226,7 +1239,20 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name = QCString(yytext).stripWhiteSpace();
}
}
<FindMembers>{B}*"@interface"{BN}+ { // Objective-C interface
<FindMembers>{B}*"@implementation"{BN}+ { // Objective-C class implementation
lineCount();
isTypedef=FALSE;
current->section = Entry::OBJCIMPL_SEC;
current->objc = insideObjC = TRUE;
current->protection = protection = Public ;
addType( current ) ;
current->type += " implementation" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
<FindMembers>{B}*"@interface"{BN}+ { // Objective-C class interface
lineCount();
isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC;
......@@ -3327,10 +3353,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ClassTemplSpec>. {
current->name += yytext;
}
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
unput(';');
if (isTypedef) // typedef of a class, put typedef keyword back
{
current->type.prepend("typedef");
}
BEGIN( FindMembers );
}
<CompoundName>{SCOPENAME} {
current->name = yytext ;
lineCount();
if (current->section == Entry::PROTOCOL_SEC)
if (current->section == Entry::PROTOCOL_SEC ||
current->section == Entry::OBJCIMPL_SEC)
{
unput('{'); // fake start of body
}
......@@ -3454,16 +3489,17 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name.sprintf("@%d",anonCount++);
}
curlyCount=0;
if (current->section==Entry::PROTOCOL_SEC)
{
if (current->section==Entry::PROTOCOL_SEC ||
current->section==Entry::OBJCIMPL_SEC)
{ // ObjC body that ends with @end
BEGIN( ReadBodyIntf );
}
else if (current->section==Entry::NAMESPACE_SEC)
{
{ // namespace body
BEGIN( ReadNSBody );
}
else
{
{ // class body
BEGIN( ReadBody ) ;
}
}
......
......@@ -55,8 +55,8 @@ class TagMemberInfo
class TagClassInfo
{
public:
enum Kind { Class, Struct, Union, Interface, Exception };
TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); }
enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category };
TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; }
~TagClassInfo() { delete bases; delete templateArguments; }
QString name;
QString filename;
......@@ -65,6 +65,7 @@ class TagClassInfo
QList<TagMemberInfo> members;
QList<QString> *templateArguments;
Kind kind;
bool isObjC;
};
/*! Container for namespace specific info that can be read from a tagfile */
......@@ -194,6 +195,7 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curString = "";
QString kind = attrib.value("kind");
QString isObjC = attrib.value("objc");
if (kind=="class")
{
m_curClass = new TagClassInfo;
......@@ -224,6 +226,18 @@ class TagFileParser : public QXmlDefaultHandler
m_curClass->kind = TagClassInfo::Exception;
m_state = InClass;
}
else if (kind=="protocol")
{
m_curClass = new TagClassInfo;
m_curClass->kind = TagClassInfo::Protocol;
m_state = InClass;
}
else if (kind=="category")
{
m_curClass = new TagClassInfo;
m_curClass->kind = TagClassInfo::Category;
m_state = InClass;
}
else if (kind=="file")
{
m_curFile = new TagFileInfo;
......@@ -253,6 +267,10 @@ class TagFileParser : public QXmlDefaultHandler
{
err("Error: Unknown compound attribute `%s' found!\n",kind.data());
}
if (isObjC=="yes" && m_curClass)
{
m_curClass->isObjC = TRUE;
}
}
void endCompound()
{
......@@ -1004,6 +1022,8 @@ void TagFileParser::buildLists(Entry *root)
case TagClassInfo::Union: ce->section = Entry::UNION_SEC; break;
case TagClassInfo::Interface: ce->section = Entry::INTERFACE_SEC; break;
case TagClassInfo::Exception: ce->section = Entry::EXCEPTION_SEC; break;
case TagClassInfo::Protocol: ce->section = Entry::PROTOCOL_SEC; break;
case TagClassInfo::Category: ce->section = Entry::CATEGORY_SEC; break;
}
ce->name = tci->name;
addDocAnchors(ce,tci->docAnchors);
......@@ -1011,6 +1031,7 @@ void TagFileParser::buildLists(Entry *root)
ti->tagName = m_tagName;
ti->fileName = tci->filename;
ce->tagInfo = ti;
ce->objc = tci->isObjC;
// transfer base class list
if (tci->bases)
{
......
......@@ -557,6 +557,7 @@ NamespaceDef *getResolvedNamespace(const char *name)
}
static QDict<MemberDef> g_resolvedTypedefs;
static QDict<Definition> g_visitedNamespaces;
// forward declaration
ClassDef *getResolvedClassRec(Definition *scope,
......@@ -746,12 +747,13 @@ bool accessibleViaUsingNamespace(const NamespaceSDict *nl,
//printf("Trying via used namespace %s\n",und->name().data());
Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,fileScope,explicitScopePart);
if (sc && item->getOuterScope()==sc) return TRUE;
//printf("Try via used namespac done\n");
//printf("Try via used namespace done\n");
}
}
return FALSE;
}
/* Returns the "distance" (=number of levels up) from item to scope, or -1
* if item in not inside scope.
*/
......@@ -857,6 +859,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
int i=-1;
if (newScope->definitionType()==Definition::TypeNamespace)
{
g_visitedNamespaces.insert(newScope->name(),newScope);
// this part deals with the case where item is a class
// A::B::C but is explicit referenced as A::C, where B is imported
// in A via a using directive.
......@@ -884,11 +887,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
i = isAccessibleFrom(scope,fileScope,item,nd->name());
if (i!=-1)
if (g_visitedNamespaces.find(nd->name())==0)
{
//printf("> found via explicit scope of used namespace\n");
goto done;
i = isAccessibleFrom(scope,fileScope,item,nd->name());
if (i!=-1)
{
//printf("> found via explicit scope of used namespace\n");
goto done;
}
}
}
}
......@@ -1009,6 +1015,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
if (d->definitionType()==Definition::TypeClass ||
d->definitionType()==Definition::TypeMember)
{
g_visitedNamespaces.clear();
// test accessibility of definition within scope.
int distance = isAccessibleFrom(scope,fileScope,d,explicitScopePart);
if (distance!=-1) // definition is accessible
......@@ -1525,6 +1532,10 @@ int filterCRLF(char *buf,int len)
if (src<len && buf[src] == '\n')
++src; // skip LF just after CR (DOS)
}
else if ( c == '\0' && src<len-1) // filter out internal \0 characters, as it will confuse the parser
{
c = ' '; // turn into a space
}
buf[dest++] = c; // copy the (modified) character to dest
}
return dest; // length of the valid part of the buf
......
......@@ -181,6 +181,11 @@ void XmlDocVisitor::visit(DocVerbatim *s)
filter(s->text());
m_t << "</htmlonly>";
break;
case DocVerbatim::ManOnly:
m_t << "<manonly>";
filter(s->text());
m_t << "</manonly>";
break;
case DocVerbatim::LatexOnly:
m_t << "<latexonly>";
filter(s->text());
......
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