mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Added continuation lines in produced Fortran
Version:1.1.34
This commit is contained in:
parent
2157cd322c
commit
3f01d854f3
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
packages/.rpmmacros
|
||||
packages/*.tar.gz
|
||||
packages/*.rpm
|
||||
packages/sourceforge.sh
|
||||
packages/version
|
||||
src/*.pyc
|
||||
irpf90.make
|
||||
irpf90_entities
|
||||
IRPF90_temp
|
||||
IRPF90_man
|
@ -12,5 +12,8 @@ for i in range(1,6):
|
||||
print " ASSERT ( d%d > d%d )"%(i,i-1)
|
||||
END_SHELL
|
||||
|
||||
print *, &
|
||||
'ceci est un ' &
|
||||
//'test'
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -43,7 +43,7 @@ def create():
|
||||
file = open(FILENAME,"w")
|
||||
t = """IRPF90 = irpf90 #-a -d
|
||||
FC = gfortran
|
||||
FCFLAGS= -ffree-line-length-none -O2
|
||||
FCFLAGS= -O2
|
||||
|
||||
SRC=
|
||||
OBJ=
|
||||
|
@ -304,14 +304,14 @@ def remove_continuation(text,form):
|
||||
if form == Free_form:
|
||||
for line in text:
|
||||
if line.text[-1] == '&':
|
||||
buffer = "%s%s "%(buffer,line.text[:-1].lstrip())
|
||||
buffer = "%s%s\n"%(buffer,line.text)
|
||||
if number == 0:
|
||||
t = type(line)
|
||||
number = line.i
|
||||
else:
|
||||
if number != 0:
|
||||
newline = t(number, \
|
||||
"%s%s"%(buffer,line.text.lstrip()), \
|
||||
"%s%s"%(buffer,line.text), \
|
||||
line.filename)
|
||||
line = newline
|
||||
number = 0
|
||||
@ -327,7 +327,7 @@ def remove_continuation(text,form):
|
||||
if line.text[5] != ' ':
|
||||
is_continuation = True
|
||||
if is_continuation:
|
||||
buffer = "%s %s"%(line.text[6:].lstrip(),buffer)
|
||||
buffer = "&\n%s %s %s"%(line.text[:5],line.text[6:],buffer)
|
||||
else:
|
||||
line.text = line.text+buffer
|
||||
result.insert(0,line)
|
||||
|
10
src/util.py
10
src/util.py
@ -39,12 +39,14 @@ def same_file(filename,txt):
|
||||
file = open(filename,"r")
|
||||
except IOError:
|
||||
return False
|
||||
lines = file.readlines()
|
||||
stream = file.read()
|
||||
file.close()
|
||||
if len(lines) != len(txt):
|
||||
|
||||
buffer = ''.join(txt)
|
||||
|
||||
if len(stream) != len(buffer):
|
||||
return False
|
||||
for a,b in zip(lines,txt):
|
||||
if a != b:
|
||||
if stream != buffer:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -1 +1 @@
|
||||
version = "1.1.31"
|
||||
version = "1.1.34"
|
||||
|
Loading…
Reference in New Issue
Block a user