From 1b90a1cf58b6b94d00e28d8212828956e8f9d177 Mon Sep 17 00:00:00 2001
From: dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>
Date: Sun, 4 Feb 2001 18:02:44 +0000
Subject: Release-1.2.5

---
 INSTALL                        |  4 ++--
 README                         |  4 ++--
 VERSION                        |  2 +-
 addon/configgen/config_templ.l | 25 ++++++++++++++++++++
 addon/configgen/configgen.cpp  | 13 +++++++++++
 doc/config.doc                 | 15 ++++++++++--
 packages/rpm/doxygen.spec      |  2 +-
 src/classdef.cpp               | 12 +++++-----
 src/classdef.h                 | 52 ++++++++++++++++++++++++++++++++++++++----
 src/code.l                     |  7 +++---
 src/config.h                   |  3 ++-
 src/config.l                   | 47 +++++++++++++++++++++++++++++++++++++-
 src/dot.cpp                    | 22 ++++++++++++------
 src/dot.h                      |  3 ++-
 src/doxygen.cpp                | 26 ++++++++++++++-------
 src/htmlgen.cpp                | 30 ++++++++++++++----------
 src/htmlgen.h                  |  6 ++---
 src/htmlhelp.cpp               |  2 ++
 src/memberdef.cpp              | 21 +++++++++++++----
 src/memberdef.h                | 11 +++------
 src/outputgen.cpp              |  1 +
 src/outputgen.h                |  2 ++
 src/outputlist.cpp             |  1 +
 src/pre.l                      | 15 ++++++++++++
 src/scanner.l                  |  8 +++----
 src/translator.h               |  7 +++++-
 src/translator_es.h            |  2 +-
 src/util.cpp                   |  4 +++-
 src/util.h                     |  2 +-
 29 files changed, 272 insertions(+), 77 deletions(-)

diff --git a/INSTALL b/INSTALL
index a7e632a..b98a483 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
-DOXYGEN Version 1.2.4-20010128
+DOXYGEN Version 1.2.5
 
 Please read the installation section of the manual for instructions.
 
 --------
-Dimitri van Heesch (28 January 2001)
+Dimitri van Heesch (04 February 2001)
diff --git a/README b/README
index 1d05bbb..847e873 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.2.4-20010128
+DOXYGEN Version 1.2.5
 
 Please read INSTALL for compilation instructions.
 
@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
 
 Enjoy,
 
-Dimitri van Heesch (28 January 2001)
+Dimitri van Heesch (04 February 2001)
diff --git a/VERSION b/VERSION
index 7131cb3..c813fe1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.4-20010128
+1.2.5
diff --git a/addon/configgen/config_templ.l b/addon/configgen/config_templ.l
index 69886d7..6b6b248 100644
--- a/addon/configgen/config_templ.l
+++ b/addon/configgen/config_templ.l
@@ -519,6 +519,31 @@ void configStrToVal()
     }
     Config::maxDotGraphHeight=height;
   }
+
+  if (maxInitLinesString.isEmpty())
+  {
+    Config::maxInitLines=30;
+  }
+  else
+  {
+    bool ok;
+    int maxLines =maxInitLinesString.toInt(&ok);
+    if (!ok)
+    {
+      warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [100..30000]!\n"
+	   "Using the default of 1024 pixels!\n");
+      maxLines=30;
+    }
+    else if (maxLines<0) // clip to lower bound
+    {
+      maxLines=0;
+    }
+    else if (maxLines>10000) // clip to upper bound
+    {
+      maxLines=10000;
+    }
+    Config::maxInitLines=maxLines;
+  }
 }
 
 static void substEnvVarsInString(QCString &s)
diff --git a/addon/configgen/configgen.cpp b/addon/configgen/configgen.cpp
index 6f62235..69dcca3 100644
--- a/addon/configgen/configgen.cpp
+++ b/addon/configgen/configgen.cpp
@@ -1046,6 +1046,19 @@ void init()
                     "will result in a user defined paragraph with heading \"Side Effects:\". \n"
                     "You can put \\n's in the value part of an alias to insert newlines. \n" 
                  );
+  ConfigInt::add(   "maxInitLines",
+                    "MAX_INITIALIZER_LINES",
+                    "30",
+                    "when do we hide values of variable and defines?",
+                    "The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n"
+                    "the initial value of a variable or define consist of for it to appear in \n"
+                    "the documentation. If the initializer consists of more lines than specified \n"
+                    "here it will be hidden. Use a value of 0 to hide initializers completely. \n"
+                    "The appearance of the initializer of individual variables and defines in the \n"
+                    "documentation can be controlled using \\showinitializer or \\hideinitializer \n"
+                    "command in the documentation regardless of this setting. \n",
+                    0,10000
+                 );
   ConfigBool::add(  "optimizeForCFlag",
                     "OPTIMIZE_OUTPUT_FOR_C",
                     "FALSE",
diff --git a/doc/config.doc b/doc/config.doc
index fc4e5b4..5cbb936 100644
--- a/doc/config.doc
+++ b/doc/config.doc
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * $Id$
+ * 
  *
  * Copyright (C) 1997-2001 by Dimitri van Heesch.
  *
@@ -63,7 +63,7 @@ followed by the descriptions of the tags grouped by category.
 \endhtmlonly
 \latexonly
 \footnotesize
-\begin{multicols}{3}
+\begin{multicols}{2}
 \begin{CompactList}
 \endlatexonly
 <li> \refitem cfg_aliases ALIASES
@@ -140,6 +140,7 @@ followed by the descriptions of the tags grouped by category.
 <li> \refitem cfg_man_output MAN_OUTPUT
 <li> \refitem cfg_max_dot_graph_height MAX_DOT_GRAPH_HEIGHT
 <li> \refitem cfg_max_dot_graph_width MAX_DOT_GRAPH_WIDTH
+<li> \refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES
 <li> \refitem cfg_optimize_output_for_c OPTIMIZE_OUTPUT_FOR_C
 <li> \refitem cfg_output_directory OUTPUT_DIRECTORY
 <li> \refitem cfg_output_language OUTPUT_LANGUAGE
@@ -446,6 +447,16 @@ followed by the descriptions of the tags grouped by category.
  will result in a user defined paragraph with heading "Side Effects:".
  You can put \\n's in the value part of an alias to insert newlines.
 
+\anchor cfg_max_initializer_lines
+<dt>\c MAX_INITIALIZER_LINES <dd>
+ \addindex MAX_INITIALIZER_LINES
+ The \c MAX_INITIALIZER_LINES tag determines the maximum number of lines
+ that the initial value of a variable or define can be. If the initializer
+ consists of more lines than specified here it will be hidden. Use a value
+ of 0 to hide initializers completely. The appearance of the value of
+ individual variables and defines can be controlled using \ref cmdshowinitializer "\\showinitializer"
+ or \ref cmdhideinitializer "\hideinitializer" command in the documentation.
+
 \anchor cfg_optimize_output_for_c
 <dt>\c OPTIMIZE_OUTPUT_FOR_C <dd>
  \addindex OPTIMIZE_OUTPUT_FOR_C
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index 315bb0b..d7a859c 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,5 +1,5 @@
 Name: doxygen
-Version: 1.2.4-20010128
+Version: 1.2.5
 Summary: documentation system for C, C++ and IDL
 Release: 1
 Source0: doxygen-%{version}.src.tar.gz
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 0fffcaf..ac6ef43 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -67,7 +67,7 @@ ClassDef::ClassDef(
   {
     //url="href=\""+fileName;
     exampleList = new ExampleList;
-    exampleDict = new ExampleDict(29);
+    exampleDict = new ExampleDict(17);
   }
   memListFileName=compoundName+"_"+nameToFile(nm)+"-members";
   inherits      = new BaseClassList;
@@ -76,7 +76,7 @@ ClassDef::ClassDef(
   inheritedBy->setAutoDelete(TRUE);
   allMemberNameInfoList = new MemberNameInfoList; 
   allMemberNameInfoList->setAutoDelete(TRUE);
-  allMemberNameInfoDict = new MemberNameInfoDict(1009);
+  allMemberNameInfoDict = new MemberNameInfoDict(257);
   visited=FALSE;
   setReference(lref);
   incInfo=0;
@@ -88,7 +88,7 @@ ClassDef::ClassDef(
   usesIntfClassDict=0;
   memberGroupList = new MemberGroupList;
   memberGroupList->setAutoDelete(TRUE);
-  memberGroupDict = new MemberGroupDict(257);
+  memberGroupDict = new MemberGroupDict(17);
   int i=name().findRev("::");
   if (i==-1)
   {
@@ -130,12 +130,12 @@ QCString ClassDef::displayName() const
 }
 
 // inserts a base class in the inheritance list
-void ClassDef::insertBaseClass(ClassDef *cd,Protection p,
+void ClassDef::insertBaseClass(ClassDef *cd,const char *n,Protection p,
                                Specifier s,const char *t)
 {
   //printf("*** insert base class %s into %s\n",cd->name().data(),name().data());
   //inherits->inSort(new BaseClassDef(cd,p,s,t));
-  inherits->append(new BaseClassDef(cd,p,s,t));
+  inherits->append(new BaseClassDef(cd,n,p,s,t));
 }
 
 // inserts a super class in the inherited list
@@ -143,7 +143,7 @@ void ClassDef::insertSuperClass(ClassDef *cd,Protection p,
                                 Specifier s,const char *t)
 {
   //printf("*** insert super class %s into %s\n",cd->name().data(),name().data());
-  inheritedBy->inSort(new BaseClassDef(cd,p,s,t));
+  inheritedBy->inSort(new BaseClassDef(cd,0,p,s,t));
 }
 
 void ClassDef::addMemberListToGroup(MemberList *ml)
diff --git a/src/classdef.h b/src/classdef.h
index 6ffa451..12cf575 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -46,6 +46,10 @@ class QTextStream;
 class PackageDef;
 struct IncludeInfo;
 
+/*! \brief This class contains all information about a compound.
+ *
+ *  A compound can be a class, struct, union, interface, or exception 
+ */
 class ClassDef : public Definition
 {
   public:
@@ -64,7 +68,7 @@ class ClassDef : public Definition
     QCString displayName() const;
     CompoundType compoundType() const { return compType; } 
     QCString compoundTypeString() const;
-    void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0);
+    void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0);
     BaseClassList *baseClasses() { return inherits; }
     void insertSuperClass(ClassDef *,Protection p,Specifier s,const char *t=0);
     BaseClassList *superClasses() { return inheritedBy; }
@@ -202,6 +206,8 @@ class ClassDef : public Definition
                       // groups?
 };
 
+/*! \brief Class that contains information about a usage relation. 
+ */
 struct UsesClassDef
 {
   UsesClassDef(ClassDef *cd) : classDef(cd) 
@@ -220,12 +226,22 @@ struct UsesClassDef
       accessors->insert(s,(void *)666);
     }
   }
+  /*! Class definition that this relation uses. */
   ClassDef *classDef;
+
+  /*! Dictionary of member variable names that form the edge labels of the
+   *  usage relation.
+   */
   QDict<void> *accessors;
+
+  /*! Template arguments used for the base class */
   QCString templSpecifiers;
+
   bool containment;
 };
 
+/*! \brief Dictionary of usage relations. 
+ */
 class UsesClassDict : public QDict<UsesClassDef>
 {
   public:
@@ -233,6 +249,8 @@ class UsesClassDict : public QDict<UsesClassDef>
    ~UsesClassDict() {}
 };
 
+/*! \brief Iterator class to iterate over a dictionary of usage relations. 
+ */
 class UsesClassDictIterator : public QDictIterator<UsesClassDef>
 {
   public:
@@ -241,16 +259,40 @@ class UsesClassDictIterator : public QDictIterator<UsesClassDef>
    ~UsesClassDictIterator() {}
 };
 
+/*! \brief Class that contains information about an inheritance relation. 
+ */
 struct BaseClassDef
 {
-  BaseClassDef(ClassDef *cd,Protection p,Specifier v,const char *t) : 
-        classDef(cd), prot(p), virt(v), templSpecifiers(t) {}
+  BaseClassDef(ClassDef *cd,const char *n,Protection p,
+               Specifier v,const char *t) : 
+        classDef(cd), usedName(n), prot(p), virt(v), templSpecifiers(t) {}
+
+  /*! Class definition that this relation inherits from. */
   ClassDef *classDef;
-  Protection prot;
+
+  /*! name used in the inheritance list 
+   * (may be a typedef name instead of the class name)
+   */
+  QCString   usedName; 
+  
+  /*! Protection level of the inheritance relation: 
+   *  Public, Protected, or Private 
+   */
+  Protection prot;     
+
+  /*! Virtualness of the inheritance relation:
+   *  Normal, or Virtual
+   */
   Specifier  virt;
+
+  /*! Template arguments used for the base class */
   QCString templSpecifiers;
 };
 
+/*! \brief list of base classes 
+ *  
+ *  The classes are alphabetically sorted on name if inSort() is used.
+ */
 class BaseClassList : public QList<BaseClassDef>
 {
   public:
@@ -266,6 +308,8 @@ class BaseClassList : public QList<BaseClassDef>
     }
 };
 
+/*! \brief Iterator for a list of base classes
+ */
 class BaseClassListIterator : public QListIterator<BaseClassDef>
 {
   public:
diff --git a/src/code.l b/src/code.l
index 0c8484d..53e3ff5 100644
--- a/src/code.l
+++ b/src/code.l
@@ -86,7 +86,7 @@ typedef QList<CodeVarDef>   CodeVarList;
  */
   
 static OutputDocInterface * g_code;
-static CodeClassList g_codeClassList;
+//static CodeClassList g_codeClassList;
 static CodeClassDict g_codeClassDict(1009);
 static CodeVarList   g_codeVarList;
 static CodeVarList   g_codeParmList;
@@ -909,7 +909,7 @@ TYPEKW  ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
 					    pushScope(g_ccd.name);
 					    //g_classScope=g_ccd.name.copy();
 					    CodeClassDef *cd=new CodeClassDef(g_ccd);
-					    g_codeClassList.append(cd);
+					    //g_codeClassList.append(cd);
 					    g_codeClassDict.insert(cd->name,cd);
 					    //printf("g_codeClassList.count()=%d\n",g_codeClassList.count());
 					  }
@@ -1555,11 +1555,10 @@ TYPEKW  ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
 
 void initParseCodeContext()
 {
-  g_codeClassList.setAutoDelete(TRUE);
+  g_codeClassDict.setAutoDelete(TRUE);
   g_codeVarList.setAutoDelete(TRUE);
   g_codeParmList.setAutoDelete(TRUE);
   g_codeClassDict.clear();
-  g_codeClassList.clear();
   g_codeVarList.clear();
   g_codeParmList.clear();
   g_ccd.bases.clear();
diff --git a/src/config.h b/src/config.h
index 130bf11..a8495bd 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sat Jan 27 18:27:32 2001
+/* This file was generated by configgen on Sat Feb 3 18:53:37 2001
  * from config_templ.h
  *
  * DO NOT EDIT!
@@ -70,6 +70,7 @@ struct Config
   static bool     generateTodoList; // do we want a todo list?
   static bool     generateTestList; // do we want a test list?
   static QStrList aliasList; // list of aliases
+  static int      maxInitLines; // when do we hide values of variable and defines?
   static bool     optimizeForCFlag; // do we parse C code?
   static bool     quietFlag; // generate progress messages flag
   static bool     warningFlag; // generate warnings flag
diff --git a/src/config.l b/src/config.l
index 77cff87..6786b88 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sat Jan 27 18:27:33 2001
+/* This file was generated by configgen on Sat Feb 3 18:53:38 2001
  * from config_templ.l
  *
  * DO NOT EDIT!
@@ -107,6 +107,7 @@ QStrList Config::sectionFilterList;
 bool     Config::generateTodoList = TRUE;
 bool     Config::generateTestList = TRUE;
 QStrList Config::aliasList;
+int      Config::maxInitLines = 30;
 bool     Config::optimizeForCFlag = FALSE;
 bool     Config::quietFlag = FALSE;
 bool     Config::warningFlag = TRUE;
@@ -214,6 +215,7 @@ static QStack<ConfigFileState> includeStack;
 static int               includeDepth;
 
 static QCString     tabSizeString;
+static QCString     maxInitLinesString;
 static QCString     colsInAlphaIndexString;
 static QCString     enumValuesPerLineString;
 static QCString     treeViewWidthString;
@@ -379,6 +381,7 @@ static void readIncludeFile(const char *incName)
 <Start>"GENERATE_TESTLIST"[ \t]*"="      { BEGIN(GetBool); b=&Config::generateTestList; }
 <Start>"ALIASES"[ \t]*"="                { BEGIN(GetStrList); l=&Config::aliasList; l->clear(); elemStr=""; }
 <Start>"ALIASES"[ \t]*"+="               { BEGIN(GetStrList); l=&Config::aliasList; elemStr=""; }
+<Start>"MAX_INITIALIZER_LINES"[ \t]*"="  { BEGIN(GetString); s=&maxInitLinesString; s->resize(0); }
 <Start>"OPTIMIZE_OUTPUT_FOR_C"[ \t]*"="  { BEGIN(GetBool); b=&Config::optimizeForCFlag; }
 <Start>"QUIET"[ \t]*"="                  { BEGIN(GetBool); b=&Config::quietFlag; }
 <Start>"WARNINGS"[ \t]*"="               { BEGIN(GetBool); b=&Config::warningFlag; }
@@ -628,6 +631,7 @@ void dumpConfig()
       is=Config::aliasList.next();
     }
   }
+  printf("maxInitLines=`%d'\n",Config::maxInitLines);
   printf("optimizeForCFlag=`%d'\n",Config::optimizeForCFlag);
   printf("# configuration options related to warning and progress messages\n");
   printf("quietFlag=`%d'\n",Config::quietFlag);
@@ -857,6 +861,7 @@ void Config::init()
   Config::generateTodoList = TRUE;
   Config::generateTestList = TRUE;
   Config::aliasList.clear();
+  Config::maxInitLines = 30;
   Config::optimizeForCFlag = FALSE;
   Config::quietFlag = FALSE;
   Config::warningFlag = TRUE;
@@ -1384,6 +1389,21 @@ void writeTemplateConfig(QFile *f,bool sl)
   if (!sl)
   {
     t << "\n";
+    t << "# The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n";
+    t << "# the initial value of a variable or define consist of for it to appear in \n";
+    t << "# the documentation. If the initializer consists of more lines than specified \n";
+    t << "# here it will be hidden. Use a value of 0 to hide initializers completely. \n";
+    t << "# The appearance of the initializer of individual variables and defines in the \n";
+    t << "# documentation can be controlled using \\showinitializer or \\hideinitializer \n";
+    t << "# command in the documentation regardless of this setting. \n";
+    t << "\n";
+  }
+  t << "MAX_INITIALIZER_LINES  = ";
+  writeIntValue(t,Config::maxInitLines);
+  t << "\n";
+  if (!sl)
+  {
+    t << "\n";
     t << "# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources \n";
     t << "# only. Doxygen will then generate output that is more tailored for C. \n";
     t << "# For instance some of the names that are used will be different. The list \n";
@@ -2430,6 +2450,31 @@ void configStrToVal()
     }
     Config::maxDotGraphHeight=height;
   }
+
+  if (maxInitLinesString.isEmpty())
+  {
+    Config::maxInitLines=30;
+  }
+  else
+  {
+    bool ok;
+    int maxLines =maxInitLinesString.toInt(&ok);
+    if (!ok)
+    {
+      warn_cont("Warning: argument of MAX_DOT_GRAPH_WIDTH is not a valid number in the range [100..30000]!\n"
+	   "Using the default of 1024 pixels!\n");
+      maxLines=30;
+    }
+    else if (maxLines<0) // clip to lower bound
+    {
+      maxLines=0;
+    }
+    else if (maxLines>10000) // clip to upper bound
+    {
+      maxLines=10000;
+    }
+    Config::maxInitLines=maxLines;
+  }
 }
 
 static void substEnvVarsInString(QCString &s)
diff --git a/src/dot.cpp b/src/dot.cpp
index 7e067e5..5824794 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -782,16 +782,24 @@ DotGfxHierarchyTable::~DotGfxHierarchyTable()
 int DotClassGraph::m_curNodeNumber;
 
 void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
-    const char *label,int distance,const char *templSpec,bool base)
+    const char *label,int distance,const char *usedName,const char *templSpec,bool base)
 {
   //printf(":: DoxGfxUsageGraph::addClass(class=%s,parent=%s,prot=%d,label=%s,dist=%d)\n",
   //                                 cd->name().data(),n->m_label.data(),prot,label,distance);
   int edgeStyle = label ? EdgeInfo::Dashed : EdgeInfo::Solid;
   QCString className;
-  if (templSpec)
+  if (usedName) // name is a typedef
+  {
+    className=usedName;
+  }
+  else if (templSpec) // name has a template part
+  {
     className=insertTemplateSpecifierInScope(cd->name(),templSpec);
-  else
-    className=cd->name().copy();
+  }
+  else // just a normal name
+  {
+    className=cd->name();
+  }
   DotNode *bn = m_usedNodes->find(className);
   if (bn) // class already inserted
   {
@@ -810,7 +818,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
   }
   else // new class
   {
-    QCString displayName=className.copy();
+    QCString displayName=className;
     if (Config::hideScopeNames) displayName=stripScope(displayName);
     QCString tmp_url;
     if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
@@ -846,7 +854,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
     //                                     cd->name().data(),bcd->templSpecifiers.data());
     QCString templSpec;
     if (base) templSpec = bcd->templSpecifiers;
-    addClass(bcd->classDef,n,bcd->prot,0,distance,templSpec,base); 
+    addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,templSpec,base); 
   }
   if (m_graphType != Inheritance)
   {
@@ -876,7 +884,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
           }
         }
         //printf("Found label=`%s'\n",label.data());
-        addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,ucd->templSpecifiers,base);
+        addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,ucd->templSpecifiers,base);
       }
     }
   }
diff --git a/src/dot.h b/src/dot.h
index c626b67..82c7de7 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -126,7 +126,8 @@ class DotClassGraph
   private:
     void buildGraph(ClassDef *cd,DotNode *n,int level,bool base);
     void addClass(ClassDef *cd,DotNode *n,int prot,const char *label,
-                  int level,const char *templSpec,bool base);
+                  int level,const char *usedName,const char *templSpec,
+                  bool base);
     DotNode        *m_startNode;
     QDict<DotNode> *m_usedNodes;
     static int      m_curNodeNumber;
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 3990dd8..9523342 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2183,7 +2183,8 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
       {
         baseClassName.prepend(scopeName.left(scopeOffset)+"::");
       }
-      ClassDef *baseClass=getResolvedClass(baseClassName);
+      bool baseClassIsTypeDef;
+      ClassDef *baseClass=getResolvedClass(baseClassName,&baseClassIsTypeDef);
       //printf("baseClassName=`%s' baseClass=%p\n",baseClassName.data(),baseClass);
       if (baseClassName!=root->name) // check for base class with the same name, 
         // look in the outer scope for a match
@@ -2333,7 +2334,9 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
         {
           Debug::print(Debug::Classes,0,"    Documented base class `%s'\n",bi->name.data());
           // add base class to this class
-          cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
+          QCString usedName;
+          if (baseClassIsTypeDef) usedName=bi->name;
+          cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec);
           // add this class as super class to the base class
           baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
           return TRUE;
@@ -2347,7 +2350,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
           baseClass=new ClassDef(root->fileName,root->startLine,
                                  baseClassName,ClassDef::Class);
           // add base class to this class
-          cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
+          cd->insertBaseClass(baseClass,bi->name,bi->prot,bi->virt,templSpec);
           // add this class as super class to the base class
           baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
           // the undocumented base was found in this file
@@ -2544,9 +2547,12 @@ static void addTodoTestReferences()
       if (d) scopeName=d->name();
       if (d==0) d=md->getFileDef();
       if (d==0) d=md->getGroupDef();
+      // TODO: i18n this
+      QCString memLabel="member";
+      if (Config::optimizeForCFlag) memLabel="field";
       if (d)
       {
-        addRefItem(md->todoId(),md->testId(),"member",d->getOutputFileBase()+":"+md->anchor(),scopeName+"::"+md->name(),md->argsString());
+        addRefItem(md->todoId(),md->testId(),memLabel,d->getOutputFileBase()+":"+md->anchor(),scopeName+"::"+md->name(),md->argsString());
       }
     }
   }
@@ -2562,9 +2568,12 @@ static void addTodoTestReferences()
       if (d) scopeName=d->name();
       if (d==0) d=md->getBodyDef();
       if (d==0) d=md->getGroupDef();
+      // TODO: i18n this
+      QCString memLabel="member";
+      if (Config::optimizeForCFlag) memLabel="global";
       if (d)
       {
-        addRefItem(md->todoId(),md->testId(),"member",d->getOutputFileBase()+":"+md->anchor(),scopeName+"::"+md->name(),md->argsString());
+        addRefItem(md->todoId(),md->testId(),memLabel,d->getOutputFileBase()+":"+md->anchor(),md->name(),md->argsString());
       }  
     }
   }
@@ -4278,7 +4287,7 @@ static void generateFileSources()
       {
         if (fd->generateSourceFile())
         {
-          msg("Generating code for file %s...\n",fd->name().data());
+          msg("Generating code for file %s...\n",fd->docName().data());
           fd->writeSource(*outputList);
         }
       }
@@ -4305,10 +4314,9 @@ static void generateFileDocs()
         bool doc = fd->isLinkableInProject();
         if (doc)
         {
-          msg("Generating docs for file %s...\n",fd->name().data());
+          msg("Generating docs for file %s...\n",fd->docName().data());
           fd->writeDocumentation(*outputList);
         }
-
       }
     }
   }
@@ -4607,6 +4615,7 @@ static void findDefineDocumentation(Entry *root)
             md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
             md->addSectionsToDefinition(root->anchors);
             md->setMaxInitLines(root->initLines);
+            md->setRefItems(root->todoId,root->testId);
             if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
             addMemberToGroups(root,md);
           }
@@ -4639,6 +4648,7 @@ static void findDefineDocumentation(Entry *root)
               bool ambig;
               md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
               md->addSectionsToDefinition(root->anchors);
+              md->setRefItems(root->todoId,root->testId);
               if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
               addMemberToGroups(root,md);
             }
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 1d6abc9..aec995f 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -46,7 +46,6 @@ static const char *defaultStyleSheet =
       "A.codeRef { font-weight: normal; color: #4444ee }\n"
       "DL.el { margin-left: -1cm }\n"
       "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
-      //"DIV.in { margin-left: 16 }\n"
       "DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }\n"
       "TD.md { background-color: #f2f2ff }\n"
       "DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }\n"
@@ -59,17 +58,18 @@ static const char *defaultStyleSheet =
       "FONT.stringliteral { color: #002080 }\n"
       "FONT.charliteral   { color: #008080 }\n";
 
+static QCString g_header;
+static QCString g_footer;
 
 HtmlGenerator::HtmlGenerator() : OutputGenerator()
 {
-  if (!Config::headerFile.isEmpty()) header=fileToString(Config::headerFile);
-  if (!Config::footerFile.isEmpty()) footer=fileToString(Config::footerFile);
   dir=Config::htmlOutputDir;
   col=0;  
 }
 
 HtmlGenerator::~HtmlGenerator()
 {
+  //printf("HtmlGenerator::~HtmlGenerator()\n");
 }
 
 void HtmlGenerator::append(const OutputGenerator *g)
@@ -87,7 +87,8 @@ void HtmlGenerator::init()
     exit(1);
   }
   writeLogo(Config::htmlOutputDir);
-  //writeNullImage(Config::htmlOutputDir);
+  if (!Config::headerFile.isEmpty()) g_header=fileToString(Config::headerFile);
+  if (!Config::footerFile.isEmpty()) g_footer=fileToString(Config::footerFile);
 }
 
 void HtmlGenerator::writeStyleSheetFile(QFile &file)
@@ -139,7 +140,7 @@ void HtmlGenerator::writeFooterFile(QFile &file)
   QTextStream t(&file);
   t << "<hr><address><small>\n";
   t << "Generated at $datetime for $projectname ";
-  t << " by <a href=\"http://www.stack.nl/~dimitri/doxygen/index.html\">\n"
+  t << " by <a href=\"http://www.doxygen.org/index.html\">\n"
     << "<img src=\"doxygen.gif\" alt=\"doxygen\" " 
     << "align=\"middle\" border=0 width=110 height=53>\n"
     << "</a> $doxygenversion written by"
@@ -162,13 +163,13 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
   }
  
   lastFile = fileName;
-  if (header.isEmpty()) 
+  if (g_header.isEmpty()) 
   {
     writeDefaultHeaderFile(t,title,external);
   }
   else
   {
-    t << substituteKeywords(header,lastTitle);
+    t << substituteKeywords(g_header,lastTitle);
   }
   t << "<!-- Generated by Doxygen " << versionString << " on " 
     << dateToString(TRUE) << " -->" << endl;
@@ -208,15 +209,15 @@ void HtmlGenerator::writeFooter(int part,bool external)
   switch (part)
   {
     case 0:
-      if (footer.isEmpty())
+      if (g_footer.isEmpty())
         t << "<hr><address><small>";
       else
-        t << substituteKeywords(footer,lastTitle);
+        t << substituteKeywords(g_footer,lastTitle);
       break;
     case 1:
-      if (footer.isEmpty())
+      if (g_footer.isEmpty())
       {
-        t << endl << "<a href=\"http://www.stack.nl/~dimitri/doxygen/index.html\">";
+        t << endl << "<a href=\"http://www.doxygen.org/index.html\">";
         t << endl << "<img ";
         if (external)
         {
@@ -233,7 +234,7 @@ void HtmlGenerator::writeFooter(int part,bool external)
       }
       break;
     default:
-      if (footer.isEmpty())
+      if (g_footer.isEmpty())
         t << " <a href=\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>,\n &copy;&nbsp;"
              "1997-2001</small></address>\n</body>\n</html>\n";
       break;
@@ -987,6 +988,7 @@ void HtmlGenerator::startIndent()
        "    </td>\n"
        "    <td>\n";
 }
+
 void HtmlGenerator::endIndent()          
 { 
   t << "    </td>\n"
@@ -994,3 +996,7 @@ void HtmlGenerator::endIndent()
        "</table>\n";
   //t << "</div>" << endl; 
 }
+
+void HtmlGenerator::addIndexItem(const char *,const char *)
+{
+}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index f48ee88..e817cc2 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -27,7 +27,7 @@ class HtmlGenerator : public OutputGenerator
 {
   public:
     HtmlGenerator();
-   ~HtmlGenerator();
+    virtual ~HtmlGenerator();
     static void init();
     static void writeStyleSheetFile(QFile &f);
     static void writeHeaderFile(QFile &f);
@@ -187,7 +187,7 @@ class HtmlGenerator : public OutputGenerator
     void writeSectionRef(const char *,const char *,const char *,const char *);
     void writeSectionRefItem(const char *,const char *,const char *);
     //void writeSectionRefAnchor(const char *,const char *,const char *);
-    void addIndexItem(const char *,const char *) {}
+    void addIndexItem(const char *,const char *);
     void startIndent();
     void endIndent();
     void writeSynopsis() {}
@@ -239,8 +239,6 @@ class HtmlGenerator : public OutputGenerator
     void endFontClass() { t << "</font>"; }
 
   private:
-    QCString header;
-    QCString footer;
     QCString lastTitle;
     QCString lastFile;
 
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 5ec135d..5d16f59 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -306,6 +306,8 @@ void HtmlHelp::createProjectFile()
          "Default Window=main\n"
          "Default topic=" << indexName << "\n"
          "Index file=index.hhk\n"
+         "Binary TOC=YES\n"
+         "Create CHI file=YES\n"
          "Title=" << Config::projectName << endl << endl;
     
     t << "[WINDOWS]" << endl;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 24f7e43..4489b7d 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -279,7 +279,8 @@ MemberDef::MemberDef(const char *df,int dl,
   indDepth=0;
   section=0;
   explExt=FALSE;
-  maxInitLines=defMaxInitLines;
+  maxInitLines=Config::maxInitLines;
+  userInitLines=-1;
   docEnumValues=FALSE;
   // copy function template arguments (if any)
   if (tal)
@@ -793,7 +794,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
     {
       linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace());
     }
-    else if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer
+    else if (!init.isEmpty() && initLines==0 && // one line initializer
+             ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
+            ) // add initializer
     {
       if (!isDefine()) 
       {
@@ -1004,7 +1007,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
       ol.startMemberDocName();
       linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
       writeDefArgumentList(ol,cd,scopeName,this);
-      if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer
+      if (!init.isEmpty() && initLines==0 && // one line initializer
+             ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
+         ) // add initializer
       {
         if (!isDefine()) 
         {
@@ -1081,10 +1086,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
     ol.popGeneratorState();
 
     /* write multi-line initializer (if any) */
-    if (initLines>0 && initLines<maxInitLines)
+    if (initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
+                        || initLines<userInitLines // explicitly enabled
+                       )
+       )
     {
       ol.startBold();
-      parseText(ol,theTranslator->trInitialValue());
+      if (mtype==Define)
+        parseText(ol,theTranslator->trDefineValue());
+      else
+        parseText(ol,theTranslator->trInitialValue());
       ol.endBold();
       initParseCodeContext();
       ol.startCodeFragment();
diff --git a/src/memberdef.h b/src/memberdef.h
index a230e6d..a939853 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -62,12 +62,6 @@ class MemberDef : public Definition
       Property
     };
 
