Commit a81ce474 authored by Dimitri van Heesch's avatar Dimitri van Heesch

+ The graphical class hierarchy was not properly generated when

  template classes were used.
+ Template specialization could not be documented using the
  \class command. This is now fixed. Example:
  /*!
   * \class T<A,int>
   * My template specialization of template T.
   */
+ Fixed a bug when parsing M$-IDL code, containing
  helpstring("bla") attributes. The attributes of a method are no longer
  shown in the documentation (the attributes of method arguments
  still visible however).
+ Improved the search algorithm that tries to connect classes with their
  base classes. It should now (hopefully) work correct in all cases
  where nested classes and/or namespaces are used.
+ Fixed a scanner problem that could cause doxygen to get
  confused after parsing struct initializers.
+ the DOTFONTPATH environment variable is now automatically set
  for Windows. This should make any "missing doxfont.ttf"
  messages disappear.
+ the extra LaTeX packages specified with EXTRA_PACKAGES can now
  also be used when generating formulas for HTML.
+ The documentation of a parameters that is part of a member definition,
  is now used in the documentation as well.
+ Fixed a HTML output bug in the class/file group-pages.
+ Links to example files generated with \link ... \endlink where not
  correct.
+ made the bullet list generation more robust. A space is now required
  after the - sign. A list can now start a paragraph.
+ the configure script now detects whether or not dot is installed.
+ The VERBATIM_HEADERS option didn't have any effect any more.
  It should now works again as advertised.
+ The IGNORE_PREFIX option can now also deal with a list of prefixes.
+ @verbatim ... @endverbatim blocks did not work.
+ new option SHOW_INCLUDE_FILES, which can be set to NO to turn of the
  list of include files that is generated for each documented file.
+ new option STRIP_CODE_COMMENTS, which can be set to NO to keep any
  special comment blocks in the generated code fragments.
