Commit 9343f07a authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.5.3

parent 04247620
DOXYGEN Version 1.5.2-20070719 DOXYGEN Version 1.5.3
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (19 July 2007) Dimitri van Heesch (27 July 2007)
DOXYGEN Version 1.5.2_20070719 DOXYGEN Version 1.5.3
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (19 July 2007) Dimitri van Heesch (dimitri@stack.nl) (27 July 2007)
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
doxygen_version_major=1 doxygen_version_major=1
doxygen_version_minor=5 doxygen_version_minor=5
doxygen_version_revision=2 doxygen_version_revision=3
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20070719 doxygen_version_mmn=NO
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
...@@ -783,7 +783,7 @@ See section \ref memgroup for an example. ...@@ -783,7 +783,7 @@ See section \ref memgroup for an example.
\ref cmdendcond "\\endcond" command, which is typically found in \ref cmdendcond "\\endcond" command, which is typically found in
another comment block. The main purpose of this pair of another comment block. The main purpose of this pair of
commands is to (conditionally) exclude part of a file from processing commands is to (conditionally) exclude part of a file from processing
(traditionally this could only be achieved using C processor commands). (in older version of doxygen this could only be achieved using C preprocessor commands).
The section between \\cond and \\endcond commands can be included by The section between \\cond and \\endcond commands can be included by
adding its section label to the \ref cfg_enabled_sections "ENABLED_SECTIONS" adding its section label to the \ref cfg_enabled_sections "ENABLED_SECTIONS"
...@@ -838,8 +838,8 @@ class Implementation : public Intf ...@@ -838,8 +838,8 @@ class Implementation : public Intf
/// @endcond /// @endcond
\endverbatim \endverbatim
The output will be different depending on whether \c ENABLED_SECTIONS The output will be different depending on whether or not \c ENABLED_SECTIONS
is empty, \c TEST, \c DEV, or \c DEV \c TEST. contains \c TEST, or \c DEV
<hr> <hr>
\section cmddate \\date { date description } \section cmddate \\date { date description }
......
...@@ -100,6 +100,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -100,6 +100,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_external_groups EXTERNAL_GROUPS \refitem cfg_external_groups EXTERNAL_GROUPS
\refitem cfg_extra_packages EXTRA_PACKAGES \refitem cfg_extra_packages EXTRA_PACKAGES
\refitem cfg_extract_all EXTRACT_ALL \refitem cfg_extract_all EXTRACT_ALL
\refitem cfg_extract_anon_nspaces EXTRACT_ANON_NSPACES
\refitem cfg_extract_local_classes EXTRACT_LOCAL_CLASSES \refitem cfg_extract_local_classes EXTRACT_LOCAL_CLASSES
\refitem cfg_extract_local_methods EXTRACT_LOCAL_METHODS \refitem cfg_extract_local_methods EXTRACT_LOCAL_METHODS
\refitem cfg_extract_private EXTRACT_PRIVATE \refitem cfg_extract_private EXTRACT_PRIVATE
...@@ -136,6 +137,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -136,6 +137,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_hide_undoc_members HIDE_UNDOC_MEMBERS \refitem cfg_hide_undoc_members HIDE_UNDOC_MEMBERS
\refitem cfg_hide_undoc_relations HIDE_UNDOC_RELATIONS \refitem cfg_hide_undoc_relations HIDE_UNDOC_RELATIONS
\refitem cfg_html_align_members HTML_ALIGN_MEMBERS \refitem cfg_html_align_members HTML_ALIGN_MEMBERS
\refitem cfg_html_dynamic_sections HTML_DYNAMIC_SECTIONS
\refitem cfg_html_footer HTML_FOOTER \refitem cfg_html_footer HTML_FOOTER
\refitem cfg_html_header HTML_HEADER \refitem cfg_html_header HTML_HEADER
\refitem cfg_html_output HTML_OUTPUT \refitem cfg_html_output HTML_OUTPUT
...@@ -548,6 +550,14 @@ followed by the descriptions of the tags grouped by category. ...@@ -548,6 +550,14 @@ followed by the descriptions of the tags grouped by category.
If set to NO only classes defined in header files are included. Does not If set to NO only classes defined in header files are included. Does not
have any effect for Java sources. have any effect for Java sources.
\anchor cfg_extract_anon_nspaces
<dt>\c EXTRACT_ANON_NSPACES <dd>
\addindex EXTRACT_ANON_NSPACES
If this flag is set to YES, the members of anonymous namespaces will be extracted
and appear in the documentation as a namespace called 'anonymous_namespace{file}',
where file will be replaced with the base name of the file that contains the anonymous
namespace. By default anonymous namespace are hidden.
\anchor cfg_extract_local_methods \anchor cfg_extract_local_methods
<dt>\c EXTRACT_LOCAL_METHODS <dd> <dt>\c EXTRACT_LOCAL_METHODS <dd>
\addindex EXTRACT_LOCAL_METHODS \addindex EXTRACT_LOCAL_METHODS
...@@ -1128,6 +1138,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1128,6 +1138,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
Setting this tag to \c NO will become obsolete in the future, since I only Setting this tag to \c NO will become obsolete in the future, since I only
intent to support and test the aligned representation. intent to support and test the aligned representation.
\anchor cfg_generate_htmlhelp \anchor cfg_generate_htmlhelp
<dt>\c GENERATE_HTMLHELP <dd> <dt>\c GENERATE_HTMLHELP <dd>
\addindex GENERATE_HTMLHELP \addindex GENERATE_HTMLHELP
...@@ -1147,6 +1158,15 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1147,6 +1158,15 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
and you can search for words in the documentation. and you can search for words in the documentation.
The HTML workshop also contains a viewer for compressed HTML files. The HTML workshop also contains a viewer for compressed HTML files.
\anchor cfg_html_dynamic_sections
<dt>\c HTML_DYNAMIC_SECTIONS <dd>
\addindex HTML_DYNAMIC_SECTIONS
If the \c HTML_DYNAMIC_SECTIONS tag is set to \c YES then the generated HTML
documentation will contain sections that can be hidden and shown after the
page has loaded. For this to work a browser that supports
JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
\anchor cfg_chm_file \anchor cfg_chm_file
<dt>\c CHM_FILE <dd> <dt>\c CHM_FILE <dd>
\addindex CHM_FILE \addindex CHM_FILE
......
...@@ -24,15 +24,21 @@ needs to end up in the generated documentation. For Python code there is ...@@ -24,15 +24,21 @@ needs to end up in the generated documentation. For Python code there is
a different comment convention, which can be found in section a different comment convention, which can be found in section
\ref pythonblocks \ref pythonblocks
For each code item there are two types of descriptions, which together For each code item there are two (or in some cases three) types of descriptions,
form the documentation: a \e brief description and \e detailed which together form the documentation: a \e brief description and \e detailed
description, both are optional. description, both are optional. For methods and functions there is also a third
Having more than one brief or detailed description however, is type of description, the so called "in body" description, which consists of
not allowed. the concatenation of all comment blocks found within the body of the method or function.
Having more than one brief or detailed description is allowed (but not recommended,
as the order in which the descriptions will appear is not specified).
As the name suggest, a brief description is As the name suggest, a brief description is
a short one-liner, whereas the detailed description provides longer, a short one-liner, whereas the detailed description provides longer,
more detailed documentation. more detailed documentation. An "in body" description can also act as a detailed
description or can describe a collection of implementation details.
For the HTML output brief descriptions are also
use to provide tooltips at places where an item is referenced.
There are several ways to mark a comment block as a detailed description: There are several ways to mark a comment block as a detailed description:
<ol> <ol>
...@@ -87,6 +93,15 @@ or ...@@ -87,6 +93,15 @@ or
Some people like to make their comment blocks more visible in the Some people like to make their comment blocks more visible in the
documentation. For this purpose you can use the following: documentation. For this purpose you can use the following:
\verbatim
/************************************************
* ... text
***********************************************/
\endverbatim
or
\verbatim \verbatim
///////////////////////////////////////////////// /////////////////////////////////////////////////
/// ... text ... /// ... text ...
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<li>Automatically generates class and collaboration diagrams in HTML (as clickable <li>Automatically generates class and collaboration diagrams in HTML (as clickable
image maps) and \f$\mbox{\LaTeX}\f$ (as Encapsulated PostScript images). image maps) and \f$\mbox{\LaTeX}\f$ (as Encapsulated PostScript images).
<li>Uses the dot tool of the Graphviz tool kit to generate <li>Uses the dot tool of the Graphviz tool kit to generate
include dependency graphs, collaboration diagrams, and include dependency graphs, collaboration diagrams, call graphs, directory structure
graphical class hierarchy graphs. graphs, and graphical class hierarchy graphs.
<li>Flexible comment placement: Allows you to put documentation in the <li>Flexible comment placement: Allows you to put documentation in the
header file (before the header file (before the
declaration of an entity), source file (before the definition of an entity) declaration of an entity), source file (before the definition of an entity)
...@@ -78,14 +78,14 @@ ...@@ -78,14 +78,14 @@
<li>Can cope with large projects easily. <li>Can cope with large projects easily.
</UL> </UL>
Although doxygen can be used in any C or C++ project, Although doxygen can now be used in any project written in a language that is
initially it was specifically designed to be used for projects that make supported by doxygen, initially it was specifically designed to be used for projects
use of Troll Tech's that make use of Troll Tech's
<A HREF="http://www.trolltech.com/products/qt.html">Qt toolkit</A>. I have tried to make doxygen <A HREF="http://www.trolltech.com/products/qt.html">Qt toolkit</A>. I have tried to
`Qt-compatible'. That is: Doxygen can read the documentation contained in make doxygen `Qt-compatible'. That is: Doxygen can read the documentation contained in
the Qt source code and create a class browser that looks very similar to the the Qt source code and create a class browser that looks quite similar to the
one that is generated by Troll Tech. Doxygen understands the C++ extensions one that is generated by Troll Tech. Doxygen understands the C++ extensions
used by Qt such as signals and slots. used by Qt such as signals and slots and many of the markup commands used in the Qt sources.
Doxygen can also automatically generate links to existing documentation Doxygen can also automatically generate links to existing documentation
that was generated with Doxygen or with Qt's non-public class browser that was generated with Doxygen or with Qt's non-public class browser
......
...@@ -49,8 +49,10 @@ The following output formats are \e indirectly supported by doxygen: ...@@ -49,8 +49,10 @@ The following output formats are \e indirectly supported by doxygen:
<dt><b>PDF</b>\htmlonly &nbsp;&nbsp;&nbsp;\endhtmlonly <dt><b>PDF</b>\htmlonly &nbsp;&nbsp;&nbsp;\endhtmlonly
<dd>Generated from the \f$\mbox{\LaTeX}\f$ output by <dd>Generated from the \f$\mbox{\LaTeX}\f$ output by
running <code>make pdf</code> in the output directory. running <code>make pdf</code> in the output directory.
In order to get hyperlinks in the PDF file, To improve the PDF output, you typically would want to enable the use
\c PDF_HYPERLINKS should be set to \c YES in the configuration file. of \c pdflatex by setting \ref cfg_use_pdflatex "USE_PDFLATEX" to \c YES in the
configuration file. In order to get hyperlinks in the PDF file you also need to enable
\ref cfg_pdf_hyperlinks "PDF_HYPERLINKS".
</dl> </dl>
*/ */
This diff is collapsed.
/* MD5.H - header file for MD5C.C /*
* This is the header file for the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
*
* Equivalent code is available from RSA Data Security, Inc.
* This code has been tested against that, and is equivalent,
* except that you don't need to include two pages of legalese
* with every copy.
*
* To compute the message digest of a chunk of bytes, declare an
* MD5Context structure, pass it to MD5Init, call MD5Update as
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*
* Changed so as no longer to depend on Colin Plumb's `usual.h'
* header definitions; now uses stuff from dpkg's config.h
* - Ian Jackson <ian@chiark.greenend.org.uk>.
* Still in the public domain.
*/ */
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All #ifndef MD5_H
rights reserved. #define MD5_H
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#ifndef _MD5_H_
#define _MD5_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "md5_loc.h" #include "md5_loc.h"
/* MD5 context. */ #define md5byte unsigned char
typedef struct {
UINT4 state[4]; /* state (ABCD) */ //#if SIZEOF_UNSIGNED_LONG==4
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ //# define UWORD32 unsigned long
unsigned char buffer[64]; /* input buffer */ //#elif SIZEOF_UNSIGNED_INT==4
} MD5_CTX; //#else
//# error I do not know what to use for a UWORD32.
void MD5Init(MD5_CTX *ctx); //#endif
void MD5Update (MD5_CTX *ctx, const unsigned char *buf, unsigned int len);
void MD5Final (MD5_CTX *ctx, unsigned char sig[16]); struct MD5Context {
UWORD32 buf[4];
UWORD32 bytes[2];
UWORD32 in[16];
};
void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16]); void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16]);
void MD5SigToString(unsigned char sig[16],char *str,int len); void MD5SigToString(unsigned char sig[16],char *str,int len);
...@@ -49,4 +54,4 @@ void MD5SigToString(unsigned char sig[16],char *str,int len); ...@@ -49,4 +54,4 @@ void MD5SigToString(unsigned char sig[16],char *str,int len);
} }
#endif #endif
#endif #endif /* !MD5_H */
/* GLOBAL.H - RSAREF types and constants */
/* Copyright (C) RSA Laboratories, a division of RSA Data Security,
Inc., created 1991. All rights reserved.
*/
#ifndef _MD5LOC_H #ifndef _MD5LOC_H
#define _MD5LOC_H #define _MD5LOC_H
/* POINTER defines a generic pointer type */ # define UWORD32 unsigned int
typedef unsigned char *POINTER;
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
#ifndef NULL_PTR
#define NULL_PTR ((POINTER)0)
#endif #endif
#ifndef UNUSED_ARG
#define UNUSED_ARG(x) x = *(&x);
#endif
#endif /* end _GLOBAL_H_ */
...@@ -59,6 +59,7 @@ public: ...@@ -59,6 +59,7 @@ public:
type *pop() { return (type *)QGList::takeFirst(); } type *pop() { return (type *)QGList::takeFirst(); }
bool remove() { return QGList::removeFirst(); } bool remove() { return QGList::removeFirst(); }
void clear() { QGList::clear(); } void clear() { QGList::clear(); }
type *bottom() const { return (type *)QGList::clast(); }
type *top() const { return (type *)QGList::cfirst(); } type *top() const { return (type *)QGList::cfirst(); }
operator type *() const { return (type *)QGList::cfirst(); } operator type *() const { return (type *)QGList::cfirst(); }
type *current() const { return (type *)QGList::cfirst(); } type *current() const { return (type *)QGList::cfirst(); }
......
...@@ -222,7 +222,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name) ...@@ -222,7 +222,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
ltype = ltype.right(ltype.length()-6); ltype = ltype.right(ltype.length()-6);
} }
if (ltype.isEmpty() || lname.isEmpty()) return; if (ltype.isEmpty() || lname.isEmpty()) return;
DBG_CTX((stderr,"** addVariable trying: type=%s name=%s g_currentDefinition=%s\n", DBG_CTX((stderr,"** addVariable trying: type='%s' name='%s' g_currentDefinition=%s\n",
ltype.data(),lname.data(),g_currentDefinition?g_currentDefinition->name().data():"<none>")); ltype.data(),lname.data(),g_currentDefinition?g_currentDefinition->name().data():"<none>"));
Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast(); Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast();
ClassDef *varType; ClassDef *varType;
...@@ -232,7 +232,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name) ...@@ -232,7 +232,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
(varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions
) )
{ {
DBG_CTX((stderr,"** addVariable type=%s name=%s\n",ltype.data(),lname.data())); DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data()));
scope->append(lname,varType); // add it to a list scope->append(lname,varType); // add it to a list
} }
else if ((i=ltype.find('<'))!=-1) else if ((i=ltype.find('<'))!=-1)
...@@ -253,7 +253,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name) ...@@ -253,7 +253,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
} }
if (newDef) if (newDef)
{ {
DBG_CTX((stderr,"** addVariable type=%s templ=%s name=%s\n",typeName.data(),templateArgs.data(),lname.data())); DBG_CTX((stderr,"** addVariable type='%s' templ='%s' name='%s'\n",typeName.data(),templateArgs.data(),lname.data()));
scope->append(lname, newDef); scope->append(lname, newDef);
} }
else else
...@@ -268,7 +268,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name) ...@@ -268,7 +268,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
// is hidden to avoid false links to global variables with the same name // is hidden to avoid false links to global variables with the same name
// TODO: make this work for namespaces as well! // TODO: make this work for namespaces as well!
{ {
DBG_CTX((stderr,"** addVariable: dummy context\n")); DBG_CTX((stderr,"** addVariable: dummy context for '%s'\n",lname.data()));
scope->append(lname,dummyContext); scope->append(lname,dummyContext);
} }
else else
...@@ -876,7 +876,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, ...@@ -876,7 +876,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
} }
QCString className=clName; QCString className=clName;
if (className.isEmpty()) return; if (className.isEmpty()) return;
if (g_insideProtocolList) if (g_insideProtocolList) // for Obj-C
{ {
className+="-p"; className+="-p";
} }
...@@ -919,10 +919,14 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, ...@@ -919,10 +919,14 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
{ {
//printf("non-dummy context lcd=%s!\n",lcd->name().data()); //printf("non-dummy context lcd=%s!\n",lcd->name().data());
g_theCallContext.setClass(lcd); g_theCallContext.setClass(lcd);
if (getLink(g_classScope,clName,ol,clName))
{ // to following is needed for links to a global variable, but is
return; // no good for a link to a local variable that is also a global symbol.
}
//if (getLink(g_classScope,clName,ol,clName))
//{
//return;
//}
} }
isLocal=TRUE; isLocal=TRUE;
//fprintf(stderr,"is a local variable cd=%p!\n",cd); //fprintf(stderr,"is a local variable cd=%p!\n",cd);
...@@ -1750,6 +1754,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1750,6 +1754,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
if (!g_curClassName.isEmpty()) // valid class name if (!g_curClassName.isEmpty()) // valid class name
{ {
pushScope(g_curClassName); pushScope(g_curClassName);
DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
g_scopeStack.push(SCOPEBLOCK); g_scopeStack.push(SCOPEBLOCK);
} }
} }
...@@ -1859,6 +1864,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1859,6 +1864,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<Body,FuncCall>"{" { <Body,FuncCall>"{" {
g_theVarContext.pushScope(); g_theVarContext.pushScope();
DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
g_scopeStack.push(INNERBLOCK); g_scopeStack.push(INNERBLOCK);
if (g_searchingForBody) if (g_searchingForBody)
...@@ -1874,11 +1880,15 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1874,11 +1880,15 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
} }
g_type.resize(0); g_type.resize(0);
g_name.resize(0); g_name.resize(0);
BEGIN( Body );
} }
<Body,MemberCall,MemberCall2>"}" { <Body,MemberCall,MemberCall2>"}" {
g_theVarContext.popScope(); g_theVarContext.popScope();
g_type.resize(0);
g_name.resize(0);
int *scope = g_scopeStack.pop(); int *scope = g_scopeStack.pop();
DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
if (scope==SCOPEBLOCK || scope==CLASSBLOCK) if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
{ {
popScope(); popScope();
...@@ -1914,6 +1924,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1914,6 +1924,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_theVarContext.popScope(); g_theVarContext.popScope();
int *scope = g_scopeStack.pop(); int *scope = g_scopeStack.pop();
DBG_CTX((stderr,"** scope stack pop SCOPEBLOCK=%d\n",scope==SCOPEBLOCK));
if (scope==SCOPEBLOCK || scope==CLASSBLOCK) if (scope==SCOPEBLOCK || scope==CLASSBLOCK)
{ {
popScope(); popScope();
...@@ -1980,7 +1991,10 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1980,7 +1991,10 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<ClassVar>{ID} { <ClassVar>{ID} {
g_type = g_curClassName.copy(); g_type = g_curClassName.copy();
g_name = yytext; g_name = yytext;
g_theVarContext.addVariable(g_type,g_name); if (g_insideBody)
{
g_theVarContext.addVariable(g_type,g_name);
}
generateClassOrGlobalLink(*g_code,yytext); generateClassOrGlobalLink(*g_code,yytext);
} }
<ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*":"{B}* { <ClassName,ClassVar,CppCliTypeModifierFollowup>{B}*":"{B}* {
...@@ -2005,6 +2019,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2005,6 +2019,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
if (g_insideBody) g_bodyCurlyCount++; if (g_insideBody) g_bodyCurlyCount++;
if (!g_curClassName.isEmpty()) // valid class name if (!g_curClassName.isEmpty()) // valid class name
{ {
DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
g_scopeStack.push(CLASSBLOCK); g_scopeStack.push(CLASSBLOCK);
pushScope(g_curClassName); pushScope(g_curClassName);
//fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data()); //fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data());
...@@ -2032,6 +2047,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2032,6 +2047,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
} }
else // not a class name -> assume inner block else // not a class name -> assume inner block
{ {
DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
g_scopeStack.push(INNERBLOCK); g_scopeStack.push(INNERBLOCK);
} }
g_curClassName.resize(0); g_curClassName.resize(0);
...@@ -2185,6 +2201,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2185,6 +2201,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
if (*yytext==')') if (*yytext==')')
{ {
g_theCallContext.popScope(); g_theCallContext.popScope();
g_bracketCount--;
BEGIN(FuncCall); BEGIN(FuncCall);
} }
} }
...@@ -2440,6 +2457,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2440,6 +2457,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_saveType = g_type.copy(); g_saveType = g_type.copy();
if (*yytext!='[' && !g_type.isEmpty()) if (*yytext!='[' && !g_type.isEmpty())
{ {
//printf("g_scopeStack.bottom()=%p\n",g_scopeStack.bottom());
if (g_scopeStack.top()!=CLASSBLOCK) if (g_scopeStack.top()!=CLASSBLOCK)
{ {
//printf("AddVariable: '%s' '%s' context=%d\n", //printf("AddVariable: '%s' '%s' context=%d\n",
...@@ -2625,6 +2643,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2625,6 +2643,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
} }
<MemberCall2,FuncCall>"(" { <MemberCall2,FuncCall>"(" {
g_parmType.resize(0);g_parmName.resize(0);
g_code->codify(yytext); g_code->codify(yytext);
g_bracketCount++; g_bracketCount++;
g_theCallContext.pushScope(); g_theCallContext.pushScope();
...@@ -2717,10 +2736,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2717,10 +2736,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
{ {
setClassScope(g_realScope); setClassScope(g_realScope);
} }
DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
g_scopeStack.push(SCOPEBLOCK); g_scopeStack.push(SCOPEBLOCK);
} }
else else
{ {
DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
g_scopeStack.push(INNERBLOCK); g_scopeStack.push(INNERBLOCK);
} }
yytext[yyleng-1]='\0'; yytext[yyleng-1]='\0';
...@@ -2806,11 +2827,13 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2806,11 +2827,13 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
if (g_insideBody) g_bodyCurlyCount++; if (g_insideBody) g_bodyCurlyCount++;
if (g_name.find("::")!=-1) if (g_name.find("::")!=-1)
{ {
DBG_CTX((stderr,"** scope stack push SCOPEBLOCK\n"));
g_scopeStack.push(SCOPEBLOCK); g_scopeStack.push(SCOPEBLOCK);
setClassScope(g_realScope); setClassScope(g_realScope);
} }
else else
{ {
DBG_CTX((stderr,"** scope stack push INNERBLOCK\n"));
g_scopeStack.push(INNERBLOCK); g_scopeStack.push(INNERBLOCK);
} }
g_type.resize(0); g_name.resize(0); g_type.resize(0); g_name.resize(0);
......
...@@ -272,7 +272,7 @@ class DocCmdMapper ...@@ -272,7 +272,7 @@ class DocCmdMapper
{ {
if (m_map.find(p->cmdName)!=0) if (m_map.find(p->cmdName)!=0)
{ {
printf("Error: command %s already added\n",p->cmdName); printf("Error: DocCmdMapper: command %s already added\n",p->cmdName);
exit(1); exit(1);
} }
Cmd *cmd = new Cmd; Cmd *cmd = new Cmd;
...@@ -687,7 +687,14 @@ static inline void setOutput(OutputContext ctx) ...@@ -687,7 +687,14 @@ static inline void setOutput(OutputContext ctx)
current->briefLine = yyLineNr; current->briefLine = yyLineNr;
} }
} }
pOutputString = &current->brief; if (current->brief.isEmpty())
{
pOutputString = &current->brief;
}
else
{
pOutputString = &current->doc;
}
break; break;
case OutputXRef: case OutputXRef:
pOutputString = &outputXRef; pOutputString = &outputXRef;
......
...@@ -647,6 +647,8 @@ static void readIncludeFile(const char *incName) ...@@ -647,6 +647,8 @@ static void readIncludeFile(const char *incName)
tmpString.resize(0); tmpString.resize(0);
} }
<GetQuotedString>"\""|"\n" { <GetQuotedString>"\""|"\n" {
// we add a bogus space to signal that the string was quoted. This space will be stripped later on.
tmpString+=" ";
//printf("Quoted String = `%s'\n",tmpString.data()); //printf("Quoted String = `%s'\n",tmpString.data());
if (lastState==GetString) if (lastState==GetString)
{ {
...@@ -790,6 +792,8 @@ static void substEnvVarsInString(QCString &s) ...@@ -790,6 +792,8 @@ static void substEnvVarsInString(QCString &s)
s = s.left(i)+env+s.right(s.length()-i-l); s = s.left(i)+env+s.right(s.length()-i-l);
p=i+env.length(); // next time start at the end of the expanded string p=i+env.length(); // next time start at the end of the expanded string
} }
s=s.stripWhiteSpace(); // to strip the bogus space that was added when an argument
// has quotes
//printf("substEnvVarInString(%s) end\n",s.data()); //printf("substEnvVarInString(%s) end\n",s.data());
} }
...@@ -799,7 +803,9 @@ static void substEnvVarsInStrList(QStrList &sl) ...@@ -799,7 +803,9 @@ static void substEnvVarsInStrList(QStrList &sl)
while (s) while (s)
{ {
QCString result(s); QCString result(s);
// an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE.
bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1); bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1);
// here we strip the quote again
substEnvVarsInString(result); substEnvVarsInString(result);
//printf("Result %s was quoted=%d\n",result.data(),wasQuoted); //printf("Result %s was quoted=%d\n",result.data(),wasQuoted);
...@@ -1717,6 +1723,14 @@ void Config::create() ...@@ -1717,6 +1723,14 @@ void Config::create()
"If set to NO (the default) only methods in the interface are included. \n", "If set to NO (the default) only methods in the interface are included. \n",
FALSE FALSE
); );
cb = addBool(
"EXTRACT_ANON_NSPACES",
"If this flag is set to YES, the members of anonymous namespaces will be extracted \n"
"and appear in the documentation as a namespace called 'anonymous_namespace{file}', \n"
"where file will be replaced with the base name of the file that contains the anonymous \n"
"namespace. By default anonymous namespace are hidden. \n",
FALSE
);
cb = addBool( cb = addBool(
"HIDE_UNDOC_MEMBERS", "HIDE_UNDOC_MEMBERS",
"If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n" "If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "qtbc.h" #include "qtbc.h"
#include <ctype.h> #include <ctype.h>
#include <qregexp.h> #include <qregexp.h>
#include <md5.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
...@@ -63,6 +64,7 @@ class DefinitionImpl ...@@ -63,6 +64,7 @@ class DefinitionImpl
DocInfo *details; // not exported DocInfo *details; // not exported
BriefInfo *brief; // not exported BriefInfo *brief; // not exported
BodyInfo *body; // not exported BodyInfo *body; // not exported
QCString docSignatures;
QCString localName; // local (unqualified) name of the definition QCString localName; // local (unqualified) name of the definition
// in the future m_name should become m_localName // in the future m_name should become m_localName
...@@ -280,7 +282,7 @@ Definition::Definition(const char *df,int dl, ...@@ -280,7 +282,7 @@ Definition::Definition(const char *df,int dl,
m_isSymbol = isSymbol; m_isSymbol = isSymbol;
if (isSymbol) addToMap(name,this); if (isSymbol) addToMap(name,this);
_setBriefDescription(b,df,dl); _setBriefDescription(b,df,dl);
_setDocumentation(d,df,dl,TRUE); _setDocumentation(d,df,dl,TRUE,FALSE);
if (matchExcludedSymbols(name)) m_impl->hidden = TRUE; if (matchExcludedSymbols(name)) m_impl->hidden = TRUE;
} }
...@@ -348,7 +350,25 @@ void Definition::writeDocAnchorsToTagFile() ...@@ -348,7 +350,25 @@ void Definition::writeDocAnchorsToTagFile()
} }
} }
void Definition::_setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace) bool Definition::_docsAlreadyAdded(const QString &doc)
{
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)doc.data(),doc.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.data(),33);
if (m_impl->docSignatures.find(sigStr)==-1) // new docs, add signature to prevent re-adding it
{
m_impl->docSignatures+=":"+sigStr;
return FALSE;
}
else
{
return TRUE;
}
}
void Definition::_setDocumentation(const char *d,const char *docFile,int docLine,
bool stripWhiteSpace,bool atTop)
{ {
if (d==0) return; if (d==0) return;
//printf("Definition::setDocumentation(%s,%s,%d,%d)\n",d,docFile,docLine,stripWhiteSpace); //printf("Definition::setDocumentation(%s,%s,%d,%d)\n",d,docFile,docLine,stripWhiteSpace);
...@@ -361,52 +381,82 @@ void Definition::_setDocumentation(const char *d,const char *docFile,int docLine ...@@ -361,52 +381,82 @@ void Definition::_setDocumentation(const char *d,const char *docFile,int docLine
{ {
doc=d; doc=d;
} }
//printf("setting docs for %s: `%s'\n",name().data(),m_doc.data()); if (!_docsAlreadyAdded(doc))
if (m_impl->details==0)
{ {
m_impl->details = new DocInfo; //printf("setting docs for %s: `%s'\n",name().data(),m_doc.data());
if (m_impl->details==0)
{
m_impl->details = new DocInfo;
}
if (m_impl->details->doc.isEmpty()) // fresh detailed description
{
m_impl->details->doc = doc;
}
else if (atTop) // another detailed description, append it to the start
{
m_impl->details->doc = doc+"\n\n"+m_impl->details->doc;
}
else // another detailed description, append it to the end
{
m_impl->details->doc += "\n\n"+doc;
}
if (docLine!=-1) // store location if valid
{
m_impl->details->file = docFile;
m_impl->details->line = docLine;
}
} }
m_impl->details->doc = doc;
m_impl->details->file = docFile;
m_impl->details->line = docLine;
} }
void Definition::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace) void Definition::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace)
{ {
if (d==0) return; if (d==0) return;
makeResident(); makeResident();
_setDocumentation(d,docFile,docLine,stripWhiteSpace); _setDocumentation(d,docFile,docLine,stripWhiteSpace,FALSE);
} }
#define uni_isupper(c) (QChar(c).category()==QChar::Letter_Uppercase) #define uni_isupper(c) (QChar(c).category()==QChar::Letter_Uppercase)
void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine) void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine)
{ {
if (b==0) return;
static QCString outputLanguage = Config_getEnum("OUTPUT_LANGUAGE"); static QCString outputLanguage = Config_getEnum("OUTPUT_LANGUAGE");
static bool needsDot = outputLanguage!="Japanese" && static bool needsDot = outputLanguage!="Japanese" &&
outputLanguage!="Chinese" && outputLanguage!="Chinese" &&
outputLanguage!="Korean"; outputLanguage!="Korean";
//fprintf(stderr,"Definition::setBriefDescription(%s,%s,%d)\n",b,briefFile,briefLine); QCString brief = b;
if (m_impl->brief==0) brief = brief.stripWhiteSpace();
{ if (brief.isEmpty()) return;
m_impl->brief = new BriefInfo; int bl = brief.length();
}
m_impl->brief->doc=QCString(b).stripWhiteSpace();
int bl=m_impl->brief->doc.length();
if (bl>0 && needsDot) // add punctuation if needed if (bl>0 && needsDot) // add punctuation if needed
{ {
switch(m_impl->brief->doc.at(bl-1)) switch(brief.at(bl-1))
{ {
case '.': case '!': case '?': break; case '.': case '!': case '?': break;
default: default:
if (uni_isupper(m_impl->brief->doc.at(0))) m_impl->brief->doc+='.'; if (uni_isupper(brief.at(0))) brief+='.';
break; break;
} }
} }
m_impl->brief->file = briefFile;
m_impl->brief->line = briefLine; if (m_impl->brief && !m_impl->brief->doc.isEmpty())
m_impl->brief->tooltip = parseCommentAsText(m_impl->brief->doc,briefFile,briefLine); {
//printf("adding to details\n");
_setDocumentation(brief,briefFile,briefLine,FALSE,TRUE);
}
else if (!_docsAlreadyAdded(brief))
{
//fprintf(stderr,"Definition::setBriefDescription(%s,%s,%d)\n",b,briefFile,briefLine);
if (m_impl->brief==0)
{
m_impl->brief = new BriefInfo;
}
m_impl->brief->doc=brief;
if (briefLine!=-1)
{
m_impl->brief->file = briefFile;
m_impl->brief->line = briefLine;
}
}
} }
void Definition::setBriefDescription(const char *b,const char *briefFile,int briefLine) void Definition::setBriefDescription(const char *b,const char *briefFile,int briefLine)
...@@ -1100,7 +1150,24 @@ QCString Definition::briefDescription() const ...@@ -1100,7 +1150,24 @@ QCString Definition::briefDescription() const
QCString Definition::briefDescriptionAsTooltip() const QCString Definition::briefDescriptionAsTooltip() const
{ {
makeResident(); makeResident();
return m_impl->brief ? m_impl->brief->tooltip : QCString(""); if (m_impl->brief)
{
if (m_impl->brief->tooltip.isEmpty() && !m_impl->brief->doc.isEmpty())
{
static bool reentering=FALSE;
if (!reentering)
{
reentering=TRUE; // prevent requests for tooltips while parsing a tooltip
m_impl->brief->tooltip = parseCommentAsText(
m_impl->brief->doc,
m_impl->brief->file,
m_impl->brief->line);
reentering=FALSE;
}
}
return m_impl->brief->tooltip;
}
return QCString("");
} }
int Definition::briefLine() const int Definition::briefLine() const
...@@ -1245,6 +1312,7 @@ void Definition::flushToDisk() const ...@@ -1245,6 +1312,7 @@ void Definition::flushToDisk() const
marshalDocInfo (Doxygen::symbolStorage,m_impl->details); marshalDocInfo (Doxygen::symbolStorage,m_impl->details);
marshalBriefInfo (Doxygen::symbolStorage,m_impl->brief); marshalBriefInfo (Doxygen::symbolStorage,m_impl->brief);
marshalBodyInfo (Doxygen::symbolStorage,m_impl->body); marshalBodyInfo (Doxygen::symbolStorage,m_impl->body);
marshalQCString (Doxygen::symbolStorage,m_impl->docSignatures);
marshalQCString (Doxygen::symbolStorage,m_impl->localName); marshalQCString (Doxygen::symbolStorage,m_impl->localName);
marshalQCString (Doxygen::symbolStorage,m_impl->qualifiedName); marshalQCString (Doxygen::symbolStorage,m_impl->qualifiedName);
marshalQCString (Doxygen::symbolStorage,m_impl->ref); marshalQCString (Doxygen::symbolStorage,m_impl->ref);
...@@ -1274,6 +1342,7 @@ void Definition::loadFromDisk() const ...@@ -1274,6 +1342,7 @@ void Definition::loadFromDisk() const
m_impl->details = unmarshalDocInfo (Doxygen::symbolStorage); m_impl->details = unmarshalDocInfo (Doxygen::symbolStorage);
m_impl->brief = unmarshalBriefInfo (Doxygen::symbolStorage); m_impl->brief = unmarshalBriefInfo (Doxygen::symbolStorage);
m_impl->body = unmarshalBodyInfo (Doxygen::symbolStorage); m_impl->body = unmarshalBodyInfo (Doxygen::symbolStorage);
m_impl->docSignatures = unmarshalQCString (Doxygen::symbolStorage);
m_impl->localName = unmarshalQCString (Doxygen::symbolStorage); m_impl->localName = unmarshalQCString (Doxygen::symbolStorage);
m_impl->qualifiedName = unmarshalQCString (Doxygen::symbolStorage); m_impl->qualifiedName = unmarshalQCString (Doxygen::symbolStorage);
m_impl->ref = unmarshalQCString (Doxygen::symbolStorage); m_impl->ref = unmarshalQCString (Doxygen::symbolStorage);
......
...@@ -310,7 +310,8 @@ class Definition : public DefinitionIntf, public LockableObj ...@@ -310,7 +310,8 @@ class Definition : public DefinitionIntf, public LockableObj
void _writeSourceRefList(OutputList &ol,const char *scopeName, void _writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool); const QCString &text,MemberSDict *members,bool);
void _setBriefDescription(const char *b,const char *briefFile,int briefLine); void _setBriefDescription(const char *b,const char *briefFile,int briefLine);
void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace); void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace,bool atTop);
bool _docsAlreadyAdded(const QString &doc);
DefinitionImpl *m_impl; // internal structure holding all private data DefinitionImpl *m_impl; // internal structure holding all private data
QCString m_name; QCString m_name;
bool m_isSymbol; bool m_isSymbol;
......
...@@ -68,23 +68,7 @@ static const char *sectionLevelToName[] = ...@@ -68,23 +68,7 @@ static const char *sectionLevelToName[] =
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc // Parser state: global variables during a call to validatingParseDoc
static bool g_hasParamCommand;
static bool g_hasReturnCommand;
static MemberDef * g_memberDef;
static QDict<void> g_paramsFound;
static bool g_isExample;
static QCString g_exampleName;
static SectionDict *g_sectionDict;
static QCString g_searchUrl;
// include file state
static QString g_includeFileText;
static uint g_includeFileOffset;
static uint g_includeFileLength;
// parser state
static QString g_context; static QString g_context;
static bool g_inSeeBlock; static bool g_inSeeBlock;
static bool g_insideHtmlLink; static bool g_insideHtmlLink;
...@@ -95,6 +79,20 @@ static QList<Definition> g_copyStack; ...@@ -95,6 +79,20 @@ static QList<Definition> g_copyStack;
static QString g_fileName; static QString g_fileName;
static QString g_relPath; static QString g_relPath;
static bool g_hasParamCommand;
static bool g_hasReturnCommand;
static MemberDef * g_memberDef;
static QDict<void> g_paramsFound;
static bool g_isExample;
static QCString g_exampleName;
static SectionDict * g_sectionDict;
static QCString g_searchUrl;
static QString g_includeFileText;
static uint g_includeFileOffset;
static uint g_includeFileLength;
// parser's context to store all global variables
struct DocParserContext struct DocParserContext
{ {
QString context; QString context;
...@@ -104,9 +102,23 @@ struct DocParserContext ...@@ -104,9 +102,23 @@ struct DocParserContext
QStack<DocStyleChange> styleStack; QStack<DocStyleChange> styleStack;
QStack<DocStyleChange> initialStyleStack; QStack<DocStyleChange> initialStyleStack;
QList<Definition> copyStack; QList<Definition> copyStack;
MemberDef *memberDef;
QString fileName; QString fileName;
QString relPath; QString relPath;
bool hasParamCommand;
bool hasReturnCommand;
MemberDef * memberDef;
QDict<void> paramsFound;
bool isExample;
QCString exampleName;
SectionDict *sectionDict;
QCString searchUrl;
QString includeFileText;
uint includeFileOffset;
uint includeFileLength;
TokenInfo *token;
}; };
static QStack<DocParserContext> g_parserStack; static QStack<DocParserContext> g_parserStack;
...@@ -115,6 +127,10 @@ static QStack<DocParserContext> g_parserStack; ...@@ -115,6 +127,10 @@ static QStack<DocParserContext> g_parserStack;
static void docParserPushContext() static void docParserPushContext()
{ {
//QCString indent;
//indent.fill(' ',g_parserStack.count()*2+2);
//printf("%sdocParserPushContext() count=%d\n",indent.data(),g_nodeStack.count());
doctokenizerYYpushContext(); doctokenizerYYpushContext();
DocParserContext *ctx = new DocParserContext; DocParserContext *ctx = new DocParserContext;
ctx->context = g_context; ctx->context = g_context;
...@@ -126,6 +142,23 @@ static void docParserPushContext() ...@@ -126,6 +142,23 @@ static void docParserPushContext()
ctx->copyStack = g_copyStack; ctx->copyStack = g_copyStack;
ctx->fileName = g_fileName; ctx->fileName = g_fileName;
ctx->relPath = g_relPath; ctx->relPath = g_relPath;
ctx->hasParamCommand = g_hasParamCommand;
ctx->hasReturnCommand = g_hasReturnCommand;
ctx->memberDef = g_memberDef;
ctx->paramsFound = g_paramsFound;
ctx->isExample = g_isExample;
ctx->exampleName = g_exampleName;
ctx->sectionDict = g_sectionDict;
ctx->searchUrl = g_searchUrl;
ctx->includeFileText = g_includeFileText;
ctx->includeFileOffset = g_includeFileOffset;
ctx->includeFileLength = g_includeFileLength;
ctx->token = g_token;
g_token = new TokenInfo;
g_parserStack.push(ctx); g_parserStack.push(ctx);
} }
...@@ -141,8 +174,29 @@ static void docParserPopContext() ...@@ -141,8 +174,29 @@ static void docParserPopContext()
g_copyStack = ctx->copyStack; g_copyStack = ctx->copyStack;
g_fileName = ctx->fileName; g_fileName = ctx->fileName;
g_relPath = ctx->relPath; g_relPath = ctx->relPath;
g_hasParamCommand = ctx->hasParamCommand;
g_hasReturnCommand = ctx->hasReturnCommand;
g_memberDef = ctx->memberDef;
g_paramsFound = ctx->paramsFound;
g_isExample = ctx->isExample;
g_exampleName = ctx->exampleName;
g_sectionDict = ctx->sectionDict;
g_searchUrl = ctx->searchUrl;
g_includeFileText = ctx->includeFileText;
g_includeFileOffset = ctx->includeFileOffset;
g_includeFileLength = ctx->includeFileLength;
delete g_token;
g_token = ctx->token;
delete ctx; delete ctx;
doctokenizerYYpopContext(); doctokenizerYYpopContext();
//QCString indent;
//indent.fill(' ',g_parserStack.count()*2+2);
//printf("%sdocParserPopContext() count=%d\n",indent.data(),g_nodeStack.count());
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -5876,7 +5930,10 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -5876,7 +5930,10 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
// md?md->name().data():"<none>"); // md?md->name().data():"<none>");
//printf("========== validating %s at line %d\n",fileName,startLine); //printf("========== validating %s at line %d\n",fileName,startLine);
//printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input); //printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
g_token = new TokenInfo; //g_token = new TokenInfo;
// store parser state so we can re-enter this function if needed
docParserPushContext();
if (ctx && if (ctx &&
(ctx->definitionType()==Definition::TypeClass || (ctx->definitionType()==Definition::TypeClass ||
...@@ -5999,10 +6056,12 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -5999,10 +6056,12 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
doctokenizerYYlineno=startLine; doctokenizerYYlineno=startLine;
doctokenizerYYinit(input,g_fileName); doctokenizerYYinit(input,g_fileName);
// build abstract syntax tree // build abstract syntax tree
DocRoot *root = new DocRoot(md!=0,singleLine); DocRoot *root = new DocRoot(md!=0,singleLine);
root->parse(); root->parse();
if (Debug::isFlagSet(Debug::PrintTree)) if (Debug::isFlagSet(Debug::PrintTree))
{ {
// pretty print the result // pretty print the result
...@@ -6011,24 +6070,29 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -6011,24 +6070,29 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
delete v; delete v;
} }
checkUndocumentedParams(); checkUndocumentedParams();
detectNoDocumentedParams(); detectNoDocumentedParams();
delete g_token;
// TODO: These should be called at the end of the program. // TODO: These should be called at the end of the program.
//doctokenizerYYcleanup(); //doctokenizerYYcleanup();
//Mappers::cmdMapper->freeInstance(); //Mappers::cmdMapper->freeInstance();
//Mappers::htmlTagMapper->freeInstance(); //Mappers::htmlTagMapper->freeInstance();
// restore original parser state
docParserPopContext();
return root; return root;
} }
DocNode *validatingParseText(const char *input) DocNode *validatingParseText(const char *input)
{ {
// store parser state so we can re-enter this function if needed
docParserPushContext();
//printf("------------ input ---------\n%s\n" //printf("------------ input ---------\n%s\n"
// "------------ end input -----\n",input); // "------------ end input -----\n",input);
g_token = new TokenInfo; //g_token = new TokenInfo;
g_context = ""; g_context = "";
g_fileName = "<parseText>"; g_fileName = "<parseText>";
g_relPath = ""; g_relPath = "";
...@@ -6068,8 +6132,8 @@ DocNode *validatingParseText(const char *input) ...@@ -6068,8 +6132,8 @@ DocNode *validatingParseText(const char *input)
} }
} }
delete g_token; // restore original parser state
docParserPopContext();
return txt; return txt;
} }
......
This diff is collapsed.
...@@ -184,7 +184,8 @@ void LatexGenerator::init() ...@@ -184,7 +184,8 @@ void LatexGenerator::init()
} }
else // use pdflatex for higher quality output else // use pdflatex for higher quality output
{ {
t << "all: clean refman.pdf" << endl << endl; t << "all: clean refman.pdf" << endl << endl
<< "pdf: refman.pdf" << endl << endl;
t << "refman.pdf: refman.tex" << endl; t << "refman.pdf: refman.tex" << endl;
t << "\tpdflatex refman.tex" << endl; t << "\tpdflatex refman.tex" << endl;
t << "\tmakeindex refman.idx" << endl; t << "\tmakeindex refman.idx" << endl;
......
...@@ -150,7 +150,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -150,7 +150,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
// or use the following to put the function pointer as it appears in // or use the following to put the function pointer as it appears in
// the prototype. // the prototype.
// bool hasFuncPtrType=vp!=-1 && wp!=-1 && wp<vp; //bool hasFuncPtrType=vp!=-1 && wp!=-1 && wp<vp;
if (!a->attrib.isEmpty() && !md->isObjCMethod()) // argument has an IDL attribute if (!a->attrib.isEmpty() && !md->isObjCMethod()) // argument has an IDL attribute
{ {
...@@ -455,9 +455,9 @@ void MemberDefImpl::init(Definition *def, ...@@ -455,9 +455,9 @@ void MemberDefImpl::init(Definition *def,
initLines=0; initLines=0;
type=t; type=t;
if (mt==MemberDef::Typedef) type.stripPrefix("typedef "); if (mt==MemberDef::Typedef) type.stripPrefix("typedef ");
type.stripPrefix("struct "); // type.stripPrefix("struct ");
type.stripPrefix("class " ); // type.stripPrefix("class " );
type.stripPrefix("union " ); // type.stripPrefix("union " );
type=removeRedundantWhiteSpace(type); type=removeRedundantWhiteSpace(type);
args=a; args=a;
args=removeRedundantWhiteSpace(args); args=removeRedundantWhiteSpace(args);
...@@ -970,10 +970,11 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -970,10 +970,11 @@ bool MemberDef::isBriefSectionVisible() const
makeResident(); makeResident();
LockingPtr<MemberDef> lock(this,this); LockingPtr<MemberDef> lock(this,this);
MemberGroupInfo *info = Doxygen::memGrpInfoDict[m_impl->grpId]; MemberGroupInfo *info = Doxygen::memGrpInfoDict[m_impl->grpId];
//printf("name=%s m_impl->grpId=%d info=%p\n",name().data(),m_impl->grpId,info);
//QCString *pMemGrp = Doxygen::memberDocDict[grpId]; //QCString *pMemGrp = Doxygen::memberDocDict[grpId];
bool hasDocs = hasDocumentation() || bool hasDocs = hasDocumentation() ||
// part of a documented member group // part of a documented member group
(m_impl->grpId!=-1 && info && !info->doc.isEmpty()); (m_impl->grpId!=-1 && info && !(info->doc.isEmpty() && info->header.isEmpty()));
// only include static members with file/namespace scope if // only include static members with file/namespace scope if
// explicitly enabled in the config file // explicitly enabled in the config file
...@@ -1033,9 +1034,9 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -1033,9 +1034,9 @@ bool MemberDef::isBriefSectionVisible() const
); );
//printf("visibleIfStatic=%d visibleIfDocumented=%d visibleIfEnabled=%d" //printf("visibleIfStatic=%d visibleIfDocumented=%d visibleIfEnabled=%d"
// "visibleIfPrivate=%d visibleIfDocVirtual=%d visibltIfNotDefaultCDTor=%d " // "visibleIfPrivate=%d visibltIfNotDefaultCDTor=%d "
// "visibleIfFriendCompound=%d\n",visibleIfStatic,visibleIfDocumented, // "visibleIfFriendCompound=%d\n",visibleIfStatic,visibleIfDocumented,
// visibleIfEnabled,visibleIfPrivate,visibleIfDocVirtual,visibleIfNotDefaultCDTor, // visibleIfEnabled,visibleIfPrivate,visibleIfNotDefaultCDTor,
// visibleIfFriendCompound); // visibleIfFriendCompound);
bool visible = visibleIfStatic && visibleIfDocumented && bool visible = visibleIfStatic && visibleIfDocumented &&
...@@ -1222,7 +1223,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -1222,7 +1223,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
} }
else else
{ {
ltype = ltype.left(i) + " { ... } " + ltype.right(ltype.length()-i-l); ltype = ltype.left(i) + " { ... } " + removeAnonymousScopes(ltype.right(ltype.length()-i-l));
linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype,TRUE); linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype,TRUE);
} }
} }
...@@ -1575,7 +1576,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1575,7 +1576,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
// get member name // get member name
QCString doxyName=name().copy(); QCString doxyName=name();
// prepend scope if there is any. TODO: make this optional for C only docs // prepend scope if there is any. TODO: make this optional for C only docs
if (scopeName) doxyName.prepend((QCString)scopeName+"::"); if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QCString doxyArgs=argsString(); QCString doxyArgs=argsString();
......
...@@ -67,6 +67,7 @@ void MemberList::countDecMembers(bool countEnumValues) ...@@ -67,6 +67,7 @@ void MemberList::countDecMembers(bool countEnumValues)
MemberDef *md; MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli) for (mli.toFirst();(md=mli.current());++mli)
{ {
//printf("MemberList::countDecMembers(md=%s,%d)\n",md->name().data(),md->isBriefSectionVisible());
if (md->isBriefSectionVisible()) if (md->isBriefSectionVisible())
{ {
switch(md->memberType()) switch(md->memberType())
...@@ -177,8 +178,12 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -177,8 +178,12 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{ {
//printf("----- writePlainDeclaration() ----\n"); //printf("----- writePlainDeclaration() ----\n");
countDecMembers(); countDecMembers();
if (numDecMembers()==0) return; // no members in this list if (numDecMembers()==0)
//printf("----> writePlainDeclaration() numDecMembers()=%d\n", {
//printf(" --> no members!\n");
return; // no members in this list
}
//printf(" --> writePlainDeclaration() numDecMembers()=%d\n",
// numDecMembers()); // numDecMembers());
ol.pushGeneratorState(); ol.pushGeneratorState();
......
...@@ -1000,7 +1000,7 @@ STARTDOCSYMS ^{B}"##"/[^#] ...@@ -1000,7 +1000,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
// prepend scope in case of nested classes // prepend scope in case of nested classes
if (current_root->section&Entry::SCOPE_MASK) if (current_root->section&Entry::SCOPE_MASK)
{ {
printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data()); //printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data());
current->name.prepend(current_root->name+"::"); current->name.prepend(current_root->name+"::");
} }
......
This diff is collapsed.
...@@ -73,7 +73,7 @@ void TextDocVisitor::filter(const char *str) ...@@ -73,7 +73,7 @@ void TextDocVisitor::filter(const char *str)
{ {
case '\n': m_t << " "; break; case '\n': m_t << " "; break;
case '"': m_t << "&quot;"; break; case '"': m_t << "&quot;"; break;
case '\'': m_t << "&apos;"; break; case '\'': m_t << "&#39;"; break;
case '<': m_t << "&lt;"; break; case '<': m_t << "&lt;"; break;
case '>': m_t << "&gt;"; break; case '>': m_t << "&gt;"; break;
case '&': m_t << "&amp;"; break; case '&': m_t << "&amp;"; break;
......
...@@ -163,8 +163,8 @@ QCString removeAnonymousScopes(const QCString &s) ...@@ -163,8 +163,8 @@ QCString removeAnonymousScopes(const QCString &s)
return result; return result;
} }
// replace anonymous scopes with __anonymous__ // replace anonymous scopes with __anonymous__ or replacement if provided
QCString replaceAnonymousScopes(const QCString &s) QCString replaceAnonymousScopes(const QCString &s,const char *replacement)
{ {
QCString result; QCString result;
if (s.isEmpty()) return result; if (s.isEmpty()) return result;
...@@ -174,7 +174,14 @@ QCString replaceAnonymousScopes(const QCString &s) ...@@ -174,7 +174,14 @@ QCString replaceAnonymousScopes(const QCString &s)
while ((i=re.match(s,p,&l))!=-1) while ((i=re.match(s,p,&l))!=-1)
{ {
result+=s.mid(p,i-p); result+=s.mid(p,i-p);
result+="__anonymous__"; if (replacement)
{
result+=replacement;
}
else
{
result+="__anonymous__";
}
p=i+l; p=i+l;
} }
result+=s.right(sl-p); result+=s.right(sl-p);
...@@ -4556,6 +4563,8 @@ QCString escapeCharsInString(const char *name,bool allowDots) ...@@ -4556,6 +4563,8 @@ QCString escapeCharsInString(const char *name,bool allowDots)
case '!': result+="_9"; break; case '!': result+="_9"; break;
case ',': result+="_00"; break; case ',': result+="_00"; break;
case ' ': result+="_01"; break; case ' ': result+="_01"; break;
case '{': result+="_02"; break;
case '}': result+="_03"; break;
default: default:
if (caseSenseNames || !isupper(c)) if (caseSenseNames || !isupper(c))
{ {
...@@ -4654,6 +4663,7 @@ QCString convertNameToFile(const char *name,bool allowDots) ...@@ -4654,6 +4663,7 @@ QCString convertNameToFile(const char *name,bool allowDots)
#endif #endif
result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir)); result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
} }
//printf("*** convertNameToFile(%s)->%s\n",name,result.data());
return result; return result;
} }
...@@ -4821,12 +4831,6 @@ QCString stripScope(const char *name) ...@@ -4821,12 +4831,6 @@ QCString stripScope(const char *name)
} }
/*! Convert nibble (range 0..15) to hex char */
//static char nibbleToHex(int n)
//{
// return (n < 10) ? ('0'+n) : ('a'+n-10);
//}
/*! Converts a string to an XML-encoded string */ /*! Converts a string to an XML-encoded string */
QCString convertToXML(const char *s) QCString convertToXML(const char *s)
{ {
...@@ -4843,19 +4847,7 @@ QCString convertToXML(const char *s) ...@@ -4843,19 +4847,7 @@ QCString convertToXML(const char *s)
case '&': result+="&amp;"; break; case '&': result+="&amp;"; break;
case '\'': result+="&apos;"; break; case '\'': result+="&apos;"; break;
case '"': result+="&quot;"; break; case '"': result+="&quot;"; break;
default: default: result+=c; break;
//if (c<0)
//{ <- this doesn't work for languages that use
// characters with codes beyond 255
// result+=(QCString)"&#x" +
// nibbleToHex((((uchar)c)>>4)&0xf)+
// nibbleToHex(c&0xf)+";";
//}
//else
//{
result+=c;
//}
break;
} }
} }
return result; return result;
...@@ -4864,7 +4856,23 @@ QCString convertToXML(const char *s) ...@@ -4864,7 +4856,23 @@ QCString convertToXML(const char *s)
/*! Converts a string to a HTML-encoded string */ /*! Converts a string to a HTML-encoded string */
QCString convertToHtml(const char *s) QCString convertToHtml(const char *s)
{ {
return convertToXML(s); QCString result;
if (s==0) return result;
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
case '<': result+="&lt;"; break;
case '>': result+="&gt;"; break;
case '&': result+="&amp;"; break;
case '\'': result+="&#39;"; break;
case '"': result+="&quot;"; break;
default: result+=c; break;
}
}
return result;
} }
/*! Returns the standard string that is generated when the \\overload /*! Returns the standard string that is generated when the \\overload
...@@ -5304,7 +5312,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -5304,7 +5312,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
if ((pd=Doxygen::pageSDict->find(name)) && !tagInfo) if ((pd=Doxygen::pageSDict->find(name)) && !tagInfo)
{ {
// append documentation block to the page. // append documentation block to the page.
pd->setDocumentation(pd->documentation()+"\n\n"+doc,fileName,startLine); pd->setDocumentation(doc,fileName,startLine);
//printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pi,name); //printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pi,name);
} }
else // new page else // new page
...@@ -5999,8 +6007,8 @@ SrcLangExt getLanguageFromFileName(const QCString fileName) ...@@ -5999,8 +6007,8 @@ SrcLangExt getLanguageFromFileName(const QCString fileName)
extLookup.insert(".odl", new int(SrcLangExt_IDL)); extLookup.insert(".odl", new int(SrcLangExt_IDL));
extLookup.insert(".ddl", new int(SrcLangExt_IDL)); extLookup.insert(".ddl", new int(SrcLangExt_IDL));
extLookup.insert(".java", new int(SrcLangExt_Java)); extLookup.insert(".java", new int(SrcLangExt_Java));
extLookup.insert(".jsl", new int(SrcLangExt_Java)); extLookup.insert(".as", new int(SrcLangExt_JS));
extLookup.insert(".as", new int(SrcLangExt_Java)); extLookup.insert(".js", new int(SrcLangExt_JS));
extLookup.insert(".cs", new int(SrcLangExt_CSharp)); extLookup.insert(".cs", new int(SrcLangExt_CSharp));
extLookup.insert(".d", new int(SrcLangExt_D)); extLookup.insert(".d", new int(SrcLangExt_D));
extLookup.insert(".php", new int(SrcLangExt_PHP)); extLookup.insert(".php", new int(SrcLangExt_PHP));
......
...@@ -92,6 +92,7 @@ enum SrcLangExt ...@@ -92,6 +92,7 @@ enum SrcLangExt
SrcLangExt_PHP = 0x080, SrcLangExt_PHP = 0x080,
SrcLangExt_ObjC = 0x100, SrcLangExt_ObjC = 0x100,
SrcLangExt_Cpp = 0x200, SrcLangExt_Cpp = 0x200,
SrcLangExt_JS = 0x400,
}; };
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -215,7 +216,7 @@ int getPrefixIndex(const QCString &name); ...@@ -215,7 +216,7 @@ int getPrefixIndex(const QCString &name);
QCString removeAnonymousScopes(const QCString &s); QCString removeAnonymousScopes(const QCString &s);
QCString replaceAnonymousScopes(const QCString &s); QCString replaceAnonymousScopes(const QCString &s,const char *replacement=0);
void initClassHierarchy(ClassSDict *cl); void initClassHierarchy(ClassSDict *cl);
......
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