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)
|
print " ASSERT ( d%d > d%d )"%(i,i-1)
|
||||||
END_SHELL
|
END_SHELL
|
||||||
|
|
||||||
|
print *, &
|
||||||
|
'ceci est un ' &
|
||||||
|
//'test'
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ def create():
|
|||||||
file = open(FILENAME,"w")
|
file = open(FILENAME,"w")
|
||||||
t = """IRPF90 = irpf90 #-a -d
|
t = """IRPF90 = irpf90 #-a -d
|
||||||
FC = gfortran
|
FC = gfortran
|
||||||
FCFLAGS= -ffree-line-length-none -O2
|
FCFLAGS= -O2
|
||||||
|
|
||||||
SRC=
|
SRC=
|
||||||
OBJ=
|
OBJ=
|
||||||
|
@ -304,14 +304,14 @@ def remove_continuation(text,form):
|
|||||||
if form == Free_form:
|
if form == Free_form:
|
||||||
for line in text:
|
for line in text:
|
||||||
if line.text[-1] == '&':
|
if line.text[-1] == '&':
|
||||||
buffer = "%s%s "%(buffer,line.text[:-1].lstrip())
|
buffer = "%s%s\n"%(buffer,line.text)
|
||||||
if number == 0:
|
if number == 0:
|
||||||
t = type(line)
|
t = type(line)
|
||||||
number = line.i
|
number = line.i
|
||||||
else:
|
else:
|
||||||
if number != 0:
|
if number != 0:
|
||||||
newline = t(number, \
|
newline = t(number, \
|
||||||
"%s%s"%(buffer,line.text.lstrip()), \
|
"%s%s"%(buffer,line.text), \
|
||||||
line.filename)
|
line.filename)
|
||||||
line = newline
|
line = newline
|
||||||
number = 0
|
number = 0
|
||||||
@ -327,7 +327,7 @@ def remove_continuation(text,form):
|
|||||||
if line.text[5] != ' ':
|
if line.text[5] != ' ':
|
||||||
is_continuation = True
|
is_continuation = True
|
||||||
if is_continuation:
|
if is_continuation:
|
||||||
buffer = "%s %s"%(line.text[6:].lstrip(),buffer)
|
buffer = "&\n%s %s %s"%(line.text[:5],line.text[6:],buffer)
|
||||||
else:
|
else:
|
||||||
line.text = line.text+buffer
|
line.text = line.text+buffer
|
||||||
result.insert(0,line)
|
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")
|
file = open(filename,"r")
|
||||||
except IOError:
|
except IOError:
|
||||||
return False
|
return False
|
||||||
lines = file.readlines()
|
stream = file.read()
|
||||||
file.close()
|
file.close()
|
||||||
if len(lines) != len(txt):
|
|
||||||
|
buffer = ''.join(txt)
|
||||||
|
|
||||||
|
if len(stream) != len(buffer):
|
||||||
return False
|
return False
|
||||||
for a,b in zip(lines,txt):
|
if stream != buffer:
|
||||||
if a != b:
|
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
version = "1.1.31"
|
version = "1.1.34"
|
||||||
|
Loading…
Reference in New Issue
Block a user