summaryrefslogtreecommitdiffstats
path: root/src/fortranscanner.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-09-15 10:30:40 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-09-15 10:30:40 (GMT)
commita88b298bee89f001072c80e32e04dfd855d05c58 (patch)
tree0a1d06808ba9db730e2016bd5150116e298c38c4 /src/fortranscanner.l
parent0fc06d657d596adcc289a5f228973ea268efd66d (diff)
downloadDoxygen-a88b298bee89f001072c80e32e04dfd855d05c58.zip
Doxygen-a88b298bee89f001072c80e32e04dfd855d05c58.tar.gz
Doxygen-a88b298bee89f001072c80e32e04dfd855d05c58.tar.bz2
Incorrect duplicate code for Fortran fixed/free recognition
There were 2 routines to recognize whether Fortran code was Fixed of Free format code, though the version in `commentcnv.l` didn't take the settings of `EXTENSION_MAPPING` into account which might lead to incorrect recognition of the format, this has been corrected.
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r--src/fortranscanner.l43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index ed41d81..dfca1f8 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -1498,49 +1498,6 @@ void truncatePrepass(yyscan_t yyscanner,int index)
yyextra->inputStringPrepass.truncate(index);
}
-// simplified way to know if this is fixed form
-bool recognizeFixedForm(const char* contents, FortranFormat format)
-{
- int column=0;
- bool skipLine=FALSE;
-
- if (format == FortranFormat_Fixed) return TRUE;
- if (format == FortranFormat_Free) return FALSE;
-
- for(int i=0;;i++) {
- column++;
-
- switch(contents[i]) {
- case '\n':
- column=0;
- skipLine=FALSE;
- break;
- case ' ':
- break;
- case '\000':
- return FALSE;
- case '#':
- skipLine=TRUE;
- break;
- case 'C':
- case 'c':
- case '*':
- if (column==1) return TRUE;
- if (skipLine) break;
- return FALSE;
- case '!':
- if (column>1 && column<7) return FALSE;
- skipLine=TRUE;
- break;
- default:
- if (skipLine) break;
- if (column>=7) return TRUE;
- return FALSE;
- }
- }
- return FALSE;
-}
-
/* This function assumes that contents has at least size=length+1 */
static void insertCharacter(char *contents, int length, int pos, char c)
{