Skip to content

Commit

Permalink
bugfix: fix bug of preprocessing parsed files
Browse files Browse the repository at this point in the history
  • Loading branch information
szaghi committed Oct 25, 2024
1 parent 552be3a commit b29c81c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/python/fobis/ParsedFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,12 @@ def parse(self, inc=['.INC', '.F', '.FOR', '.FPP', '.F77', '.F90', '.F95', '.F03
preprocessor += ' -C -w '
elif preprocessor == 'fpp':
preprocessor += ' -w '
source = str(check_output(preprocessor + ' ' + preproc + ' ' + '-I'.join(include) + ' ' + self.name, shell=True, stderr=STDOUT, encoding='UTF-8'))
if preproc is None:
preproc = ''
includes = ' '
if len(include) > 0 :
includes = ' -I' + '-I'.join(include) + ' '
source = str(check_output(preprocessor + ' ' + preproc + includes + self.name, shell=True, stderr=STDOUT, encoding='UTF-8'))
source = source.replace('\\n', '\n')
else:
source = str(openReader(self.name).read())
Expand Down
Binary file modified src/main/python/fobis/__pycache__/ParsedFile.cpython-310.pyc
Binary file not shown.
Binary file modified src/main/python/fobis/__pycache__/fobis.cpython-310.pyc
Binary file not shown.

0 comments on commit b29c81c

Please sign in to comment.