summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/commands.doc7
-rw-r--r--doc/install.doc2
-rw-r--r--doc/trouble.doc2
-rw-r--r--libmscgen/mscgen_api.h2
-rw-r--r--libmscgen/mscgen_msc.h2
-rw-r--r--src/commentscan.l14
-rw-r--r--src/docbookvisitor.cpp18
-rw-r--r--src/docbookvisitor.h2
-rw-r--r--src/docparser.cpp94
-rw-r--r--src/docparser.h18
-rw-r--r--src/docvisitor.h3
-rw-r--r--src/dotrunner.cpp2
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/htmldocvisitor.cpp8
-rw-r--r--src/htmldocvisitor.h2
-rw-r--r--src/latexdocvisitor.cpp10
-rw-r--r--src/latexdocvisitor.h2
-rw-r--r--src/latexgen.cpp2
-rw-r--r--src/mandocvisitor.cpp10
-rw-r--r--src/mandocvisitor.h2
-rw-r--r--src/perlmodgen.cpp10
-rw-r--r--src/pre.l12
-rw-r--r--src/printdocvisitor.h10
-rw-r--r--src/rtfdocvisitor.cpp14
-rw-r--r--src/rtfdocvisitor.h2
-rw-r--r--src/textdocvisitor.h2
-rw-r--r--src/util.cpp21
-rw-r--r--src/xmldocvisitor.cpp14
-rw-r--r--src/xmldocvisitor.h2
29 files changed, 47 insertions, 244 deletions
diff --git a/doc/commands.doc b/doc/commands.doc
index ca7786c..6c8b696 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -2783,7 +2783,8 @@ See also the \ref emojisup "emoji support page" for details.
\note The text fragment should only include the part of the message
sequence chart that is
- within the <code>msc {...}</code> block.
+ within the <code>msc {...}</code> block (this is different from
+ \ref cmdmscfile "\\mscfile").
\note mscgen is now built in into doxygen
Here is an example of the use of the \c \\msc command.
@@ -2937,6 +2938,10 @@ class Receiver
\ref image_sizeindicator "Size indication" with the
\ref cmdimage "\\image" command.
+ \note The text fragment should include the part message of the
+ sequence chart as well as the starting `msc {` and ending `}`
+ (this is different from \ref cmdmsc "\\msc").
+
\sa section \ref cmdmsc "\\msc".
<hr>
diff --git a/doc/install.doc b/doc/install.doc
index 18ea44e..b711cd4 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -201,7 +201,7 @@ tar zxvf doxygen-x.y.z.src.tar.gz
\endverbatim
to unpack the sources (you can obtain \c tar from e.g. http://gnuwin32.sourceforge.net/packages.html).
Alternatively you can use an unpack program, like 7-Zip (see https://www.7-zip.org/)
-or use the build in unpack feature of modern Windows systems).
+or use the built-in unpack feature of modern Windows systems).
Now your environment is setup to generate the required project files for \c doxygen.
diff --git a/doc/trouble.doc b/doc/trouble.doc
index c490ae1..cb50399 100644
--- a/doc/trouble.doc
+++ b/doc/trouble.doc
@@ -20,7 +20,7 @@
<ul>
<li>Doxygen is <em>not</em> a real compiler, it is only a lexical scanner.
This means that it can and will not detect errors in your source code.
-<li>Doxygen has a build in preprocessor, but this works slightly different than
+<li>Doxygen has a built-in preprocessor, but this works slightly different than
the C preprocessor. Doxygen assumes a header file is properly guarded against
multiple inclusion, and that each include file is standalone (i.e. it could be placed
at the top of a source file without causing compiler errors). As long as this is
diff --git a/libmscgen/mscgen_api.h b/libmscgen/mscgen_api.h
index 3d294a1..43a1bf8 100644
--- a/libmscgen/mscgen_api.h
+++ b/libmscgen/mscgen_api.h
@@ -23,7 +23,7 @@ typedef enum
/** generate an image file for a given .msc file.
* @param inputFile the name of the MSC file to process.
* @param outputFile the name of the image file to generate.
- * @param fomat the format of the image file to generate.
+ * @param format the format of the image file to generate.
* @return 0 on success, a non zero error code on failure.
*/
int mscgen_generate(const char *inputFile,
diff --git a/libmscgen/mscgen_msc.h b/libmscgen/mscgen_msc.h
index d7b2726..2c75131 100644
--- a/libmscgen/mscgen_msc.h
+++ b/libmscgen/mscgen_msc.h
@@ -262,7 +262,7 @@ Boolean MscNextArc(struct MscTag *m);
/** Get the name of the entity from which the current arc originates.
- * \retvat The label for the entity from which the current arc starts.
+ * \retval The label for the entity from which the current arc starts.
* The returned string must not be modified.
*/
const char *MscGetCurrentArcSource(Msc m);
diff --git a/src/commentscan.l b/src/commentscan.l
index b3902fc..665360c 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -458,6 +458,7 @@ static QCString g_memberGroupDocs;
static QCString g_memberGroupRelates;
static QCString g_compoundName;
+static int g_openCount = 0;
//-----------------------------------------------------------------------------
static void initParser()
@@ -3243,6 +3244,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
void groupEnterFile(const char *fileName,int)
{
+ g_openCount = 0;
g_autoGroupStack.setAutoDelete(TRUE);
g_autoGroupStack.clear();
g_memberGroupId = DOX_NOGROUP;
@@ -3262,7 +3264,11 @@ void groupLeaveFile(const char *fileName,int line)
g_memberGroupDocs.resize(0);
if (!g_autoGroupStack.isEmpty())
{
- warn(fileName,line,"end of file while inside a group\n");
+ warn(fileName,line,"end of file while inside a group");
+ }
+ else if (g_openCount > 0) // < 0 is already handled on close call
+ {
+ warn(fileName,line,"end of file with unbalanced grouping commands");
}
}
@@ -3323,6 +3329,7 @@ static int findExistingGroup(int &groupId,const MemberGroupInfo *info)
void openGroup(Entry *e,const char *,int)
{
+ g_openCount++;
//printf("==> openGroup(name=%s,sec=%x) g_autoGroupStack=%d\n",
// e->name.data(),e->section,g_autoGroupStack.count());
if (e->section==Entry::GROUPDOC_SEC) // auto group
@@ -3351,6 +3358,11 @@ void openGroup(Entry *e,const char *,int)
void closeGroup(Entry *e,const char *fileName,int line,bool foundInline)
{
+ g_openCount--;
+ if (g_openCount < 0)
+ {
+ warn(fileName,line,"unbalanced grouping commands");
+ }
//printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) g_autoGroupStack=%d\n",
// e->name.data(),e->section,fileName,line,g_autoGroupStack.count());
if (g_memberGroupId!=DOX_NOGROUP) // end of member group
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 73db25f..937d268 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -480,7 +480,7 @@ DB_VIS_C
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -1523,22 +1523,6 @@ DB_VIS_C
m_t << " ";
}
-void DocbookDocVisitor::visitPre(DocCopy *)
-{
-DB_VIS_C
- if (m_hide) return;
- // TODO: to be implemented
-}
-
-
-void DocbookDocVisitor::visitPost(DocCopy *)
-{
-DB_VIS_C
- if (m_hide) return;
- // TODO: to be implemented
-}
-
-
void DocbookDocVisitor::visitPre(DocText *)
{
DB_VIS_C
diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h
index 24b1fbb..47275f7 100644
--- a/src/docbookvisitor.h
+++ b/src/docbookvisitor.h
@@ -127,8 +127,6 @@ class DocbookDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 90ace3f..f097d04 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -2098,100 +2098,6 @@ void DocIncOperator::parse()
//---------------------------------------------------------------------------
-void DocCopy::parse(QList<DocNode> &children)
-{
- QCString doc,brief;
- const Definition *def = 0;
- if (findDocsForMemberOrCompound(m_link,&doc,&brief,&def))
- {
- if (g_copyStack.findRef(def)==-1) // definition not parsed earlier
- {
- bool hasParamCommand = g_hasParamCommand;
- bool hasReturnCommand = g_hasReturnCommand;
- QDict<void> paramsFound = g_paramsFound;
- //printf("..1 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
-
- docParserPushContext(FALSE);
- g_scope = def;
- if (def->definitionType()==Definition::TypeMember && def->getOuterScope())
- {
- if (def->getOuterScope()!=Doxygen::globalScope)
- {
- g_context=def->getOuterScope()->name();
- }
- }
- else if (def!=Doxygen::globalScope)
- {
- g_context=def->name();
- }
- g_styleStack.clear();
- g_nodeStack.clear();
- g_paramsFound.clear();
- g_copyStack.append(def);
- // make sure the descriptions end with a newline, so the parser will correctly
- // handle them in all cases.
- //printf("doc='%s'\n",doc.data());
- //printf("brief='%s'\n",brief.data());
- if (m_copyBrief)
- {
- brief+='\n';
- internalValidatingParseDoc(m_parent,children,brief);
-
- //printf("..2 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
- hasParamCommand = hasParamCommand || g_hasParamCommand;
- hasReturnCommand = hasReturnCommand || g_hasReturnCommand;
- QDictIterator<void> it(g_paramsFound);
- void *item;
- for (;(item=it.current());++it)
- {
- paramsFound.insert(it.currentKey(),it.current());
- }
- }
- if (m_copyDetails)
- {
- doc+='\n';
- internalValidatingParseDoc(m_parent,children,doc);
-
- //printf("..3 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
- hasParamCommand = hasParamCommand || g_hasParamCommand;
- hasReturnCommand = hasReturnCommand || g_hasReturnCommand;
- QDictIterator<void> it(g_paramsFound);
- void *item;
- for (;(item=it.current());++it)
- {
- paramsFound.insert(it.currentKey(),it.current());
- }
- }
- g_copyStack.remove(def);
- ASSERT(g_styleStack.isEmpty());
- ASSERT(g_nodeStack.isEmpty());
- docParserPopContext(TRUE);
-
- g_hasParamCommand = hasParamCommand;
- g_hasReturnCommand = hasReturnCommand;
- g_paramsFound = paramsFound;
-
- //printf("..4 hasParamCommand=%d hasReturnCommand=%d paramsFound=%d\n",
- // g_hasParamCommand,g_hasReturnCommand,g_paramsFound.count());
- }
- else // oops, recursion
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"recursive call chain of \\copydoc commands detected at %d\n",
- doctokenizerYYlineno);
- }
- }
- else
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"target %s of \\copydoc command not found",
- qPrint(m_link));
- }
-}
-
-//---------------------------------------------------------------------------
-
DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
m_id(id), m_key(key), m_relPath(g_relPath)
{
diff --git a/src/docparser.h b/src/docparser.h
index ef01089..2cc607e 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -694,24 +694,6 @@ class DocIndexEntry : public DocNode
//-----------------------------------------------------------------------
-/** Node representing a copy of documentation block. */
-class DocCopy : public DocNode
-{
- public:
- DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails)
- : m_link(link),
- m_copyBrief(copyBrief), m_copyDetails(copyDetails) { m_parent = parent; }
- Kind kind() const { return Kind_Copy; }
- QCString link() const { return m_link; }
- void accept(DocVisitor * /*v*/) { /*CompAccept<DocCopy>::accept(this,v);*/ }
- void parse(QList<DocNode> &children);
-
- private:
- QCString m_link;
- bool m_copyBrief;
- bool m_copyDetails;
-};
-
/** Node representing an auto List */
class DocAutoList : public CompAccept<DocAutoList>
{
diff --git a/src/docvisitor.h b/src/docvisitor.h
index d2318c9..0a53595 100644
--- a/src/docvisitor.h
+++ b/src/docvisitor.h
@@ -79,7 +79,6 @@ class DocLinkedWord;
class DocParamSect;
class DocParamList;
class DocInternalRef;
-class DocCopy; // TODO: no longer generated => remove
class DocText;
class DocSimpleSectSep;
class DocHtmlBlockQuote;
@@ -187,8 +186,6 @@ class DocVisitor
virtual void visitPost(DocXRefItem *) = 0;
virtual void visitPre(DocInternalRef *) = 0;
virtual void visitPost(DocInternalRef *) = 0;
- virtual void visitPre(DocCopy *) = 0;
- virtual void visitPost(DocCopy *) = 0;
virtual void visitPre(DocText *) = 0;
virtual void visitPost(DocText *) = 0;
virtual void visitPre(DocHtmlBlockQuote *) = 0;
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index b7ddda1..22a0081 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -128,6 +128,7 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
if (p) // found PageBoundingBox or /MediaBox string
{
int x,y;
+ fclose(f);
if (sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height)!=4)
{
//printf("readBoundingBox sscanf fail\n");
@@ -137,6 +138,7 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
}
}
err("Failed to extract bounding box from generated diagram file %s\n",fileName);
+ fclose(f);
return FALSE;
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index c7fce01..85ed747 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -10146,7 +10146,7 @@ static void usage(const char *name)
msg(" RTF: %s -e rtf extensionsFile\n\n",name);
msg("7) Use doxygen to compare the used configuration file with the template configuration file\n");
msg(" %s -x [configFile]\n\n",name);
- msg("8) Use doxygen to show a list of build in emoji.\n");
+ msg("8) Use doxygen to show a list of built-in emojis.\n");
msg(" %s -f emoji outputFileName\n\n",name);
msg(" If - is used for outputFileName doxygen will write to standard output.\n\n");
msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n");
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 29298a1..05cdc42 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -2118,14 +2118,6 @@ void HtmlDocVisitor::visitPost(DocInternalRef *)
m_t << " ";
}
-void HtmlDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void HtmlDocVisitor::visitPost(DocCopy *)
-{
-}
-
void HtmlDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h
index 1c08c03..c994bac 100644
--- a/src/htmldocvisitor.h
+++ b/src/htmldocvisitor.h
@@ -127,8 +127,6 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index f960333..9652580 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -574,7 +574,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -1698,14 +1698,6 @@ void LatexDocVisitor::visitPost(DocInternalRef *ref)
endLink(0,ref->file(),ref->anchor());
}
-void LatexDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void LatexDocVisitor::visitPost(DocCopy *)
-{
-}
-
void LatexDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h
index 7ea8ae1..71fb5be 100644
--- a/src/latexdocvisitor.h
+++ b/src/latexdocvisitor.h
@@ -128,8 +128,6 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 6864e74..182583f 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1381,7 +1381,7 @@ void LatexGenerator::startHtmlLink(const char *url)
if (Config_getBool(PDF_HYPERLINKS))
{
t << "\\href{";
- t << url;
+ t << latexFilterURL(url);
t << "}";
}
t << "{\\texttt{ ";
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index e407642..b13f7e4 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -388,7 +388,7 @@ void ManDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -1028,14 +1028,6 @@ void ManDocVisitor::visitPost(DocInternalRef *)
m_t << "\\fP";
}
-void ManDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void ManDocVisitor::visitPost(DocCopy *)
-{
-}
-
void ManDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h
index 8efc223..fa65424 100644
--- a/src/mandocvisitor.h
+++ b/src/mandocvisitor.h
@@ -128,8 +128,6 @@ class ManDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 3813c56..7a804b1 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -388,8 +388,6 @@ public:
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
@@ -1385,14 +1383,6 @@ void PerlModDocVisitor::visitPost(DocInternalRef *)
closeItem();
}
-void PerlModDocVisitor::visitPre(DocCopy *)
-{
-}
-
-void PerlModDocVisitor::visitPost(DocCopy *)
-{
-}
-
void PerlModDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/pre.l b/src/pre.l
index ca2fe2b..6829a92 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1089,7 +1089,12 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
if (g_expandedDict->find(macroName)==0) // expand macro
{
Define *def=DefineManager::instance().isDefined(macroName);
- if (definedTest) // macro name was found after defined
+ if (macroName=="defined")
+ {
+ //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
+ definedTest=TRUE;
+ }
+ else if (definedTest) // macro name was found after defined
{
if (def) expMacro = " 1 "; else expMacro = " 0 ";
replaced=TRUE;
@@ -1118,11 +1123,6 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro);
len+=l;
}
- else if (macroName=="defined")
- {
- //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
- definedTest=TRUE;
- }
if (replaced) // expand the macro and rescan the expression
{
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 26bb3e7..b4997fd 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -676,16 +676,6 @@ class PrintDocVisitor : public DocVisitor
indent_post();
printf("</internalref>\n");
}
- void visitPre(DocCopy *c)
- {
- indent_pre();
- printf("<copy link=\"%s\">\n",c->link().data());
- }
- void visitPost(DocCopy *)
- {
- indent_post();
- printf("</copy>\n");
- }
void visitPre(DocText *)
{
indent_pre();
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 040375d..c4bcf24 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -551,7 +551,7 @@ void RTFDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -1657,18 +1657,6 @@ void RTFDocVisitor::visitPost(DocInternalRef *)
m_t << " ";
}
-void RTFDocVisitor::visitPre(DocCopy *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCopy)}\n");
-}
-
-void RTFDocVisitor::visitPost(DocCopy *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocCopy)}\n");
-}
-
void RTFDocVisitor::visitPre(DocText *)
{
if (m_hide) return;
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index b7cc3ea..82e4453 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -126,8 +126,6 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);
diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h
index bbc70e8..c4ba3d7 100644
--- a/src/textdocvisitor.h
+++ b/src/textdocvisitor.h
@@ -125,8 +125,6 @@ class TextDocVisitor : public DocVisitor
void visitPost(DocXRefItem *) {}
void visitPre(DocInternalRef *) {}
void visitPost(DocInternalRef *) {}
- void visitPre(DocCopy *) {}
- void visitPost(DocCopy *) {}
void visitPre(DocText *) {}
void visitPost(DocText *) {}
void visitPre(DocHtmlBlockQuote *) {}
diff --git a/src/util.cpp b/src/util.cpp
index e5b9c5c..bf02d7e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7082,6 +7082,7 @@ QCString latexFilterURL(const char *s)
switch (c)
{
case '#': t << "\\#"; break;
+ case '%': t << "\\%"; break;
default:
t << c;
break;
@@ -7417,20 +7418,16 @@ void addCodeOnlyMappings()
SrcLangExt getLanguageFromFileName(const QCString& fileName)
{
- int i = fileName.findRev('.');
- if (i!=-1) // name has an extension
- {
- QCString extStr=fileName.right(fileName.length()-i).lower();
- if (!extStr.isEmpty()) // non-empty extension
+ QFileInfo fi(fileName);
+ QCString extName = fi.extension().lower().data();
+ if (extName.isEmpty()) extName=".no_extension";
+ if (extName.at(0)!='.') extName.prepend(".");
+ int *pVal=g_extLookup.find(extName.data());
+ if (pVal) // listed extension
{
- int *pVal=g_extLookup.find(extStr);
- if (pVal) // listed extension
- {
- //printf("getLanguageFromFileName(%s)=%x\n",extStr.data(),*pVal);
- return (SrcLangExt)*pVal;
- }
+ //printf("getLanguageFromFileName(%s)=%x\n",fi.extension().data(),*pVal);
+ return (SrcLangExt)*pVal;
}
- }
//printf("getLanguageFromFileName(%s) not found!\n",fileName.data());
return SrcLangExt_Cpp; // not listed => assume C-ish language.
}
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 0f11315..c8d23a8 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -423,7 +423,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
popEnabled();
if (!m_hide)
{
- FileDef *fd;
+ FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
QFileInfo cfi( op->includeFileName() );
@@ -1080,18 +1080,6 @@ void XmlDocVisitor::visitPost(DocInternalRef *)
m_t << " ";
}
-void XmlDocVisitor::visitPre(DocCopy *c)
-{
- if (m_hide) return;
- m_t << "<copydoc link=\"" << convertToXML(c->link()) << "\">";
-}
-
-void XmlDocVisitor::visitPost(DocCopy *)
-{
- if (m_hide) return;
- m_t << "</copydoc>" << endl;
-}
-
void XmlDocVisitor::visitPre(DocText *)
{
}
diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h
index c2c6537..6fa1392 100644
--- a/src/xmldocvisitor.h
+++ b/src/xmldocvisitor.h
@@ -130,8 +130,6 @@ class XmlDocVisitor : public DocVisitor
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
- void visitPre(DocCopy *);
- void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
void visitPre(DocHtmlBlockQuote *);