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
(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.
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")
bool Step2::crossReferencingEnabled() const
{
//printf("Step2::crossReferencingEnabled()=%d\n",m_crossRef->isOn());
return m_crossRef->isOn();
}
void Step2::enableCrossReferencing()
{
//printf("Step2::enableCrossReferencing()\n");
m_crossRef->setChecked(TRUE);
}
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
......@@ -247,11 +250,13 @@ OptLang Step2::optimizeFor() const
void Step2::setExtractAll(bool enable)
{
//printf("Step2::setExtractAll(%d)\n",enable);
m_extractMode->setButton(enable?1:0);
}
void Step2::setCrossReferencing(bool enable)
{
//printf("Step2::setCrossReferencing(%d)\n",enable);
m_crossRef->setChecked(enable);
}
......@@ -374,12 +379,19 @@ bool Step3::searchEnabled() const
HtmlStyle Step3::htmlStyle() const
{
switch (m_htmlOptions->selectedId())
if (m_htmlOptions->find(0)->isOn())
{
case 0: return HS_Plain;
case 1: return HS_TreeView;
case 2: return HS_CHM;
return HS_Plain;
}
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;
}
......
......@@ -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
"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
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
......
......@@ -760,11 +760,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{
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
{
if (lcd!=VariableContext::dummyContext) g_theCallContext.setClass(lcd);
if (lcd!=VariableContext::dummyContext)
{
g_theCallContext.setClass(lcd);
}
//fprintf(stderr,"is a local variable!\n");
}
if (cd && cd->isLinkable()) // is it a linkable class
......@@ -802,6 +805,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{
if (md==0) // not found as a typedef
{
//printf("setCallContextForVar(%s)\n",clName);
md = setCallContextForVar(clName);
if (md && g_currentDefinition)
{
......@@ -820,10 +824,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
if (md)
{
//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())
{
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName);
......@@ -1085,6 +1085,7 @@ static void generateFunctionLink(BaseCodeDocInterface &ol,char *funcName)
ClassDef *ccd=0;
QCString locScope=g_classScope.copy();
QCString locFunc=removeRedundantWhiteSpace(funcName);
//fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
int i=locFunc.findRev("::");
if (i>0)
{
......@@ -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")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"boolean"|"id"|"SEL")
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
BITOP "&"|"|"|"^"|"<<"|">>"|"~"
OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
%option noyywrap
%x SkipString
......@@ -1827,7 +1832,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_code->codify(yytext);
g_curlyCount++;
g_inClass=TRUE;
if (YY_START==ClassVar)
if (YY_START==ClassVar && g_curClassName.isEmpty())
{
g_curClassName = g_name.copy();
}
......@@ -1841,9 +1846,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
{
g_scopeStack.push(CLASSBLOCK);
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)
{
//printf("Adding new class %s\n",g_curClassName.data());
ClassDef *ncd=new ClassDef("<code>",1,
g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict.append(g_curClassName,ncd);
......@@ -1981,6 +1987,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
codifyLines(yytext);
endFontClass();
g_name.resize(0);g_type.resize(0);
BEGIN(FuncCall);
}
<Body>[\\|\)\+\-\/\%\~\!] {
g_code->codify(yytext);
......@@ -2027,7 +2034,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_name+=yytext;
}
<Body>{SCOPENAME}/{B}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
generateClassOrGlobalLink(*g_code,yytext,TRUE);
generateClassOrGlobalLink(*g_code,yytext/*,TRUE*/);
addType();
g_name+=yytext;
}
......@@ -2382,9 +2389,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_theVarContext.pushScope();
}
}
<MemberCall2,FuncCall>{OPERATOR} { // operator
g_code->codify(yytext);
g_parmType.resize(0);g_parmName.resize(0);
}
<MemberCall2,FuncCall>")" {
g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope();
g_theCallContext.setClass(0);
g_code->codify(yytext);
if (--g_bracketCount<=0)
{
......@@ -2404,8 +2416,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_theVarContext.addVariable(g_type,g_name);
}
g_parmType.resize(0);g_parmName.resize(0);
g_theCallContext.popScope();
g_theCallContext.setClass(0);
//g_theCallContext.popScope();
//g_theCallContext.setClass(0);
if (*yytext==';' || g_insideBody)
{
if (!g_insideBody)
......@@ -2432,7 +2444,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_theVarContext.pushScope();
}
g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope();
//g_theCallContext.popScope();
g_parmType.resize(0);g_parmName.resize(0);
int index = g_name.findRev("::");
if (index!=-1)
......@@ -2540,7 +2552,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
generateFunctionLink(*g_code,yytext);
}
<FuncCall>([a-z_A-Z][a-z_A-Z0-9]*)/("."|"->") {
//g_code->codify(yytext);
g_name=yytext;
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( MemberCall2 );
......
This diff is collapsed.
......@@ -29,6 +29,8 @@ class ClassSDict;
class QStrList;
class FileDef;
class OutputList;
class UsedDir;
class QTextStream;
class DirDef;
......@@ -43,6 +45,8 @@ class DirDef : public Definition
public:
DirDef(const char *path);
virtual ~DirDef();
// accessors
virtual DefType definitionType() { return TypeDir; }
virtual QCString getOutputFileBase() const;
virtual bool isLinkableInProject() const { return !isReference() && hasDocumentation(); }
......@@ -53,19 +57,30 @@ class DirDef : public Definition
FileList * getFiles() const { return m_fileList; }
ClassSDict * getClasses() const { return m_classSDict; }
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 writeDocumentation(OutputList &ol);
void writeNavigationPath(OutputList &ol);
const QList<DirDef> &subDirs() const { return m_subdirs; }
void writeDepGraph(QTextStream &t);
static DirDef *mergeDirectoryInTree(const QCString &path);
bool visited;
private:
friend void computeDirDependencies();
void writePathFragment(OutputList &ol);
void setLevel();
static DirDef *createNewDir(const char *path);
static bool matchPath(const QCString &path,QStrList &l);
void addUsesDependency(DirDef *usedDir,FileDef *fd,bool inherited);
void computeDependencies();
DirList m_subdirs;
QCString m_dispName;
......@@ -73,6 +88,26 @@ class DirDef : public Definition
FileList *m_fileList; // list of files in the group
ClassSDict *m_classSDict; // list of classes in the group
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)
......@@ -93,5 +128,7 @@ class DirSDict : public SDict<DirDef>
void buildDirectories();
void generateDirDocs(OutputList &ol);
void computeDirDependencies();
void writeDirDependencyGraph(const char *file);
#endif
......@@ -297,7 +297,7 @@ SCOPESEP "::"|"#"|"."
SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP}
SCOPEKEYS ":"({ID}":")*
SCOPECPP {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")?
SCOPEOBJC {ID}{SCOPEKEYS}?
SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
FUNCARG "("{FUNCCHAR}*")"
OPNEW {BLANK}+"new"({BLANK}*"[]")?
......
......@@ -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()
......
......@@ -1222,20 +1222,26 @@ static void findUsingDeclarations(Entry *root)
// with the most inner scope and going to the most outer scope (i.e.
// file scope).
QCString name = substitute(root->name,".","::");
MemberDef *mtd=0;
usingCd = getResolvedClass(nd,fd,root->name,&mtd);
usingCd = getResolvedClass(nd,fd,name,&mtd);
//printf("%s -> %p\n",root->name.data(),usingCd);
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",
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(
"<using>",1,
root->name,ClassDef::Class);
Doxygen::hiddenClasses.append(root->name,usingCd);
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
{
......@@ -8344,6 +8350,10 @@ void parseInput()
buildClassDocList(root);
resolveClassNestingRelations();
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(root);
findUsingDeclarations(root);
msg("Building example list...\n");
buildExampleList(root);
......@@ -8379,10 +8389,6 @@ void parseInput()
findEnums(root);
findEnumDocumentation(root);
msg("Searching for members imported via using declarations...\n");
findUsingDeclImports(root);
findUsingDeclarations(root);
msg("Searching for member function documentation...\n");
findObjCMethodDefinitions(root);
findMemberDocumentation(root); // may introduce new members !
......@@ -8442,6 +8448,8 @@ void parseInput()
msg("Adding todo/test/bug list items...\n");
addListReferences();
msg("Computing dependencies between directories...\n");
computeDirDependencies();
}
void generateOutput()
......@@ -8640,8 +8648,7 @@ void generateOutput()
writeGraphInfo(*outputList);
}
//msg("Generating search index...\n");
//generateSearchIndex();
//writeDirDependencyGraph(Config_getString("HTML_OUTPUT"));
if (Config_getBool("GENERATE_RTF"))
{
......@@ -8664,15 +8671,6 @@ void generateOutput()
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"))
{
HtmlHelp::getInstance()->finalize();
......
......@@ -2873,7 +2873,8 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd,int level)
ftvHelp->incContentsDepth();
}
ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(),dd->shortName());
ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(),
dd->shortName());
if (dd->isReference())
{
ol.startTypewriter();
......
......@@ -79,8 +79,10 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
}
LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE)
LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci,
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 *)
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)
......
......@@ -30,7 +30,7 @@ class QString;
class LatexDocVisitor : public DocVisitor
{
public:
LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci);
LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci,bool insideTabbing);
//--------------------------------------
// visitor functions for leaf nodes
......@@ -154,6 +154,7 @@ class LatexDocVisitor : public DocVisitor
bool m_insidePre;
bool m_insideItem;
bool m_hide;
bool m_insideTabbing;
QStack<bool> m_enabled;
};
......
......@@ -102,7 +102,6 @@ LatexGenerator::LatexGenerator() : OutputGenerator()
//printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n");
insideTabbing=FALSE;
firstDescItem=TRUE;
insidePre=FALSE;
m_indent=0;
}
......@@ -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()
{
QCString dir=Config_getString("LATEX_OUTPUT");
......@@ -1260,7 +1234,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
//void LatexGenerator::docifyStatic(QTextStream &t,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)
......@@ -1548,7 +1522,7 @@ void LatexGenerator::endParamList()
void LatexGenerator::printDoc(DocNode *n)
{
LatexDocVisitor *visitor = new LatexDocVisitor(t,*this);
LatexDocVisitor *visitor = new LatexDocVisitor(t,*this,insideTabbing);
n->accept(visitor);
delete visitor;
}
......
......@@ -212,7 +212,6 @@ class LatexGenerator : public OutputGenerator
int col;
bool insideTabbing;
bool firstDescItem;
bool insidePre;
QCString relPath;
int m_indent;
};
......
......@@ -990,9 +990,9 @@ void RTFDocVisitor::visitPre(DocImage *img)
m_t << "\\par" << endl;
m_t << "{" << 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 << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "}" << endl;
m_lastIsPara=TRUE;
}
......@@ -1381,9 +1381,9 @@ void RTFDocVisitor::writeDotFile(const QString &fileName)
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{" << endl;
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 << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
m_t << "}" << endl;
m_lastIsPara=TRUE;
}
......
......@@ -549,8 +549,8 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
if (rtf_logoFilename)
{
t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << rtf_logoFilename;
t << " \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << rtf_logoFilename;
t << "\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
}
if (rtf_company)
{
......@@ -1717,8 +1717,8 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
// display the file
t << "{" << endl;
t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << fileName << ".png";
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
t << fileName << ".png\"";
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
......@@ -2206,9 +2206,9 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
// display the file
t << "{" << 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 << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
newParagraph();
DBG_RTF(t << "{\\comment (endDotGraph)}" << endl)
......@@ -2229,9 +2229,9 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
// display the file
t << "{" << 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 << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl)
}
......@@ -2251,9 +2251,9 @@ void RTFGenerator::endCallGraph(DotCallGraph &g)
// display the file
t << "{" << 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 << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
DBG_RTF(t << "{\\comment (endCallGraph)}" << endl)
}
......
......@@ -669,6 +669,7 @@ ID "$"?[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}?)
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&]*">")?
CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
ATTR ({B}+[^>\n]*)?
A [aA]
......@@ -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 ; }
<FindMembers>"("/({BN}*{ID}{BN}*"::")*{ID}{BN}*")"{BN}*"(" | /* typedef void (A::func_t)(args...) */
<FindMembers>("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */
<FindMembers>"("/({BN}*{TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */
<FindMembers>("("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */
current->bodyLine = yyLineNr;
lineCount();
addType(current);
......@@ -3620,7 +3620,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
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} {
if (insideIDL && strcmp(yytext,"switch")==0)
{
......
This diff is collapsed.
......@@ -833,6 +833,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
if (scope->definitionType()==Definition::TypeNamespace)
{
NamespaceDef *nscope = (NamespaceDef*)scope;
//printf(" %s is namespace with %d used classes\n",nscope->name().data(),nscope->getUsedClasses());
SDict<Definition> *cl = nscope->getUsedClasses();
if (accessibleViaUsingClass(cl,fileScope,item))
{
......@@ -1074,7 +1075,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
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"
DefinitionListIterator dli(*dl);
Definition *d;
......@@ -1084,7 +1085,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
int count=0;
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());
// only look at classes and members
......@@ -1377,9 +1378,8 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
bool keepSpaces)
{
//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 scopeName;
int strLen = txtStr.length();
//printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d\n",
// scope?scope->name().data():"<none>",
......@@ -1429,6 +1429,9 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
}
// get word from string
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;
if (!insideString)
{
......@@ -1439,7 +1442,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
GroupDef *gd=0;
MemberDef *typeDef=0;
if ((cd=getResolvedClass(scope,fileScope,word,&typeDef)))
if ((cd=getResolvedClass(scope,fileScope,matchWord,&typeDef)))
{
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
......@@ -1459,7 +1462,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
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
if (external ? cd->isLinkable() : cd->isLinkableInProject())
......@@ -1469,7 +1472,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
}
}
QCString scopeName;
if (scope &&
(scope->definitionType()==Definition::TypeClass ||
scope->definitionType()==Definition::TypeNamespace
......@@ -1478,9 +1481,10 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
{
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 &&
getDefs(scopeName,word,0,md,cd,fd,nd,gd) &&
getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) &&
(md->isTypedef() || md->isEnumerate() ||
md->isReference() || md->isVariable()
) &&
......@@ -1501,7 +1505,6 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
if (!found) // add word to the result
{
//ol.docify(word);
out.writeString(word,keepSpaces);
}
// set next start point in the string
......@@ -1722,6 +1725,10 @@ QCString getFileFilter(const char* name)
{
// found a match!
QCString filterName = fs.mid(i_equals+1);
if (filterName.find(' ')!=-1)
{ // add quotes if the name has spaces
filterName="\""+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