-    enum
-    {
-      defMaxInitLines = 30 // default maximum number of lines shown for member
-                           // initializer
-    };
-    
     MemberDef(const char *defFileName,int defLine,
               const char *type,const char *name,const char *args,
               const char *excp,Protection prot,Specifier virt,bool stat,
@@ -135,11 +129,11 @@ class MemberDef : public Definition
     void setMemberSpecifiers(int s)       { memSpec=s; }
     void mergeMemberSpecifiers(int s)     { memSpec|=s; }
     void setInitializer(const char *i)    { init=i; 
-                                            init=init.stripWhiteSpace();
+                                            //init=init.stripWhiteSpace();
                                             initLines=init.contains('\n');
                                           }
     void setBitfields(const char *s)      { bitfields = s; }
-    void setMaxInitLines(int lines)       { if (lines!=-1) maxInitLines=lines; }
+    void setMaxInitLines(int lines)       { userInitLines=lines; }
     void setMemberClass(ClassDef *cd)     { classDef=cd; }
     void setSectionList(MemberList *sl)   { section=sl; }
     void setGroupDef(GroupDef *gd)        { group=gd; }
@@ -261,6 +255,7 @@ class MemberDef : public Definition
     bool annShown;           
     int  indDepth;            // indentation depth for this member if inside an annonymous scope
     int  maxInitLines;        // when the initializer will be displayed 
+    int userInitLines;        // result of explicit \hideinitializer or \showinitializer
     MemberList *section;      // declation list containing this member 
     MemberDef  *annMemb;
     ArgumentList *argList;    // argument list of this member
diff --git a/src/outputgen.cpp b/src/outputgen.cpp
index 490a80e..c8a9393 100644
--- a/src/outputgen.cpp
+++ b/src/outputgen.cpp
@@ -94,5 +94,6 @@ void OutputGenerator::popGeneratorState()
   ASSERT(lb!=0);
   if (lb==0) return; // for some robustness against superfluous \endhtmlonly commands.
   if (*lb) enable(); else disable();
+  delete lb;
 }
 
