Commit 670c8a43 authored by dimitri's avatar dimitri

Release-1.3.9.1-20041028

parent 161d3860
...@@ -4,4 +4,4 @@ Please read the installation section of the manual ...@@ -4,4 +4,4 @@ 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 (10 October 2004) Dimitri van Heesch (28 October 2004)
...@@ -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) (10 October 2004) Dimitri van Heesch (dimitri@stack.nl) (28 October 2004)
...@@ -216,17 +216,20 @@ Step2::Step2(QWidget *parent) : QWidget(parent,"Step2") ...@@ -216,17 +216,20 @@ Step2::Step2(QWidget *parent) : QWidget(parent,"Step2")
bool Step2::crossReferencingEnabled() const bool Step2::crossReferencingEnabled() const
{ {
//printf("Step2::crossReferencingEnabled()=%d\n",m_crossRef->isOn());
return m_crossRef->isOn(); return m_crossRef->isOn();
} }
void Step2::enableCrossReferencing() void Step2::enableCrossReferencing()
{ {
//printf("Step2::enableCrossReferencing()\n");
m_crossRef->setChecked(TRUE); m_crossRef->setChecked(TRUE);
} }
bool Step2::extractAll() const bool Step2::extractAll() const
{ {
return m_extractMode->selectedId()==1; //printf("Step2::extractAll()=%d\n",m_extractMode->find(1)->isOn());
return m_extractMode->find(1)->isOn();
} }
bool Step2::crossReferencing() const bool Step2::crossReferencing() const
...@@ -247,11 +250,13 @@ OptLang Step2::optimizeFor() const ...@@ -247,11 +250,13 @@ OptLang Step2::optimizeFor() const
void Step2::setExtractAll(bool enable) void Step2::setExtractAll(bool enable)
{ {
//printf("Step2::setExtractAll(%d)\n",enable);
m_extractMode->setButton(enable?1:0); m_extractMode->setButton(enable?1:0);
} }
void Step2::setCrossReferencing(bool enable) void Step2::setCrossReferencing(bool enable)
{ {
//printf("Step2::setCrossReferencing(%d)\n",enable);
m_crossRef->setChecked(enable); m_crossRef->setChecked(enable);
} }
...@@ -374,12 +379,19 @@ bool Step3::searchEnabled() const ...@@ -374,12 +379,19 @@ bool Step3::searchEnabled() const
HtmlStyle Step3::htmlStyle() const HtmlStyle Step3::htmlStyle() const
{ {
switch (m_htmlOptions->selectedId()) if (m_htmlOptions->find(0)->isOn())
{ {
case 0: return HS_Plain; return HS_Plain;
case 1: return HS_TreeView;
case 2: return HS_CHM;
} }
else if (m_htmlOptions->find(1)->isOn())
{
return HS_TreeView;
}
else if (m_htmlOptions->find(2)->isOn())
{
return HS_CHM;
}
// broken radio button logic
return HS_Plain; return HS_Plain;
} }
......
...@@ -210,7 +210,7 @@ If you don't mind spending some time on it, there are several options: ...@@ -210,7 +210,7 @@ If you don't mind spending some time on it, there are several options:
<li><b>Help! I get the cryptic message <li><b>Help! I get the cryptic message
"input buffer overflow, can't enlarge buffer because scanner uses REJECT"</b> "input buffer overflow, can't enlarge buffer because scanner uses REJECT"</b>
This error happens when doxygen lexical scanner has a rule that matches This error happens when doxygen's lexical scanner has a rule that matches
more than 256K of input characters in one go. I've seen this happening more than 256K of input characters in one go. I've seen this happening
on a very large generated file (\>256K lines), where the built-in preprocessor on a very large generated file (\>256K lines), where the built-in preprocessor
converted it into an empty file (with \>256K of newlines). Another case converted it into an empty file (with \>256K of newlines). Another case
......
...@@ -760,11 +760,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, ...@@ -760,11 +760,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{ {
cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md); cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md);
} }
//printf("is not found as a variable %s\n",cd?cd->name().data():"<null>"); //printf("is found as a type %s\n",cd?cd->name().data():"<null>");
} }
else else
{ {
if (lcd!=VariableContext::dummyContext) g_theCallContext.setClass(lcd); if (lcd!=VariableContext::dummyContext)
{
g_theCallContext.setClass(lcd);
}
//fprintf(stderr,"is a local variable!\n"); //fprintf(stderr,"is a local variable!\n");
} }
if (cd && cd->isLinkable()) // is it a linkable class if (cd && cd->isLinkable()) // is it a linkable class
...@@ -802,6 +805,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, ...@@ -802,6 +805,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{ {
if (md==0) // not found as a typedef if (md==0) // not found as a typedef
{ {
//printf("setCallContextForVar(%s)\n",clName);
md = setCallContextForVar(clName); md = setCallContextForVar(clName);
if (md && g_currentDefinition) if (md && g_currentDefinition)
{ {
...@@ -820,10 +824,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, ...@@ -820,10 +824,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
if (md) if (md)
{ {
//printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>"); //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>");
//Definition *d = md->getOuterScope()==Doxygen::globalScope ?
// md->getBodyDef() : md->getOuterScope();
//printf("definition %s\n",d?d->name().data():"<none>");
//if (md->getGroupDef()) d = md->getGroupDef();
if (md->isLinkable()) if (md->isLinkable())
{ {
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName); writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName);
...@@ -1085,6 +1085,7 @@ static void generateFunctionLink(BaseCodeDocInterface &ol,char *funcName) ...@@ -1085,6 +1085,7 @@ static void generateFunctionLink(BaseCodeDocInterface &ol,char *funcName)
ClassDef *ccd=0; ClassDef *ccd=0;
QCString locScope=g_classScope.copy(); QCString locScope=g_classScope.copy();
QCString locFunc=removeRedundantWhiteSpace(funcName); QCString locFunc=removeRedundantWhiteSpace(funcName);
//fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
int i=locFunc.findRev("::"); int i=locFunc.findRev("::");
if (i>0) if (i>0)
{ {
...@@ -1493,7 +1494,11 @@ KEYWORD ("asm"|"auto"|"class"|"const"|"const_cast"|"delete"|"dynamic_cast"|"enum ...@@ -1493,7 +1494,11 @@ KEYWORD ("asm"|"auto"|"class"|"const"|"const_cast"|"delete"|"dynamic_cast"|"enum
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"for"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while") FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"for"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"boolean"|"id"|"SEL") TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"boolean"|"id"|"SEL")
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
BITOP "&"|"|"|"^"|"<<"|">>"|"~"
OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
%option noyywrap %option noyywrap
%x SkipString %x SkipString
...@@ -1827,7 +1832,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -1827,7 +1832,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_code->codify(yytext); g_code->codify(yytext);
g_curlyCount++; g_curlyCount++;
g_inClass=TRUE; g_inClass=TRUE;
if (YY_START==ClassVar) if (YY_START==ClassVar && g_curClassName.isEmpty())
{ {
g_curClassName = g_name.copy(); g_curClassName = g_name.copy();
} }
...@@ -1841,9 +1846,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -1841,9 +1846,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
{ {
g_scopeStack.push(CLASSBLOCK); g_scopeStack.push(CLASSBLOCK);
pushScope(g_curClassName); pushScope(g_curClassName);
//printf("***** g_curClassName=%s\n",g_curClassName.data()); //fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data());
if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0) if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0)
{ {
//printf("Adding new class %s\n",g_curClassName.data());
ClassDef *ncd=new ClassDef("<code>",1, ClassDef *ncd=new ClassDef("<code>",1,
g_curClassName,ClassDef::Class,0,0,FALSE); g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict.append(g_curClassName,ncd); g_codeClassSDict.append(g_curClassName,ncd);
...@@ -1981,6 +1987,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -1981,6 +1987,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
g_name.resize(0);g_type.resize(0); g_name.resize(0);g_type.resize(0);
BEGIN(FuncCall);
} }
<Body>[\\|\)\+\-\/\%\~\!] { <Body>[\\|\)\+\-\/\%\~\!] {
g_code->codify(yytext); g_code->codify(yytext);
...@@ -2027,7 +2034,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2027,7 +2034,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_name+=yytext; g_name+=yytext;
} }
<Body>{SCOPENAME}/{B}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" <Body>{SCOPENAME}/{B}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
generateClassOrGlobalLink(*g_code,yytext,TRUE); generateClassOrGlobalLink(*g_code,yytext/*,TRUE*/);
addType(); addType();
g_name+=yytext; g_name+=yytext;
} }
...@@ -2382,9 +2389,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2382,9 +2389,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_theVarContext.pushScope(); g_theVarContext.pushScope();
} }
} }
<MemberCall2,FuncCall>{OPERATOR} { // operator
g_code->codify(yytext);
g_parmType.resize(0);g_parmName.resize(0);
}
<MemberCall2,FuncCall>")" { <MemberCall2,FuncCall>")" {
g_theVarContext.addVariable(g_parmType,g_parmName); g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope(); g_theCallContext.popScope();
g_theCallContext.setClass(0);
g_code->codify(yytext); g_code->codify(yytext);
if (--g_bracketCount<=0) if (--g_bracketCount<=0)
{ {
...@@ -2404,8 +2416,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2404,8 +2416,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_theVarContext.addVariable(g_type,g_name); g_theVarContext.addVariable(g_type,g_name);
} }
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
g_theCallContext.popScope(); //g_theCallContext.popScope();
g_theCallContext.setClass(0); //g_theCallContext.setClass(0);
if (*yytext==';' || g_insideBody) if (*yytext==';' || g_insideBody)
{ {
if (!g_insideBody) if (!g_insideBody)
...@@ -2432,7 +2444,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2432,7 +2444,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_theVarContext.pushScope(); g_theVarContext.pushScope();
} }
g_theVarContext.addVariable(g_parmType,g_parmName); g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope(); //g_theCallContext.popScope();
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
int index = g_name.findRev("::"); int index = g_name.findRev("::");
if (index!=-1) if (index!=-1)
...@@ -2540,7 +2552,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2540,7 +2552,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
generateFunctionLink(*g_code,yytext); generateFunctionLink(*g_code,yytext);
} }
<FuncCall>([a-z_A-Z][a-z_A-Z0-9]*)/("."|"->") { <FuncCall>([a-z_A-Z][a-z_A-Z0-9]*)/("."|"->") {
//g_code->codify(yytext);
g_name=yytext; g_name=yytext;
generateClassOrGlobalLink(*g_code,yytext); generateClassOrGlobalLink(*g_code,yytext);
BEGIN( MemberCall2 ); BEGIN( MemberCall2 );
......
This diff is collapsed.
...@@ -29,6 +29,8 @@ class ClassSDict; ...@@ -29,6 +29,8 @@ class ClassSDict;
class QStrList; class QStrList;
class FileDef; class FileDef;
class OutputList; class OutputList;
class UsedDir;
class QTextStream;
class DirDef; class DirDef;
...@@ -43,6 +45,8 @@ class DirDef : public Definition ...@@ -43,6 +45,8 @@ class DirDef : public Definition
public: public:
DirDef(const char *path); DirDef(const char *path);
virtual ~DirDef(); virtual ~DirDef();
// accessors
virtual DefType definitionType() { return TypeDir; } virtual DefType definitionType() { return TypeDir; }
virtual QCString getOutputFileBase() const; virtual QCString getOutputFileBase() const;
virtual bool isLinkableInProject() const { return !isReference() && hasDocumentation(); } virtual bool isLinkableInProject() const { return !isReference() && hasDocumentation(); }
...@@ -53,19 +57,30 @@ class DirDef : public Definition ...@@ -53,19 +57,30 @@ class DirDef : public Definition
FileList * getFiles() const { return m_fileList; } FileList * getFiles() const { return m_fileList; }
ClassSDict * getClasses() const { return m_classSDict; } ClassSDict * getClasses() const { return m_classSDict; }
void addFile(FileDef *fd); void addFile(FileDef *fd);
const QList<DirDef> &subDirs() const { return m_subdirs; }
bool isCluster() const { return m_subdirs.count()>0; }
int level() const { return m_level; }
DirDef *parent() const { return m_parent; }
const QDict<UsedDir> *usedDirs() const { return m_usedDirs; }
bool isParentOf(DirDef *dir) const;
// generate output
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeNavigationPath(OutputList &ol); void writeNavigationPath(OutputList &ol);
const QList<DirDef> &subDirs() const { return m_subdirs; } void writeDepGraph(QTextStream &t);
static DirDef *mergeDirectoryInTree(const QCString &path); static DirDef *mergeDirectoryInTree(const QCString &path);
bool visited; bool visited;
private: private:
friend void computeDirDependencies();
void writePathFragment(OutputList &ol); void writePathFragment(OutputList &ol);
void setLevel();
static DirDef *createNewDir(const char *path); static DirDef *createNewDir(const char *path);
static bool matchPath(const QCString &path,QStrList &l); static bool matchPath(const QCString &path,QStrList &l);
void addUsesDependency(DirDef *usedDir,FileDef *fd,bool inherited);
void computeDependencies();
DirList m_subdirs; DirList m_subdirs;
QCString m_dispName; QCString m_dispName;
...@@ -73,6 +88,26 @@ class DirDef : public Definition ...@@ -73,6 +88,26 @@ class DirDef : public Definition
FileList *m_fileList; // list of files in the group FileList *m_fileList; // list of files in the group
ClassSDict *m_classSDict; // list of classes in the group ClassSDict *m_classSDict; // list of classes in the group
int m_dirCount; int m_dirCount;
int m_level;
DirDef *m_parent;
QDict<UsedDir> *m_usedDirs;
};
class UsedDir
{
public:
UsedDir(DirDef *dir,bool inherited);
virtual ~UsedDir();
void addFile(FileDef *fd);
FileDef *findFile(const char *name);
const QDict<FileDef> &files() const { return m_files; }
const DirDef *dir() const { return m_dir; }
bool inherited() const { return m_inherited; }
private:
DirDef *m_dir;
QDict<FileDef> m_files;
bool m_inherited;
}; };
inline int DirList::compareItems(GCI item1,GCI item2) inline int DirList::compareItems(GCI item1,GCI item2)
...@@ -93,5 +128,7 @@ class DirSDict : public SDict<DirDef> ...@@ -93,5 +128,7 @@ class DirSDict : public SDict<DirDef>
void buildDirectories(); void buildDirectories();
void generateDirDocs(OutputList &ol); void generateDirDocs(OutputList &ol);
void computeDirDependencies();
void writeDirDependencyGraph(const char *file);
#endif #endif
...@@ -297,7 +297,7 @@ SCOPESEP "::"|"#"|"." ...@@ -297,7 +297,7 @@ SCOPESEP "::"|"#"|"."
SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP} SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP}
SCOPEKEYS ":"({ID}":")* SCOPEKEYS ":"({ID}":")*
SCOPECPP {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")? SCOPECPP {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")?
SCOPEOBJC {ID}{SCOPEKEYS}? SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
SCOPEMASK {SCOPECPP}|{SCOPEOBJC} SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
FUNCARG "("{FUNCCHAR}*")" FUNCARG "("{FUNCCHAR}*")"
OPNEW {BLANK}+"new"({BLANK}*"[]")? OPNEW {BLANK}+"new"({BLANK}*"[]")?
......
...@@ -2338,30 +2338,8 @@ bool DotCallGraph::isTrivial() const ...@@ -2338,30 +2338,8 @@ bool DotCallGraph::isTrivial() const
//------------------------------------------------------------- //-------------------------------------------------------------
DotDirDeps::DotDirDeps(DirDef *dd) DotDirDeps::DotDirDeps(DirDef *)
{ {
FileList *fl = dd->getFiles();
if (fl)
{
QListIterator<FileDef> fli(*fl);
FileDef *fd;
for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd
{
QList<IncludeInfo> *ifl = fd->includeFileList();
if (ifl)
{
QListIterator<IncludeInfo> ifli(*ifl);
IncludeInfo *ii;
for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file
{
if (ii->fileDef)
{
// add dependency
}
}
}
}
}
} }
DotDirDeps::~DotDirDeps() DotDirDeps::~DotDirDeps()
......
...@@ -1222,20 +1222,26 @@ static void findUsingDeclarations(Entry *root) ...@@ -1222,20 +1222,26 @@ static void findUsingDeclarations(Entry *root)
// with the most inner scope and going to the most outer scope (i.e. // with the most inner scope and going to the most outer scope (i.e.
// file scope). // file scope).
QCString name = substitute(root->name,".","::");
MemberDef *mtd=0; MemberDef *mtd=0;
usingCd = getResolvedClass(nd,fd,root->name,&mtd); usingCd = getResolvedClass(nd,fd,name,&mtd);
//printf("%s -> %p\n",root->name.data(),usingCd); //printf("%s -> %p\n",root->name.data(),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class if (usingCd==0) // definition not in the input => add an artificial class
{ {
Debug::print(Debug::Classes,0," New using class `%s' (sec=0x%08x)! #tArgLists=%d\n", Debug::print(Debug::Classes,0," New using class `%s' (sec=0x%08x)! #tArgLists=%d\n",
root->name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
usingCd = new ClassDef( usingCd = new ClassDef(
"<using>",1, "<using>",1,
root->name,ClassDef::Class); root->name,ClassDef::Class);
Doxygen::hiddenClasses.append(root->name,usingCd); Doxygen::hiddenClasses.append(root->name,usingCd);
usingCd->setClassIsArtificial(); usingCd->setClassIsArtificial();
} }
else
{
Debug::print(Debug::Classes,0," Found used class %s in scope=%s\n",
usingCd->name().data(),nd?nd->name().data():fd->name().data());
}
if (mtd) // add the typedef to the correct scope if (mtd) // add the typedef to the correct scope
{ {
...@@ -8344,6 +8350,10 @@ void parseInput() ...@@ -8344,6 +8350,10 @@ void parseInput()
buildClassDocList(root); buildClassDocList(root);
resolveClassNestingRelations(); resolveClassNestingRelations();
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(root);
findUsingDeclarations(root);
msg("Building example list...\n"); msg("Building example list...\n");
buildExampleList(root); buildExampleList(root);
...@@ -8379,10 +8389,6 @@ void parseInput() ...@@ -8379,10 +8389,6 @@ void parseInput()
findEnums(root); findEnums(root);
findEnumDocumentation(root); findEnumDocumentation(root);
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(root);
findUsingDeclarations(root);
msg("Searching for member function documentation...\n"); msg("Searching for member function documentation...\n");
findObjCMethodDefinitions(root); findObjCMethodDefinitions(root);
findMemberDocumentation(root); // may introduce new members ! findMemberDocumentation(root); // may introduce new members !
...@@ -8442,6 +8448,8 @@ void parseInput() ...@@ -8442,6 +8448,8 @@ void parseInput()
msg("Adding todo/test/bug list items...\n"); msg("Adding todo/test/bug list items...\n");
addListReferences(); addListReferences();
msg("Computing dependencies between directories...\n");
computeDirDependencies();
} }
void generateOutput() void generateOutput()
...@@ -8640,8 +8648,7 @@ void generateOutput() ...@@ -8640,8 +8648,7 @@ void generateOutput()
writeGraphInfo(*outputList); writeGraphInfo(*outputList);
} }
//msg("Generating search index...\n"); //writeDirDependencyGraph(Config_getString("HTML_OUTPUT"));
//generateSearchIndex();
if (Config_getBool("GENERATE_RTF")) if (Config_getBool("GENERATE_RTF"))
{ {
...@@ -8664,15 +8671,6 @@ void generateOutput() ...@@ -8664,15 +8671,6 @@ void generateOutput()
Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT")); Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT"));
} }
// This is confusing people, so I removed it
//if (Config_getBool("SEARCHENGINE") || Config_getList("TAGFILES").count()>0)
//{
// msg("\nNow copy the file\n\n %s\n\nto the directory where the CGI binaries are "
// "located and don't forget to run\n\n",(Config_getString("HTML_OUTPUT")+"/"+Config_getString("CGI_NAME")).data());
// msg(" %s/installdox\n\nto replace any dummy links.\n\n",
// Config_getString("HTML_OUTPUT").data());
//}
if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
{ {
HtmlHelp::getInstance()->finalize(); HtmlHelp::getInstance()->finalize();
......
...@@ -2873,7 +2873,8 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd,int level) ...@@ -2873,7 +2873,8 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd,int level)
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(),dd->shortName()); ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(),
dd->shortName());
if (dd->isReference()) if (dd->isReference())
{ {
ol.startTypewriter(); ol.startTypewriter();
......
...@@ -79,8 +79,10 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s) ...@@ -79,8 +79,10 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
} }
LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci,
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE) bool insideTabbing)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_insideItem(FALSE), m_hide(FALSE), m_insideTabbing(insideTabbing)
{ {
} }
...@@ -979,7 +981,7 @@ void LatexDocVisitor::visitPost(DocText *) ...@@ -979,7 +981,7 @@ void LatexDocVisitor::visitPost(DocText *)
void LatexDocVisitor::filter(const char *str) void LatexDocVisitor::filter(const char *str)
{ {
filterLatexString(m_t,str,FALSE,m_insidePre,m_insideItem); filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem);
} }
void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor) void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
......
...@@ -30,7 +30,7 @@ class QString; ...@@ -30,7 +30,7 @@ class QString;
class LatexDocVisitor : public DocVisitor class LatexDocVisitor : public DocVisitor
{ {
public: public:
LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci); LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci,bool insideTabbing);
//-------------------------------------- //--------------------------------------
// visitor functions for leaf nodes // visitor functions for leaf nodes
...@@ -154,6 +154,7 @@ class LatexDocVisitor : public DocVisitor ...@@ -154,6 +154,7 @@ class LatexDocVisitor : public DocVisitor
bool m_insidePre; bool m_insidePre;
bool m_insideItem; bool m_insideItem;
bool m_hide; bool m_hide;
bool m_insideTabbing;
QStack<bool> m_enabled; QStack<bool> m_enabled;
}; };
......
...@@ -102,7 +102,6 @@ LatexGenerator::LatexGenerator() : OutputGenerator() ...@@ -102,7 +102,6 @@ LatexGenerator::LatexGenerator() : OutputGenerator()
//printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n"); //printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n");
insideTabbing=FALSE; insideTabbing=FALSE;
firstDescItem=TRUE; firstDescItem=TRUE;
insidePre=FALSE;
m_indent=0; m_indent=0;
} }
...@@ -110,31 +109,6 @@ LatexGenerator::~LatexGenerator() ...@@ -110,31 +109,6 @@ LatexGenerator::~LatexGenerator()
{ {
} }
//LatexGenerator::LatexGenerator(const LatexGenerator &g)
// : OutputGenerator(g)
//{
// col=g.col;
//}
//void LatexGenerator::append(const OutputGenerator *g)
//{
// t << g->getContents();
// col+=((LatexGenerator *)g)->col;
// insideTabbing=insideTabbing || ((LatexGenerator *)g)->insideTabbing;
// firstDescItem = ((LatexGenerator *)g)->firstDescItem;
// insidePre = insidePre || ((LatexGenerator *)g)->insidePre;
// //printf("LatexGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(),
// // insideTabbing ? "TRUE" : "FALSE" );
//}
//OutputGenerator *LatexGenerator::copy()
//{
// LatexGenerator *result = new LatexGenerator;
// result->insideTabbing=insideTabbing;
// result->insidePre=insidePre;
// return result;
//}
void LatexGenerator::init() void LatexGenerator::init()
{ {
QCString dir=Config_getString("LATEX_OUTPUT"); QCString dir=Config_getString("LATEX_OUTPUT");
...@@ -1260,7 +1234,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) ...@@ -1260,7 +1234,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str) //void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str) void LatexGenerator::docify(const char *str)
{ {
filterLatexString(t,str,insideTabbing,insidePre); filterLatexString(t,str,insideTabbing,FALSE);
} }
void LatexGenerator::codify(const char *str) void LatexGenerator::codify(const char *str)
...@@ -1548,7 +1522,7 @@ void LatexGenerator::endParamList() ...@@ -1548,7 +1522,7 @@ void LatexGenerator::endParamList()
void LatexGenerator::printDoc(DocNode *n) void LatexGenerator::printDoc(DocNode *n)
{ {
LatexDocVisitor *visitor = new LatexDocVisitor(t,*this); LatexDocVisitor *visitor = new LatexDocVisitor(t,*this,insideTabbing);
n->accept(visitor); n->accept(visitor);
delete visitor; delete visitor;
} }
......
...@@ -212,7 +212,6 @@ class LatexGenerator : public OutputGenerator ...@@ -212,7 +212,6 @@ class LatexGenerator : public OutputGenerator
int col; int col;
bool insideTabbing; bool insideTabbing;
bool firstDescItem; bool firstDescItem;
bool insidePre;
QCString relPath; QCString relPath;
int m_indent; int m_indent;
}; };
......
...@@ -990,9 +990,9 @@ void RTFDocVisitor::visitPre(DocImage *img) ...@@ -990,9 +990,9 @@ void RTFDocVisitor::visitPre(DocImage *img)
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "{" << endl; m_t << "{" << endl;
m_t << rtf_Style_Reset << endl; m_t << rtf_Style_Reset << endl;
m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
m_t << img->name(); m_t << img->name();
m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
m_lastIsPara=TRUE; m_lastIsPara=TRUE;
} }
...@@ -1381,9 +1381,9 @@ void RTFDocVisitor::writeDotFile(const QString &fileName) ...@@ -1381,9 +1381,9 @@ void RTFDocVisitor::writeDotFile(const QString &fileName)
if (!m_lastIsPara) m_t << "\\par" << endl; if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{" << endl; m_t << "{" << endl;
m_t << rtf_Style_Reset; m_t << rtf_Style_Reset;
m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
m_t << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); m_t << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
m_lastIsPara=TRUE; m_lastIsPara=TRUE;
} }
......
...@@ -549,8 +549,8 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -549,8 +549,8 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n"; t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
if (rtf_logoFilename) if (rtf_logoFilename)
{ {
t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << rtf_logoFilename; t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << rtf_logoFilename;
t << " \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n"; t << "\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
} }
if (rtf_company) if (rtf_company)
{ {
...@@ -1717,8 +1717,8 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d, ...@@ -1717,8 +1717,8 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
// display the file // display the file
t << "{" << endl; t << "{" << endl;
t << rtf_Style_Reset << endl; t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
t << fileName << ".png"; t << fileName << ".png\"";
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
} }
...@@ -2206,9 +2206,9 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) ...@@ -2206,9 +2206,9 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
// display the file // display the file
t << "{" << endl; t << "{" << endl;
t << rtf_Style_Reset << endl; t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
newParagraph(); newParagraph();
DBG_RTF(t << "{\\comment (endDotGraph)}" << endl) DBG_RTF(t << "{\\comment (endDotGraph)}" << endl)
...@@ -2229,9 +2229,9 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -2229,9 +2229,9 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
// display the file // display the file
t << "{" << endl; t << "{" << endl;
t << rtf_Style_Reset << endl; t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl) DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl)
} }
...@@ -2251,9 +2251,9 @@ void RTFGenerator::endCallGraph(DotCallGraph &g) ...@@ -2251,9 +2251,9 @@ void RTFGenerator::endCallGraph(DotCallGraph &g)
// display the file // display the file
t << "{" << endl; t << "{" << endl;
t << rtf_Style_Reset << endl; t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
DBG_RTF(t << "{\\comment (endCallGraph)}" << endl) DBG_RTF(t << "{\\comment (endCallGraph)}" << endl)
} }
......
...@@ -669,6 +669,7 @@ ID "$"?[a-z_A-Z][a-z_A-Z0-9]* ...@@ -669,6 +669,7 @@ ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
LABELID [a-z_A-Z][a-z_A-Z0-9\-]* LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&]*">")?
CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID}) CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
ATTR ({B}+[^>\n]*)? ATTR ({B}+[^>\n]*)?
A [aA] A [aA]
...@@ -2694,10 +2695,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2694,10 +2695,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
} }
<ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; } <ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; }
<ReadBody,ReadNSBody,ReadBodyIntf>"'#" { current->program += yytext ; }
<FindMembers>"("/({BN}*{ID}{BN}*"::")*{ID}{BN}*")"{BN}*"(" | /* typedef void (A::func_t)(args...) */ <FindMembers>"("/({BN}*{TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */
<FindMembers>("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */ <FindMembers>("("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
lineCount(); lineCount();
addType(current); addType(current);
...@@ -3620,7 +3620,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3620,7 +3620,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
} }
<ClassVar>"," // Multiple class forward declaration <ClassVar>"," {
if (isTypedef)
{
// multiple types in one typedef
unput(',');
current->type.prepend("typedef ");
BEGIN(FindMembers);
}
else
{
// Multiple class forward declaration
}
}
<ClassVar>{ID} { <ClassVar>{ID} {
if (insideIDL && strcmp(yytext,"switch")==0) if (insideIDL && strcmp(yytext,"switch")==0)
{ {
......
This diff is collapsed.
...@@ -833,6 +833,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -833,6 +833,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
if (scope->definitionType()==Definition::TypeNamespace) if (scope->definitionType()==Definition::TypeNamespace)
{ {
NamespaceDef *nscope = (NamespaceDef*)scope; NamespaceDef *nscope = (NamespaceDef*)scope;
//printf(" %s is namespace with %d used classes\n",nscope->name().data(),nscope->getUsedClasses());
SDict<Definition> *cl = nscope->getUsedClasses(); SDict<Definition> *cl = nscope->getUsedClasses();
if (accessibleViaUsingClass(cl,fileScope,item)) if (accessibleViaUsingClass(cl,fileScope,item))
{ {
...@@ -1074,7 +1075,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1074,7 +1075,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
ClassDef *bestMatch=0; ClassDef *bestMatch=0;
//printf(" found %d symbol with name %s\n",dl->count(),name.data()); //printf(" found %d symbol(s) with name %s\n",dl->count(),name.data());
// now we look int the list of Definitions and determine which one is the "best" // now we look int the list of Definitions and determine which one is the "best"
DefinitionListIterator dli(*dl); DefinitionListIterator dli(*dl);
Definition *d; Definition *d;
...@@ -1084,7 +1085,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1084,7 +1085,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
int count=0; int count=0;
for (dli.toFirst();(d=dli.current());++dli,++count) // foreach definition for (dli.toFirst();(d=dli.current());++dli,++count) // foreach definition
{ {
//fprintf(stderr," found type %x name=%s (%d/%d)\n", //printf(" found type %x name=%s (%d/%d)\n",
// d->definitionType(),d->name().data(),count,dl->count()); // d->definitionType(),d->name().data(),count,dl->count());
// only look at classes and members // only look at classes and members
...@@ -1377,9 +1378,8 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1377,9 +1378,8 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
bool keepSpaces) bool keepSpaces)
{ {
//printf("`%s'\n",text); //printf("`%s'\n",text);
static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*"); static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9.:]*");
QCString txtStr=text; QCString txtStr=text;
QCString scopeName;
int strLen = txtStr.length(); int strLen = txtStr.length();
//printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d\n", //printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d\n",
// scope?scope->name().data():"<none>", // scope?scope->name().data():"<none>",
...@@ -1429,6 +1429,9 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1429,6 +1429,9 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
} }
// get word from string // get word from string
QCString word=txtStr.mid(newIndex,matchLen); QCString word=txtStr.mid(newIndex,matchLen);
QCString matchWord = substitute(word,".","::");
//printf("linkifyText word=%s matchWord=%s scope=%s\n",
// word.data(),matchWord.data(),scope?scope->name().data():"<none>");
bool found=FALSE; bool found=FALSE;
if (!insideString) if (!insideString)
{ {
...@@ -1439,7 +1442,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1439,7 +1442,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
GroupDef *gd=0; GroupDef *gd=0;
MemberDef *typeDef=0; MemberDef *typeDef=0;
if ((cd=getResolvedClass(scope,fileScope,word,&typeDef))) if ((cd=getResolvedClass(scope,fileScope,matchWord,&typeDef)))
{ {
// add link to the result // add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject()) if (external ? cd->isLinkable() : cd->isLinkableInProject())
...@@ -1459,7 +1462,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1459,7 +1462,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
found=TRUE; found=TRUE;
} }
} }
else if ((cd=getClass(word+"-p"))) // search for Obj-C protocols as well else if ((cd=getClass(matchWord+"-p"))) // search for Obj-C protocols as well
{ {
// add link to the result // add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject()) if (external ? cd->isLinkable() : cd->isLinkableInProject())
...@@ -1469,7 +1472,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1469,7 +1472,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
} }
} }
QCString scopeName;
if (scope && if (scope &&
(scope->definitionType()==Definition::TypeClass || (scope->definitionType()==Definition::TypeClass ||
scope->definitionType()==Definition::TypeNamespace scope->definitionType()==Definition::TypeNamespace
...@@ -1478,9 +1481,10 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1478,9 +1481,10 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
{ {
scopeName=scope->name(); scopeName=scope->name();
} }
//if (!found) printf("Trying to link %s in %s\n",word.data(),scName); //printf("ScopeName=%s\n",scopeName.data());
//if (!found) printf("Trying to link %s in %s\n",word.data(),scopeName.data());
if (!found && if (!found &&
getDefs(scopeName,word,0,md,cd,fd,nd,gd) && getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) &&
(md->isTypedef() || md->isEnumerate() || (md->isTypedef() || md->isEnumerate() ||
md->isReference() || md->isVariable() md->isReference() || md->isVariable()
) && ) &&
...@@ -1501,7 +1505,6 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1501,7 +1505,6 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
if (!found) // add word to the result if (!found) // add word to the result
{ {
//ol.docify(word);
out.writeString(word,keepSpaces); out.writeString(word,keepSpaces);
} }
// set next start point in the string // set next start point in the string
...@@ -1722,6 +1725,10 @@ QCString getFileFilter(const char* name) ...@@ -1722,6 +1725,10 @@ QCString getFileFilter(const char* name)
{ {
// found a match! // found a match!
QCString filterName = fs.mid(i_equals+1); QCString filterName = fs.mid(i_equals+1);
if (filterName.find(' ')!=-1)
{ // add quotes if the name has spaces
filterName="\""+filterName+"\"";
}
return filterName; return filterName;
} }
} }
......
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