summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL4
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--addon/doxywizard/README5
-rw-r--r--addon/xmlparse/Doxyfile2
-rw-r--r--addon/xmlparse/basehandler.h12
-rw-r--r--addon/xmlparse/compoundhandler.h16
-rw-r--r--addon/xmlparse/dochandler.cpp289
-rw-r--r--addon/xmlparse/dochandler.h151
-rw-r--r--addon/xmlparse/doxmlintf.h63
-rw-r--r--addon/xmlparse/main.cpp108
-rw-r--r--addon/xmlparse/mainhandler.cpp43
-rw-r--r--addon/xmlparse/mainhandler.h17
-rw-r--r--addon/xmlparse/memberhandler.h15
-rw-r--r--addon/xmlparse/paramhandler.h12
-rw-r--r--addon/xmlparse/sectionhandler.h10
-rw-r--r--doc/doxygen_manual.tex1
-rw-r--r--doc/install.doc8
-rw-r--r--doc/language.doc2
-rw-r--r--doc/starting.doc3
-rw-r--r--doc/translator.pl148
-rw-r--r--packages/rpm/doxygen.spec2
-rw-r--r--src/bufstr.h8
-rw-r--r--src/classdef.cpp11
-rw-r--r--src/code.l7
-rw-r--r--src/diagram.cpp4
-rw-r--r--src/dot.cpp6
-rw-r--r--src/doxygen.cpp6
-rw-r--r--src/htmlgen.cpp37
-rw-r--r--src/htmlgen.h6
-rw-r--r--src/image.cpp2
-rw-r--r--src/image.h1
-rw-r--r--src/index.cpp105
-rw-r--r--src/latexgen.cpp22
-rw-r--r--src/latexgen.h4
-rw-r--r--src/mangen.h4
-rw-r--r--src/memberdef.cpp11
-rw-r--r--src/memberdef.h5
-rw-r--r--src/outputgen.h4
-rw-r--r--src/outputlist.h8
-rw-r--r--src/rtfgen.cpp46
-rw-r--r--src/rtfgen.h6
-rw-r--r--src/scanner.l63
-rw-r--r--src/util.cpp2
-rw-r--r--src/xmlgen.cpp15
45 files changed, 1044 insertions, 256 deletions
diff --git a/INSTALL b/INSTALL
index 31d657b..87021fb 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
-DOXYGEN Version 1.2.10-20010909
+DOXYGEN Version 1.2.10-20010923
Please read the installation section of the manual for instructions.
--------
-Dimitri van Heesch (09 September 2001)
+Dimitri van Heesch (23 September 2001)
diff --git a/README b/README
index 1f840e5..ce80968 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.2.10_20010909
+DOXYGEN Version 1.2.10_20010923
Please read INSTALL for compilation instructions.
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (09 September 2001)
+Dimitri van Heesch (dimitri@stack.nl) (23 September 2001)
diff --git a/VERSION b/VERSION
index eb88bd3..7c196a7 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.10-20010909
+1.2.10-20010923
diff --git a/addon/doxywizard/README b/addon/doxywizard/README
index e265c2e..883b93a 100644
--- a/addon/doxywizard/README
+++ b/addon/doxywizard/README
@@ -1,2 +1,7 @@
Doxywizard is a graphical front-end to read/edit/write doxygen configuration
files. It requires Qt version 2.1.0 or higher.
+
+As a special exception, Dimitri van Heesch gives permission to link this
+program with Qt non-commercial edition, and distribute the resulting
+executable, without including the source code for the Qt non-commercial
+edition in the source distribution.
diff --git a/addon/xmlparse/Doxyfile b/addon/xmlparse/Doxyfile
index 7899f6b..c711577 100644
--- a/addon/xmlparse/Doxyfile
+++ b/addon/xmlparse/Doxyfile
@@ -71,7 +71,7 @@ IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
-GENERATE_HTML = YES
+GENERATE_HTML = NO
HTML_OUTPUT =
HTML_HEADER =
HTML_FOOTER =
diff --git a/addon/xmlparse/basehandler.h b/addon/xmlparse/basehandler.h
index 3c64d42..33b8831 100644
--- a/addon/xmlparse/basehandler.h
+++ b/addon/xmlparse/basehandler.h
@@ -190,6 +190,17 @@ template<class T> class BaseHandler : public IBaseHandler,
m_curString="";
return TRUE;
}
+
+ bool skippedEntity ( const QString &s )
+ {
+ if (m_delegateHandler)
+ {
+ return m_delegateHandler->skippedEntity(s);
+ }
+
+ printf("Skipped unhandled entity %s\n",s.data());
+ return TRUE;
+ }
virtual bool characters ( const QString & ch )
{
@@ -198,6 +209,7 @@ template<class T> class BaseHandler : public IBaseHandler,
return m_delegateHandler->characters(ch);
}
+ //printf("Found characters \"%s\"\n",ch.data());
m_curString+=ch;
return TRUE;
}
diff --git a/addon/xmlparse/compoundhandler.h b/addon/xmlparse/compoundhandler.h
index 29556a0..7d7c9b9 100644
--- a/addon/xmlparse/compoundhandler.h
+++ b/addon/xmlparse/compoundhandler.h
@@ -21,10 +21,11 @@
#include "basehandler.h"
#include "sectionhandler.h"
+#include "doxmlintf.h"
class DocHandler;
-class CompoundHandler : public BaseHandler<CompoundHandler>
+class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
{
public:
virtual void startSection(const QXmlAttributes& attrib);
@@ -38,6 +39,13 @@ class CompoundHandler : public BaseHandler<CompoundHandler>
CompoundHandler(IBaseHandler *parent);
virtual ~CompoundHandler();
+
+ // ICompound
+ QString name() const { return m_name; }
+ QString id() const { return m_id; }
+ QString kind() const { return m_kind; }
+ QListIterator<ISection> getSectionIterator() const { return m_sections; }
+
private:
struct SuperClass
{
@@ -57,9 +65,9 @@ class CompoundHandler : public BaseHandler<CompoundHandler>
QString m_protection;
QString m_virtualness;
};
- QList<SuperClass> m_superClasses;
- QList<SubClass> m_subClasses;
- QList<SectionHandler> m_sections;
+ QList<SuperClass> m_superClasses;
+ QList<SubClass> m_subClasses;
+ QList<ISection> m_sections;
IBaseHandler *m_parent;
DocHandler *m_brief;
DocHandler *m_detailed;
diff --git a/addon/xmlparse/dochandler.cpp b/addon/xmlparse/dochandler.cpp
index 29e8799..8506d25 100644
--- a/addon/xmlparse/dochandler.cpp
+++ b/addon/xmlparse/dochandler.cpp
@@ -373,14 +373,147 @@ void ParameterListHandler::startParameterDescription(const QXmlAttributes& attri
}
//----------------------------------------------------------------------
+// LineBreakHandler
+//----------------------------------------------------------------------
+
+LineBreakHandler::LineBreakHandler(IBaseHandler *parent)
+ : DocNode(LineBreak), m_parent(parent)
+{
+}
+
+LineBreakHandler::~LineBreakHandler()
+{
+}
+
+void LineBreakHandler::startLineBreak(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+ addEndHandler("linebreak",this,&LineBreakHandler::endLineBreak);
+ printf("Start linebreak\n");
+}
+
+void LineBreakHandler::endLineBreak()
+{
+ m_parent->setDelegate(0);
+ printf("End linebreak\n");
+}
+
+//----------------------------------------------------------------------
+// HRulerHandler
+//----------------------------------------------------------------------
+
+HRulerHandler::HRulerHandler(IBaseHandler *parent)
+ : DocNode(HRuler), m_parent(parent)
+{
+}
+
+HRulerHandler::~HRulerHandler()
+{
+}
+
+void HRulerHandler::startHRuler(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+ addEndHandler("hruler",this,&HRulerHandler::endHRuler);
+ printf("Start hruler\n");
+}
+
+void HRulerHandler::endHRuler()
+{
+ m_parent->setDelegate(0);
+ printf("End hruler\n");
+}
+
+//----------------------------------------------------------------------
+// RefHandler
+//----------------------------------------------------------------------
+
+RefHandler::RefHandler(IBaseHandler *parent)
+ : DocNode(Ref), m_parent(parent)
+{
+}
+
+RefHandler::~RefHandler()
+{
+}
+
+void RefHandler::startRef(const QXmlAttributes& attrib)
+{
+ m_parent->setDelegate(this);
+ addEndHandler("ref",this,&RefHandler::endRef);
+ m_refId = attrib.value("idref");
+ m_anchor = attrib.value("anchor");
+ printf("Start ref refId=%s anchor=%s\n",m_refId.data(),m_anchor.data());
+ m_curString="";
+}
+
+void RefHandler::endRef()
+{
+ m_linkText = m_curString;
+ m_parent->setDelegate(0);
+ printf("End ref\n");
+}
+
+
+//----------------------------------------------------------------------
+// TitleHandler
+//----------------------------------------------------------------------
+
+TitleHandler::TitleHandler(IBaseHandler *parent)
+ : DocNode(Title), m_parent(parent)
+{
+ m_children.setAutoDelete(TRUE);
+ m_markupHandler = new MarkupHandler(m_children,m_curString);
+ setFallBackHandler(m_markupHandler);
+ addStartHandler("ref",this,&TitleHandler::startRef);
+}
+
+TitleHandler::~TitleHandler()
+{
+ delete m_markupHandler;
+}
+
+void TitleHandler::startTitle(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+ addEndHandler("title",this,&TitleHandler::endTitle);
+ printf("Start title\n");
+ m_curString="";
+}
+
+void TitleHandler::endTitle()
+{
+ addTextNode();
+ m_parent->setDelegate(0);
+ printf("End title\n");
+}
+
+void TitleHandler::addTextNode()
+{
+ if (!m_curString.isEmpty())
+ {
+ m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
+ printf("addTextNode() text=\"%s\" markup=%x\n",
+ m_curString.data(),m_markupHandler->markup());
+ m_curString="";
+ }
+}
+
+void TitleHandler::startRef(const QXmlAttributes& attrib)
+{
+ RefHandler *ref = new RefHandler(this);
+ ref->startRef(attrib);
+ m_children.append(ref);
+}
+
+//----------------------------------------------------------------------
// SimpleSectHandler
//----------------------------------------------------------------------
SimpleSectHandler::SimpleSectHandler(IBaseHandler *parent)
- : DocNode(Para), m_parent(parent), m_paragraph(0)
+ : DocNode(Para), m_parent(parent), m_paragraph(0), m_title(0)
{
addStartHandler("title",this,&SimpleSectHandler::startTitle);
- addEndHandler("title",this,&SimpleSectHandler::endTitle);
addStartHandler("para",this,&SimpleSectHandler::startParagraph);
}
@@ -402,24 +535,124 @@ void SimpleSectHandler::endSimpleSect()
m_parent->setDelegate(0);
}
-void SimpleSectHandler::startTitle(const QXmlAttributes& /*attrib*/)
+void SimpleSectHandler::startTitle(const QXmlAttributes& attrib)
{
- m_curString="";
+ ASSERT(m_title==0);
+ m_title = new TitleHandler(this);
+ m_title->startTitle(attrib);
+}
+
+void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib)
+{
+ ASSERT(m_paragraph==0);
+ m_paragraph = new ParagraphHandler(this);
+ m_paragraph->startParagraph(attrib);
+}
+
+//----------------------------------------------------------------------
+// VariableListEntryHandler
+//----------------------------------------------------------------------
+
+VariableListEntryHandler::VariableListEntryHandler(IBaseHandler *parent)
+ : DocNode(VariableListEntry), m_parent(parent), m_description(0)
+{
+ addStartHandler("term",this,&VariableListEntryHandler::startTerm);
+ addEndHandler("term",this,&VariableListEntryHandler::endTerm);
+ addStartHandler("para",this,&VariableListEntryHandler::startParagraph);
+}
+
+VariableListEntryHandler::~VariableListEntryHandler()
+{
+ delete m_description;
+}
+
+void VariableListEntryHandler::startVarListEntry(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+ printf("start varlistentry\n");
+ addEndHandler("varlistentry",this,&VariableListEntryHandler::endVarListEntry);
}
-void SimpleSectHandler::endTitle()
+void VariableListEntryHandler::endVarListEntry()
+{
+ m_parent->setDelegate(0);
+ printf("end varlistentry\n");
+}
+
+void VariableListEntryHandler::startListItem(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+ printf("start listitem\n");
+ addEndHandler("listitem",this,&VariableListEntryHandler::endListItem);
+}
+
+void VariableListEntryHandler::endListItem()
+{
+ m_parent->setDelegate(0);
+ printf("end listitem\n");
+}
+
+void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/)
{
- printf("simpleSect title=\"%s\"\n",m_curString.data());
- m_title = m_curString;
m_curString="";
}
+void VariableListEntryHandler::endTerm()
+{
+ m_term = m_curString;
+ printf("term=%s\n",m_term.data());
+}
-void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib)
+void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib)
{
- ASSERT(m_paragraph==0);
- m_paragraph = new ParagraphHandler(this);
- m_paragraph->startParagraph(attrib);
+ ASSERT(m_description==0);
+ m_description = new ParagraphHandler(this);
+ m_description->startParagraph(attrib);
+}
+
+
+
+//----------------------------------------------------------------------
+// VariableListHandler
+//----------------------------------------------------------------------
+
+VariableListHandler::VariableListHandler(IBaseHandler *parent)
+ : DocNode(VariableList), m_parent(parent)
+{
+ m_entries.setAutoDelete(TRUE);
+ addStartHandler("varlistentry",this,&VariableListHandler::startVarListEntry);
+ addStartHandler("listitem",this,&VariableListHandler::startListItem);
+}
+
+VariableListHandler::~VariableListHandler()
+{
+}
+
+void VariableListHandler::startVariableList(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+ printf("start variablelist\n");
+ addEndHandler("variablelist",this,&VariableListHandler::endVariableList);
+}
+
+void VariableListHandler::endVariableList()
+{
+ printf("end variablelist\n");
+ m_parent->setDelegate(0);
+}
+
+void VariableListHandler::startVarListEntry(const QXmlAttributes& attrib)
+{
+ VariableListEntryHandler *vle = new VariableListEntryHandler(this);
+ vle->startVarListEntry(attrib);
+ m_curEntry = vle;
+ m_entries.append(vle);
+}
+
+void VariableListHandler::startListItem(const QXmlAttributes& attrib)
+{
+ ASSERT(m_curEntry!=0);
+ m_curEntry->startListItem(attrib);
}
//----------------------------------------------------------------------
@@ -440,6 +673,10 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList);
addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList);
addStartHandler("simplesect",this,&ParagraphHandler::startSimpleSect);
+ addStartHandler("ref",this,&ParagraphHandler::startRef);
+ addStartHandler("variablelist",this,&ParagraphHandler::startVariableList);
+ addStartHandler("hruler",this,&ParagraphHandler::startHRuler);
+ addStartHandler("linebreak",this,&ParagraphHandler::startLineBreak);
}
ParagraphHandler::~ParagraphHandler()
@@ -492,12 +729,40 @@ void ParagraphHandler::startSimpleSect(const QXmlAttributes& attrib)
m_children.append(sectHandler);
}
+void ParagraphHandler::startRef(const QXmlAttributes& attrib)
+{
+ RefHandler *ref = new RefHandler(this);
+ ref->startRef(attrib);
+ m_children.append(ref);
+}
+
+void ParagraphHandler::startVariableList(const QXmlAttributes& attrib)
+{
+ VariableListHandler *vl = new VariableListHandler(this);
+ vl->startVariableList(attrib);
+ m_children.append(vl);
+}
+
+void ParagraphHandler::startHRuler(const QXmlAttributes& attrib)
+{
+ HRulerHandler *hr = new HRulerHandler(this);
+ hr->startHRuler(attrib);
+ m_children.append(hr);
+}
+
+void ParagraphHandler::startLineBreak(const QXmlAttributes& attrib)
+{
+ LineBreakHandler *lb = new LineBreakHandler(this);
+ lb->startLineBreak(attrib);
+ m_children.append(lb);
+}
+
void ParagraphHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
- printf("addTextNode() text=%s markup=%x\n",
+ printf("addTextNode() text=\"%s\" markup=%x\n",
m_curString.data(),m_markupHandler->markup());
m_curString="";
}
diff --git a/addon/xmlparse/dochandler.h b/addon/xmlparse/dochandler.h
index 4dc50c5..c805371 100644
--- a/addon/xmlparse/dochandler.h
+++ b/addon/xmlparse/dochandler.h
@@ -53,7 +53,13 @@ class DocNode
ListItem,
ParameterList,
Parameter,
- SimpleSect
+ SimpleSect,
+ Title,
+ Ref,
+ VariableList,
+ VariableListEntry,
+ HRuler,
+ LineBreak
};
DocNode(NodeKind k) : m_kind(k) {}
virtual ~DocNode() {}
@@ -223,6 +229,85 @@ class ParameterListHandler : public DocNode,
//-----------------------------------------------------------------------------
+/* \brief Node representing a horizontal ruler
+ *
+ */
+class LineBreakHandler : public DocNode, public BaseHandler<LineBreakHandler>
+{
+ public:
+ LineBreakHandler(IBaseHandler *parent);
+ virtual ~LineBreakHandler();
+
+ void startLineBreak(const QXmlAttributes& attrib);
+ void endLineBreak();
+
+ private:
+ IBaseHandler *m_parent;
+};
+
+//-----------------------------------------------------------------------------
+
+/* \brief Node representing a horizontal ruler
+ *
+ */
+class HRulerHandler : public DocNode, public BaseHandler<HRulerHandler>
+{
+ public:
+ HRulerHandler(IBaseHandler *parent);
+ virtual ~HRulerHandler();
+
+ void startHRuler(const QXmlAttributes& attrib);
+ void endHRuler();
+
+ private:
+ IBaseHandler *m_parent;
+};
+
+//-----------------------------------------------------------------------------
+
+/* \brief Node representing a reference to another item
+ *
+ */
+class RefHandler : public DocNode, public BaseHandler<RefHandler>
+{
+ public:
+ RefHandler(IBaseHandler *parent);
+ virtual ~RefHandler();
+ void startRef(const QXmlAttributes& attrib);
+ void endRef();
+ private:
+ IBaseHandler *m_parent;
+ QCString m_refId;
+ QCString m_anchor;
+ QCString m_linkText;
+};
+
+//-----------------------------------------------------------------------------
+
+/* \brief Node representing the title of a section
+ *
+ */
+// children: text, ref
+// children handled by MarkupHandler:
+// bold, computeroutput, emphasis, center,
+// small, subscript, superscript.
+class TitleHandler : public DocNode, public BaseHandler<TitleHandler>
+{
+ public:
+ TitleHandler(IBaseHandler *parent);
+ virtual ~TitleHandler();
+ virtual void startTitle(const QXmlAttributes& attrib);
+ virtual void endTitle();
+ virtual void startRef(const QXmlAttributes& attrib);
+ void addTextNode();
+ private:
+ IBaseHandler *m_parent;
+ QList<DocNode> m_children;
+ MarkupHandler *m_markupHandler;
+};
+
+//-----------------------------------------------------------------------------
+
/* \brief Node representing a simple section with an unnumbered header.
*
*/
@@ -244,15 +329,58 @@ class SimpleSectHandler : public DocNode,
virtual void startSimpleSect(const QXmlAttributes& attrib);
virtual void endSimpleSect();
virtual void startTitle(const QXmlAttributes& attrib);
- virtual void endTitle();
virtual void startParagraph(const QXmlAttributes& attrib);
private:
IBaseHandler *m_parent;
ParagraphHandler *m_paragraph;
Types m_type;
- // TODO: a title can also contain links (for todo sections for instance!)
- QString m_title;
+ TitleHandler *m_title;
+};
+
+//-----------------------------------------------------------------------------
+
+class VariableListEntryHandler : public DocNode, public BaseHandler<VariableListEntryHandler>
+{
+ public:
+ virtual void startVarListEntry(const QXmlAttributes& attrib);
+ virtual void endVarListEntry();
+ virtual void startListItem(const QXmlAttributes& attrib);
+ virtual void endListItem();
+ virtual void startTerm(const QXmlAttributes& attrib);
+ virtual void endTerm();
+ virtual void startParagraph(const QXmlAttributes& attrib);
+
+ VariableListEntryHandler(IBaseHandler *parent);
+ virtual ~VariableListEntryHandler();
+
+ private:
+ IBaseHandler *m_parent;
+ QString m_term;
+ ParagraphHandler *m_description;
+};
+
+//-----------------------------------------------------------------------------
+
+/*! \brief Node representing a list of named items.
+ *
+ */
+// children: varlistentry, listitem
+class VariableListHandler : public DocNode, public BaseHandler<VariableListHandler>
+{
+ public:
+ virtual void startVariableList(const QXmlAttributes& attrib);
+ virtual void endVariableList();
+ virtual void startVarListEntry(const QXmlAttributes& attrib);
+ virtual void startListItem(const QXmlAttributes& attrib);
+
+ VariableListHandler(IBaseHandler *parent);
+ virtual ~VariableListHandler();
+
+ private:
+ IBaseHandler *m_parent;
+ QList<VariableListEntryHandler> m_entries;
+ VariableListEntryHandler *m_curEntry;
};
//-----------------------------------------------------------------------------
@@ -260,10 +388,13 @@ class SimpleSectHandler : public DocNode,
/*! \brief Node representing a paragraph of text and commands.
*
*/
-// children: itemizedlist, orderedlist, parameterlist, simplesect,
-// programlisting, hruler, variablelist,
-// linebreak, nonbreakablespace, ref, ulink, email,
-// table, link, indexentry, formula, image, dotfile, ref
+// children: itemizedlist, orderedlist, parameterlist, simplesect, ref,
+// variablelist, hruler, linebreak,
+// TODO:
+// ulink, email, link
+// table,
+// programlisting,
+// indexentry, formula, image, dotfile
// children handled by MarkupHandler:
// bold, computeroutput, emphasis, center,
// small, subscript, superscript.
@@ -276,6 +407,10 @@ class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
virtual void startOrderedList(const QXmlAttributes& attrib);
virtual void startParameterList(const QXmlAttributes& attrib);
virtual void startSimpleSect(const QXmlAttributes& attrib);
+ virtual void startRef(const QXmlAttributes& attrib);
+ virtual void startVariableList(const QXmlAttributes& attrib);
+ virtual void startHRuler(const QXmlAttributes& attrib);
+ virtual void startLineBreak(const QXmlAttributes& attrib);
ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler();
diff --git a/addon/xmlparse/doxmlintf.h b/addon/xmlparse/doxmlintf.h
new file mode 100644
index 0000000..50acb79
--- /dev/null
+++ b/addon/xmlparse/doxmlintf.h
@@ -0,0 +1,63 @@
+#ifndef _DOXMLINTF_H
+#define _DOXMLINTF_H
+
+#include <qlist.h>
+#include <qstring.h>
+
+class IParam
+{
+ public:
+ virtual QString type() const = 0;
+ virtual QString declarationName() const = 0;
+ virtual QString definitionName() const = 0;
+ virtual QString attrib() const = 0;
+ virtual QString arraySpecifier() const = 0;
+ virtual QString defaultValue() const = 0;
+};
+
+class IMember
+{
+ public:
+ virtual QString kind() const = 0;
+ virtual QString id() const = 0;
+ virtual QString protection() const = 0;
+ virtual QString virtualness() const = 0;
+ virtual QString type() const = 0;
+ virtual QString name() const = 0;
+ virtual QListIterator<IParam> getParamIterator() const = 0;
+};
+
+class ISection
+{
+ public:
+ virtual QString kind() const = 0;
+ virtual QListIterator<IMember> getMemberIterator() const = 0;
+};
+
+class ICompound
+{
+ public:
+ virtual QString name() const = 0;
+ virtual QString id() const = 0;
+ virtual QString kind() const = 0;
+ virtual QListIterator<ISection> getSectionIterator() const = 0;
+};
+
+/*! Root node of the object model. */
+class IDoxygen
+{
+ public:
+ /*! Returns an iterator that can be used to iterate over the list
+ * of compounds found in the project.
+ */
+ virtual QListIterator<ICompound> getCompoundIterator() const = 0;
+};
+
+/*! Factory method that creates an object model given an XML file generated
+ * by doxygen.
+ * @param xmlFileName The name of the XML to parse.
+ * @returns An iterface to the object model.
+ */
+IDoxygen *createObjectModelFromXML(const char *xmlFileName);
+
+#endif
diff --git a/addon/xmlparse/main.cpp b/addon/xmlparse/main.cpp
index 44c5e36..081b0d7 100644
--- a/addon/xmlparse/main.cpp
+++ b/addon/xmlparse/main.cpp
@@ -13,95 +13,53 @@
*
*/
-#include "mainhandler.h"
-
-#include <qstring.h>
-#include <qxml.h>
-#include <qfile.h>
-#include <qdict.h>
-#include <qlist.h>
-
-//#define USE_DOM
-#define USE_SAX
-
-#ifdef USE_DOM
-#include <qdom.h>
-#endif
-
-class ErrorHandler : public QXmlErrorHandler
-{
- public:
- virtual ~ErrorHandler() {}
- bool warning( const QXmlParseException & )
- {
- return FALSE;
- }
- bool error( const QXmlParseException & )
- {
- return FALSE;
- }
- bool fatalError( const QXmlParseException &exception )
- {
- fprintf(stderr,"Fatal error at line %d column %d: %s\n",
- exception.lineNumber(),exception.columnNumber(),
- exception.message().data());
- return FALSE;
- }
- QString errorString() { return ""; }
-
- private:
- QString errorMsg;
-};
+#include <stdio.h>
+#include "doxmlintf.h"
int main(int argc,char **argv)
{
- if (argc==1)
+ if (argc!=2)
{
printf("Usage: %s file.xml\n",argv[0]);
exit(1);
}
- QFile xmlFile(argv[1]);
-
-#ifdef USE_SAX
- MainHandler handler;
- ErrorHandler errorHandler;
- QXmlInputSource source( xmlFile );
- QXmlSimpleReader reader;
- reader.setContentHandler( &handler );
- reader.setErrorHandler( &errorHandler );
- reader.parse( source );
-#endif
-
-#ifdef USE_DOM
- if (!xmlFile.open( IO_ReadOnly ))
- {
- qFatal("Could not read %s",argv[1] );
- }
- QDomDocument doc;
- doc.setContent( &xmlFile );
-
- QDomElement de = doc.documentElement();
-
- printf("docElem=%s\n",de.tagName().data());
+ IDoxygen *dox = createObjectModelFromXML(argv[1]);
- QDomNode n = de.firstChild();
- while( !n.isNull() )
{
- QDomElement e = n.toElement(); // try to convert the node to an element.
- if( !e.isNull() )
- { // the node was really an element.
- printf("direct child %s id=%s kind=%s\n",
- e.tagName().data(),
- e.attribute("id").data(),
- e.attribute("kind").data()
- );
+ QListIterator<ICompound> cli(dox->getCompoundIterator());
+ ICompound *comp;
+ printf("--- compound list ---------\n");
+ for (cli.toFirst();(comp=cli.current());++cli)
+ {
+ printf("Compound name=%s id=%s kind=%s\n",
+ comp->name().data(),comp->id().data(),comp->kind().data());
+ QListIterator<ISection> sli(comp->getSectionIterator());
+ ISection *sec;
+ for (sli.toFirst();(sec=sli.current());++sli)
+ {
+ printf(" Section kind=%s\n",sec->kind().data());
+ QListIterator<IMember> mli(sec->getMemberIterator());
+ IMember *mem;
+ for (mli.toFirst();(mem=mli.current());++mli)
+ {
+ printf(" Member type=%s name=%s\n",mem->type().data(),mem->name().data());
+ QListIterator<IParam> pli(mem->getParamIterator());
+ IParam *par;
+ for (pli.toFirst();(par=pli.current());++pli)
+ {
+ printf(" Param type=%s name=%s defvalue=%s\n",
+ par->type().data(),par->definitionName().data(),par->defaultValue().data());
+ }
+ }
+ }
}
- n = n.nextSibling();
+ printf("---------------------------\n");
+
}
-#endif
+ delete dox;
return 0;
}
diff --git a/addon/xmlparse/mainhandler.cpp b/addon/xmlparse/mainhandler.cpp
index 8a5d449..21185e6 100644
--- a/addon/xmlparse/mainhandler.cpp
+++ b/addon/xmlparse/mainhandler.cpp
@@ -13,6 +13,7 @@
*
*/
+#include <qxml.h>
#include "mainhandler.h"
void MainHandler::startCompound(const QXmlAttributes& attrib)
@@ -20,9 +21,10 @@ void MainHandler::startCompound(const QXmlAttributes& attrib)
CompoundHandler *compHandler = new CompoundHandler(this);
compHandler->startCompound(attrib);
m_compounds.append(compHandler);
+ m_compoundDict.insert(compHandler->id(),compHandler);
}
-MainHandler::MainHandler()
+MainHandler::MainHandler() : m_compoundDict(10007)
{
m_compounds.setAutoDelete(TRUE);
addStartHandler("doxygen");
@@ -33,6 +35,45 @@ MainHandler::MainHandler()
MainHandler::~MainHandler()
{
+ printf("MainHandler::~MainHandler()\n");
}
+class ErrorHandler : public QXmlErrorHandler
+{
+ public:
+ virtual ~ErrorHandler() {}
+ bool warning( const QXmlParseException & )
+ {
+ return FALSE;
+ }
+ bool error( const QXmlParseException & )
+ {
+ return FALSE;
+ }
+ bool fatalError( const QXmlParseException &exception )
+ {
+ fprintf(stderr,"Fatal error at line %d column %d: %s\n",
+ exception.lineNumber(),exception.columnNumber(),
+ exception.message().data());
+ return FALSE;
+ }
+ QString errorString() { return ""; }
+
+ private:
+ QString errorMsg;
+};
+
+IDoxygen *createObjectModelFromXML(const char * xmlFileName)
+{
+ QFile xmlFile(xmlFileName);
+ MainHandler * handler = new MainHandler;
+ ErrorHandler errorHandler;
+ QXmlInputSource source( xmlFile );
+ QXmlSimpleReader reader;
+ reader.setContentHandler( handler );
+ reader.setErrorHandler( &errorHandler );
+ reader.parse( source );
+ return handler;
+}
+
diff --git a/addon/xmlparse/mainhandler.h b/addon/xmlparse/mainhandler.h
index 75a3b98..0d69f25 100644
--- a/addon/xmlparse/mainhandler.h
+++ b/addon/xmlparse/mainhandler.h
@@ -19,15 +19,28 @@
#include <qlist.h>
#include "basehandler.h"
#include "compoundhandler.h"
+#include "doxmlintf.h"
-class MainHandler : public BaseHandler<MainHandler>
+class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
{
public:
virtual void startCompound(const QXmlAttributes& attrib);
MainHandler();
virtual ~MainHandler();
+
+ // IDoxygen
+ QListIterator<ICompound> getCompoundIterator() const
+ {
+ return m_compounds;
+ }
+ ICompound *getCompoundById(const QString &id) const
+ {
+ return m_compoundDict[id];
+ }
+
private:
- QList<CompoundHandler> m_compounds;
+ QList<ICompound> m_compounds;
+ QDict<ICompound> m_compoundDict;
};
#endif
diff --git a/addon/xmlparse/memberhandler.h b/addon/xmlparse/memberhandler.h
index e18e59c..7a5ea06 100644
--- a/addon/xmlparse/memberhandler.h
+++ b/addon/xmlparse/memberhandler.h
@@ -22,10 +22,11 @@
#include "basehandler.h"
#include "paramhandler.h"
+#include "doxmlintf.h"
class DocHandler;
-class MemberHandler : public BaseHandler<MemberHandler>
+class MemberHandler : public IMember, public BaseHandler<MemberHandler>
{
public:
virtual void startMember(const QXmlAttributes& attrib);
@@ -38,6 +39,16 @@ class MemberHandler : public BaseHandler<MemberHandler>
MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler();
+
+ // IMember
+ virtual QString kind() const { return m_kind; }
+ virtual QString id() const { return m_id; }
+ virtual QString protection() const { return m_protection; }
+ virtual QString virtualness() const { return m_virtualness; }
+ virtual QString type() const { return m_type; }
+ virtual QString name() const { return m_name; }
+ virtual QListIterator<IParam> getParamIterator() const { return m_params; }
+
private:
IBaseHandler *m_parent;
QString m_kind;
@@ -48,7 +59,7 @@ class MemberHandler : public BaseHandler<MemberHandler>
QString m_name;
DocHandler *m_brief;
DocHandler *m_detailed;
- QList<ParamHandler> m_params;
+ QList<IParam> m_params;
};
#endif
diff --git a/addon/xmlparse/paramhandler.h b/addon/xmlparse/paramhandler.h
index f93f83f..38e5e03 100644
--- a/addon/xmlparse/paramhandler.h
+++ b/addon/xmlparse/paramhandler.h
@@ -21,8 +21,9 @@
#include <qxml.h>
#include "basehandler.h"
+#include "doxmlintf.h"
-class ParamHandler : public BaseHandler<ParamHandler>
+class ParamHandler : public IParam, public BaseHandler<ParamHandler>
{
public:
virtual void startParam(const QXmlAttributes& attrib);
@@ -36,6 +37,15 @@ class ParamHandler : public BaseHandler<ParamHandler>
ParamHandler(IBaseHandler *parent);
virtual ~ParamHandler();
+
+ // IParam
+ virtual QString type() const { return m_type; }
+ virtual QString declarationName() const { return m_declName; }
+ virtual QString definitionName() const { return m_defName; }
+ virtual QString attrib() const { return m_attrib; }
+ virtual QString arraySpecifier() const { return m_array; }
+ virtual QString defaultValue() const { return m_defVal; }
+
private:
IBaseHandler *m_parent;
QString m_type;
diff --git a/addon/xmlparse/sectionhandler.h b/addon/xmlparse/sectionhandler.h
index 5a4ab2a..1231214 100644
--- a/addon/xmlparse/sectionhandler.h
+++ b/addon/xmlparse/sectionhandler.h
@@ -22,8 +22,9 @@
#include "basehandler.h"
#include "memberhandler.h"
+#include "doxmlintf.h"
-class SectionHandler : public BaseHandler<SectionHandler>
+class SectionHandler : public ISection, public BaseHandler<SectionHandler>
{
public:
virtual void startMember(const QXmlAttributes& attrib);
@@ -32,10 +33,15 @@ class SectionHandler : public BaseHandler<SectionHandler>
SectionHandler(IBaseHandler *parent);
virtual ~SectionHandler();
+
+ // ISection
+ virtual QString kind() const { return m_kind; }
+ virtual QListIterator<IMember> getMemberIterator() const { return m_members; }
+
private:
IBaseHandler *m_parent;
QString m_kind;
- QList<MemberHandler> m_members;
+ QList<IMember> m_members;
};
#endif
diff --git a/doc/doxygen_manual.tex b/doc/doxygen_manual.tex
index bc1dfbb..6f3313a 100644
--- a/doc/doxygen_manual.tex
+++ b/doc/doxygen_manual.tex
@@ -16,6 +16,7 @@
\usepackage{a4wide}
\usepackage{makeidx}
\usepackage{fancyhdr}
+\usepackage{float}
\usepackage{graphicx}
\usepackage{epsf}
\usepackage{doxygen}
diff --git a/doc/install.doc b/doc/install.doc
index 99e8e56..528c36e 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -514,13 +514,17 @@ Compilation is now done by performing the following steps:
\subsection install_bin_windows Installating the binaries on Windows
-There is no fancy installation procedure at the moment (if anyone wants
-to add it please let me know).
+There is no fancy installation procedure at the moment (if anyone can
+add it in a location independent way please let me know).
To install doxygen, just copy the binaries from the <code>bin</code> directory
to a location somewhere in the path. Alternatively, you can include
the <code>bin</code> directory of the distribution to the path.
+For running doxywizard you need to install the non-commercial version of
+the Qt library first. This library can be downloaded from
+http://www.trolltech.com/products/download/freelicense/noncommercial-dl.html
+
\subsection build_tools Tools used to develop doxygen
Doxygen was developed and tested under Linux using the following
diff --git a/doc/language.doc b/doc/language.doc
index 101273f..ceb842b 100644
--- a/doc/language.doc
+++ b/doc/language.doc
@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
-Currently (version 1.2.10), 24 languages
+Currently (version 1.2.10-20010909), 24 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
diff --git a/doc/starting.doc b/doc/starting.doc
index 402a765..2ef5775 100644
--- a/doc/starting.doc
+++ b/doc/starting.doc
@@ -184,7 +184,8 @@ During parsing the following steps take place:
<li> The special commands inside the documentation are executed. See
section \ref commands for an overview of all commands.
<li> If a line starts with some whitespace followed by one or more asterixes
- (<tt>*</tt>) then the whitespace and asterixes are removed.
+ (<tt>*</tt>) and then optionally more whitespace,
+ then all whitespace and asterixes are removed.
<li> All resulting blank lines are treated as a paragraph separators.
This saves you from placing new-paragraph commands yourself
in order to make the generated documentation readable.
diff --git a/doc/translator.pl b/doc/translator.pl
index 207f191..e031674 100644
--- a/doc/translator.pl
+++ b/doc/translator.pl
@@ -55,6 +55,28 @@
# equal prototypes from the base class and from the derived
# classes (if they should be considered equal).
#
+# 2001/08/28
+# - "see details" added to the up-to-date translator list
+# (in translator report) to translators for which some details
+# are listed below in the report. This is usually the case
+# when the up-to-date translator still implements a obsolete
+# method that will never be called (i.e. the code should be removed).
+#
+# 2001/09/10
+# - The script now always exits with 0. If the sources are not
+# found, translator report is not generated. If the $flangdoc
+# is not also found and no sources are available, the simplified
+# result with remarks inside is generated from the template.
+# The consequences, translator.pl should never break the "make",
+# and the language.doc should always be present after running
+# this script -- no problem should occur when generating doxygen
+# documentation.
+#
+# 2001/09/11
+# - Minor (say cosmetic) enhancement. The code for generating
+# the simplified language.doc from the template was moved to
+# the separate function CopyTemplateToLanguageDoc().
+#
################################################################
use 5.005;
@@ -642,6 +664,64 @@ xxxTABLE_FOOTxxx
}
##}}}
+################################################################
+# CopyTemplateToLanguageDoc takes the $flangtpl template and
+# generates $flangdoc without using information from other
+# sources. This function is called when source files were not found.
+# The marks inside the template are replaced by warning-like
+# explanations that something could not be done because sources
+# were not available. Writes directly to the file, returns nothing.
+#
+sub CopyTemplateToLanguageDoc ##{{{
+{
+ # The template file will be the source.
+ #
+ my $fin = "$docdir/$flangtpl";
+
+ # Let's open the template and read it all into one string.
+ #
+ open(FIN, "< $fin") or die "\nError when open < $fin: $!";
+ my @content = <FIN>;
+ close FIN;
+ my $cont = join("", @content);
+
+ # Replace the template marks by some notices.
+ #
+ $cont =~ s{<notice>.+?</notice>}
+{Warning: this file was generated from the $flangtpl template
+ * by the $0 script. As doxygen sources were not available
+ * in that time, some information could not be extracted
+ * and inserted into this file.
+ *
+ * Do not edit this file. Edit the above mentioned files!}sx;
+
+ $cont =~ s{\$version}{$doxversion};
+
+ $cont =~ s{\$numlang}
+ {<b>[number of supported languages could not be extracted -- no sources]</b>};
+
+ $cont =~ s{\$languages}
+ {<b>[names of languages could not be extracted -- no sources]</b>};
+
+ $cont =~ s{\$information_table}
+ {<b>[Information table could not be extracted -- no sources.]</b>};
+
+ $cont =~ s{\$translator_report_file_name}
+ {$ftranslatortxt <b>[translator report could not be
+ generated -- no sources]</b>}x;
+
+ $cont =~ s{\$translator_report_link}{<b>[no sources, no link]</b>};
+
+ # Let's open the output file and copy the template content there.
+ #
+ my $fout = "$docdir/$flangdoc";
+
+ open(FOUT, "> $fout") or die "\nError when open > $fout: $!";
+ print FOUT $cont;
+ close FOUT;
+}
+##}}}
+
################################################################
# Body
@@ -672,16 +752,42 @@ print STDERR "\n\n";
##}}}
- # The translator base class must be present. Exit otherwise. #{{{
+ # The translator base class must be present. Exit otherwise,
+ # but be kind to those who already have the documentation
+ # generated by this script ready, but who do not have sources.
+ # If no $flangdoc is present, copy the template to it. #{{{
#
- if (!-f "$srcdir/translator.h")
- {
- print STDERR "\n\nThe translator.h not found in $srcdir.\n\n\a";
- exit 1;
+ if (!-f "$srcdir/translator.h") {
+ print STDERR "\nThe $0 warning:\n"
+ . "\tThe translator.h not found in $srcdir.\n"
+ . "\tThe $ftranslatortxt will not be "
+ . "generated (you don't need it).\n";
+
+ # $flangdoc is present, copy the template to it.
+ #
+ if (!-f "$docdir/$flangdoc") {
+
+ # Copy the template document to $flandoc with simplified
+ # replacement of the markers inside the template.
+ #
+ CopyTemplateToLanguageDoc();
+
+ # Generate the warning about $flangdoc content.
+ #
+ print STDERR "\nThe $0 warning:\n"
+ . "\tThe $flangdoc not found in the '$docdir' directory.\n"
+ . "\tThe $flangtpl template content copied into it.\n"
+ . "\tAs the sources are not available, some information\n"
+ . "\tcould not be extracted and inserted into $flangdoc.\n";
+ }
+
+ # Exit as if nothing happened.
+ #
+ exit 0;
}
##}}}
- # Find all translator_xx.h files. #{{{
+ # Find all translator_xx.h file names. #{{{
#
my @entries = (); # init
@@ -700,9 +806,12 @@ print STDERR "\n\n";
my @expected = GetPureVirtualFrom("$srcdir/translator.h");
# The details for translators will be collected into the output
- # string.
+ # string. If some details are listed for a translator, the flag
+ # will be set to produce possible warning to the list of
+ # up-to-date translators.
#
my $output = '';
+ my %details = ();
# Remove the argument identifiers from the method prototypes
# to get only the required form of the prototype. Fill the
@@ -728,7 +837,8 @@ print STDERR "\n\n";
foreach (@files) {
# Get the information from the sources. Remember the base
- # class for each of the classes. #{{{
+ # class for each of the classes. Clear the flag for
+ # details for the class. #{{{
#
my @info = GetInfoFrom("$srcdir/$_");
@@ -736,6 +846,8 @@ print STDERR "\n\n";
my $base = shift @info;
$cb{$class} = $base;
+ $details{$class} = 0;
+
##}}}
# Set the value of the required methods to 1 (true). Let
@@ -821,7 +933,12 @@ print STDERR "\n\n";
if (@old_methods) {
$output .= "\nObsolete methods (should be removed):\n\n";
foreach (sort @old_methods) { $output .= " $_\n"; }
- }
+ }
+
+ # Some details were listed, set the details flag for
+ # the class.
+ #
+ $details{$class} = 1;
}
##}}}
}
@@ -863,15 +980,26 @@ print STDERR "\n\n";
. "release. Anyway, there\n"
. "still may be some details listed even for "
. "the up-to-date translators.\n"
- . "Please, check the text below.\n\n";
+ . "Please, check the text below if the translator "
+ . "is marked so.\n\n";
foreach (@list) {
+
+ # Print the class name.
+ #
print FOUT " $_";
# For almost up-to-date translators, show also the base class.
#
if ($cb{$_} ne 'Translator') { print FOUT "\t($cb{$_})"; }
+ # If some details were listed for the translator class,
+ # add a notice.
+ #
+ if ($details{$_}) {
+ print FOUT "\t-- see details below in the report";
+ }
+
print FOUT "\n";
}
}
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index 6b7d410..44d3702 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,5 +1,5 @@
Name: doxygen
-Version: 1.2.10_20010909
+Version: 1.2.10_20010923
Summary: documentation system for C, C++ and IDL
Release: 4
Source: doxygen-%{version}.src.tar.gz
diff --git a/src/bufstr.h b/src/bufstr.h
index 576dac7..550ec4d 100644
--- a/src/bufstr.h
+++ b/src/bufstr.h
@@ -53,6 +53,14 @@ class BufStr : public QCString
}
offset+=s;
}
+ void resize( uint newlen )
+ {
+ QCString::resize(newlen);
+ if (offset>newlen)
+ {
+ offset=newlen;
+ }
+ }
private:
uint offset;
const int spareRoom; // 10Kb extra room to avoid frequent resizing
diff --git a/src/classdef.cpp b/src/classdef.cpp
index cb453ec..59a53d7 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -700,6 +700,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
//printf("Class %s brief=`%s' doc=`%s'\n",name().data(),briefDescription().data(),documentation().data());
+ bool exampleFlag=hasExamples();
// write brief description
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty())
@@ -710,7 +711,14 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
- parseText(ol,theTranslator->trMore());
+
+ if (Config_getBool("REPEAT_BRIEF") ||
+ !documentation().isEmpty() ||
+ exampleFlag
+ )
+ {
+ parseText(ol,theTranslator->trMore());
+ }
ol.endTextLink();
ol.popGeneratorState();
ol.disable(OutputGenerator::Man);
@@ -1032,7 +1040,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endMemberSections();
// write detailed description
- bool exampleFlag=hasExamples();
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty() ||
/*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/
diff --git a/src/code.l b/src/code.l
index 39fc7d6..7329541 100644
--- a/src/code.l
+++ b/src/code.l
@@ -228,9 +228,10 @@ static void startCodeLine()
}
+static void endFontClass();
static void endCodeLine()
{
- if (g_currentFontClass) { g_code->endFontClass(); }
+ endFontClass();
g_code->endCodeLine();
}
@@ -1720,6 +1721,10 @@ void parseCode(OutputDocInterface &od,const char *className,const QCString &s,
BEGIN( Body );
codeYYlex();
endFontClass();
+ if (g_inputLines==1)
+ {
+ g_code->endCodeLine();
+ }
od.append(g_code);
delete g_code;
return;
diff --git a/src/diagram.cpp b/src/diagram.cpp
index e50766e..9b82bd4 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -126,7 +126,7 @@ static void writeBitmapBox(DiagramItem *di,Image *image,
{
int colFill = hasDocs ? (firstRow ? 0 : 2) : 7;
int colBorder = (firstRow || !hasDocs) ? 1 : 3;
- int l = stringLength(di->label());
+ int l = Image::stringLength(di->label());
uint mask=virtToMask(di->virtualness());
image->fillRect(x+1,y+1,w-2,h-2,colFill,mask);
image->drawRect(x,y,w,h,colBorder,mask);
@@ -463,7 +463,7 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos)
{
if (di->isInList()) done=TRUE;
if (maxXPos) mx=QMAX(mx,(uint)di->xPos());
- if (maxLabelLen) ml=QMAX(ml,stringLength(di->label()));
+ if (maxLabelLen) ml=QMAX(ml,Image::stringLength(di->label()));
di=dr->next();
}
dr=next();
diff --git a/src/dot.cpp b/src/dot.cpp
index 4e43b2d..1b1bc96 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -431,7 +431,7 @@ void DotNode::write(QTextStream &t,
void DotNode::writeXML(QTextStream &t)
{
t << " <node id=\"" << m_number << "\">" << endl;
- t << " <label>" << m_label << "</label>" << endl;
+ t << " <label>" << convertToXML(m_label) << "</label>" << endl;
if (!m_url.isEmpty())
{
QCString url(m_url);
@@ -475,12 +475,12 @@ void DotNode::writeXML(QTextStream &t)
while ((ni=edgeInfo->m_label.find("\\n",p))!=-1)
{
t << " <edgelabel>"
- << edgeInfo->m_label.mid(p,ni-p)
+ << convertToXML(edgeInfo->m_label.mid(p,ni-p))
<< "</edgelabel>" << endl;
p=ni+2;
}
t << " <edgelabel>"
- << edgeInfo->m_label.right(edgeInfo->m_label.length()-p)
+ << convertToXML(edgeInfo->m_label.right(edgeInfo->m_label.length()-p))
<< "</edgelabel>" << endl;
}
t << " </childnode>" << endl;
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index d6c5911..f350cc8 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1281,13 +1281,14 @@ static MemberDef *addVariableToClass(
{
Debug::print(Debug::Variables,0,
" class variable:\n"
- " %s' %s'::`%s' `%s' prot=`%d ann=%d\n",
+ " %s' %s'::`%s' `%s' prot=`%d ann=%d init=%s\n",
root->type.data(),
scope.data(),
name.data(),
root->args.data(),
root->protection,
- fromAnnScope
+ fromAnnScope,
+ root->initializer.data()
);
// class friends may be templatized
@@ -6132,6 +6133,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
for (i=0;i<size;i++,p++) *p=conv[*p];
// and translate CR's
int newSize=filterCRLF(dest.data()+oldPos,size);
+ //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize);
if (newSize!=size) // we removed chars
{
dest.resize(newSize); // resize the array
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 2320473..286b35d 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -49,8 +49,8 @@ static const char *defaultStyleSheet =
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n"
"TD.md { background-color: #f2f2ff; font-weight: bold; }\n"
- "TD.mdname1 { background-color: #f2f2ff; font-weight: bold; font-style: italic; }\n"
- "TD.mdname { background-color: #f2f2ff; font-weight: bold; font-style: italic; width: 600px; }\n"
+ "TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }\n"
+ "TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"FONT.keyword { color: #008000 }\n"
@@ -801,21 +801,32 @@ void HtmlGenerator::endMemberSubtitle()
void HtmlGenerator::startIndexList()
{
- t << "<ul>" << endl;
- //if (Config_getBool("GENERATE_HTMLHELP"))
- //{
- // if (htmlHelp->depth()==0) htmlHelp->addItem(lastTitle,lastFile);
- // htmlHelp->incDepth();
- //}
+ t << "<table>" << endl;
}
void HtmlGenerator::endIndexList()
{
- t << "</ul>" << endl;
- //if (Config_getBool("GENERATE_HTMLHELP"))
- //{
- // htmlHelp->decDepth();
- //}
+ t << "</table>" << endl;
+}
+
+void HtmlGenerator::startIndexKey()
+{
+ t << " <tr bgcolor=\"#f0f0f0\"><td>";
+}
+
+void HtmlGenerator::endIndexKey()
+{
+ t << "</td>";
+}
+
+void HtmlGenerator::startIndexValue()
+{
+ t << "<td>";
+}
+
+void HtmlGenerator::endIndexValue(const char *)
+{
+ t << "</td></tr>" << endl;
}
void HtmlGenerator::startAlphabeticalIndexList()
diff --git a/src/htmlgen.h b/src/htmlgen.h
index caed87f..c220473 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -66,6 +66,10 @@ class HtmlGenerator : public OutputGenerator
void writeString(const char *text);
void startIndexList();
void endIndexList();
+ void startIndexKey();
+ void endIndexKey();
+ void startIndexValue();
+ void endIndexValue(const char *);
void startItemList() { t << "<ul>" << endl; }
void endItemList() { t << "</ul>" << endl; }
void startEnumList() { t << "<ol>" << endl; }
@@ -215,7 +219,7 @@ class HtmlGenerator : public OutputGenerator
void startDescTableTitle()
{ t << "<tr><td valign=top><em>"; }
void endDescTableTitle()
- { t << endl << "</em>&nbsp;</td>"; }
+ { t << "</em>&nbsp;</td>"; }
void startDescTableData()
{ t << "<td>" << endl; }
void endDescTableData()
diff --git a/src/image.cpp b/src/image.cpp
index ccfa65f..bbbcfc8 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -250,7 +250,7 @@ void Image::writeString(int x,int y,const char *s,uchar fg)
}
}
-uint stringLength(const char *s)
+uint Image::stringLength(const char *s)
{
int w=0;
if (s)
diff --git a/src/image.h b/src/image.h
index 178996b..8cd1e65 100644
--- a/src/image.h
+++ b/src/image.h
@@ -41,6 +41,7 @@ class Image
uint getWidth() const { return width; }
uint getHeight() const { return height; }
uchar *getData() const { return data; }
+ static uint stringLength(const char *s);
private:
int width;
diff --git a/src/index.cpp b/src/index.cpp
index 5124dd9..79cc8cc 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -347,7 +347,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{
if (!started)
{
- ol.startIndexList();
+ ol.startItemList();
if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE;
@@ -396,7 +396,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
}
if (started)
{
- ol.endIndexList();
+ ol.endItemList();
if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth();
}
@@ -550,7 +550,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started)
{
if (!started)
{
- ol.startIndexList();
+ ol.startItemList();
if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE;
@@ -621,7 +621,7 @@ void writeClassHierarchy(OutputList &ol)
writeClassTreeForList(ol,&Doxygen::hiddenClasses,started);
if (started)
{
- ol.endIndexList();
+ ol.endItemList();
if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth();
}
@@ -875,6 +875,7 @@ void writeFileIndex(OutputList &ol)
if (!path.isEmpty()) fullName.prepend(path+"/");
// --------------- LaTeX/RTF only -------------------------
+#if 0
if (doc)
{
ol.pushGeneratorState();
@@ -887,22 +888,22 @@ void writeFileIndex(OutputList &ol)
if (!fd->briefDescription().isEmpty())
{
ol.docify(" (");
- OutputList briefOutput(&ol);
- parseDoc(briefOutput,fd->absFilePath(),1,
+ parseDoc(ol,fd->absFilePath(),1,
0,0,
abbreviate(fd->briefDescription(),fd->name()));
- ol+=briefOutput;
ol.docify(")");
}
ol.writeEndAnnoItem(fd->getOutputFileBase());
ol.popGeneratorState();
}
+#endif
// --------------------------------------------------------
// ----------------- HTML only ----------------------------
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.writeListItem();
+ //ol.pushGeneratorState();
+ //ol.disableAllBut(OutputGenerator::Html);
+ //ol.writeListItem();
+ ol.startIndexKey();
ol.docify(path);
if (doc)
{
@@ -932,25 +933,29 @@ void writeFileIndex(OutputList &ol)
}
if (src)
{
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
ol.startTextLink(fd->includeName(),0);
ol.docify("[");
parseText(ol,theTranslator->trCode());
ol.docify("]");
ol.endTextLink();
+ ol.popGeneratorState();
}
+ ol.endIndexKey();
+ ol.startIndexValue();
if (!fd->briefDescription().isEmpty())
{
- ol.docify(" (");
- OutputList briefOutput(&ol);
- parseDoc(briefOutput,
+ //ol.docify(" (");
+ parseDoc(ol,
fd->absFilePath(),1,
0,0,
abbreviate(fd->briefDescription(),fd->name()));
- ol+=briefOutput;
- ol.docify(")");
+ //ol.docify(")");
}
- ol.popGeneratorState();
+ ol.endIndexValue(fd->getOutputFileBase());
+ //ol.popGeneratorState();
// --------------------------------------------------------
}
fd=fl->next();
@@ -1039,19 +1044,22 @@ void writeNamespaceIndex(OutputList &ol)
ol.startIndexList();
first=FALSE;
}
- ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
+ //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
+ ol.startIndexKey();
+ ol.writeObjectLink(0,nd->getOutputFileBase(),0,nd->name());
+ ol.endIndexKey();
+ ol.startIndexValue();
if (!nd->briefDescription().isEmpty())
{
- ol.docify(" (");
- OutputList briefOutput(&ol);
- parseDoc(briefOutput,
+ //ol.docify(" (");
+ parseDoc(ol,
nd->getDefFileName(),nd->getDefLine(),
nd->name(),0,
abbreviate(nd->briefDescription(),nd->name()));
- ol+=briefOutput;
- ol.docify(")");
+ //ol.docify(")");
}
- ol.writeEndAnnoItem(nd->getOutputFileBase());
+ ol.endIndexValue(nd->getOutputFileBase());
+ //ol.writeEndAnnoItem(nd->getOutputFileBase());
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(FALSE,nd->name(),nd->getOutputFileBase());
@@ -1112,19 +1120,22 @@ void writeAnnotatedClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
QCString type=cd->compoundTypeString();
- ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName());
+ //ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName());
+ ol.startIndexKey();
+ ol.writeObjectLink(0,cd->getOutputFileBase(),0,cd->displayName());
+ ol.endIndexKey();
+ ol.startIndexValue();
if (!cd->briefDescription().isEmpty())
{
- ol.docify(" (");
- OutputList briefOutput(&ol);
- parseDoc(briefOutput,
+ //ol.docify(" (");
+ parseDoc(ol,
cd->getDefFileName(),cd->getDefLine(),
cd->name(),0,
abbreviate(cd->briefDescription(),cd->name()));
- ol+=briefOutput;
- ol.docify(")");
+ //ol.docify(")");
}
- ol.writeEndAnnoItem(cd->getOutputFileBase());
+ ol.endIndexValue(cd->getOutputFileBase());
+ //ol.writeEndAnnoItem(cd->getOutputFileBase());
if (hasHtmlHelp)
{
HtmlHelp::getInstance()->addContentsItem(FALSE,cd->name(),cd->getOutputFileBase());
@@ -1152,19 +1163,23 @@ void writePackageList(OutputList &ol)
{
if (!pd->isReference())
{
- ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
+ //ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
+ ol.startIndexKey();
+ ol.writeObjectLink(0,pd->getOutputFileBase(),0,pd->name());
+ ol.endIndexKey();
+ ol.startIndexValue();
if (!pd->briefDescription().isEmpty())
{
- ol.docify(" (");
- OutputList briefOutput(&ol);
- parseDoc(briefOutput,
+ //ol.docify(" (");
+ parseDoc(ol,
pd->getDefFileName(),pd->getDefLine(),
pd->name(),0,
abbreviate(pd->briefDescription(),pd->name()));
- ol+=briefOutput;
- ol.docify(")");
+ //ol.docify(")");
}
- ol.writeEndAnnoItem(pd->getOutputFileBase());
+ ol.endIndexValue(pd->getOutputFileBase());
+
+ //ol.writeEndAnnoItem(pd->getOutputFileBase());
if (hasHtmlHelp)
{
HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase());
@@ -1967,7 +1982,7 @@ void writeExampleIndex(OutputList &ol)
parseText(ol,theTranslator->trExamplesDescription());
//ol.newParagraph();
ol.endTextBlock();
- ol.startIndexList();
+ ol.startItemList();
PageSDictIterator pdi(*Doxygen::exampleSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
@@ -1988,7 +2003,7 @@ void writeExampleIndex(OutputList &ol)
}
ol.writeString("\n");
}
- ol.endIndexList();
+ ol.endItemList();
if (hasHtmlHelp)
{
htmlHelp->decContentsDepth();
@@ -2071,7 +2086,7 @@ void writePageIndex(OutputList &ol)
parseText(ol,theTranslator->trRelatedPagesDescription());
//ol.newParagraph();
ol.endTextBlock();
- ol.startIndexList();
+ ol.startItemList();
PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
@@ -2105,7 +2120,7 @@ void writePageIndex(OutputList &ol)
if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,pageName,0,pageTitle);
}
}
- ol.endIndexList();
+ ol.endItemList();
if (hasHtmlHelp)
{
htmlHelp->decContentsDepth();
@@ -2258,12 +2273,12 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
// write subgroups
if (hasSubGroups)
{
- ol.startIndexList();
+ ol.startItemList();
for (gli.toLast();(subgd=gli.current());--gli)
{
writeGroupTreeNode(ol,subgd,TRUE);
}
- ol.endIndexList();
+ ol.endItemList();
}
@@ -2463,14 +2478,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
void writeGroupHierarchy(OutputList &ol)
{
- ol.startIndexList();
+ ol.startItemList();
GroupListIterator gli(Doxygen::groupList);
GroupDef *gd;
for (;(gd=gli.current());++gli)
{
writeGroupTreeNode(ol,gd,FALSE);
}
- ol.endIndexList();
+ ol.endItemList();
}
//----------------------------------------------------------------------------
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 7bdfbdf..d310ea3 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -906,6 +906,26 @@ void LatexGenerator::writeEndAnnoItem(const char *name)
t << "}{\\pageref{" << name << "}}{}" << endl;
}
+void LatexGenerator::startIndexKey()
+{
+ t << "\\item\\contentsline{section}{";
+}
+
+void LatexGenerator::endIndexKey()
+{
+}
+
+void LatexGenerator::startIndexValue()
+{
+ t << " (";
+}
+
+void LatexGenerator::endIndexValue(const char *name)
+{
+ t << ")";
+ t << "}{\\pageref{" << name << "}}{}" << endl;
+}
+
//void LatexGenerator::writeClassLink(const char *,const char *,
// const char *,const char *name)
//{
@@ -1530,7 +1550,7 @@ void LatexGenerator::startImage(const char *name,const char *size,bool hasCaptio
{
if (hasCaption)
{
- t << "\\begin{figure}[h]" << endl;
+ t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl;
}
else
diff --git a/src/latexgen.h b/src/latexgen.h
index bf3e530..802542a 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -63,6 +63,10 @@ class LatexGenerator : public OutputGenerator
void writeString(const char *text);
void startIndexList() { t << "\\begin{CompactList}" << endl; }
void endIndexList() { t << "\\end{CompactList}" << endl; }
+ void startIndexKey();
+ void endIndexKey();
+ void startIndexValue();
+ void endIndexValue(const char *);
void startItemList() { t << "\\begin{CompactItemize}" << endl; }
void endItemList() { t << "\\end{CompactItemize}" << endl; }
void startEnumList() { t << "\\begin{enumerate}" << endl; }
diff --git a/src/mangen.h b/src/mangen.h
index e87cbc7..6599c1e 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -61,6 +61,10 @@ class ManGenerator : public OutputGenerator
void writeString(const char *text);
void startIndexList() {}
void endIndexList() { newParagraph(); }
+ void startIndexKey() {}
+ void endIndexKey() {}
+ void startIndexValue() {}
+ void endIndexValue(const char *) {}
void startItemList() {}
void endItemList() { newParagraph(); }
void startEnumList() {}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index afdcab6..5b58626 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1653,6 +1653,8 @@ MemberDef *MemberDef::createTemplateInstanceMember(
bool MemberDef::hasOneLineInitializer() const
{
+ //printf("%s: init=%s, initLines=%d maxInitLines=%d userInitLines=%d\n",
+ // name().data(),init.data(),initLines,maxInitLines,userInitLines);
return !init.isEmpty() && initLines==0 && // one line initializer
((maxInitLines>0 && userInitLines==-1) || userInitLines>0); // enabled by default or explicitly
}
@@ -1664,3 +1666,12 @@ bool MemberDef::hasMultiLineInitializer() const
|| initLines<userInitLines // explicitly enabled
);
}
+
+void MemberDef::setInitializer(const char *initializer)
+{
+ init=initializer;
+ int p=init.length()-1;
+ while (p>=0 && isspace(init.at(p))) p--;
+ init=init.left(p+1);
+ initLines=init.contains('\n');
+}
diff --git a/src/memberdef.h b/src/memberdef.h
index 4af6f66..b734615 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -139,10 +139,7 @@ class MemberDef : public Definition
void setProtection(Protection p) { prot=p; }
void setMemberSpecifiers(int s) { memSpec=s; }
void mergeMemberSpecifiers(int s) { memSpec|=s; }
- void setInitializer(const char *i) { init=i;
- //init=init.stripWhiteSpace();
- initLines=init.contains('\n');
- }
+ void setInitializer(const char *i);
void setBitfields(const char *s) { bitfields = s; }
void setMaxInitLines(int lines) { userInitLines=lines; }
void setMemberClass(ClassDef *cd);
diff --git a/src/outputgen.h b/src/outputgen.h
index 15cab68..dbc2351 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -314,6 +314,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endTitleHead(const char *fileName,const char *name) = 0;
virtual void startIndexList() = 0;
virtual void endIndexList() = 0;
+ virtual void startIndexKey() = 0;
+ virtual void endIndexKey() = 0;
+ virtual void startIndexValue() = 0;
+ virtual void endIndexValue(const char *) = 0;
virtual void startAlphabeticalIndexList() = 0;
virtual void endAlphabeticalIndexList() = 0;
virtual void writeIndexHeading(const char *s) = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index 8583e56..625c7a5 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -105,6 +105,14 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndexList); }
void endIndexList()
{ forall(&OutputGenerator::endIndexList); }
+ void startIndexKey()
+ { forall(&OutputGenerator::startIndexKey); }
+ void endIndexKey()
+ { forall(&OutputGenerator::endIndexKey); }
+ void startIndexValue()
+ { forall(&OutputGenerator::startIndexValue); }
+ void endIndexValue(const char *name)
+ { forall(&OutputGenerator::endIndexValue,name); }
void startItemList()
{ forall(&OutputGenerator::startItemList); }
void endItemList()
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 1831072..5313f9b 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -877,6 +877,7 @@ void RTFGenerator::startFile(const char *name,const char *,
void RTFGenerator::endFile()
{
+ DBG_RTF(t << "{\\comment endFile}\n")
t << "}";
endPlainFile();
@@ -1410,7 +1411,6 @@ void RTFGenerator::startItemList()
t << "{";
incrementIndentLevel();
listItemInfo[m_listLevel].isEnum = FALSE;
- //t << Rtf_Style_Reset << Rtf_BList_DepthStyle();
}
/*! end bullet list */
@@ -1421,9 +1421,6 @@ void RTFGenerator::endItemList()
t << "}";
decrementIndentLevel();
m_omitParagraph=TRUE;
- //t << Rtf_Style_Reset << styleStack.top() << endl;
- //printf("RTFGenerator::endItemList() `%s'\n",styleStack.top());
- //newParagraph();
}
/*! start enumeration list */
@@ -1571,6 +1568,39 @@ void RTFGenerator::writeEndAnnoItem(const char *name)
newParagraph();
}
+void RTFGenerator::startIndexKey()
+{
+ DBG_RTF(t << "{\\comment (startIndexKey)}" << endl)
+ t << "{\\b ";
+}
+
+void RTFGenerator::endIndexKey()
+{
+}
+
+void RTFGenerator::startIndexValue()
+{
+ t << " (";
+}
+
+void RTFGenerator::endIndexValue(const char *name)
+{
+ DBG_RTF(t << "{\\comment (endIndexKey)}" << endl)
+ t << ")";
+ t << "} ";
+ if (name)
+ {
+ t << "\\tab ";
+ WriteRTFReference(name);
+ t << endl;
+ }
+ else
+ {
+ t << endl;
+ }
+ newParagraph();
+}
+
void RTFGenerator::startSubsection()
{
//beginRTFSubSection();
@@ -1937,7 +1967,7 @@ void RTFGenerator::startDescList(SectionTypes)
void RTFGenerator::endDescTitle()
{
DBG_RTF(t << "{\\comment (endDescTitle) }" << endl)
- endBold();
+ //endBold();
newParagraph();
//t << Rtf_Style_Reset << styleStack.top();
incrementIndentLevel();
@@ -1948,6 +1978,7 @@ void RTFGenerator::startParamList(ParamListTypes)
{
DBG_RTF(t << "{\\comment (startParamList)}" << endl)
t << "{";
+ incrementIndentLevel();
newParagraph();
}
@@ -2182,6 +2213,7 @@ void RTFGenerator::endCodeFragment()
//styleStack.pop();
//printf("RTFGenerator::endCodeFrament() top=%s\n",styleStack.top());
//t << Rtf_Style_Reset << styleStack.top() << endl;
+ DBG_RTF(t << "{\\comment (endCodeFragment) }" << endl)
t << "}" << endl;
m_omitParagraph = TRUE;
}
@@ -2382,8 +2414,8 @@ void RTFGenerator::startTextBlock(bool dense)
void RTFGenerator::endTextBlock()
{
newParagraph();
- t << "}" << endl;
DBG_RTF(t << "{\\comment End TextBlock}" << endl)
+ t << "}" << endl;
m_omitParagraph = TRUE;
}
@@ -2395,12 +2427,14 @@ void RTFGenerator::newParagraph()
void RTFGenerator::startMemberSubtitle()
{
+ DBG_RTF(t << "{\\comment startMemberSubtitle}" << endl)
t << "{" << endl;
t << Rtf_Style_Reset << Rtf_CList_DepthStyle() << endl;
}
void RTFGenerator::endMemberSubtitle()
{
+ DBG_RTF(t << "{\\comment endMemberSubtitle}" << endl)
newParagraph();
t << "}" << endl;
}
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 5569328..b2971ad 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -58,12 +58,16 @@ class RTFGenerator : public OutputGenerator
void startTitleHead(const char *);
void startTitle();
void endTitleHead(const char *,const char *name);
- void endTitle() {}; //{ t << "}"; }
+ void endTitle() {}
void newParagraph();
void writeString(const char *text);
void startIndexList();
void endIndexList();
+ void startIndexKey();
+ void endIndexKey();
+ void startIndexValue();
+ void endIndexValue(const char *);
void startItemList();
void endItemList();
void startEnumList();
diff --git a/src/scanner.l b/src/scanner.l
index 0088e9a..faa8f3c 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -235,12 +235,18 @@ static void lineCount()
static void addType( Entry* current )
{
- if( current->type.length() )
- current->type += ' ' ;
+ uint tl=current->type.length();
+ if( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.')
+ {
+ current->type += ' ' ;
+ }
current->type += current->name ;
current->name.resize(0) ;
- if( current->type.length() )
- current->type += ' ' ;
+ tl=current->type.length();
+ if( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.')
+ {
+ current->type += ' ' ;
+ }
current->type += current->args ;
current->args.resize(0) ;
current->argList->clear();
@@ -443,6 +449,7 @@ UL [uU][lL]
OL [oO][lL]
DL [dD][lL]
TITLE [tT][iI][tT][lL][eE]
+CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%option noyywrap
@@ -531,7 +538,6 @@ TITLE [tT][iI][tT][lL][eE]
%x FileDocArg2
%x ExampleDoc
%x ExampleDocArg1
-%x EnumDoc
%x EnumDocArg1
%x FuncPtr
%x EndFuncPtr
@@ -633,9 +639,7 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN( FindMembers );
}
}
-<NextSemi>"'"\\[0-7]{1,3}"'"
-<NextSemi>"'"\\."'"
-<NextSemi>"'".{1,4}"'"
+<NextSemi>{CHARLIT}
<NextSemi>\" {
lastStringContext=NextSemi;
BEGIN(SkipString);
@@ -1148,6 +1152,12 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN(FindMembers);
}
}
+<FindMembers>"." {
+ if (insideJava)
+ {
+ current->name+=".";
+ }
+ }
<FindMembers>"::" {
current->name+=yytext;
}
@@ -1388,9 +1398,7 @@ TITLE [tT][iI][tT][lL][eE]
initializerSharpCount--;
current->initializer+=*yytext;
}
-<ReadInitializer>"'"\\[0-7]{1,3}"'" |
-<ReadInitializer>"'"\\."'" |
-<ReadInitializer>"'".{1,4}"'" { current->initializer+=yytext; }
+<ReadInitializer>{CHARLIT} { current->initializer+=yytext; }
<ReadInitializer>\n {
current->initializer+=*yytext;
yyLineNr++;
@@ -1438,9 +1446,7 @@ TITLE [tT][iI][tT][lL][eE]
yyLineNr++;
*pCopyRoundString+=*yytext;
}
-<CopyRound>"'"\\[0-7]{1,3}"'" { *pCopyRoundString+=yytext; }
-<CopyRound>"'"\\."'" { *pCopyRoundString+=yytext; }
-<CopyRound>"'".{1,4}"'" { *pCopyRoundString+=yytext; }
+<CopyRound>{CHARLIT} { *pCopyRoundString+=yytext; }
<CopyRound>[^"'()\n]+ {
*pCopyRoundString+=yytext;
}
@@ -1461,9 +1467,7 @@ TITLE [tT][iI][tT][lL][eE]
if (--curlyCount<0)
BEGIN(lastCurlyContext);
}
-<CopyCurly>"'"\\[0-7]{1,3}"'" { *pCopyCurlyString+=yytext; }
-<CopyCurly>"'"\\."'" { *pCopyCurlyString+=yytext; }
-<CopyCurly>"'".{1,4}"'" { *pCopyCurlyString+=yytext; }
+<CopyCurly>{CHARLIT} { *pCopyCurlyString+=yytext; }
<CopyCurly>[^"'{}\/\n]+ {
*pCopyCurlyString+=yytext;
}
@@ -1623,9 +1627,7 @@ TITLE [tT][iI][tT][lL][eE]
lastContext = ReadBody ;
BEGIN( Comment ) ;
}
-<ReadBody>"'"\\[0-7]{1,3}"'" { current->program += yytext; }
-<ReadBody>"'"\\."'" { current->program += yytext; }
-<ReadBody>"'".{1,4}"'" { current->program += yytext; }
+<ReadBody>{CHARLIT} { current->program += yytext; }
<ReadBody>"{" { current->program += yytext ;
++curlyCount ;
}
@@ -2052,15 +2054,7 @@ TITLE [tT][iI][tT][lL][eE]
fullArgString+=*yytext;
BEGIN( lastCopyArgStringContext );
}
-<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>"'"\\[0-7]{1,3}"'" {
- *copyArgString+=yytext;
- fullArgString+=yytext;
- }
-<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>"'"\\."'" {
- *copyArgString+=yytext;
- fullArgString+=yytext;
- }
-<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>"'".{1,4}"'" {
+<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT} {
*copyArgString+=yytext;
fullArgString+=yytext;
}
@@ -2294,13 +2288,7 @@ TITLE [tT][iI][tT][lL][eE]
current = tempEntry;
BEGIN( lastCurlyContext );
}
-<SkipCurly>"'"\\[0-7]{1,3}"'" {
- //addToBody(yytext);
- }
-<SkipCurly>"'"\\."'" {
- //addToBody(yytext);
- }
-<SkipCurly>"'".{1,4}"'" {
+<SkipCurly>{CHARLIT} {
//addToBody(yytext);
}
<SkipCurly>\" {
@@ -3321,6 +3309,9 @@ TITLE [tT][iI][tT][lL][eE]
addSection();
BEGIN(PageDoc);
}
+<SectionTitle>[^\n*]* {
+ sectionTitle+=yytext;
+ }
<SectionTitle>"*" {
sectionTitle+=yytext;
}
diff --git a/src/util.cpp b/src/util.cpp
index 5f54a61..764ab02 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -473,7 +473,7 @@ ClassDef *getResolvedClass(
{
// strip * and & from n
int ip=subst.length()-1;
- while (subst.at(ip)=='*' || subst.at(ip)=='&' || subst.at(ip)==' ') ip--;
+ while (ip>=0 && (subst.at(ip)=='*' || subst.at(ip)=='&' || subst.at(ip)==' ')) ip--;
subst=subst.left(ip+1);
if (pIsTypeDef) *pIsTypeDef=TRUE;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index dfe19b9..f5f66ac 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -296,7 +296,6 @@ class XMLGenerator : public OutputDocInterface
}
void startCodeFragment()
{
- startParMode();
m_t << "<programlisting>";
}
void endCodeFragment()
@@ -305,7 +304,6 @@ class XMLGenerator : public OutputDocInterface
}
void startPreFragment()
{
- startParMode();
m_t << "<programlisting>";
}
void endPreFragment()
@@ -416,11 +414,10 @@ class XMLGenerator : public OutputDocInterface
int i;for (i=0;i<num;i++) m_t << "&nbsp;";
}
- //// TODO: translate these as well....
-
void writeObjectLink(const char *ref,const char *file,
const char *anchor, const char *text)
{
+ startParMode();
writeXMLLink(m_t,ref,file,anchor,text);
}
void writeCodeLink(const char *ref,const char *file,
@@ -748,13 +745,15 @@ void writeXMLDocBlock(QTextStream &t,
const QCString &name,
const QCString &text)
{
+ if (text.stripWhiteSpace().isEmpty()) return;
XMLGenerator *xmlGen = new XMLGenerator;
+ xmlGen->startParMode();
parseDoc(*xmlGen,
fileName, // input definition file
lineNr, // input definition line
scope, // scope (which should not be linked to)
name, // member (which should not be linked to)
- text // actual text
+ text+"\n" // actual text
);
xmlGen->endParMode();
t << xmlGen->getContents();
@@ -979,6 +978,7 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
// + standard member sections
// + detailed member documentation
+ if (cd->isReference()) return; // skip external references.
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
t << " <compounddef id=\""
@@ -989,7 +989,6 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
t << "</compoundname>" << endl;
if (cd->baseClasses()->count()>0)
{
- //t << " <basecompoundlist>" << endl;
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
@@ -1012,11 +1011,9 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
}
t << "\"/>" << endl;
}
- //t << " </basecompoundlist>" << endl;
}
if (cd->subClasses()->count()>0)
{
- //t << " <derivedcompoundlist>" << endl;
BaseClassListIterator bcli(*cd->subClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
@@ -1039,7 +1036,6 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
}
t << "\"/>" << endl;
}
- //t << " </derivedcompoundlist>" << endl;
}
int numMembers =
cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+
@@ -1120,6 +1116,7 @@ void generateXMLFileSection(FileDef *fd,QTextStream &t,MemberList *ml,const char
void generateXMLForFile(FileDef *fd,QTextStream &t)
{
+ if (fd->isReference()) return; // skip external references
t << " <compounddef id=\""
<< fd->getOutputFileBase() << "\" kind=\"file\">" << endl;
t << " <compoundname>";