diff --git a/src/outputgen.h b/src/outputgen.h
index 93f1046..7d7834a 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -378,6 +378,8 @@ class OutputGenerator : public BaseOutputDocInterface
 class OutputDocInterface : public BaseOutputDocInterface
 {
   public:
+    virtual ~OutputDocInterface() {}
+
     /*! Create a new output generator. This can later by appended
      *  to the current one using append().
      */
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index b41a97e..3e02375 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -54,6 +54,7 @@ OutputList::OutputList(const OutputList *olist)
 
 OutputList::~OutputList()
 {
+  //printf("OutputList::~OutputList()\n");
   delete outputs;
 }
 
diff --git a/src/pre.l b/src/pre.l
index 59b542d..e3e378c 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -821,6 +821,21 @@ void addDefine()
     md->setArgumentList(argList);
   }
   //printf("Setting initializer for `%s' to `%s'\n",g_defName.data(),g_defText.data());
+  int l=g_defLitText.find('\n');
+  if (l>0 && g_defLitText.left(l).stripWhiteSpace()=="\\")
+  {
+    // strip first line if it only contains a slash 
+    g_defLitText = g_defLitText.right(g_defLitText.length()-l-1);
+  }
+  else if (l>0) 
+  {
+    // align the items on the first line with the items on the second line
+    int k=l+1;
+    const char *p=g_defLitText.data()+k;
+    char c;
+    while ((c=*p++) && (c==' ' || c=='\t')) k++;
+    g_defLitText=g_defLitText.mid(l+1,k-l-1)+g_defLitText.stripWhiteSpace();
+  }
   md->setInitializer(g_defLitText);
   
   //md->setDefFile(g_yyFileName);