parent ddbc18f5
DOXYGEN Version 1.1.0 DOXYGEN Version 1.1.0-20000220
CONTENTS CONTENTS
-------- --------
...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: ...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.0.src.tar.gz # uncompress the archive gunzip doxygen-1.1.0-20000220.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.0.src.tar # unpack it tar xf doxygen-1.1.0-20000220.src.tar # unpack it
2. Run the configure script: 2. Run the configure script:
...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at ...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (13 February 2000) Dimitri van Heesch (20 February 2000)
DOXYGEN Version 1.1.0 DOXYGEN Version 1.1.0-20000220
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (13 February 2000) Dimitri van Heesch (20 February 2000)
1.1.0 1.1.0-20000220
...@@ -19,6 +19,7 @@ bin_dirs=`echo $PATH | sed -e "s/:/ /g"` ...@@ -19,6 +19,7 @@ bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
f_debug=NO f_debug=NO
f_shared=YES f_shared=YES
f_make=NO f_make=NO
f_dot=NO
f_perl=NO f_perl=NO
f_plf_auto=NO f_plf_auto=NO
f_prefix=/usr f_prefix=/usr
...@@ -51,6 +52,9 @@ while test -n "$1"; do ...@@ -51,6 +52,9 @@ while test -n "$1"; do
--make) --make)
shift; f_make=$1 shift; f_make=$1
;; ;;
--dot)
shift; f_dot=$1
;;
--perl) --perl)
shift; f_perl=$1 shift; f_perl=$1
;; ;;
...@@ -72,10 +76,10 @@ done ...@@ -72,10 +76,10 @@ done
if test "$f_help" = y; then if test "$f_help" = y; then
cat <<EOF cat <<EOF
Usage: $0 [--help] [--shared] [--static] [--release] [--debug] Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--platform target] [--prefix dir] [--perl name] [--make name] [--dot name] [--platform target]
[--install name] [--english-only] [--prefix dir] [--install name] [--english-only]
Options:ll Options:
--help Print this help --help Print this help
...@@ -91,6 +95,10 @@ Options:ll ...@@ -91,6 +95,10 @@ Options:ll
--make name Use \`name' as the name of the GNU make tool --make name Use \`name' as the name of the GNU make tool
[default: autodetect] [default: autodetect]
--dot name Use \`name' as the name of the dot tool that
is part of the Graphviz package.
[default: autodetect]
--platform target Do not detect platform but use \`target' instead. --platform target Do not detect platform but use \`target' instead.
See PLATFORMS for a list of possibilities See PLATFORMS for a list of possibilities
...@@ -241,6 +249,27 @@ if test "$f_make" = NO; then ...@@ -241,6 +249,27 @@ if test "$f_make" = NO; then
fi fi
echo "using $f_make" echo "using $f_make"
# - check for dot ------------------------------------------------------------
echo -n " Checking for dot... "
if test "$f_dot" = NO; then
dot_dirs="$bin_dirs"
dot_prog=NO
for j in $dot_dirs; do
if test -x "$j/dot"; then
dot_prog="$j/dot"
break 2
fi
done
f_dot="$dot_prog"
fi
if test "$f_dot" = NO; then
echo "not found!";
else
echo "using $f_dot"
fi
# - check for perl ------------------------------------------------------------ # - check for perl ------------------------------------------------------------
echo -n " Checking for perl... " echo -n " Checking for perl... "
...@@ -294,6 +323,12 @@ DOXYDOCS = .. ...@@ -294,6 +323,12 @@ DOXYDOCS = ..
export TMAKEPATH export TMAKEPATH
EOF EOF
if test "$f_dot" != NO; then
cat >> .makeconfig <<EOF
HAVE_DOT = $f_dot
EOF
fi
touch .tmakeconfig touch .tmakeconfig
if test "$f_shared" = NO; then if test "$f_shared" = NO; then
cat >> .tmakeconfig <<EOF cat >> .tmakeconfig <<EOF
...@@ -302,7 +337,7 @@ EOF ...@@ -302,7 +337,7 @@ EOF
fi fi
if test "$f_english" = YES; then if test "$f_english" = YES; then
cat >> .tmakeconfig << EOF cat >> .tmakeconfig <<EOF
TMAKE_CXXFLAGS = -DENGLISH_ONLY TMAKE_CXXFLAGS = -DENGLISH_ONLY
EOF EOF
fi fi
......
...@@ -120,7 +120,9 @@ followed by the descriptions of the tags grouped by category. ...@@ -120,7 +120,9 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_repeat_brief REPEAT_BRIEF <li> \refitem cfg_repeat_brief REPEAT_BRIEF
<li> \refitem cfg_search_includes SEARCH_INCLUDES <li> \refitem cfg_search_includes SEARCH_INCLUDES
<li> \refitem cfg_searchengine SEARCHENGINE <li> \refitem cfg_searchengine SEARCHENGINE
<li> \refitem cfg_show_include_files SHOW_INCLUDE_FILES
<li> \refitem cfg_source_browser SOURCE_BROWSER <li> \refitem cfg_source_browser SOURCE_BROWSER
<li> \refitem cfg_strip_code_comments STRIP_CODE_COMMENTS
<li> \refitem cfg_strip_from_path STRIP_FROM_PATH <li> \refitem cfg_strip_from_path STRIP_FROM_PATH
<li> \refitem cfg_rtf_hyperlinks RTF_HYPERLINKS <li> \refitem cfg_rtf_hyperlinks RTF_HYPERLINKS
<li> \refitem cfg_rtf_output RTF_OUTPUT <li> \refitem cfg_rtf_output RTF_OUTPUT
...@@ -292,6 +294,13 @@ followed by the descriptions of the tags grouped by category. ...@@ -292,6 +294,13 @@ followed by the descriptions of the tags grouped by category.
Setting the \c INLINE_SOURCES tag to \c YES will include the body Setting the \c INLINE_SOURCES tag to \c YES will include the body
of functions, classes and enums directly into the documentation. of functions, classes and enums directly into the documentation.
\anchor cfg_strip_code_comments
<dt>\c STRIP_CODE_COMMENTS <dd>
\addindex STRIP_CODE_COMMENTS
Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
doxygen to hide any special comment blocks from generated source code
fragments. Normal C and C++ comments will always remain visible.
\anchor cfg_case_sense_names \anchor cfg_case_sense_names
<dt>\c CASE_SENSE_NAMES <dd> <dt>\c CASE_SENSE_NAMES <dd>
\addindex CASE_SENSE_NAMES \addindex CASE_SENSE_NAMES
...@@ -309,6 +318,13 @@ followed by the descriptions of the tags grouped by category. ...@@ -309,6 +318,13 @@ followed by the descriptions of the tags grouped by category.
which an include is specified. Set to NO to disable this. which an include is specified. Set to NO to disable this.
\sa Section \ref cmdclass "\\class". \sa Section \ref cmdclass "\\class".
\anchor cfg_show_include_files
<dt>\c SHOW_INCLUDE_FILES <dd>
\addindex SHOW_INCLUDE_FILES
If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
will put list of the files that are included by a file in the documentation
of that file.
\anchor cfg_javadoc_autobrief \anchor cfg_javadoc_autobrief
<dt>\c JAVADOC_AUTOBRIEF <dd> <dt>\c JAVADOC_AUTOBRIEF <dd>
\addindex JAVADOC_AUTOBRIEF \addindex JAVADOC_AUTOBRIEF
...@@ -559,10 +575,11 @@ used to specify the number of columns in which this list will be split (can be a ...@@ -559,10 +575,11 @@ used to specify the number of columns in which this list will be split (can be a
\anchor cfg_ignore_prefix \anchor cfg_ignore_prefix
<dt>\c IGNORE_PREFIX <dd> <dt>\c IGNORE_PREFIX <dd>
In case all classes in a project start with a common prefix, all In case all classes in a project start with a common prefix, all classes will
classes will be put under the same header in the alphabetical index. be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be use to specify a prefix that should be ignored The \c IGNORE_PREFIX tag can be used to specify a prefix
while generating the index headers. (or a list of prefixes) that should be ignored while generating the index
headers.
</dl> </dl>
......
...@@ -103,8 +103,6 @@ tools should be installed. ...@@ -103,8 +103,6 @@ tools should be installed.
the Graph visualization toolkit version 1.5</a><br> the Graph visualization toolkit version 1.5</a><br>
Needed for the include dependency graphs, the graphical inheritance graphs, Needed for the include dependency graphs, the graphical inheritance graphs,
and the collaboration graphs.<br> and the collaboration graphs.<br>
<b>Note:</b> For windows you will have to set the <code>DOTFONTPATH</code> environment
variable to include the current directory (e.g. <code>DOTFONTPATH=.</code>)
<li><a href="http://msdn.microsoft.com/workshop/author/htmlhelp"> <li><a href="http://msdn.microsoft.com/workshop/author/htmlhelp">
the HTML help workshop</a> (for Windows only)<br> the HTML help workshop</a> (for Windows only)<br>
Needed for compiling compressed HTML output (a.k.a. the new Windows help format). Needed for compiling compressed HTML output (a.k.a. the new Windows help format).
......
...@@ -20,12 +20,12 @@ all: class/html/index.html \ ...@@ -20,12 +20,12 @@ all: class/html/index.html \
template/html/index.html \ template/html/index.html \
tag/html/index.html \ tag/html/index.html \
group/html/index.html \ group/html/index.html \
diagram/html/index.html diagrams/html/index.html
clean: clean:
rm -rf class define enum file func page relates author \ rm -rf class define enum file func page relates author \
par overload example include qtstyle jdstyle structcmd \ par overload example include qtstyle jdstyle structcmd \
autolink tag restypedef afterdoc template autolink tag restypedef afterdoc template tag group diagrams
class/html/index.html: class.h class.cfg class/html/index.html: class.h class.cfg
$(DOXYGEN)/bin/doxygen class.cfg $(DOXYGEN)/bin/doxygen class.cfg
...@@ -92,5 +92,7 @@ template/html/index.html: templ.cpp templ.cfg ...@@ -92,5 +92,7 @@ template/html/index.html: templ.cpp templ.cfg
group/html/index.html: group.cpp group.cfg group/html/index.html: group.cpp group.cfg
$(DOXYGEN)/bin/doxygen group.cfg $(DOXYGEN)/bin/doxygen group.cfg
diagram/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg diagrams/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
ifneq ($(HAVE_DOT),)
$(DOXYGEN)/bin/doxygen diagrams.cfg $(DOXYGEN)/bin/doxygen diagrams.cfg
endif
...@@ -16,20 +16,19 @@ all: class/html/index.html \ ...@@ -16,20 +16,19 @@ all: class/html/index.html \
jdstyle/html/index.html \ jdstyle/html/index.html \
structcmd/html/index.html \ structcmd/html/index.html \
autolink/html/index.html \ autolink/html/index.html \
tag/html/index.html \
restypedef/html/index.html \ restypedef/html/index.html \
afterdoc/html/index.html \ afterdoc/html/index.html \
template/html/index.html \ template/html/index.html \
tag/html/index.html \ tag/html/index.html \
group/html/index.html \ group/html/index.html \
diagram/html/index.html diagrams/html/index.html
clean: clean:
deltree /y class define enum file deltree /y class define enum file
deltree /y func page relates author deltree /y func page relates author
deltree /y par overload example include qtstyle deltree /y par overload example include qtstyle
deltree /y jdstyle structcmd autolink tag resdefine deltree /y jdstyle structcmd autolink resdefine
deltree /y restypedef deltree /y restypedef afterdoc template tag group diagrams
class/html/index.html: class.h class.cfg class/html/index.html: class.h class.cfg
$(DOXYDIR)\doxygen class.cfg $(DOXYDIR)\doxygen class.cfg
...@@ -98,5 +97,5 @@ template/html/index.html: templ.cpp templ.cfg ...@@ -98,5 +97,5 @@ template/html/index.html: templ.cpp templ.cfg
group/html/index.html: group.cpp group.cfg group/html/index.html: group.cpp group.cfg
$(DOXYDIR)\doxygen group.cfg $(DOXYDIR)\doxygen group.cfg
diagram/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg diagrams/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
$(DOXYDIR)\doxygen diagrams.cfg $(DOXYDIR)\doxygen diagrams.cfg
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# $Id$ # $Id$
# #
# Copyright (C) 1997-1999 by Dimitri van Heesch. # Copyright (C) 1997-2000 by Dimitri van Heesch.
# #
# Permission to use, copy, modify, and distribute this software and its # Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby # documentation under the terms of the GNU General Public License is hereby
......
...@@ -331,27 +331,39 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -331,27 +331,39 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (incInfo) if (incInfo)
{ {
QCString nm=incInfo->includeName.isEmpty() ? QCString nm=incInfo->includeName.isEmpty() ?
incInfo->fileDef->docName().data() : (incInfo->fileDef ?
incInfo->includeName.data(); incInfo->fileDef->docName().data() : ""
ol.startTypewriter(); ) :
ol.docify("#include "); incInfo->includeName.data();
if (incInfo->local) if (!nm.isEmpty())
ol.docify("\""); {
else ol.startTypewriter();
ol.docify("<"); ol.docify("#include ");
ol.pushGeneratorState(); if (incInfo->local)
ol.disable(OutputGenerator::Html); ol.docify("\"");
ol.docify(nm); else
ol.disableAllBut(OutputGenerator::Html); ol.docify("<");
ol.enable(OutputGenerator::Html); ol.pushGeneratorState();
ol.writeObjectLink(0,incInfo->fileDef->includeName(),0,nm); ol.disable(OutputGenerator::Html);
ol.popGeneratorState(); ol.docify(nm);
if (incInfo->local) ol.disableAllBut(OutputGenerator::Html);
ol.docify("\""); ol.enable(OutputGenerator::Html);
else if (incInfo->fileDef)
ol.docify(">"); {
ol.endTypewriter(); ol.writeObjectLink(0,incInfo->fileDef->includeName(),0,nm);
ol.newParagraph(); }
else
{
ol.docify(nm);
}
ol.popGeneratorState();
if (incInfo->local)
ol.docify("\"");
else
ol.docify(">");
ol.endTypewriter();
ol.newParagraph();
}
} }
...@@ -1340,12 +1352,14 @@ void ClassDef::determineImplUsageRelation() ...@@ -1340,12 +1352,14 @@ void ClassDef::determineImplUsageRelation()
//printf("in class %s found var type=`%s' name=`%s'\n", //printf("in class %s found var type=`%s' name=`%s'\n",
// name().data(),type.data(),md->name().data()); // name().data(),type.data(),md->name().data());
int p=0,i,l; int p=0,i,l;
while ((i=re.match(type,p,&l))!=-1) // for each class name in the type bool found=FALSE;
while ((i=re.match(type,p,&l))!=-1 && !found) // for each class name in the type
{ {
ClassDef *cd=getClass(name()+"::"+type.mid(i,l)); ClassDef *cd=getClass(name()+"::"+type.mid(i,l));
if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes! if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes!
if (cd && cd->isLinkable()) // class exists and is linkable if (cd && cd->isLinkable()) // class exists and is linkable
{ {
found=TRUE;
if (usesImplClassDict==0) usesImplClassDict = new UsesClassDict(257); if (usesImplClassDict==0) usesImplClassDict = new UsesClassDict(257);
UsesClassDef *ucd=usesImplClassDict->find(cd->name()); UsesClassDef *ucd=usesImplClassDict->find(cd->name());
if (ucd==0) if (ucd==0)
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "classlist.h" #include "classlist.h"
#include "config.h" #include "config.h"
#include "util.h"
ClassList::ClassList() : QList<ClassDef>() ClassList::ClassList() : QList<ClassDef>()
{ {
...@@ -30,10 +31,12 @@ int ClassList::compareItems(GCI item1, GCI item2) ...@@ -30,10 +31,12 @@ int ClassList::compareItems(GCI item1, GCI item2)
ClassDef *c1=(ClassDef *)item1; ClassDef *c1=(ClassDef *)item1;
ClassDef *c2=(ClassDef *)item2; ClassDef *c2=(ClassDef *)item2;
int prefixLength = Config::ignorePrefix.length(); //int prefixLength = Config::ignorePrefix.length();
int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; //int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; //int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
return strcmp(c1->name().data()+i1,c2->name().data()+i2); return strcmp(c1->name().data()+getPrefixIndex(c1->name()),
c2->name().data()+getPrefixIndex(c2->name())
);
} }
ClassListIterator::ClassListIterator(const ClassList &cllist) : ClassListIterator::ClassListIterator(const ClassList &cllist) :
......
...@@ -2510,60 +2510,57 @@ YY_RULE_SETUP ...@@ -2510,60 +2510,57 @@ YY_RULE_SETUP
#line 887 "code.l" #line 887 "code.l"
YY_BREAK YY_BREAK
/*
<SkipSpecialComment>"//"
<SkipSpecialComment>[ \t]*"* /" {
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>[ \t]*"* /"[ \t\n]*"\n"/"/ *" {
//g_code->codify("\n");
//QCString lineText=yytext;
//g_yyLineNr+=lineText.contains('\n');
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>.
<SkipSpecialComment>\n {
codifyLines(yytext);
}
<SkipSpecialCxxComment>.* /\n {
codifyLines(yytext);
BEGIN( lastDContext ) ;
}
<SkipSpecialCxxComment>.
<SkipSpecialCxxComment>\n {
codifyLines(yytext);
}
*/
case 67: case 67:
YY_RULE_SETUP YY_RULE_SETUP
#line 912 "code.l" #line 888 "code.l"
{ // remove special one-line comment { // remove special one-line comment
g_yyLineNr+=((QCString)yytext).contains('\n'); if (Config::stripCommentsFlag)
g_code->endCodeLine(); {
if (g_yyLineNr<g_inputLines) g_yyLineNr+=((QCString)yytext).contains('\n');
{ g_code->endCodeLine();
startCodeLine(*g_code); if (g_yyLineNr<g_inputLines)
} {
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
} }
YY_BREAK YY_BREAK
case 68: case 68:
YY_RULE_SETUP YY_RULE_SETUP
#line 920 "code.l" #line 903 "code.l"
{ // remove special one-line comment { // remove special one-line comment
g_yyLineNr++; if (Config::stripCommentsFlag)
g_code->endCodeLine(); {
if (g_yyLineNr<g_inputLines) g_yyLineNr++;
{ g_code->endCodeLine();
startCodeLine(*g_code); if (g_yyLineNr<g_inputLines)
} {
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
} }
YY_BREAK YY_BREAK
case 69: case 69:
YY_RULE_SETUP YY_RULE_SETUP
#line 928 "code.l" #line 918 "code.l"
{ // strip special one-line comment { // strip special one-line comment
char c[2]; c[0]='\n'; c[1]=0; if (Config::stripCommentsFlag)
codifyLines(c); {
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
else
{
codifyLines(yytext);
}
} }
YY_BREAK YY_BREAK
case 70: case 70:
...@@ -2571,11 +2568,20 @@ case 70: ...@@ -2571,11 +2568,20 @@ case 70:
yy_c_buf_p = yy_cp -= 1; yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 932 "code.l" #line 929 "code.l"
{ {
g_lastSpecialCContext = YY_START; if (Config::stripCommentsFlag)
g_yyLineNr++; {
BEGIN(RemoveSpecialCComment); g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
codifyLines(yytext);
BEGIN(SkipComment);
}
} }
YY_BREAK YY_BREAK
case 71: case 71:
...@@ -2583,10 +2589,19 @@ case 71: ...@@ -2583,10 +2589,19 @@ case 71:
yy_c_buf_p = yy_cp -= 1; yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 937 "code.l" #line 943 "code.l"
{ // special C comment block at a new line { // special C comment block at a new line
g_lastSpecialCContext = YY_START; if (Config::stripCommentsFlag)
BEGIN(RemoveSpecialCComment); {
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
} }
YY_BREAK YY_BREAK
case 72: case 72:
...@@ -2594,20 +2609,33 @@ case 72: ...@@ -2594,20 +2609,33 @@ case 72:
yy_c_buf_p = yy_cp = yy_bp + 3; yy_c_buf_p = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 941 "code.l" #line 956 "code.l"
{ // special C comment block half way a line { // special C comment block half way a line
g_lastSpecialCContext = YY_START; if (Config::stripCommentsFlag)
BEGIN(RemoveSpecialCComment); {
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
} }
YY_BREAK YY_BREAK
case 73: case 73:
YY_RULE_SETUP YY_RULE_SETUP
#line 945 "code.l" #line 969 "code.l"
{} { if (!Config::stripCommentsFlag)
{
g_code->codify(yytext);
}
}
YY_BREAK YY_BREAK
case 74: case 74:
YY_RULE_SETUP YY_RULE_SETUP
#line 946 "code.l" #line 974 "code.l"
{ {
g_code->codify(yytext); g_code->codify(yytext);
g_lastCContext = YY_START ; g_lastCContext = YY_START ;
...@@ -2616,7 +2644,7 @@ YY_RULE_SETUP ...@@ -2616,7 +2644,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 75: case 75:
YY_RULE_SETUP YY_RULE_SETUP
#line 951 "code.l" #line 979 "code.l"
{ {
g_code->codify(yytext); g_code->codify(yytext);
g_lastCContext = YY_START ; g_lastCContext = YY_START ;
...@@ -2625,14 +2653,14 @@ YY_RULE_SETUP ...@@ -2625,14 +2653,14 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 76: case 76:
YY_RULE_SETUP YY_RULE_SETUP
#line 956 "code.l" #line 984 "code.l"
{ {
codifyLines(yytext); codifyLines(yytext);
} }
YY_BREAK YY_BREAK
case 77: case 77:
YY_RULE_SETUP YY_RULE_SETUP
#line 959 "code.l" #line 987 "code.l"
{ {
g_code->codify(yytext); g_code->codify(yytext);
} }
...@@ -2648,7 +2676,7 @@ YY_RULE_SETUP ...@@ -2648,7 +2676,7 @@ YY_RULE_SETUP
*/ */
case 78: case 78:
YY_RULE_SETUP YY_RULE_SETUP
#line 972 "code.l" #line 1000 "code.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
...@@ -3547,7 +3575,7 @@ int main() ...@@ -3547,7 +3575,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 972 "code.l" #line 1000 "code.l"
/*@ ---------------------------------------------------------------------------- /*@ ----------------------------------------------------------------------------
......
...@@ -885,64 +885,92 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -885,64 +885,92 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<RemoveSpecialCComment>"//"|"/*" <RemoveSpecialCComment>"//"|"/*"
<RemoveSpecialCComment>\n { g_yyLineNr++; } <RemoveSpecialCComment>\n { g_yyLineNr++; }
<RemoveSpecialCComment>. <RemoveSpecialCComment>.
/*
<SkipSpecialComment>"//"
<SkipSpecialComment>[ \t]*"* /" {
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>[ \t]*"* /"[ \t\n]*"\n"/"/ *" {
//g_code->codify("\n");
//QCString lineText=yytext;
//g_yyLineNr+=lineText.contains('\n');
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>.
<SkipSpecialComment>\n {
codifyLines(yytext);
}
<SkipSpecialCxxComment>.* /\n {
codifyLines(yytext);
BEGIN( lastDContext ) ;
}
<SkipSpecialCxxComment>.
<SkipSpecialCxxComment>\n {
codifyLines(yytext);
}
*/
<*>\n({B}*"//"[!/][^\n]*\n)* { // remove special one-line comment <*>\n({B}*"//"[!/][^\n]*\n)* { // remove special one-line comment
g_yyLineNr+=((QCString)yytext).contains('\n'); if (Config::stripCommentsFlag)
g_code->endCodeLine(); {
if (g_yyLineNr<g_inputLines) g_yyLineNr+=((QCString)yytext).contains('\n');
{ g_code->endCodeLine();
startCodeLine(*g_code); if (g_yyLineNr<g_inputLines)
} {
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
} }
<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment <*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
g_yyLineNr++; if (Config::stripCommentsFlag)
g_code->endCodeLine(); {
if (g_yyLineNr<g_inputLines) g_yyLineNr++;
{ g_code->endCodeLine();
startCodeLine(*g_code); if (g_yyLineNr<g_inputLines)
} {
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
} }
<*>"//"[!/][^\n]*\n { // strip special one-line comment <*>"//"[!/][^\n]*\n { // strip special one-line comment
char c[2]; c[0]='\n'; c[1]=0; if (Config::stripCommentsFlag)
codifyLines(c); {
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
else
{
codifyLines(yytext);
}
} }
<*>\n{B}*"/*"[!*]/[^/*] { <*>\n{B}*"/*"[!*]/[^/*] {
g_lastSpecialCContext = YY_START; if (Config::stripCommentsFlag)
g_yyLineNr++; {
BEGIN(RemoveSpecialCComment); g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
codifyLines(yytext);
BEGIN(SkipComment);
}
} }
<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line <*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line
g_lastSpecialCContext = YY_START; if (Config::stripCommentsFlag)
BEGIN(RemoveSpecialCComment); {
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
} }
<*>"/*"[!*]/[^/*] { // special C comment block half way a line <*>"/*"[!*]/[^/*] { // special C comment block half way a line
g_lastSpecialCContext = YY_START; if (Config::stripCommentsFlag)
BEGIN(RemoveSpecialCComment); {
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
<*>"/*"("!"?)"*/" { if (!Config::stripCommentsFlag)
{
g_code->codify(yytext);
}
} }
<*>"/*"("!"?)"*/" {}
<*>"/*" { <*>"/*" {
g_code->codify(yytext); g_code->codify(yytext);
g_lastCContext = YY_START ; g_lastCContext = YY_START ;
......
This diff is collapsed.
...@@ -53,7 +53,7 @@ struct Config ...@@ -53,7 +53,7 @@ struct Config
static QCString paperType; // the page type to generate docs for static QCString paperType; // the page type to generate docs for
static QCString manExtension; // extension the man page files static QCString manExtension; // extension the man page files
static QCString htmlStyleSheet; // user defined cascading style sheet static QCString htmlStyleSheet; // user defined cascading style sheet
static QCString ignorePrefix; // prefix to ignore for the alphabetical index static QStrList ignorePrefixList; // list of prefixes to ignore for the alphabetical index
static QStrList includePath; // list of include paths static QStrList includePath; // list of include paths
static QStrList examplePath; // list of example paths static QStrList examplePath; // list of example paths
static QStrList imagePath; // list of image paths static QStrList imagePath; // list of image paths
...@@ -112,6 +112,8 @@ struct Config ...@@ -112,6 +112,8 @@ struct Config
static bool generateRTF; // generate RTF flag static bool generateRTF; // generate RTF flag
static bool compactRTFFlag; // generate more compact RTF static bool compactRTFFlag; // generate more compact RTF
static bool rtfHyperFlag; // generate hyper links in RTF static bool rtfHyperFlag; // generate hyper links in RTF
static bool showIncFileFlag; // show include file in file documentation?
static bool stripCommentsFlag; // strip special comments from code fragments?
}; };
#endif #endif
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* includes * includes
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <iostream.h> #include <iostream.h>
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
...@@ -84,7 +85,7 @@ QCString Config::inputFilter; ...@@ -84,7 +85,7 @@ QCString Config::inputFilter;
QCString Config::paperType; QCString Config::paperType;
QCString Config::manExtension; QCString Config::manExtension;
QCString Config::htmlStyleSheet; QCString Config::htmlStyleSheet;
QCString Config::ignorePrefix; QStrList Config::ignorePrefixList;
QStrList Config::includePath; QStrList Config::includePath;
QStrList Config::examplePath; QStrList Config::examplePath;
QStrList Config::imagePath; QStrList Config::imagePath;
...@@ -141,6 +142,8 @@ bool Config::inlineInfoFlag = TRUE; ...@@ -141,6 +142,8 @@ bool Config::inlineInfoFlag = TRUE;
bool Config::collGraphFlag = TRUE; bool Config::collGraphFlag = TRUE;
bool Config::includeGraphFlag = TRUE; bool Config::includeGraphFlag = TRUE;
bool Config::gfxHierarchyFlag = TRUE; bool Config::gfxHierarchyFlag = TRUE;
bool Config::showIncFileFlag = TRUE;
bool Config::stripCommentsFlag = TRUE;
int Config::tabSize = 8; int Config::tabSize = 8;
int Config::colsInAlphaIndex = 5; int Config::colsInAlphaIndex = 5;
...@@ -219,7 +222,7 @@ static int yyread(char *buf,int max_size) ...@@ -219,7 +222,7 @@ static int yyread(char *buf,int max_size)
<Start>"TAB_SIZE"[ \t]*"=" { BEGIN(GetString); s=&tabSizeString; s->resize(0); } <Start>"TAB_SIZE"[ \t]*"=" { BEGIN(GetString); s=&tabSizeString; s->resize(0); }
<Start>"HTML_STYLESHEET"[ \t]*"=" { BEGIN(GetString); s=&Config::htmlStyleSheet; s->resize(0); } <Start>"HTML_STYLESHEET"[ \t]*"=" { BEGIN(GetString); s=&Config::htmlStyleSheet; s->resize(0); }
<Start>"COLS_IN_ALPHA_INDEX"[ \t]*"=" { BEGIN(GetString); s=&colsInAlphaIndexString; s->resize(0); } <Start>"COLS_IN_ALPHA_INDEX"[ \t]*"=" { BEGIN(GetString); s=&colsInAlphaIndexString; s->resize(0); }
<Start>"IGNORE_PREFIX"[ \t]*"=" { BEGIN(GetString); s=&Config::ignorePrefix; s->resize(0); } <Start>"IGNORE_PREFIX"[ \t]*"=" { BEGIN(GetStrList); l=&Config::ignorePrefixList; l->clear(); elemStr=""; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; } <Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; }
<Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePath; l->clear(); elemStr=""; } <Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePath; l->clear(); elemStr=""; }
<Start>"IMAGE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::imagePath; l->clear(); elemStr=""; } <Start>"IMAGE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::imagePath; l->clear(); elemStr=""; }
...@@ -276,6 +279,8 @@ static int yyread(char *buf,int max_size) ...@@ -276,6 +279,8 @@ static int yyread(char *buf,int max_size)
<Start>"GENERATE_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateRTF; } <Start>"GENERATE_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateRTF; }
<Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; } <Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; }
<Start>"RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; } <Start>"RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; }
<Start>"SHOW_INCLUDE_FILES"[ \t]*"=" { BEGIN(GetBool); b=&Config::showIncFileFlag; }
<Start>"STRIP_CODE_COMMENTS"[ \t]*"=" { BEGIN(GetBool); b=&Config::stripCommentsFlag; }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); } <Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); } <GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n { <GetStrList>\n {
...@@ -433,7 +438,7 @@ void Config::init() ...@@ -433,7 +438,7 @@ void Config::init()
Config::paperType = "a4wide"; Config::paperType = "a4wide";
Config::manExtension = ".3"; Config::manExtension = ".3";
Config::htmlStyleSheet.resize(0); Config::htmlStyleSheet.resize(0);
Config::ignorePrefix.resize(0); Config::ignorePrefixList.clear();
Config::includePath.clear(); Config::includePath.clear();
Config::examplePath.clear(); Config::examplePath.clear();
Config::imagePath.clear(); Config::imagePath.clear();
...@@ -492,6 +497,8 @@ void Config::init() ...@@ -492,6 +497,8 @@ void Config::init()
Config::collGraphFlag = TRUE; Config::collGraphFlag = TRUE;
Config::includeGraphFlag = TRUE; Config::includeGraphFlag = TRUE;
Config::gfxHierarchyFlag = TRUE; Config::gfxHierarchyFlag = TRUE;
Config::showIncFileFlag = TRUE;
Config::stripCommentsFlag = TRUE;
} }
void writeTemplateConfig(QFile *f,bool sl) void writeTemplateConfig(QFile *f,bool sl)
...@@ -695,6 +702,15 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -695,6 +702,15 @@ void writeTemplateConfig(QFile *f,bool sl)
} }
t << "INLINE_SOURCES = NO\n"; t << "INLINE_SOURCES = NO\n";
if (!sl) if (!sl)
{
t << "\n";
t << "# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\n";
t << "# doxygen to hide any special comment blocks from generated source code\n";
t << "# fragments. Normal C and C++ comments will always remain visible.\n";
t << "\n";
}
t << "STRIP_CODE_COMMENTS = YES\n";
if (!sl)
{ {
t << "\n"; t << "\n";
t << "# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen\n"; t << "# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen\n";
...@@ -715,6 +731,15 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -715,6 +731,15 @@ void writeTemplateConfig(QFile *f,bool sl)
} }
t << "VERBATIM_HEADERS = YES\n"; t << "VERBATIM_HEADERS = YES\n";
if (!sl) if (!sl)
{
t << "\n";
t << "# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen\n";
t << "# will put list of the files that are included by a file in the documentation\n";
t << "# of that file.\n";
t << "\n";
}
t << "SHOW_INCLUDE_FILES = YES\n";
if (!sl)
{ {
t << "\n"; t << "\n";
t << "# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen\n"; t << "# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen\n";
...@@ -945,8 +970,8 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -945,8 +970,8 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "\n"; t << "\n";
t << "# In case all classes in a project start with a common prefix, all\n"; t << "# In case all classes in a project start with a common prefix, all\n";
t << "# classes will be put under the same header in the alphabetical index.\n"; t << "# classes will be put under the same header in the alphabetical index.\n";
t << "# The IGNORE_PREFIX tag can be use to specify a prefix that should be ignored\n"; t << "# The IGNORE_PREFIX tag can be used to specify one or more prefixes that\n";
t << "# while generating the index headers.\n"; t << "# should be ignored while generating the index headers.\n";
t << "\n"; t << "\n";
} }
t << "IGNORE_PREFIX = \n"; t << "IGNORE_PREFIX = \n";
...@@ -1649,6 +1674,11 @@ void checkConfig() ...@@ -1649,6 +1674,11 @@ void checkConfig()
} }
} }
} }
#if defined(_WIN32)
if (Config::haveDotFlag) _putenv("DOTFONTPATH=.");
#endif
} }
void parseConfig(const QCString &s) void parseConfig(const QCString &s)
......
...@@ -43,12 +43,13 @@ QCString Definition::nameToFile(const char *name) ...@@ -43,12 +43,13 @@ QCString Definition::nameToFile(const char *name)
{ {
switch(c) switch(c)
{ {
case ':': result+="_c_"; break; case ':': result+="_"; break;
case '<': result+="_lt"; break; case '<': result+="_lt"; break;
case '>': result+="_gt"; break; case '>': result+="_gt"; break;
case '*': result+="_ast"; break; case '*': result+="_ast"; break;
case '&': result+="_amp"; break; case '&': result+="_amp"; break;
case '|': result+="_p_"; break; case '|': result+="_p_"; break;
case '!': result+="_e_"; break;
case ',': result+="_x_"; break; case ',': result+="_x_"; break;
case ' ': break; case ' ': break;
default: default:
......
...@@ -259,10 +259,6 @@ void DotNode::deleteNode() ...@@ -259,10 +259,6 @@ void DotNode::deleteNode()
// do not access cn after this! // do not access cn after this!
} }
} }
//printf("delete node %s from memory (c=%d,p=%d)\n",
// m_label.data(),
// m_children?m_children->count():0,
// m_parents?m_parents->count():0);
delete this; delete this;
} }
...@@ -413,73 +409,62 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -413,73 +409,62 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QDir::setCurrent(d.absPath()); QDir::setCurrent(d.absPath());
QDir thisDir; QDir thisDir;
//QFile ind("inherit.html"); out << "<table border=0 cellspacing=10 cellpadding=0>" << endl;
//if (ind.open(IO_WriteOnly))
//{
// QTextStream ti(&ind);
//ti << "<html><head><title>Class Hierarchy</title></head>" << endl;
//ti << "<body bgcolor=#ffffff>" << endl;
out << "<table border=0 cellspacing=10 cellpadding=0>" << endl;
QListIterator<DotNode> dnli(*m_rootSubgraphs); QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n; DotNode *n;
for (dnli.toFirst();(n=dnli.current());++dnli) for (dnli.toFirst();(n=dnli.current());++dnli)
{
QCString baseName;
QCString diskName=n->m_url.copy();
int i=diskName.find('$'); /* should not return -1 */
if (i!=-1) diskName=diskName.right(diskName.length()-i-1);
baseName.sprintf("inherit_graph_%s",diskName.data());
QCString dotName=baseName+".dot";
QCString gifName=baseName+".gif";
QCString mapName=baseName+".map";
QFile f(dotName);
if (!f.open(IO_WriteOnly)) return;
QTextStream t(&f);
t << "digraph inheritance" << endl;
t << "{" << endl;
t << " rankdir=LR;" << endl;
QListIterator<DotNode> dnli2(*m_rootNodes);
DotNode *node;
for (;(node=dnli2.current());++dnli2)
{ {
//printf("Node %s color=%d (c=%d,p=%d)\n", if (node->m_subgraphId==n->m_subgraphId) node->write(t);
// n->m_label.data(),n->m_subgraphId, }
// n->m_children?n->m_children->count():0, t << "}" << endl;
// n->m_parents?n->m_parents->count():0); f.close();
QCString baseName;
baseName.sprintf("inherit_graph_%s",n->m_label.data());
QCString dotName=baseName+".dot";
QCString gifName=baseName+".gif";
QCString mapName=baseName+".map";
QFile f(dotName);
if (!f.open(IO_WriteOnly)) return;
QTextStream t(&f);
t << "digraph inheritance" << endl;
t << "{" << endl;
t << " rankdir=LR;" << endl;
QListIterator<DotNode> dnli2(*m_rootNodes);
DotNode *node;
for (;(node=dnli2.current());++dnli2)
{
if (node->m_subgraphId==n->m_subgraphId) node->write(t);
}
t << "}" << endl;
f.close();
QCString dotCmd; QCString dotCmd;
dotCmd.sprintf("dot -Tgif %s -o %s",dotName.data(),gifName.data()); dotCmd.sprintf("dot -Tgif %s -o %s",dotName.data(),gifName.data());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data()); //printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (system(dotCmd)!=0) if (system(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
out << "</table>" << endl; out << "</table>" << endl;
return; return;
}
dotCmd.sprintf("dot -Timap %s -o %s",dotName.data(),mapName.data());
//printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
out << "</table>" << endl;
return;
}
out << "<tr><td><img src=\"" << gifName << "\" border=\"0\" usemap=\"#"
<< n->m_label << "_map\"></td></tr>" << endl;
out << "<map name=\"" << n->m_label << "_map\">" << endl;
convertMapFile(out,mapName);
out << "</map>" << endl;
thisDir.remove(dotName);
thisDir.remove(mapName);
} }
out << "</table>" << endl; dotCmd.sprintf("dot -Timap %s -o %s",dotName.data(),mapName.data());
// ti << "</body></html>" << endl; //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
// ind.close(); if (system(dotCmd)!=0)
//} {
err("Problems running dot. Check your installation!\n");
out << "</table>" << endl;
return;
}
out << "<tr><td><img src=\"" << gifName << "\" border=\"0\" usemap=\"#"
<< n->m_label << "_map\"></td></tr>" << endl;
out << "<map name=\"" << n->m_label << "_map\">" << endl;
convertMapFile(out,mapName);
out << "</map>" << endl;
thisDir.remove(dotName);
thisDir.remove(mapName);
}
out << "</table>" << endl;
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
} }
......
...@@ -67,8 +67,8 @@ class DotNode ...@@ -67,8 +67,8 @@ class DotNode
void colorConnectedNodes(int curColor); void colorConnectedNodes(int curColor);
const DotNode *findRoot() const; // only works for acyclic graphs! const DotNode *findRoot() const; // only works for acyclic graphs!
int m_number; int m_number;
QCString m_label; QCString m_label; //!< label text
QCString m_url; QCString m_url; //!< url of the node (format: remove$local)
QList<DotNode> *m_parents; //!< list of parent nodes (incoming arrows) QList<DotNode> *m_parents; //!< list of parent nodes (incoming arrows)
QList<DotNode> *m_children; //!< list of child nodes (outgoing arrows) QList<DotNode> *m_children; //!< list of child nodes (outgoing arrows)
QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child
......
This diff is collapsed.
# #
# $Id$ # $Id$
# #
# Copyright (C) 1997-1999 by Dimitri van Heesch. # Copyright (C) 1997-2000 by Dimitri van Heesch.
# #
# Permission to use, copy, modify, and distribute this software and its # Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby # documentation under the terms of the GNU General Public License is hereby
......
...@@ -126,46 +126,49 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -126,46 +126,49 @@ void FileDef::writeDocumentation(OutputList &ol)
} }
ol.writeSynopsis(); ol.writeSynopsis();
ol.startTextBlock(TRUE); if (Config::showIncFileFlag)
QListIterator<IncludeInfo> ili(*includeList);
IncludeInfo *ii;
for (;(ii=ili.current());++ili)
{ {
FileDef *fd=ii->fileDef; ol.startTextBlock(TRUE);
ol.startTypewriter(); QListIterator<IncludeInfo> ili(*includeList);
ol.docify("#include "); IncludeInfo *ii;
if (ii->local) for (;(ii=ili.current());++ili)
ol.docify("\"");
else
ol.docify("<");
ol.disable(OutputGenerator::Html);
ol.docify(ii->includeName);
ol.enableAll();
ol.disableAllBut(OutputGenerator::Html);
if (fd && fd->isLinkable() &&
(fd->generateSource() || Config::sourceBrowseFlag)
)
{
ol.writeObjectLink(fd->getReference(),fd->includeName(),0,ii->includeName);
}
else
{ {
FileDef *fd=ii->fileDef;
ol.startTypewriter();
ol.docify("#include ");
if (ii->local)
ol.docify("\"");
else
ol.docify("<");
ol.disable(OutputGenerator::Html);
ol.docify(ii->includeName); ol.docify(ii->includeName);
ol.enableAll();
ol.disableAllBut(OutputGenerator::Html);
if (fd && fd->isLinkable() &&
(fd->generateSource() || Config::sourceBrowseFlag)
)
{
ol.writeObjectLink(fd->getReference(),fd->includeName(),0,ii->includeName);
}
else
{
ol.docify(ii->includeName);
}
ol.enableAll();
if (ii->local)
ol.docify("\"");
else
ol.docify(">");
ol.endTypewriter();
ol.disable(OutputGenerator::RTF);
ol.lineBreak();
ol.enableAll();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
} }
ol.enableAll(); ol.endTextBlock();
if (ii->local)
ol.docify("\"");
else
ol.docify(">");
ol.endTypewriter();
ol.disable(OutputGenerator::RTF);
ol.lineBreak();
ol.enableAll();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
} }
ol.endTextBlock();
if (Config::haveDotFlag && Config::includeGraphFlag) if (Config::haveDotFlag && Config::includeGraphFlag)
{ {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "image.h" #include "image.h"
#include "util.h" #include "util.h"
#include "message.h" #include "message.h"
#include "config.h"
Formula::Formula(const char *text) Formula::Formula(const char *text)
{ {
...@@ -66,6 +67,12 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -66,6 +67,12 @@ void FormulaList::generateBitmaps(const char *path)
QTextStream t(&f); QTextStream t(&f);
t << "\\documentclass{article}" << endl; t << "\\documentclass{article}" << endl;
t << "\\usepackage{epsf}" << endl; // for those who want to include images t << "\\usepackage{epsf}" << endl; // for those who want to include images
const char *s=Config::extraPackageList.first();
while (s)
{
t << "\\usepackage{" << s << "}\n";
s=Config::extraPackageList.next();
}
t << "\\pagestyle{empty}" << endl; t << "\\pagestyle{empty}" << endl;
t << "\\begin{document}" << endl; t << "\\begin{document}" << endl;
int page=0; int page=0;
......
...@@ -102,9 +102,9 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -102,9 +102,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
} }
if (fileList->count()>0) if (fileList->count()>0)
{ {
ol.startMemberHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trFiles()); parseText(ol,theTranslator->trFiles());
ol.endMemberHeader(); ol.endGroupHeader();
ol.startIndexList(); ol.startIndexList();
FileDef *fd=fileList->first(); FileDef *fd=fileList->first();
while (fd) while (fd)
...@@ -123,9 +123,9 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -123,9 +123,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
{ {
if (!found) if (!found)
{ {
ol.startMemberHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trCompounds()); parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader(); ol.endGroupHeader();
ol.startIndexList(); ol.startIndexList();
found=TRUE; found=TRUE;
} }
......
...@@ -495,7 +495,7 @@ void writeFileIndex(OutputList &ol) ...@@ -495,7 +495,7 @@ void writeFileIndex(OutputList &ol)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#if 0
void writeSourceIndex(OutputList &ol) void writeSourceIndex(OutputList &ol)
{ {
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
...@@ -561,6 +561,7 @@ void writeSourceIndex(OutputList &ol) ...@@ -561,6 +561,7 @@ void writeSourceIndex(OutputList &ol)
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
} }
#endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int countNamespaces() int countNamespaces()
...@@ -723,13 +724,11 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -723,13 +724,11 @@ void writeAlphabeticalClassList(OutputList &ol)
ClassDef *cd; ClassDef *cd;
char startLetter=0; char startLetter=0;
int headerItems=0; int headerItems=0;
int prefixLength = Config::ignorePrefix.length();
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
if (cd->isLinkableInProject()) if (cd->isLinkableInProject())
{ {
int index = cd->name().left(prefixLength)==Config::ignorePrefix ? int index = getPrefixIndex(cd->name());
prefixLength : 0;
if (cd->name().at(index)!=startLetter) // new begin letter => new header if (cd->name().at(index)!=startLetter) // new begin letter => new header
{ {
startLetter=cd->name().at(index); startLetter=cd->name().at(index);
...@@ -762,8 +761,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -762,8 +761,7 @@ void writeAlphabeticalClassList(OutputList &ol)
{ {
if (cd->isLinkableInProject()) if (cd->isLinkableInProject())
{ {
int index = cd->name().left(prefixLength)==Config::ignorePrefix ? int index = getPrefixIndex(cd->name());
prefixLength : 0;
if (cd->name().at(index)!=startLetter) if (cd->name().at(index)!=startLetter)
{ {
// insert a new header using a dummy class pointer. // insert a new header using a dummy class pointer.
...@@ -811,8 +809,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -811,8 +809,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd) if (cd)
{ {
//printf("head ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>"); //printf("head ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>");
int index = cd->name().left(prefixLength)==Config::ignorePrefix ? int index = getPrefixIndex(cd->name());
prefixLength : 0;
startLetter=cd->name().at(index); startLetter=cd->name().at(index);
char s[2]; s[0]=startLetter; s[1]=0; char s[2]; s[0]=startLetter; s[1]=0;
ol.writeIndexHeading(s); ol.writeIndexHeading(s);
......
This diff is collapsed.
This diff is collapsed.
...@@ -1130,6 +1130,14 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl) ...@@ -1130,6 +1130,14 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
srcA->type = dstA->type.left(i2+2)+srcA->type; srcA->type = dstA->type.left(i2+2)+srcA->type;
srcA->name = dstA->name.copy(); srcA->name = dstA->name.copy();
} }
if (srcA->docs.isEmpty() && !dstA->docs.isEmpty())
{
srcA->docs = dstA->docs.copy();
}
else if (dstA->docs.isEmpty() && !srcA->docs.isEmpty())
{
dstA->docs = srcA->docs.copy();
}
} }
//printf("result mergeArguments `%s', `%s'\n", //printf("result mergeArguments `%s', `%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data()); // argListToString(srcAl).data(),argListToString(dstAl).data());
...@@ -1694,20 +1702,21 @@ bool generateLink(OutputList &ol,const char *clName, ...@@ -1694,20 +1702,21 @@ bool generateLink(OutputList &ol,const char *clName,
//FileInfo *fi=0; //FileInfo *fi=0;
FileDef *fd; FileDef *fd;
GroupDef *gd; GroupDef *gd;
PageInfo *pi;
bool ambig; bool ambig;
if (linkRef.isEmpty()) // no reference name! if (linkRef.isEmpty()) // no reference name!
{ {
ol.docify(lt); ol.docify(lt);
return FALSE; return FALSE;
} }
else if ((pageDict[linkRef])) // link to a page else if ((pi=pageDict[linkRef])) // link to a page
{ {
ol.writeObjectLink(0,linkRef,0,lt); ol.writeObjectLink(0,pi->name,0,lt);
return TRUE; return TRUE;
} }
else if ((exampleDict[linkRef])) // link to an example else if ((pi=exampleDict[linkRef])) // link to an example
{ {
ol.writeObjectLink(0,linkRef+"-example",0,lt); ol.writeObjectLink(0,convertSlashes(pi->name,TRUE)+"-example",0,lt);
return TRUE; return TRUE;
} }
else if ((gd=groupDict[linkRef])) // link to a group else if ((gd=groupDict[linkRef])) // link to a group
...@@ -1915,3 +1924,24 @@ QCString substituteKeywords(const QCString &s,const char *title) ...@@ -1915,3 +1924,24 @@ QCString substituteKeywords(const QCString &s,const char *title)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
/*! Returns the character index within \a name of the first prefix
* in Config::ignorePrefixList that matches \a name at the left hand side,
* or zero if no match was found
*/
int getPrefixIndex(const QCString &name)
{
char *s = Config::ignorePrefixList.first();
while (s)
{
const char *ps=s;
const char *pd=name.data();
int i=0;
while (*ps!=0 && *pd!=0 && *ps==*pd) ps++,pd++,i++;
if (*ps==0 && *pd!=0)
{
return i;
}
s = Config::ignorePrefixList.next();
}
return 0;
}
...@@ -78,7 +78,6 @@ bool rightScopeMatch(const QCString &scope, const QCString &name); ...@@ -78,7 +78,6 @@ bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name); bool leftScopeMatch(const QCString &scope, const QCString &name);
void writePageRef(OutputList &ol,const char *cn,const char *mn); void writePageRef(OutputList &ol,const char *cn,const char *mn);
QCString substituteKeywords(const QCString &s,const char *title); QCString substituteKeywords(const QCString &s,const char *title);
//void pushGeneratorState(OutputList &ol); int getPrefixIndex(const QCString &name);
//void popGeneratorState(OutputList &ol);
#endif #endif
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