This fixes a line counting bug in the doxygen preprocessor.
Symptom: References and callgraphs are sometimes not displayed for C
functions, even if explicitly requested.
Cause: The preprocessing code neglects to count linebreaks when it
encounters certain commands in a comment block. #include directives
are replaced with line number directives based on this faulty counter.
The line directives affect the counter that is used to set up and
index contexts for later processing stages. For example a \verbatim
before an #include in the file will cause the contexts to be indexed
with the wrong line numbers. When the later stage that computes
function references needs the context, it looks it up using the
correct line count and fails to find it. Therefore the references
list ends up empty, and therefore callgraphs are suppressed.
Index: doxygen-1.4.5/src/pre.l
===================================================================
--- doxygen-1.4.5.orig/src/pre.l 2005-09-18 13:01:10.000000000 -0400
+++ doxygen-1.4.5/src/pre.l 2005-11-11 12:11:20.000000000 -0500
@@ -1838,9 +1838,11 @@
//g_commentCount++;
}
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f{"|"f$"|"f["){BN}+ {
+ g_yyLineNr+=QCString(yytext).contains('\n');
outputArray(yytext,yyleng);
}
<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
+ g_yyLineNr+=QCString(yytext).contains('\n');
outputArray(yytext,yyleng);
if (yytext[1]=='f')
{
|