Commit b76d4ee1 authored by dimitri's avatar dimitri

+ 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 8cc2d754
DOXYGEN Version 1.1.0
DOXYGEN Version 1.1.0-20000220
CONTENTS
--------
......@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.0.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.0.src.tar # unpack it
gunzip doxygen-1.1.0-20000220.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.0-20000220.src.tar # unpack it
2. Run the configure script:
......@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
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.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
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"`
f_debug=NO
f_shared=YES
f_make=NO
f_dot=NO
f_perl=NO
f_plf_auto=NO
f_prefix=/usr
......@@ -51,6 +52,9 @@ while test -n "$1"; do
--make)
shift; f_make=$1
;;
--dot)
shift; f_dot=$1
;;
--perl)
shift; f_perl=$1
;;
......@@ -72,10 +76,10 @@ done
if test "$f_help" = y; then
cat <<EOF
Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--platform target] [--prefix dir]
[--install name] [--english-only]
[--perl name] [--make name] [--dot name] [--platform target]
[--prefix dir] [--install name] [--english-only]
Options:ll
Options:
--help Print this help
......@@ -91,6 +95,10 @@ Options:ll
--make name Use \`name' as the name of the GNU make tool
[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.
See PLATFORMS for a list of possibilities
......@@ -241,6 +249,27 @@ if test "$f_make" = NO; then
fi
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 ------------------------------------------------------------
echo -n " Checking for perl... "
......@@ -294,6 +323,12 @@ DOXYDOCS = ..
export TMAKEPATH
EOF
if test "$f_dot" != NO; then
cat >> .makeconfig <<EOF
HAVE_DOT = $f_dot
EOF
fi
touch .tmakeconfig
if test "$f_shared" = NO; then
cat >> .tmakeconfig <<EOF
......@@ -302,7 +337,7 @@ EOF
fi
if test "$f_english" = YES; then
cat >> .tmakeconfig << EOF
cat >> .tmakeconfig <<EOF
TMAKE_CXXFLAGS = -DENGLISH_ONLY
EOF
fi
......
......@@ -120,7 +120,9 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_repeat_brief REPEAT_BRIEF
<li> \refitem cfg_search_includes SEARCH_INCLUDES
<li> \refitem cfg_searchengine SEARCHENGINE
<li> \refitem cfg_show_include_files SHOW_INCLUDE_FILES
<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_rtf_hyperlinks RTF_HYPERLINKS
<li> \refitem cfg_rtf_output RTF_OUTPUT
......@@ -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
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
<dt>\c CASE_SENSE_NAMES <dd>
\addindex CASE_SENSE_NAMES
......@@ -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.
\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
<dt>\c JAVADOC_AUTOBRIEF <dd>
\addindex JAVADOC_AUTOBRIEF
......@@ -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
<dt>\c IGNORE_PREFIX <dd>
In case all classes in a project start with a common prefix, all
classes will 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
while generating the index headers.
In case all classes in a project start with a common prefix, all classes will
be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be used to specify a prefix
(or a list of prefixes) that should be ignored while generating the index
headers.
</dl>
......
......@@ -103,8 +103,6 @@ tools should be installed.
the Graph visualization toolkit version 1.5</a><br>
Needed for the include dependency graphs, the graphical inheritance graphs,
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">
the HTML help workshop</a> (for Windows only)<br>
Needed for compiling compressed HTML output (a.k.a. the new Windows help format).
......
......@@ -20,12 +20,12 @@ all: class/html/index.html \
template/html/index.html \
tag/html/index.html \
group/html/index.html \
diagram/html/index.html
diagrams/html/index.html
clean:
rm -rf class define enum file func page relates author \
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
$(DOXYGEN)/bin/doxygen class.cfg
......@@ -92,5 +92,7 @@ template/html/index.html: templ.cpp templ.cfg
group/html/index.html: group.cpp 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
endif
......@@ -16,20 +16,19 @@ all: class/html/index.html \
jdstyle/html/index.html \
structcmd/html/index.html \
autolink/html/index.html \
tag/html/index.html \
restypedef/html/index.html \
afterdoc/html/index.html \
template/html/index.html \
tag/html/index.html \
group/html/index.html \
diagram/html/index.html
diagrams/html/index.html
clean:
deltree /y class define enum file
deltree /y func page relates author
deltree /y par overload example include qtstyle
deltree /y jdstyle structcmd autolink tag resdefine
deltree /y restypedef
deltree /y jdstyle structcmd autolink resdefine
deltree /y restypedef afterdoc template tag group diagrams
class/html/index.html: class.h class.cfg
$(DOXYDIR)\doxygen class.cfg
......@@ -98,5 +97,5 @@ template/html/index.html: templ.cpp templ.cfg
group/html/index.html: group.cpp 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
......@@ -2,7 +2,7 @@
#
# $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
# documentation under the terms of the GNU General Public License is hereby
......
......@@ -331,27 +331,39 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (incInfo)
{
QCString nm=incInfo->includeName.isEmpty() ?
incInfo->fileDef->docName().data() :
incInfo->includeName.data();
ol.startTypewriter();
ol.docify("#include ");
if (incInfo->local)
ol.docify("\"");
else
ol.docify("<");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
ol.docify(nm);
ol.disableAllBut(OutputGenerator::Html);
ol.enable(OutputGenerator::Html);
ol.writeObjectLink(0,incInfo->fileDef->includeName(),0,nm);
ol.popGeneratorState();
if (incInfo->local)
ol.docify("\"");
else
ol.docify(">");
ol.endTypewriter();
ol.newParagraph();
(incInfo->fileDef ?
incInfo->fileDef->docName().data() : ""
) :
incInfo->includeName.data();
if (!nm.isEmpty())
{
ol.startTypewriter();
ol.docify("#include ");
if (incInfo->local)
ol.docify("\"");
else
ol.docify("<");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
ol.docify(nm);
ol.disableAllBut(OutputGenerator::Html);
ol.enable(OutputGenerator::Html);
if (incInfo->fileDef)
{
ol.writeObjectLink(0,incInfo->fileDef->includeName(),0,nm);
}
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()
//printf("in class %s found var type=`%s' name=`%s'\n",
// name().data(),type.data(),md->name().data());
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));
if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes!
if (cd && cd->isLinkable()) // class exists and is linkable
{
found=TRUE;
if (usesImplClassDict==0) usesImplClassDict = new UsesClassDict(257);
UsesClassDef *ucd=usesImplClassDict->find(cd->name());
if (ucd==0)
......
......@@ -16,6 +16,7 @@
#include "classlist.h"
#include "config.h"
#include "util.h"
ClassList::ClassList() : QList<ClassDef>()
{
......@@ -30,10 +31,12 @@ int ClassList::compareItems(GCI item1, GCI item2)
ClassDef *c1=(ClassDef *)item1;
ClassDef *c2=(ClassDef *)item2;
int prefixLength = Config::ignorePrefix.length();
int i1 = c1->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);
//int prefixLength = Config::ignorePrefix.length();
//int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
//int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
return strcmp(c1->name().data()+getPrefixIndex(c1->name()),
c2->name().data()+getPrefixIndex(c2->name())
);
}
ClassListIterator::ClassListIterator(const ClassList &cllist) :
......
......@@ -2510,60 +2510,57 @@ YY_RULE_SETUP
#line 887 "code.l"
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:
YY_RULE_SETUP
#line 912 "code.l"
#line 888 "code.l"
{ // remove special one-line comment
g_yyLineNr+=((QCString)yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
if (Config::stripCommentsFlag)
{
g_yyLineNr+=((QCString)yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
YY_BREAK
case 68:
YY_RULE_SETUP
#line 920 "code.l"
#line 903 "code.l"
{ // remove special one-line comment
g_yyLineNr++;
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
if (Config::stripCommentsFlag)
{
g_yyLineNr++;
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 928 "code.l"
#line 918 "code.l"
{ // strip special one-line comment
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
if (Config::stripCommentsFlag)
{
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
else
{
codifyLines(yytext);
}
}
YY_BREAK
case 70:
......@@ -2571,11 +2568,20 @@ case 70:
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 932 "code.l"
#line 929 "code.l"
{
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
codifyLines(yytext);
BEGIN(SkipComment);
}
}
YY_BREAK
case 71:
......@@ -2583,10 +2589,19 @@ case 71:
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 937 "code.l"
#line 943 "code.l"
{ // special C comment block at a new line
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
YY_BREAK
case 72:
......@@ -2594,20 +2609,33 @@ case 72:
yy_c_buf_p = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 941 "code.l"
#line 956 "code.l"
{ // special C comment block half way a line
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 945 "code.l"
{}
#line 969 "code.l"
{ if (!Config::stripCommentsFlag)
{
g_code->codify(yytext);
}
}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 946 "code.l"
#line 974 "code.l"
{
g_code->codify(yytext);
g_lastCContext = YY_START ;
......@@ -2616,7 +2644,7 @@ YY_RULE_SETUP
YY_BREAK
case 75:
YY_RULE_SETUP
#line 951 "code.l"
#line 979 "code.l"
{
g_code->codify(yytext);
g_lastCContext = YY_START ;
......@@ -2625,14 +2653,14 @@ YY_RULE_SETUP
YY_BREAK
case 76:
YY_RULE_SETUP
#line 956 "code.l"
#line 984 "code.l"
{
codifyLines(yytext);
}
YY_BREAK
case 77:
YY_RULE_SETUP
#line 959 "code.l"
#line 987 "code.l"
{
g_code->codify(yytext);
}
......@@ -2648,7 +2676,7 @@ YY_RULE_SETUP
*/
case 78:
YY_RULE_SETUP
#line 972 "code.l"
#line 1000 "code.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
......@@ -3547,7 +3575,7 @@ int main()
return 0;
}
#endif
#line 972 "code.l"
#line 1000 "code.l"
/*@ ----------------------------------------------------------------------------
......
......@@ -885,64 +885,92 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<RemoveSpecialCComment>"//"|"/*"
<RemoveSpecialCComment>\n { g_yyLineNr++; }
<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
g_yyLineNr+=((QCString)yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
if (Config::stripCommentsFlag)
{
g_yyLineNr+=((QCString)yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
g_yyLineNr++;
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
if (Config::stripCommentsFlag)
{
g_yyLineNr++;
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
<*>"//"[!/][^\n]*\n { // strip special one-line comment
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
if (Config::stripCommentsFlag)
{
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
else
{
codifyLines(yytext);
}
}
<*>\n{B}*"/*"[!*]/[^/*] {
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
if (Config::stripCommentsFlag)
{
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
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
if (Config::stripCommentsFlag)
{
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
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
if (Config::stripCommentsFlag)
{
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_lastCContext = YY_START ;
......
This diff is collapsed.
......@@ -53,7 +53,7 @@ struct Config
static QCString paperType; // the page type to generate docs for
static QCString manExtension; // extension the man page files
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 examplePath; // list of example paths
static QStrList imagePath; // list of image paths
......@@ -112,6 +112,8 @@ struct Config
static bool generateRTF; // generate RTF flag
static bool compactRTFFlag; // generate more compact 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
......@@ -20,6 +20,7 @@
* includes
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......@@ -84,7 +85,7 @@ QCString Config::inputFilter;
QCString Config::paperType;
QCString Config::manExtension;
QCString Config::htmlStyleSheet;
QCString Config::ignorePrefix;
QStrList Config::ignorePrefixList;
QStrList Config::includePath;
QStrList Config::examplePath;
QStrList Config::imagePath;
......@@ -141,6 +142,8 @@ bool Config::inlineInfoFlag = TRUE;
bool Config::collGraphFlag = TRUE;
bool Config::includeGraphFlag = TRUE;
bool Config::gfxHierarchyFlag = TRUE;
bool Config::showIncFileFlag = TRUE;
bool Config::stripCommentsFlag = TRUE;
int Config::tabSize = 8;
int Config::colsInAlphaIndex = 5;
......@@ -219,7 +222,7 @@ static int yyread(char *buf,int max_size)
<Start>"TAB_SIZE"[ \t]*"=" { BEGIN(GetString); s=&tabSizeString; 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>"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>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePath; 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)
<Start>"GENERATE_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateRTF; }
<Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; }
<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); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n {
......@@ -433,7 +438,7 @@ void Config::init()
Config::paperType = "a4wide";
Config::manExtension = ".3";
Config::htmlStyleSheet.resize(0);
Config::ignorePrefix.resize(0);
Config::ignorePrefixList.clear();
Config::includePath.clear();
Config::examplePath.clear();
Config::imagePath.clear();
......@@ -492,6 +497,8 @@ void Config::init()
Config::collGraphFlag = TRUE;
Config::includeGraphFlag = TRUE;
Config::gfxHierarchyFlag = TRUE;
Config::showIncFileFlag = TRUE;
Config::stripCommentsFlag = TRUE;
}
void writeTemplateConfig(QFile *f,bool sl)
......@@ -695,6 +702,15 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "INLINE_SOURCES = NO\n";
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 << "# 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)
}
t << "VERBATIM_HEADERS = YES\n";
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 << "# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen\n";
......@@ -945,8 +970,8 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "\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 << "# The IGNORE_PREFIX tag can be use to specify a prefix that should be ignored\n";
t << "# while generating the index headers.\n";
t << "# The IGNORE_PREFIX tag can be used to specify one or more prefixes that\n";
t << "# should be ignored while generating the index headers.\n";
t << "\n";
}
t << "IGNORE_PREFIX = \n";
......@@ -1649,6 +1674,11 @@ void checkConfig()
}
}
}
#if defined(_WIN32)
if (Config::haveDotFlag) _putenv("DOTFONTPATH=.");
#endif
}
void parseConfig(const QCString &s)
......
......@@ -43,12 +43,13 @@ QCString Definition::nameToFile(const char *name)
{
switch(c)
{
case ':': result+="_c_"; break;
case ':': result+="_"; break;
case '<': result+="_lt"; break;
case '>': result+="_gt"; break;
case '*': result+="_ast"; break;
case '&': result+="_amp"; break;
case '|': result+="_p_"; break;
case '!': result+="_e_"; break;
case ',': result+="_x_"; break;
case ' ': break;
default:
......
......@@ -259,10 +259,6 @@ void DotNode::deleteNode()
// 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;
}
......@@ -413,73 +409,62 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QDir::setCurrent(d.absPath());
QDir thisDir;
//QFile ind("inherit.html");
//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;
out << "<table border=0 cellspacing=10 cellpadding=0>" << endl;
QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n;
for (dnli.toFirst();(n=dnli.current());++dnli)
QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n;
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",
// n->m_label.data(),n->m_subgraphId,
// n->m_children?n->m_children->count():0,
// n->m_parents?n->m_parents->count():0);
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();
if (node->m_subgraphId==n->m_subgraphId) node->write(t);
}
t << "}" << endl;
f.close();
QCString dotCmd;
dotCmd.sprintf("dot -Tgif %s -o %s",dotName.data(),gifName.data());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
out << "</table>" << endl;
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);
QCString dotCmd;
dotCmd.sprintf("dot -Tgif %s -o %s",dotName.data(),gifName.data());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
out << "</table>" << endl;
return;
}
out << "</table>" << endl;
// ti << "</body></html>" << endl;
// ind.close();
//}
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;
QDir::setCurrent(oldDir);
}
......
......@@ -67,8 +67,8 @@ class DotNode
void colorConnectedNodes(int curColor);
const DotNode *findRoot() const; // only works for acyclic graphs!
int m_number;
QCString m_label;
QCString m_url;
QCString m_label; //!< label text
QCString m_url; //!< url of the node (format: remove$local)
QList<DotNode> *m_parents; //!< list of parent nodes (incoming arrows)
QList<DotNode> *m_children; //!< list of child nodes (outgoing arrows)
QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child
......
This diff is collapsed.
#
# $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
# documentation under the terms of the GNU General Public License is hereby
......
......@@ -126,46 +126,49 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.writeSynopsis();
ol.startTextBlock(TRUE);
QListIterator<IncludeInfo> ili(*includeList);
IncludeInfo *ii;
for (;(ii=ili.current());++ili)
if (Config::showIncFileFlag)
{
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.enableAll();
ol.disableAllBut(OutputGenerator::Html);
if (fd && fd->isLinkable() &&
(fd->generateSource() || Config::sourceBrowseFlag)
)
{
ol.writeObjectLink(fd->getReference(),fd->includeName(),0,ii->includeName);
}
else
ol.startTextBlock(TRUE);
QListIterator<IncludeInfo> ili(*includeList);
IncludeInfo *ii;
for (;(ii=ili.current());++ili)
{
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.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();
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();
}
ol.endTextBlock();
if (Config::haveDotFlag && Config::includeGraphFlag)
{
......
......@@ -27,6 +27,7 @@
#include "image.h"
#include "util.h"
#include "message.h"
#include "config.h"
Formula::Formula(const char *text)
{
......@@ -66,6 +67,12 @@ void FormulaList::generateBitmaps(const char *path)
QTextStream t(&f);
t << "\\documentclass{article}" << endl;
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 << "\\begin{document}" << endl;
int page=0;
......
......@@ -102,9 +102,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
if (fileList->count()>0)
{
ol.startMemberHeader();
ol.startGroupHeader();
parseText(ol,theTranslator->trFiles());
ol.endMemberHeader();
ol.endGroupHeader();
ol.startIndexList();
FileDef *fd=fileList->first();
while (fd)
......@@ -123,9 +123,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
if (!found)
{
ol.startMemberHeader();
ol.startGroupHeader();
parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader();
ol.endGroupHeader();
ol.startIndexList();
found=TRUE;
}
......
......@@ -495,7 +495,7 @@ void writeFileIndex(OutputList &ol)
}
//----------------------------------------------------------------------------
#if 0
void writeSourceIndex(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
......@@ -561,6 +561,7 @@ void writeSourceIndex(OutputList &ol)
endFile(ol);
ol.enable(OutputGenerator::Man);
}
#endif
//----------------------------------------------------------------------------
int countNamespaces()
......@@ -723,13 +724,11 @@ void writeAlphabeticalClassList(OutputList &ol)
ClassDef *cd;
char startLetter=0;
int headerItems=0;
int prefixLength = Config::ignorePrefix.length();
for (;(cd=cli.current());++cli)
{
if (cd->isLinkableInProject())
{
int index = cd->name().left(prefixLength)==Config::ignorePrefix ?
prefixLength : 0;
int index = getPrefixIndex(cd->name());
if (cd->name().at(index)!=startLetter) // new begin letter => new header
{
startLetter=cd->name().at(index);
......@@ -762,8 +761,7 @@ void writeAlphabeticalClassList(OutputList &ol)
{
if (cd->isLinkableInProject())
{
int index = cd->name().left(prefixLength)==Config::ignorePrefix ?
prefixLength : 0;
int index = getPrefixIndex(cd->name());
if (cd->name().at(index)!=startLetter)
{
// insert a new header using a dummy class pointer.
......@@ -811,8 +809,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd)
{
//printf("head ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>");
int index = cd->name().left(prefixLength)==Config::ignorePrefix ?
prefixLength : 0;
int index = getPrefixIndex(cd->name());
startLetter=cd->name().at(index);
char s[2]; s[0]=startLetter; s[1]=0;
ol.writeIndexHeading(s);
......
This diff is collapsed.
This diff is collapsed.
......@@ -1130,6 +1130,14 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
srcA->type = dstA->type.left(i2+2)+srcA->type;
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",
// argListToString(srcAl).data(),argListToString(dstAl).data());
......@@ -1694,20 +1702,21 @@ bool generateLink(OutputList &ol,const char *clName,
//FileInfo *fi=0;
FileDef *fd;
GroupDef *gd;
PageInfo *pi;
bool ambig;
if (linkRef.isEmpty()) // no reference name!
{
ol.docify(lt);
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;
}
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;
}
else if ((gd=groupDict[linkRef])) // link to a group
......@@ -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);
bool leftScopeMatch(const QCString &scope, const QCString &name);
void writePageRef(OutputList &ol,const char *cn,const char *mn);
QCString substituteKeywords(const QCString &s,const char *title);
//void pushGeneratorState(OutputList &ol);
//void popGeneratorState(OutputList &ol);
int getPrefixIndex(const QCString &name);
#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