summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-02-08 20:59:33 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-02-08 20:59:33 (GMT)
commitd5dec476be2805b7b82893dcb5c147473b6740c4 (patch)
tree267387c59c5c0c6c4623d616f7102d54600dfba9
parentb3ff521abec20509a917158bee82fff6d0931447 (diff)
downloadDoxygen-d5dec476be2805b7b82893dcb5c147473b6740c4.zip
Doxygen-d5dec476be2805b7b82893dcb5c147473b6740c4.tar.gz
Doxygen-d5dec476be2805b7b82893dcb5c147473b6740c4.tar.bz2
Release-1.6.2-20100208
-rw-r--r--INSTALL4
-rw-r--r--README4
-rwxr-xr-xconfigure2
-rw-r--r--src/code.l6
-rw-r--r--src/definition.cpp4
-rw-r--r--src/docsets.cpp103
-rw-r--r--src/doxygen.cpp39
-rw-r--r--src/htmldocvisitor.cpp25
-rw-r--r--src/index.cpp2
-rw-r--r--src/memberdef.cpp4
-rw-r--r--src/pagedef.cpp4
-rw-r--r--src/perlmodgen.cpp89
-rw-r--r--src/pre.l67
-rw-r--r--src/rtfgen.cpp4
-rw-r--r--src/scanner.l3
-rw-r--r--src/translator_hu.h2
-rw-r--r--src/util.cpp80
-rw-r--r--src/util.h7
18 files changed, 211 insertions, 238 deletions
diff --git a/INSTALL b/INSTALL
index 4e13d2a..1170423 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.6.2-20100124
+DOXYGEN Version 1.6.2-20100208
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (24 January 2010)
+Dimitri van Heesch (08 February 2010)
diff --git a/README b/README
index 985b527..758e5e7 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.6.2_20100124
+DOXYGEN Version 1.6.2_20100208
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) (24 January 2010)
+Dimitri van Heesch (dimitri@stack.nl) (08 February 2010)
diff --git a/configure b/configure
index 492d8eb..e4807ff 100755
--- a/configure
+++ b/configure
@@ -20,7 +20,7 @@ doxygen_version_minor=6
doxygen_version_revision=2
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
-doxygen_version_mmn=20100124
+doxygen_version_mmn=20100208
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
diff --git a/src/code.l b/src/code.l
index 877c2e7..2ad58de 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1938,6 +1938,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<SkipCPP>. {
g_code->codify(yytext);
}
+<SkipCPP>[^\n\/\\]+ {
+ g_code->codify(yytext);
+ }
<SkipCPP>\\[\r]?\n {
codifyLines(yytext);
}
@@ -3043,6 +3046,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
BEGIN(g_memCallContext);
}
<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment
+ if (YY_START==SkipCPP) REJECT;
if (Config_getBool("STRIP_CODE_COMMENTS"))
{
g_yyLineNr+=((QCString)yytext).contains('\n');
@@ -3147,7 +3151,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
}
}
<*>"//"[!/][^\n]*\n { // strip special one-line comment
- if (YY_START==SkipComment || YY_START==SkipString) REJECT;
+ if (YY_START==SkipComment || YY_START==SkipString || YY_START==SkipCPP) REJECT;
if (Config_getBool("STRIP_CODE_COMMENTS"))
{
char c[2]; c[0]='\n'; c[1]=0;
diff --git a/src/definition.cpp b/src/definition.cpp
index 2247df0..e714818 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -245,9 +245,7 @@ void Definition::addToMap(const char *name,Definition *d)
void Definition::removeFromMap(Definition *d)
{
- QCString symbolName = d->symbolName();
- int index=computeQualifiedIndex(symbolName);
- if (index!=-1) symbolName=symbolName.mid(index+2);
+ QString symbolName = d->m_symbolName;
if (!symbolName.isEmpty())
{
//printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d);
diff --git a/src/docsets.cpp b/src/docsets.cpp
index fce61e5..449ac1f 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -283,67 +283,66 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,
if (md)
{
- if (!md->isLinkable()) return; // internal symbol
if (context==0)
{
if (md->getGroupDef())
context = md->getGroupDef();
else if (md->getFileDef())
context = md->getFileDef();
- if (context==0) return; // should not happen
+ }
+ if (context==0) return; // should not happen
- switch (md->memberType())
- {
- case MemberDef::Define:
- type="macro"; break;
- case MemberDef::Function:
- if (cd && (cd->compoundType()==ClassDef::Interface ||
- cd->compoundType()==ClassDef::Class))
- {
- if (md->isStatic())
- type="clm"; // class member
- else
- type="instm"; // instance member
- }
- else if (cd && cd->compoundType()==ClassDef::Protocol)
- {
- if (md->isStatic())
- type="intfcm"; // interface class member
- else
- type="intfm"; // interface member
- }
+ switch (md->memberType())
+ {
+ case MemberDef::Define:
+ type="macro"; break;
+ case MemberDef::Function:
+ if (cd && (cd->compoundType()==ClassDef::Interface ||
+ cd->compoundType()==ClassDef::Class))
+ {
+ if (md->isStatic())
+ type="clm"; // class member
else
- type="func";
- break;
- case MemberDef::Variable:
- type="data"; break;
- case MemberDef::Typedef:
- type="tdef"; break;
- case MemberDef::Enumeration:
- type="enum"; break;
- case MemberDef::EnumValue:
- type="econst"; break;
- //case MemberDef::Prototype:
- // type="prototype"; break;
- case MemberDef::Signal:
- type="signal"; break;
- case MemberDef::Slot:
- type="slot"; break;
- case MemberDef::Friend:
- type="ffunc"; break;
- case MemberDef::DCOP:
- type="dcop"; break;
- case MemberDef::Property:
- if (cd && cd->compoundType()==ClassDef::Protocol)
- type="intfp"; // interface property
- else
- type="instp"; // instance property
- break;
- case MemberDef::Event:
- type="event"; break;
- }
- writeToken(m_tts,md,type,lang,scope,md->anchor());
+ type="instm"; // instance member
+ }
+ else if (cd && cd->compoundType()==ClassDef::Protocol)
+ {
+ if (md->isStatic())
+ type="intfcm"; // interface class member
+ else
+ type="intfm"; // interface member
+ }
+ else
+ type="func";
+ break;
+ case MemberDef::Variable:
+ type="data"; break;
+ case MemberDef::Typedef:
+ type="tdef"; break;
+ case MemberDef::Enumeration:
+ type="enum"; break;
+ case MemberDef::EnumValue:
+ type="econst"; break;
+ //case MemberDef::Prototype:
+ // type="prototype"; break;
+ case MemberDef::Signal:
+ type="signal"; break;
+ case MemberDef::Slot:
+ type="slot"; break;
+ case MemberDef::Friend:
+ type="ffunc"; break;
+ case MemberDef::DCOP:
+ type="dcop"; break;
+ case MemberDef::Property:
+ if (cd && cd->compoundType()==ClassDef::Protocol)
+ type="intfp"; // interface property
+ else
+ type="instp"; // instance property
+ break;
+ case MemberDef::Event:
+ type="event"; break;
}
+ writeToken(m_tts,md,type,lang,scope,md->anchor());
}
else if (context && context->isLinkable())
{
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 976412d..ff76488 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -8029,7 +8029,7 @@ static void buildExampleList(EntryNav *rootNav)
{
PageDef *pd=new PageDef(root->fileName,root->startLine,
root->name,root->brief+root->doc+root->inbodyDocs,root->args);
- pd->setFileName(convertNameToFile(pd->name()+"-example"));
+ pd->setFileName(convertNameToFile(pd->name()+"-example",TRUE,FALSE));
pd->addSectionsToDefinition(root->anchors);
//pi->addSections(root->anchors);
@@ -8420,37 +8420,6 @@ static void readTagFile(Entry *root,const char *tl)
}
//----------------------------------------------------------------------------
-// returns TRUE if the name of the file represented by `fi' matches
-// one of the file patterns in the `patList' list.
-
-static bool patternMatch(QFileInfo *fi,QStrList *patList)
-{
- bool found=FALSE;
- if (patList)
- {
- QCString pattern=patList->first();
- while (!pattern.isEmpty() && !found)
- {
- int i=pattern.find('=');
- if (i!=-1) pattern=pattern.left(i); // strip of the extension specific filter name
-
-#if defined(_WIN32) // windows
- QRegExp re(pattern,FALSE,TRUE); // case insensitive match
-#else // unix
- QRegExp re(pattern,TRUE,TRUE); // case sensitive match
-#endif
- found = found || re.match(fi->fileName())!=-1 ||
- re.match(fi->filePath())!=-1 ||
- re.match(fi->absFilePath())!=-1;
- //printf("Matching `%s' against pattern `%s' found=%d\n",
- // fi->fileName().data(),pattern.data(),found);
- pattern=patList->next();
- }
- }
- return found;
-}
-
-//----------------------------------------------------------------------------
static void copyStyleSheet()
{
QCString &htmlStyleSheet = Config_getString("HTML_STYLESHEET");
@@ -8659,8 +8628,8 @@ int readDir(QFileInfo *fi,
}
else if (cfi->isFile() &&
(!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
- (patList==0 || patternMatch(cfi,patList)) &&
- !patternMatch(cfi,exclPatList) &&
+ (patList==0 || patternMatch(*cfi,patList)) &&
+ !patternMatch(*cfi,exclPatList) &&
(killDict==0 || killDict->find(cfi->absFilePath())==0)
)
{
@@ -8695,7 +8664,7 @@ int readDir(QFileInfo *fi,
else if (recursive &&
(!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
cfi->isDir() && cfi->fileName()!="." &&
- !patternMatch(cfi,exclPatList) &&
+ !patternMatch(*cfi,exclPatList) &&
cfi->fileName()!="..")
{
cfi->setFile(cfi->absFilePath());
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index f30da98..0bd3620 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -1033,25 +1033,18 @@ void HtmlDocVisitor::visitPost(DocHtmlDescData *)
void HtmlDocVisitor::visitPre(DocHtmlTable *t)
{
if (m_hide) return;
- //bool hasBorder = FALSE;
- //bool hasCellSpacing = FALSE;
- //bool hasCellPadding = FALSE;
forceEndParagraph(t);
- //HtmlAttribListIterator li(t->attribs());
- //HtmlAttrib *att;
- //for (li.toFirst();(att=li.current());++li)
- //{
- // if (att->name=="border") hasBorder=TRUE;
- // else if (att->name=="cellspacing") hasCellSpacing=TRUE;
- // else if (att->name=="cellpadding") hasCellPadding=TRUE;
- //}
- m_t << "<table class=\"doxtable\"" << htmlAttribsToString(t->attribs());
- //if (!hasBorder) m_t << " border=\"1\"";
- //if (!hasCellSpacing) m_t << " cellspacing=\"3\"";
- //if (!hasCellPadding) m_t << " cellpadding=\"3\"";
- m_t << ">\n";
+ QString attrs = htmlAttribsToString(t->attribs());
+ if (attrs.isEmpty())
+ {
+ m_t << "<table class=\"doxtable\">\n";
+ }
+ else
+ {
+ m_t << "<table " << htmlAttribsToString(t->attribs()) << ">\n";
+ }
}
void HtmlDocVisitor::visitPost(DocHtmlTable *t)
diff --git a/src/index.cpp b/src/index.cpp
index 70143f0..1d3a7d1 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1203,7 +1203,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
int index = getPrefixIndex(cd->className());
- startLetter=toupper(cd->className().at(index));
+ startLetter=toupper(cd->className().at(index))&0xFF;
// Do some sorting again, since the classes are sorted by name with
// prefix, which should be ignored really.
classesByLetter[startLetter].inSort (cd);
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 9bf3c74..b861750 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -2687,12 +2687,12 @@ void MemberDef::addListReference(Definition *)
}
else if (optimizeOutputJava)
{
- if (!hideScopeNames) memName.prepend(pd->name()+".");
+ if (!hideScopeNames && pd!=Doxygen::globalScope) memName.prepend(pd->name()+".");
memArgs = argsString();
}
else
{
- if (!hideScopeNames) memName.prepend(pd->name()+"::");
+ if (!hideScopeNames && pd!=Doxygen::globalScope) memName.prepend(pd->name()+"::");
memArgs = argsString();
}
}
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 70fde22..3023ed8 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -71,7 +71,7 @@ void PageDef::writeDocumentation(OutputList &ol)
{
//outputList->disable(OutputGenerator::Man);
QCString pageName;
- pageName=escapeCharsInString(name(),FALSE);
+ pageName=escapeCharsInString(name(),FALSE,TRUE);
startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,TRUE);
@@ -114,7 +114,7 @@ void PageDef::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::RTF);
SectionInfo *si=0;
if (!title().isEmpty() && !name().isEmpty() &&
- (si=Doxygen::sectionDict.find(pageName))!=0)
+ (si=Doxygen::sectionDict.find(name()))!=0)
{
ol.startSection(si->label,si->title,si->type);
ol.parseDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index ce306bf..417cbf3 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -534,53 +534,59 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
const char *symbol = 0;
switch(sy->symbol())
{
- case DocSymbol::At: c = '@'; break;
- case DocSymbol::Less: c = '<'; break;
- case DocSymbol::Greater: c = '>'; break;
- case DocSymbol::Amp: c = '&'; break;
- case DocSymbol::Dollar: c = '$'; break;
- case DocSymbol::Hash: c = '#'; break;
- case DocSymbol::Percent: c = '%'; break;
- case DocSymbol::Quot: c = '"'; break;
- case DocSymbol::Lsquo: s = "\\\'"; break;
- case DocSymbol::Rsquo: s = "\\\'"; break;
- case DocSymbol::Ldquo: c = '"'; break;
- case DocSymbol::Rdquo: c = '"'; break;
- case DocSymbol::Ndash: c = '-'; break;
- case DocSymbol::Mdash: s = "--"; break;
- case DocSymbol::Nbsp: c = ' '; break;
- case DocSymbol::Uml: accent = "umlaut"; break;
- case DocSymbol::Acute: accent = "acute"; break;
- case DocSymbol::Grave: accent = "grave"; break;
- case DocSymbol::Circ: accent = "circ"; break;
- case DocSymbol::Slash: accent = "slash"; break;
- case DocSymbol::Tilde: accent = "tilde"; break;
- case DocSymbol::Cedil: accent = "cedilla"; break;
- case DocSymbol::Ring: accent = "ring"; break;
- case DocSymbol::BSlash: s = "\\\\"; break;
- case DocSymbol::Copy: symbol = "copyright"; break;
- case DocSymbol::Tm: symbol = "trademark"; break;
- case DocSymbol::Reg: symbol = "registered"; break;
- case DocSymbol::Szlig: symbol = "szlig"; break;
- case DocSymbol::Apos: s = "\\\'"; break;
- case DocSymbol::Aelig: symbol = "aelig"; break;
- case DocSymbol::AElig: symbol = "AElig"; break;
- case DocSymbol::Unknown:
- err("Error: unknown symbol found\n");
- break;
- }
- if (c != 0) {
+ case DocSymbol::At: c = '@'; break;
+ case DocSymbol::Less: c = '<'; break;
+ case DocSymbol::Greater: c = '>'; break;
+ case DocSymbol::Amp: c = '&'; break;
+ case DocSymbol::Dollar: c = '$'; break;
+ case DocSymbol::Hash: c = '#'; break;
+ case DocSymbol::Percent: c = '%'; break;
+ case DocSymbol::Quot: c = '"'; break;
+ case DocSymbol::Lsquo: s = "\\\'"; break;
+ case DocSymbol::Rsquo: s = "\\\'"; break;
+ case DocSymbol::Ldquo: c = '"'; break;
+ case DocSymbol::Rdquo: c = '"'; break;
+ case DocSymbol::Ndash: c = '-'; break;
+ case DocSymbol::Mdash: s = "--"; break;
+ case DocSymbol::Nbsp: c = ' '; break;
+ case DocSymbol::Uml: accent = "umlaut"; break;
+ case DocSymbol::Acute: accent = "acute"; break;
+ case DocSymbol::Grave: accent = "grave"; break;
+ case DocSymbol::Circ: accent = "circ"; break;
+ case DocSymbol::Slash: accent = "slash"; break;
+ case DocSymbol::Tilde: accent = "tilde"; break;
+ case DocSymbol::Cedil: accent = "cedilla"; break;
+ case DocSymbol::Ring: accent = "ring"; break;
+ case DocSymbol::BSlash: s = "\\\\"; break;
+ case DocSymbol::Copy: symbol = "copyright"; break;
+ case DocSymbol::Tm: symbol = "trademark"; break;
+ case DocSymbol::Reg: symbol = "registered"; break;
+ case DocSymbol::Szlig: symbol = "szlig"; break;
+ case DocSymbol::Apos: s = "\\\'"; break;
+ case DocSymbol::Aelig: symbol = "aelig"; break;
+ case DocSymbol::AElig: symbol = "AElig"; break;
+ case DocSymbol::Unknown: err("Error: unknown symbol found\n");
+ break;
+ }
+ if (c != 0)
+ {
enterText();
m_output.add(c);
- } else if (s != 0) {
+ }
+ else if (s != 0)
+ {
enterText();
m_output.add(s);
- } else if (symbol != 0) {
+ }
+ else if (symbol != 0)
+ {
leaveText();
openItem("symbol");
m_output.addFieldQuotedString("symbol", symbol);
closeItem();
- } else if (accent != 0) {
+ }
+ else if (accent != 0)
+ {
leaveText();
openItem("accent");
m_output
@@ -805,7 +811,7 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
case DocSimpleSect::Version: type = "version"; break;
case DocSimpleSect::Since: type = "since"; break;
case DocSimpleSect::Date: type = "date"; break;
- case DocSimpleSect::Note: type = "bug"; break;
+ case DocSimpleSect::Note: type = "note"; break;
case DocSimpleSect::Warning: type = "warning"; break;
case DocSimpleSect::Pre: type = "pre"; break;
case DocSimpleSect::Post: type = "post"; break;
@@ -818,6 +824,8 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
err("Error: unknown simple section found\n");
break;
}
+ leaveText();
+ m_output.openHash();
openOther();
openSubBlock(type);
}
@@ -826,6 +834,7 @@ void PerlModDocVisitor::visitPost(DocSimpleSect *)
{
closeSubBlock();
closeOther();
+ m_output.closeHash();
}
void PerlModDocVisitor::visitPre(DocTitle *)
diff --git a/src/pre.l b/src/pre.l
index 339965a..6ae01cb 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -195,6 +195,9 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude
QFileInfo fi(fileName);
if (fi.exists() && fi.isFile())
{
+ static QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
+ if (patternMatch(fi,&exclPatterns)) return 0;
+
QCString absName = convertToQCString(fi.absFilePath());
// global guard
@@ -243,41 +246,6 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude
fs->oldFileBuf = g_inputBuf;
fs->oldFileBufPos = g_inputBufPos;
}
-
-#if 0
- QCString filterName = getFileFilter(absName);
- if (!filterName.isEmpty())
- {
- fs->isPlainFile = FALSE;
- QCString cmd = filterName+" \""+absName+"\"";
- fs->filePtr=portable_popen(cmd,"r");
- if (!fs->filePtr)
- {
- err("Error: could not execute filter %s, reason: %s\n",cmd.data(),
- strerror(errno));
- }
- }
- else
- {
- fs->isPlainFile = TRUE;
- fs->filePtr=fopen(absName,"r");
- if (!fs->filePtr)
- {
- err("Error: could not open file %s for reading, reason: %s \n",
- absName.data(),strerror(errno));
- }
- }
- if (!fs->filePtr) // error -> cleanup
- {
- delete fs;
- fs=0;
- }
- else
- {
- fs->oldYYin = preYYin;
- }
-#endif
-
}
return fs;
}
@@ -1874,7 +1842,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<EndImport>. {
}
-<DefName>{ID}/"(" {
+<DefName>{ID}/"(" { // define with argument
//printf("Define() `%s'\n",yytext);
g_argDict = new QDict<int>(31);
g_argDict->setAutoDelete(TRUE);
@@ -1886,7 +1854,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defVarArgs = FALSE;
BEGIN(DefineArg);
}
-<DefName>{ID}/{B}* {
+<DefName>{ID}/{B}* { // define with content
//printf("Define `%s'\n",yytext);
g_argDict = 0;
g_defArgs = -1;
@@ -1895,13 +1863,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defLitText.resize(0);
g_defName = yytext;
g_defVarArgs = FALSE;
- QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
- outputArray(tmp.data(),tmp.length());
- g_quoteArg=FALSE;
- g_insideComment=FALSE;
- BEGIN(DefineText);
+ //QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
+ //outputArray(tmp.data(),tmp.length());
+ //g_quoteArg=FALSE;
+ //g_insideComment=FALSE;
+ //BEGIN(DefineText);
+ if ( g_defName!=g_lastGuardName || !g_expectGuard)
+ { // define may appear in the output
+ QCString tmp=(QCString)"#define "+g_defName;
+ outputArray(tmp.data(),tmp.length());
+ g_quoteArg=FALSE;
+ g_insideComment=FALSE;
+ BEGIN(DefineText);
+ }
+ else // define is a guard => hide
+ {
+ g_lastGuardName.resize(0);
+ BEGIN(Start);
+ }
}
-<DefName>{ID}/{B}*"\n" { // bare define
+<DefName>{ID}/{B}*"\n" { // empty define
g_argDict = 0;
g_defArgs = -1;
g_defName = yytext;
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index b2541a6..6ef321c 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -633,11 +633,11 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "\\par " << rtf_Style_Reset << endl;
if (fortranOpt)
{
- t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}"<< endl;
+ t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}" << endl;
}
else
{
- t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}"<< endl;
+ t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}" << endl;
}
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
diff --git a/src/scanner.l b/src/scanner.l
index eb1a064..038eb1b 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -3197,7 +3197,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
}
//printf("msName=%s current->name=%s\n",msName.data(),current->name.data());
- if (!msName.isEmpty() && msName!=current->name) // skip typedef T {} T;
+ if (!msName.isEmpty()
+ /*&& msName!=current->name*/) // skip typedef T {} T;, removed due to bug608493
{
static bool typedefHidesStruct = Config_getBool("TYPEDEF_HIDES_STRUCT");
// case 1: typedef struct _S { ... } S_t;
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 1ac045b..f33ae29 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -1185,7 +1185,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trRTFansicp()
{
- return "1252";
+ return "1250";
}
diff --git a/src/util.cpp b/src/util.cpp
index 7765805..0f7c17d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -2076,6 +2076,7 @@ QCString getFileFilter(const char* name)
return "";
}
+#if 0
QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding)
{
QCString inputEncoding = fromEncoding;
@@ -2112,6 +2113,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t
portable_iconv_close(cd);
return output;
}
+#endif
QCString transcodeCharacterStringToUTF8(const QCString &input)
@@ -4749,7 +4751,7 @@ bool hasVisibleRoot(BaseClassList *bcl)
//----------------------------------------------------------------------
-QCString escapeCharsInString(const char *name,bool allowDots)
+QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore)
{
static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
QCString result;
@@ -4759,7 +4761,7 @@ QCString escapeCharsInString(const char *name,bool allowDots)
{
switch(c)
{
- case '_': result+="__"; break;
+ case '_': if (allowUnderscore) result+="_"; else result+="__"; break;
case '-': result+="-"; break;
case ':': result+="_1"; break;
case '/': result+="_2"; break;
@@ -4813,7 +4815,7 @@ QCString escapeCharsInString(const char *name,bool allowDots)
* given its name, which could be a class name with template
* arguments, so special characters need to be escaped.
*/
-QCString convertNameToFile(const char *name,bool allowDots)
+QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
{
static bool shortNames = Config_getBool("SHORT_NAMES");
static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
@@ -4839,7 +4841,7 @@ QCString convertNameToFile(const char *name,bool allowDots)
}
else // long names
{
- result=escapeCharsInString(name,allowDots);
+ result=escapeCharsInString(name,allowDots,allowUnderscore);
int resultLen = result.length();
if (resultLen>=128) // prevent names that cannot be created!
{
@@ -5787,7 +5789,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
pd->setReference(tagInfo->tagName);
}
- pd->setFileName(convertNameToFile(pd->name()));
+ pd->setFileName(convertNameToFile(pd->name(),TRUE,FALSE));
//printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pd);
@@ -5856,28 +5858,6 @@ void addRefItem(const QList<ListItemInfo> *sli,
refList->insertIntoList(key,item);
-#if 0
-
- //printf("anchor=%s written=%d\n",item->listAnchor.data(),item->written);
- //if (item->written) return;
-
- QCString doc;
- doc = "\\anchor ";
- doc += item->listAnchor;
- doc += " <dl><dt>";
- doc += prefix;
- doc += " \\_internalref ";
- doc += name;
- doc += " \"";
- doc += title;
- doc += "\"";
- if (args) doc += args;
- doc += "</dt>\n<dd>";
- doc += item->text;
- doc += "</dd></dl>\n";
- addRelatedPage(refList->listName(),refList->pageTitle(),doc,0,refList->listName(),1,0,0,0);
- //item->written=TRUE;
-#endif
}
}
}
@@ -6843,7 +6823,7 @@ void stackTrace()
#endif
}
-static int transcodeCharacterBuffer(BufStr &srcBuf,int size,
+static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size,
const char *inputEncoding,const char *outputEncoding)
{
if (inputEncoding==0 || outputEncoding==0) return size;
@@ -6872,8 +6852,8 @@ static int transcodeCharacterBuffer(BufStr &srcBuf,int size,
}
else
{
- err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
- inputEncoding,outputEncoding);
+ err("%s: Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
+ fileName,inputEncoding,outputEncoding);
exit(1);
}
portable_iconv_close(cd);
@@ -6936,7 +6916,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf)
)
) // UCS-2 encoded file
{
- transcodeCharacterBuffer(inBuf,inBuf.curPos(),
+ transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
"UCS-2","UTF-8");
}
else if (inBuf.size()>=3 &&
@@ -6951,7 +6931,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf)
else // transcode according to the INPUT_ENCODING setting
{
// do character transcoding if needed.
- transcodeCharacterBuffer(inBuf,inBuf.curPos(),
+ transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
Config_getString("INPUT_ENCODING"),"UTF-8");
}
@@ -6986,3 +6966,39 @@ QCString filterTitle(const QCString &title)
return tf;
}
+//----------------------------------------------------------------------------
+// returns TRUE if the name of the file represented by `fi' matches
+// one of the file patterns in the `patList' list.
+
+bool patternMatch(const QFileInfo &fi,const QStrList *patList)
+{
+ bool found=FALSE;
+ if (patList)
+ {
+ QStrListIterator it(*patList);
+ QCString pattern;
+ for (it.toFirst();(pattern=it.current());++it)
+ {
+ if (!pattern.isEmpty() && !found)
+ {
+ int i=pattern.find('=');
+ if (i!=-1) pattern=pattern.left(i); // strip of the extension specific filter name
+
+#if defined(_WIN32) || defined(__MACOSX__) // Windows or MacOSX
+ QRegExp re(pattern,FALSE,TRUE); // case insensitive match
+#else // unix
+ QRegExp re(pattern,TRUE,TRUE); // case sensitive match
+#endif
+ found = found || re.match(fi.fileName())!=-1 ||
+ re.match(fi.filePath())!=-1 ||
+ re.match(fi.absFilePath())!=-1;
+ //printf("Matching `%s' against pattern `%s' found=%d\n",
+ // fi->fileName().data(),pattern.data(),found);
+ }
+ }
+ }
+ return found;
+}
+
+
+
diff --git a/src/util.h b/src/util.h
index 4f4f171..6b86afb 100644
--- a/src/util.h
+++ b/src/util.h
@@ -54,6 +54,8 @@ struct SectionInfo;
class QDir;
class Definition;
class BufStr;
+class QFileInfo;
+class QStrList;
//--------------------------------------------------------------------
@@ -234,7 +236,7 @@ bool hasVisibleRoot(BaseClassList *bcl);
int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level=0);
-QCString convertNameToFile(const char *name,bool allowDots=FALSE);
+QCString convertNameToFile(const char *name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName,
@@ -291,7 +293,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
TagInfo *tagInfo=0
);
-QCString escapeCharsInString(const char *name,bool allowDots);
+QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore=FALSE);
void addGroupListToTitle(OutputList &ol,Definition *d);
@@ -368,6 +370,7 @@ void stackTrace();
bool readInputFile(const char *fileName,BufStr &inBuf);
QCString filterTitle(const QCString &title);
+bool patternMatch(const QFileInfo &fi,const QStrList *patList);
#endif