summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>1999-12-15 19:26:45 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>1999-12-15 19:26:45 (GMT)
commite04496cb647291b94c0b27b8babb127a79803579 (patch)
treebec2e27efcff1ecb747c25b00bb9fea1e068d151 /src/code.l
parent322885a8700a209812bf5a94205260c9bef6ac1f (diff)
downloadDoxygen-e04496cb647291b94c0b27b8babb127a79803579.zip
Doxygen-e04496cb647291b94c0b27b8babb127a79803579.tar.gz
Doxygen-e04496cb647291b94c0b27b8babb127a79803579.tar.bz2
mods for doxygen-0.49-990522
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/code.l b/src/code.l
index 8bff410..dd5ec0c 100644
--- a/src/code.l
+++ b/src/code.l
@@ -173,16 +173,19 @@ static void generateClassLink(OutputList &ol,const char *clName)
if (exampleBlock)
{
QString anchor;
- anchor.sprintf("a%d",anchorCount);
+ anchor.sprintf("_a%d",anchorCount);
//printf("addExampleClass(%s,%s,%s)\n",anchor.data(),exampleName.data(),
// exampleFile.data());
if (cd->addExample(anchor,exampleName,exampleFile))
{
+ bool latexOn = ol.isEnabled(OutputGenerator::Latex);
+ if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor(anchor);
+ if (latexOn) ol.enable(OutputGenerator::Latex);
anchorCount++;
}
}
- ol.writeCodeLink(cd->getReference(),cd->classFile(),0,className);
+ ol.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),0,className);
}
else
{
@@ -193,13 +196,14 @@ static void generateClassLink(OutputList &ol,const char *clName)
static bool getLink(const char *className,
const char *memberName,OutputList &result)
{
- MemberDef *md;
- ClassDef *cd;
- FileDef *fd;
+ MemberDef *md;
+ ClassDef *cd;
+ FileDef *fd;
+ NamespaceDef *nd;
QString m=memberName;
QString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data());
- if (getDefs(m,c,"()",md,cd,fd) &&
+ if (getDefs(m,c,"()",md,cd,fd,nd) &&
(md->hasDocumentation() || md->isReference()))
{
//printf("Found!\n");
@@ -217,13 +221,19 @@ static bool getLink(const char *className,
}
if (cd)
{
- result.writeCodeLink(cd->getReference(),cd->classFile(),
+ result.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),
+ md->anchor(),memberName);
+ return TRUE;
+ }
+ else if (nd)
+ {
+ result.writeCodeLink(nd->getReference(),nd->getOutputFileBase(),
md->anchor(),memberName);
return TRUE;
}
else if (fd)
{
- result.writeCodeLink(fd->getReference(),fd->diskName(),
+ result.writeCodeLink(fd->getReference(),fd->getOutputFileBase(),
md->anchor(),memberName);
return TRUE;
}
@@ -363,7 +373,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if ((fd=findFileDef(&inputNameDict,yytext,ambig)) &&
fd->hasDocumentation())
{
- code->writeCodeLink(0,fd->diskName(),0,yytext);
+ code->writeCodeLink(0,fd->getOutputFileBase(),0,yytext);
}
else
{