Commit f22ba481 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.6.2-20100208

parent 3eb607c7
DOXYGEN Version 1.6.2-20100124 DOXYGEN Version 1.6.2-20100208
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (24 January 2010) Dimitri van Heesch (08 February 2010)
DOXYGEN Version 1.6.2_20100124 DOXYGEN Version 1.6.2_20100208
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (24 January 2010) Dimitri van Heesch (dimitri@stack.nl) (08 February 2010)
...@@ -20,7 +20,7 @@ doxygen_version_minor=6 ...@@ -20,7 +20,7 @@ doxygen_version_minor=6
doxygen_version_revision=2 doxygen_version_revision=2
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #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"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
...@@ -1938,6 +1938,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1938,6 +1938,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<SkipCPP>. { <SkipCPP>. {
g_code->codify(yytext); g_code->codify(yytext);
} }
<SkipCPP>[^\n\/\\]+ {
g_code->codify(yytext);
}
<SkipCPP>\\[\r]?\n { <SkipCPP>\\[\r]?\n {
codifyLines(yytext); codifyLines(yytext);
} }
...@@ -3043,6 +3046,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -3043,6 +3046,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
BEGIN(g_memCallContext); BEGIN(g_memCallContext);
} }
<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment <*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment
if (YY_START==SkipCPP) REJECT;
if (Config_getBool("STRIP_CODE_COMMENTS")) if (Config_getBool("STRIP_CODE_COMMENTS"))
{ {
g_yyLineNr+=((QCString)yytext).contains('\n'); g_yyLineNr+=((QCString)yytext).contains('\n');
...@@ -3147,7 +3151,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -3147,7 +3151,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
} }
} }
<*>"//"[!/][^\n]*\n { // strip special one-line comment <*>"//"[!/][^\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")) if (Config_getBool("STRIP_CODE_COMMENTS"))
{ {
char c[2]; c[0]='\n'; c[1]=0; char c[2]; c[0]='\n'; c[1]=0;
......
...@@ -245,9 +245,7 @@ void Definition::addToMap(const char *name,Definition *d) ...@@ -245,9 +245,7 @@ void Definition::addToMap(const char *name,Definition *d)
void Definition::removeFromMap(Definition *d) void Definition::removeFromMap(Definition *d)
{ {
QCString symbolName = d->symbolName(); QString symbolName = d->m_symbolName;
int index=computeQualifiedIndex(symbolName);
if (index!=-1) symbolName=symbolName.mid(index+2);
if (!symbolName.isEmpty()) if (!symbolName.isEmpty())
{ {
//printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d); //printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d);
......
...@@ -283,13 +283,13 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md, ...@@ -283,13 +283,13 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,
if (md) if (md)
{ {
if (!md->isLinkable()) return; // internal symbol
if (context==0) if (context==0)
{ {
if (md->getGroupDef()) if (md->getGroupDef())
context = md->getGroupDef(); context = md->getGroupDef();
else if (md->getFileDef()) else if (md->getFileDef())
context = md->getFileDef(); context = md->getFileDef();
}
if (context==0) return; // should not happen if (context==0) return; // should not happen
switch (md->memberType()) switch (md->memberType())
...@@ -344,7 +344,6 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md, ...@@ -344,7 +344,6 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,
} }
writeToken(m_tts,md,type,lang,scope,md->anchor()); writeToken(m_tts,md,type,lang,scope,md->anchor());
} }
}
else if (context && context->isLinkable()) else if (context && context->isLinkable())
{ {
if (fd==0 && context->definitionType()==Definition::TypeFile) if (fd==0 && context->definitionType()==Definition::TypeFile)
......
...@@ -8029,7 +8029,7 @@ static void buildExampleList(EntryNav *rootNav) ...@@ -8029,7 +8029,7 @@ static void buildExampleList(EntryNav *rootNav)
{ {
PageDef *pd=new PageDef(root->fileName,root->startLine, PageDef *pd=new PageDef(root->fileName,root->startLine,
root->name,root->brief+root->doc+root->inbodyDocs,root->args); 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); pd->addSectionsToDefinition(root->anchors);
//pi->addSections(root->anchors); //pi->addSections(root->anchors);
...@@ -8419,37 +8419,6 @@ static void readTagFile(Entry *root,const char *tl) ...@@ -8419,37 +8419,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() static void copyStyleSheet()
{ {
...@@ -8659,8 +8628,8 @@ int readDir(QFileInfo *fi, ...@@ -8659,8 +8628,8 @@ int readDir(QFileInfo *fi,
} }
else if (cfi->isFile() && else if (cfi->isFile() &&
(!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) && (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
(patList==0 || patternMatch(cfi,patList)) && (patList==0 || patternMatch(*cfi,patList)) &&
!patternMatch(cfi,exclPatList) && !patternMatch(*cfi,exclPatList) &&
(killDict==0 || killDict->find(cfi->absFilePath())==0) (killDict==0 || killDict->find(cfi->absFilePath())==0)
) )
{ {
...@@ -8695,7 +8664,7 @@ int readDir(QFileInfo *fi, ...@@ -8695,7 +8664,7 @@ int readDir(QFileInfo *fi,
else if (recursive && else if (recursive &&
(!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) && (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
cfi->isDir() && cfi->fileName()!="." && cfi->isDir() && cfi->fileName()!="." &&
!patternMatch(cfi,exclPatList) && !patternMatch(*cfi,exclPatList) &&
cfi->fileName()!="..") cfi->fileName()!="..")
{ {
cfi->setFile(cfi->absFilePath()); cfi->setFile(cfi->absFilePath());
......
...@@ -1033,25 +1033,18 @@ void HtmlDocVisitor::visitPost(DocHtmlDescData *) ...@@ -1033,25 +1033,18 @@ void HtmlDocVisitor::visitPost(DocHtmlDescData *)
void HtmlDocVisitor::visitPre(DocHtmlTable *t) void HtmlDocVisitor::visitPre(DocHtmlTable *t)
{ {
if (m_hide) return; if (m_hide) return;
//bool hasBorder = FALSE;
//bool hasCellSpacing = FALSE;
//bool hasCellPadding = FALSE;
forceEndParagraph(t); forceEndParagraph(t);
//HtmlAttribListIterator li(t->attribs()); QString attrs = htmlAttribsToString(t->attribs());
//HtmlAttrib *att; if (attrs.isEmpty())
//for (li.toFirst();(att=li.current());++li) {
//{ m_t << "<table class=\"doxtable\">\n";
// if (att->name=="border") hasBorder=TRUE; }
// else if (att->name=="cellspacing") hasCellSpacing=TRUE; else
// else if (att->name=="cellpadding") hasCellPadding=TRUE; {
//} m_t << "<table " << htmlAttribsToString(t->attribs()) << ">\n";
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";
} }
void HtmlDocVisitor::visitPost(DocHtmlTable *t) void HtmlDocVisitor::visitPost(DocHtmlTable *t)
......
...@@ -1203,7 +1203,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1203,7 +1203,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
int index = getPrefixIndex(cd->className()); 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 // Do some sorting again, since the classes are sorted by name with
// prefix, which should be ignored really. // prefix, which should be ignored really.
classesByLetter[startLetter].inSort (cd); classesByLetter[startLetter].inSort (cd);
......
...@@ -2687,12 +2687,12 @@ void MemberDef::addListReference(Definition *) ...@@ -2687,12 +2687,12 @@ void MemberDef::addListReference(Definition *)
} }
else if (optimizeOutputJava) else if (optimizeOutputJava)
{ {
if (!hideScopeNames) memName.prepend(pd->name()+"."); if (!hideScopeNames && pd!=Doxygen::globalScope) memName.prepend(pd->name()+".");
memArgs = argsString(); memArgs = argsString();
} }
else else
{ {
if (!hideScopeNames) memName.prepend(pd->name()+"::"); if (!hideScopeNames && pd!=Doxygen::globalScope) memName.prepend(pd->name()+"::");
memArgs = argsString(); memArgs = argsString();
} }
} }
......
...@@ -71,7 +71,7 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -71,7 +71,7 @@ void PageDef::writeDocumentation(OutputList &ol)
{ {
//outputList->disable(OutputGenerator::Man); //outputList->disable(OutputGenerator::Man);
QCString pageName; QCString pageName;
pageName=escapeCharsInString(name(),FALSE); pageName=escapeCharsInString(name(),FALSE,TRUE);
startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,TRUE); startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,TRUE);
...@@ -114,7 +114,7 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -114,7 +114,7 @@ void PageDef::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
SectionInfo *si=0; SectionInfo *si=0;
if (!title().isEmpty() && !name().isEmpty() && 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.startSection(si->label,si->title,si->type);
ol.parseDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); ol.parseDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
......
...@@ -565,22 +565,28 @@ void PerlModDocVisitor::visit(DocSymbol *sy) ...@@ -565,22 +565,28 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
case DocSymbol::Apos: s = "\\\'"; break; case DocSymbol::Apos: s = "\\\'"; break;
case DocSymbol::Aelig: symbol = "aelig"; break; case DocSymbol::Aelig: symbol = "aelig"; break;
case DocSymbol::AElig: symbol = "AElig"; break; case DocSymbol::AElig: symbol = "AElig"; break;
case DocSymbol::Unknown: case DocSymbol::Unknown: err("Error: unknown symbol found\n");
err("Error: unknown symbol found\n");
break; break;
} }
if (c != 0) { if (c != 0)
{
enterText(); enterText();
m_output.add(c); m_output.add(c);
} else if (s != 0) { }
else if (s != 0)
{
enterText(); enterText();
m_output.add(s); m_output.add(s);
} else if (symbol != 0) { }
else if (symbol != 0)
{
leaveText(); leaveText();
openItem("symbol"); openItem("symbol");
m_output.addFieldQuotedString("symbol", symbol); m_output.addFieldQuotedString("symbol", symbol);
closeItem(); closeItem();
} else if (accent != 0) { }
else if (accent != 0)
{
leaveText(); leaveText();
openItem("accent"); openItem("accent");
m_output m_output
...@@ -805,7 +811,7 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s) ...@@ -805,7 +811,7 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
case DocSimpleSect::Version: type = "version"; break; case DocSimpleSect::Version: type = "version"; break;
case DocSimpleSect::Since: type = "since"; break; case DocSimpleSect::Since: type = "since"; break;
case DocSimpleSect::Date: type = "date"; 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::Warning: type = "warning"; break;
case DocSimpleSect::Pre: type = "pre"; break; case DocSimpleSect::Pre: type = "pre"; break;
case DocSimpleSect::Post: type = "post"; break; case DocSimpleSect::Post: type = "post"; break;
...@@ -818,6 +824,8 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s) ...@@ -818,6 +824,8 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
err("Error: unknown simple section found\n"); err("Error: unknown simple section found\n");
break; break;
} }
leaveText();
m_output.openHash();
openOther(); openOther();
openSubBlock(type); openSubBlock(type);
} }
...@@ -826,6 +834,7 @@ void PerlModDocVisitor::visitPost(DocSimpleSect *) ...@@ -826,6 +834,7 @@ void PerlModDocVisitor::visitPost(DocSimpleSect *)
{ {
closeSubBlock(); closeSubBlock();
closeOther(); closeOther();
m_output.closeHash();
} }
void PerlModDocVisitor::visitPre(DocTitle *) void PerlModDocVisitor::visitPre(DocTitle *)
......
...@@ -195,6 +195,9 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude ...@@ -195,6 +195,9 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude
QFileInfo fi(fileName); QFileInfo fi(fileName);
if (fi.exists() && fi.isFile()) if (fi.exists() && fi.isFile())
{ {
static QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
if (patternMatch(fi,&exclPatterns)) return 0;
QCString absName = convertToQCString(fi.absFilePath()); QCString absName = convertToQCString(fi.absFilePath());
// global guard // global guard
...@@ -243,41 +246,6 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude ...@@ -243,41 +246,6 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude
fs->oldFileBuf = g_inputBuf; fs->oldFileBuf = g_inputBuf;
fs->oldFileBufPos = g_inputBufPos; 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; return fs;
} }
...@@ -1874,7 +1842,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1874,7 +1842,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<EndImport>. { <EndImport>. {
} }
<DefName>{ID}/"(" { <DefName>{ID}/"(" { // define with argument
//printf("Define() `%s'\n",yytext); //printf("Define() `%s'\n",yytext);
g_argDict = new QDict<int>(31); g_argDict = new QDict<int>(31);
g_argDict->setAutoDelete(TRUE); g_argDict->setAutoDelete(TRUE);
...@@ -1886,7 +1854,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1886,7 +1854,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defVarArgs = FALSE; g_defVarArgs = FALSE;
BEGIN(DefineArg); BEGIN(DefineArg);
} }
<DefName>{ID}/{B}* { <DefName>{ID}/{B}* { // define with content
//printf("Define `%s'\n",yytext); //printf("Define `%s'\n",yytext);
g_argDict = 0; g_argDict = 0;
g_defArgs = -1; g_defArgs = -1;
...@@ -1895,13 +1863,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1895,13 +1863,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defLitText.resize(0); g_defLitText.resize(0);
g_defName = yytext; g_defName = yytext;
g_defVarArgs = FALSE; g_defVarArgs = FALSE;
QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr; //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()); outputArray(tmp.data(),tmp.length());
g_quoteArg=FALSE; g_quoteArg=FALSE;
g_insideComment=FALSE; g_insideComment=FALSE;
BEGIN(DefineText); BEGIN(DefineText);
} }
<DefName>{ID}/{B}*"\n" { // bare define else // define is a guard => hide
{
g_lastGuardName.resize(0);
BEGIN(Start);
}
}
<DefName>{ID}/{B}*"\n" { // empty define
g_argDict = 0; g_argDict = 0;
g_defArgs = -1; g_defArgs = -1;
g_defName = yytext; g_defName = yytext;
......
...@@ -633,11 +633,11 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -633,11 +633,11 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "\\par " << rtf_Style_Reset << endl; t << "\\par " << rtf_Style_Reset << endl;
if (fortranOpt) if (fortranOpt)
{ {
t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}" << endl;
} }
else else
{ {
t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}" << endl;
} }
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
......
...@@ -3197,7 +3197,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -3197,7 +3197,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
} }
} }
//printf("msName=%s current->name=%s\n",msName.data(),current->name.data()); //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"); static bool typedefHidesStruct = Config_getBool("TYPEDEF_HIDES_STRUCT");
// case 1: typedef struct _S { ... } S_t; // case 1: typedef struct _S { ... } S_t;
......
...@@ -1185,7 +1185,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6 ...@@ -1185,7 +1185,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/ */
virtual QCString trRTFansicp() virtual QCString trRTFansicp()
{ {
return "1252"; return "1250";
} }
......
...@@ -2076,6 +2076,7 @@ QCString getFileFilter(const char* name) ...@@ -2076,6 +2076,7 @@ QCString getFileFilter(const char* name)
return ""; return "";
} }
#if 0
QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding) QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding)
{ {
QCString inputEncoding = fromEncoding; QCString inputEncoding = fromEncoding;
...@@ -2112,6 +2113,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t ...@@ -2112,6 +2113,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t
portable_iconv_close(cd); portable_iconv_close(cd);
return output; return output;
} }
#endif
QCString transcodeCharacterStringToUTF8(const QCString &input) QCString transcodeCharacterStringToUTF8(const QCString &input)
...@@ -4749,7 +4751,7 @@ bool hasVisibleRoot(BaseClassList *bcl) ...@@ -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"); static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
QCString result; QCString result;
...@@ -4759,7 +4761,7 @@ QCString escapeCharsInString(const char *name,bool allowDots) ...@@ -4759,7 +4761,7 @@ QCString escapeCharsInString(const char *name,bool allowDots)
{ {
switch(c) switch(c)
{ {
case '_': result+="__"; break; case '_': if (allowUnderscore) result+="_"; else result+="__"; break;
case '-': result+="-"; break; case '-': result+="-"; break;
case ':': result+="_1"; break; case ':': result+="_1"; break;
case '/': result+="_2"; break; case '/': result+="_2"; break;
...@@ -4813,7 +4815,7 @@ QCString escapeCharsInString(const char *name,bool allowDots) ...@@ -4813,7 +4815,7 @@ QCString escapeCharsInString(const char *name,bool allowDots)
* given its name, which could be a class name with template * given its name, which could be a class name with template
* arguments, so special characters need to be escaped. * 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 shortNames = Config_getBool("SHORT_NAMES");
static bool createSubdirs = Config_getBool("CREATE_SUBDIRS"); static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
...@@ -4839,7 +4841,7 @@ QCString convertNameToFile(const char *name,bool allowDots) ...@@ -4839,7 +4841,7 @@ QCString convertNameToFile(const char *name,bool allowDots)
} }
else // long names else // long names
{ {
result=escapeCharsInString(name,allowDots); result=escapeCharsInString(name,allowDots,allowUnderscore);
int resultLen = result.length(); int resultLen = result.length();
if (resultLen>=128) // prevent names that cannot be created! if (resultLen>=128) // prevent names that cannot be created!
{ {
...@@ -5787,7 +5789,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -5787,7 +5789,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
pd->setReference(tagInfo->tagName); pd->setReference(tagInfo->tagName);
} }
pd->setFileName(convertNameToFile(pd->name())); pd->setFileName(convertNameToFile(pd->name(),TRUE,FALSE));
//printf("Appending page `%s'\n",baseName.data()); //printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pd); Doxygen::pageSDict->append(baseName,pd);
...@@ -5856,28 +5858,6 @@ void addRefItem(const QList<ListItemInfo> *sli, ...@@ -5856,28 +5858,6 @@ void addRefItem(const QList<ListItemInfo> *sli,
refList->insertIntoList(key,item); 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() ...@@ -6843,7 +6823,7 @@ void stackTrace()
#endif #endif
} }
static int transcodeCharacterBuffer(BufStr &srcBuf,int size, static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size,
const char *inputEncoding,const char *outputEncoding) const char *inputEncoding,const char *outputEncoding)
{ {
if (inputEncoding==0 || outputEncoding==0) return size; if (inputEncoding==0 || outputEncoding==0) return size;
...@@ -6872,8 +6852,8 @@ static int transcodeCharacterBuffer(BufStr &srcBuf,int size, ...@@ -6872,8 +6852,8 @@ static int transcodeCharacterBuffer(BufStr &srcBuf,int size,
} }
else else
{ {
err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n", err("%s: Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
inputEncoding,outputEncoding); fileName,inputEncoding,outputEncoding);
exit(1); exit(1);
} }
portable_iconv_close(cd); portable_iconv_close(cd);
...@@ -6936,7 +6916,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf) ...@@ -6936,7 +6916,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf)
) )
) // UCS-2 encoded file ) // UCS-2 encoded file
{ {
transcodeCharacterBuffer(inBuf,inBuf.curPos(), transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
"UCS-2","UTF-8"); "UCS-2","UTF-8");
} }
else if (inBuf.size()>=3 && else if (inBuf.size()>=3 &&
...@@ -6951,7 +6931,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf) ...@@ -6951,7 +6931,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf)
else // transcode according to the INPUT_ENCODING setting else // transcode according to the INPUT_ENCODING setting
{ {
// do character transcoding if needed. // do character transcoding if needed.
transcodeCharacterBuffer(inBuf,inBuf.curPos(), transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
Config_getString("INPUT_ENCODING"),"UTF-8"); Config_getString("INPUT_ENCODING"),"UTF-8");
} }
...@@ -6986,3 +6966,39 @@ QCString filterTitle(const QCString &title) ...@@ -6986,3 +6966,39 @@ QCString filterTitle(const QCString &title)
return tf; 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;
}
...@@ -54,6 +54,8 @@ struct SectionInfo; ...@@ -54,6 +54,8 @@ struct SectionInfo;
class QDir; class QDir;
class Definition; class Definition;
class BufStr; class BufStr;
class QFileInfo;
class QStrList;
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -234,7 +236,7 @@ bool hasVisibleRoot(BaseClassList *bcl); ...@@ -234,7 +236,7 @@ bool hasVisibleRoot(BaseClassList *bcl);
int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level=0); 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, void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName, QCString &className,QCString &namespaceName,
...@@ -291,7 +293,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -291,7 +293,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
TagInfo *tagInfo=0 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); void addGroupListToTitle(OutputList &ol,Definition *d);
...@@ -368,6 +370,7 @@ void stackTrace(); ...@@ -368,6 +370,7 @@ void stackTrace();
bool readInputFile(const char *fileName,BufStr &inBuf); bool readInputFile(const char *fileName,BufStr &inBuf);
QCString filterTitle(const QCString &title); QCString filterTitle(const QCString &title);
bool patternMatch(const QFileInfo &fi,const QStrList *patList);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment