summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-06-18 16:12:02 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-06-18 16:12:02 (GMT)
commit2d0679ab5e5cf4fd5daa7bbc007c9b43ccac42d8 (patch)
tree87cc9a7540b6f305b72a7d2e3ecb7e16762b3488 /src/definition.cpp
parenteb3b95e2aacced2a715337e2d4a93e588d3258c1 (diff)
downloadDoxygen-2d0679ab5e5cf4fd5daa7bbc007c9b43ccac42d8.zip
Doxygen-2d0679ab5e5cf4fd5daa7bbc007c9b43ccac42d8.tar.gz
Doxygen-2d0679ab5e5cf4fd5daa7bbc007c9b43ccac42d8.tar.bz2
Release-1.1.4-20000618
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index af964f0..629a45a 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -141,15 +141,27 @@ static bool readCodeFragment(const char *fileName,
}
if (!f.atEnd())
{
- // skip until the opening bracket is found
- while (lineNr<=endLine && !f.atEnd() && c!='{')
+ // skip until the opening bracket or lonely : is found
+ bool found=FALSE;
+ char cn;
+ while (lineNr<=endLine && !f.atEnd() && !found)
{
- while ((c=f.getch())!='{' && c!=-1) if (c=='\n') lineNr++;
+ while ((c=f.getch())!='{' && c!=':' && c!=-1) if (c=='\n') lineNr++;
+ if (c==':')
+ {
+ cn=f.getch();
+ if (cn!=':') found=TRUE;
+ }
+ else if (c=='{')
+ {
+ found=TRUE;
+ }
}
- if (c=='{')
+ if (found)
{
// copy until end of line
result+=c;
+ if (c==':') result+=cn;
startLine=lineNr;
const int maxLineLength=4096;
char lineStr[maxLineLength];
@@ -179,7 +191,7 @@ static bool readCodeFragment(const char *fileName,
}
/*! Write a reference to the source code defining this definition */
-void Definition::writeSourceDef(OutputList &ol,const char *scopeName)
+void Definition::writeSourceDef(OutputList &ol,const char *)
{
ol.pushGeneratorState();
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
@@ -271,6 +283,13 @@ void Definition::writeSourceDef(OutputList &ol,const char *scopeName)
ol.newParagraph();
ol.enableAll();
}
+ ol.popGeneratorState();
+}
+
+/*! Write code of this definition into the documentation */
+void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
+{
+ ol.pushGeneratorState();
if (Config::inlineSourceFlag && startBodyLine!=-1 &&
endBodyLine>=startBodyLine && bodyDef)
{