summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-14 12:32:56 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-14 12:32:56 (GMT)
commita47c456eadf1895654a3e8c4a6232e67db20371b (patch)
treee1f4cf00afd7656c55836b31c2780a9a5f8eb109
parent97bcc770006f08d8a4aa383a6ccd93b1d1d6d324 (diff)
downloadDoxygen-a47c456eadf1895654a3e8c4a6232e67db20371b.zip
Doxygen-a47c456eadf1895654a3e8c4a6232e67db20371b.tar.gz
Doxygen-a47c456eadf1895654a3e8c4a6232e67db20371b.tar.bz2
issue #7206: Problems with Fortran and `@cond`
-rw-r--r--src/commentcnv.l22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 66aada1..95d0347 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -791,7 +791,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
BEGIN(yyextra->condCtx);
}
}
-<CondLine>[ \t]*
+<CondLine>[ \t]*/\n |
<CComment,ReadLine>[\\@]"cond"[ \t\r]*/\n |
<CondLine>. { // forgot section id?
if (YY_START!=CondLine) yyextra->condCtx=YY_START;
@@ -942,24 +942,32 @@ static inline int computeIndent(const char *s)
static inline void copyToOutput(yyscan_t yyscanner,const char *s,int len)
{
+ int tabSize=Config_getInt(TAB_SIZE);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int i;
if (yyextra->skip) // only add newlines.
{
- for (i=0;i<len;i++)
+ for (i=0;i<len;i++)
{
- if (s[i]=='\n')
+ switch(s[i])
{
- ADDCHAR('\n');
- //fprintf(stderr,"---> skip %d\n",g_lineNr);
- yyextra->lineNr++;
+ case '\n':
+ ADDCHAR('\n');
+ yyextra->lineNr++;
+ yyextra->col=0;
+ break;
+ case '\t':
+ yyextra->col+=tabSize-(yyextra->col%tabSize);
+ break;
+ default:
+ yyextra->col++;
+ break;
}
}
}
else if (len>0)
{
ADDARRAY(s,len);
- static int tabSize=Config_getInt(TAB_SIZE);
for (i=0;i<len;i++)
{
switch (s[i])