Skip to content

Commit

Permalink
Determination of fixed source form.
Browse files Browse the repository at this point in the history
Better recognizing of fixed source form of Fortran
- in fixed source form a ! in position 6 is not a comment sign but continuation character
-  better determination of the column position in case a tab is used.
  • Loading branch information
albert-github committed Mar 1, 2022
1 parent 5481d6e commit f46f510
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7125,6 +7125,7 @@ bool recognizeFixedForm(const QCString &contents, FortranFormat format)

if (format == FortranFormat_Fixed) return TRUE;
if (format == FortranFormat_Free) return FALSE;
static int tabSize=Config_getInt(TAB_SIZE);

for (int i=0;;i++)
{
Expand All @@ -7136,6 +7137,9 @@ bool recognizeFixedForm(const QCString &contents, FortranFormat format)
column=0;
skipLine=FALSE;
break;
case '\t':
column += tabSize-1;
break;
case ' ':
break;
case '\000':
Expand All @@ -7150,8 +7154,7 @@ bool recognizeFixedForm(const QCString &contents, FortranFormat format)
if (skipLine) break;
return FALSE;
case '!':
if (column>1 && column<7) return FALSE;
skipLine=TRUE;
if (column!=6) skipLine=TRUE;
break;
default:
if (skipLine) break;
Expand Down

0 comments on commit f46f510

Please sign in to comment.