summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2003-09-22 20:13:01 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2003-09-22 20:13:01 (GMT)
commitb740d594fddfb880f5800b991e408bdb42a3f354 (patch)
tree5da2b20b68f07e1ce10d01b7102a959409be641d /src/definition.cpp
parent640babbbb6882ce1b1e52563c0617e2f4213eeb8 (diff)
downloadDoxygen-b740d594fddfb880f5800b991e408bdb42a3f354.zip
Doxygen-b740d594fddfb880f5800b991e408bdb42a3f354.tar.gz
Doxygen-b740d594fddfb880f5800b991e408bdb42a3f354.tar.bz2
Release-1.3.4
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index c94c7c5..e0841ef 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -252,7 +252,7 @@ static bool readCodeFragment(const char *fileName,
// skip until the startLine has reached
while (lineNr<startLine && !feof(f))
{
- while ((c=fgetc(f))!='\n' && c==EOF) /* skip */;
+ while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */;
lineNr++;
}
if (!feof(f))
@@ -263,6 +263,7 @@ static bool readCodeFragment(const char *fileName,
{
while ((c=fgetc(f))!='{' && c!=':' && c!=EOF)
{
+ //printf("parsing char `%c'\n",c);
if (c=='\n')
{
lineNr++,col=0;
@@ -286,6 +287,7 @@ static bool readCodeFragment(const char *fileName,
found=TRUE;
}
}
+ //printf(" -> readCodeFragment(%s,%d,%d) lineNr=%d\n",fileName,startLine,endLine,lineNr);
if (found)
{
// For code with more than one line,
@@ -305,11 +307,21 @@ static bool readCodeFragment(const char *fileName,
char lineStr[maxLineLength];
do
{
+ //printf("reading line %d in range %d-%d\n",lineNr,startLine,endLine);
int size_read;
- do {
+ do
+ {
// read up to maxLineLength-1 bytes, the last byte being zero
char *p = fgets(lineStr, maxLineLength,f);
- if (p) size_read=qstrlen(p); else size_read=-1;
+ //printf(" read %s",p);
+ if (p)
+ {
+ size_read=qstrlen(p);
+ }
+ else
+ {
+ size_read=-1;
+ }
result+=lineStr;
} while (size_read == (maxLineLength-1));
@@ -432,7 +444,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
ol.pushGeneratorState();
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
- // startBodyLine,endBodyLine,bodyDef);
+ // m_startBodyLine,m_endBodyLine,m_bodyDef);
if (Config_getBool("INLINE_SOURCES") && m_startBodyLine!=-1 &&
m_endBodyLine>=m_startBodyLine && m_bodyDef)
{