summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-06-18 16:12:02 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-06-18 16:12:02 (GMT)
commitcb417a1f59c3bf956677a59ce94cf13b4010f3c4 (patch)
tree87cc9a7540b6f305b72a7d2e3ecb7e16762b3488 /src/definition.cpp
parent24106371e24a41d86a7a50de14d9741e591e95e3 (diff)
downloadDoxygen-cb417a1f59c3bf956677a59ce94cf13b4010f3c4.zip
Doxygen-cb417a1f59c3bf956677a59ce94cf13b4010f3c4.tar.gz
Doxygen-cb417a1f59c3bf956677a59ce94cf13b4010f3c4.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)
{