diff --git a/src/scanner.l b/src/scanner.l
index 9ff3bbc..413b489 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -358,7 +358,7 @@ static int yyread(char *buf,int max_size)
 %}
 
 CMD	  ("\\"|"@")
-SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"ingroup"|"latexonly"|"htmlonly"|"{") 
+SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"ingroup"|"latexonly"|"htmlonly"|"{"|"verbatim") 
 BN        [ \t\n\r]
 BL        [ \t\r]*"\n"
 B         [ \t]
@@ -757,7 +757,7 @@ TITLE     [tT][iI][tT][lL][eE]
 					  lineCount();
 					  BEGIN( CompoundName );
   					}
-<FindMembers>{B}*(("typedef"{BN}+)?)"class"{BN}+ { 
+<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"class"{BN}+ { 
 					  isTypedef=((QCString)yytext).find("typedef")!=-1;
   					  current->section = Entry::CLASS_SEC;
 					  addType( current ) ;
@@ -777,7 +777,7 @@ TITLE     [tT][iI][tT][lL][eE]
 					  lineCount() ;
 					  BEGIN( CompoundName ) ;
 					}
-<FindMembers>{B}*(("typedef"{BN}+)?)"struct"{BN}+ { 
+<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"struct"{BN}+ { 
 					  isTypedef=((QCString)yytext).find("typedef")!=-1;
   					  current->section = Entry::STRUCT_SEC ;
 					  addType( current ) ;
@@ -797,7 +797,7 @@ TITLE     [tT][iI][tT][lL][eE]
 					  lineCount() ;
 					  BEGIN( CompoundName ) ;
 					}
-<FindMembers>{B}*(("typedef"{BN}+)?)"union"{BN}+ { 
+<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"union"{BN}+ { 
 					  isTypedef=((QCString)yytext).find("typedef")!=-1;
   					  current->section = Entry::UNION_SEC ;
 					  addType( current ) ;
diff --git a/src/translator.h b/src/translator.h
index e458c0f..8d45cb1 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -954,7 +954,7 @@ class Translator
     /*! Text shown before a multi-line variable/enum initialization */
     virtual QCString trInitialValue()
     {
-      return "Initializer:";
+      return "Initial value:";
     }
     /*! Text used the source code in the file index */
     virtual QCString trCode()
@@ -1222,6 +1222,11 @@ class Translator
     {
       return "Package Documentation";
     }
+    /*! Text shown before a multi-line define */
+    virtual QCString trDefineValue()
+    {
+      return "Value:";
+    }
 };
 
 #endif
diff --git a/src/translator_es.h b/src/translator_es.h
index 29822e5..ceea071 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -15,7 +15,7 @@
  *
  */
 
-/**
+/*
  * translator_es.h modified by Lucas Cruz (7-julio-2000)
  * Some notes:
  * - It's posible that some sentences haven't got meaning because  
diff --git a/src/util.cpp b/src/util.cpp
index a0cf5b3..bc4e8b5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -378,12 +378,13 @@ NamespaceDef *getResolvedNamespace(const char *name)
   }
 }
 
-ClassDef *getResolvedClass(const char *name)
+ClassDef *getResolvedClass(const char *name,bool *pIsTypeDef)
 {
   if (name==0 || name[0]=='\0') return 0;
   QCString *subst = Doxygen::typedefDict[name];
   if (subst) // there is a typedef with this name
   {
+    if (pIsTypeDef) *pIsTypeDef=TRUE;
     //printf("getResolvedClass `%s'->`%s'\n",name,subst->data());
     if (*subst==name) // avoid resolving typedef struct foo foo; 
     {
@@ -419,6 +420,7 @@ ClassDef *getResolvedClass(const char *name)
   }
   else
   {
+    if (pIsTypeDef) *pIsTypeDef=FALSE;
     return Doxygen::classDict[name];
   }
 }
diff --git a/src/util.h b/src/util.h
index 510b553..b9cf560 100644
--- a/src/util.h
+++ b/src/util.h
@@ -101,7 +101,7 @@ extern QCString convertFileName(const QCString &s);
 extern QCString substitute(const char *s,const char *src,const char *dst);
 extern QCString resolveDefines(const char *n);
 extern ClassDef *getClass(const char *key);
-extern ClassDef *getResolvedClass(const char *key);
+extern ClassDef *getResolvedClass(const char *key,bool *pIsTypeDef=0);
 extern NamespaceDef *getResolvedNamespace(const char *key);
 extern FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
                 bool &ambig);
-- 
cgit v0.12