@@ -224,6 +224,7 @@ static unsigned int Column;
224224static bool FreeSourceForm ;
225225static bool FreeSourceFormFound = false;
226226static bool ParsingString ;
227+ static bool Newline ;
227228
228229/* indexed by tagType */
229230static kindDefinition FortranKinds [] = {
@@ -781,7 +782,6 @@ static int skipToNextLine (void)
781782
782783static int getFreeFormChar (void )
783784{
784- static bool newline = true;
785785 bool advanceLine = false;
786786 int c = getcFromInputFile ();
787787
@@ -796,7 +796,7 @@ static int getFreeFormChar (void)
796796 while (isspace (c ) && c != '\n' );
797797 if (c == '\n' )
798798 {
799- newline = true;
799+ Newline = true;
800800 advanceLine = true;
801801 }
802802 else if (c == '!' )
@@ -807,24 +807,24 @@ static int getFreeFormChar (void)
807807 c = '&' ;
808808 }
809809 }
810- else if (newline && (c == '!' || c == '#' ))
810+ else if (Newline && (c == '!' || c == '#' ))
811811 advanceLine = true;
812812 while (advanceLine )
813813 {
814814 while (isspace (c ))
815815 c = getcFromInputFile ();
816- if (c == '!' || (newline && c == '#' ))
816+ if (c == '!' || (Newline && c == '#' ))
817817 {
818818 c = skipToNextLine ();
819- newline = true;
819+ Newline = true;
820820 continue ;
821821 }
822822 if (c == '&' )
823823 c = getcFromInputFile ();
824824 else
825825 advanceLine = false;
826826 }
827- newline = (bool ) (c == '\n' );
827+ Newline = (bool ) (c == '\n' );
828828 return c ;
829829}
830830
@@ -2653,6 +2653,7 @@ static rescanReason findFortranTags (const unsigned int passCount)
26532653 token = newToken ();
26542654
26552655 FreeSourceForm = (bool ) (passCount > 1 );
2656+ Newline = (passCount == 1 )? true: Newline ;
26562657 Column = 0 ;
26572658 parseProgramUnit (token );
26582659 if (FreeSourceFormFound && ! FreeSourceForm )
0 commit comments