mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Some renaming, from Guenter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31970 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7bf3d5cad0
commit
8042139ea5
@ -105,12 +105,12 @@ def trim_bom(line):
|
|||||||
return line
|
return line
|
||||||
|
|
||||||
|
|
||||||
def read(input):
|
def read(source):
|
||||||
" Read input file and strip lineendings."
|
" Read input file and strip lineendings."
|
||||||
lines = list()
|
lines = list()
|
||||||
first_line = 1
|
first_line = 1
|
||||||
while 1:
|
while 1:
|
||||||
line = input.readline()
|
line = source.readline()
|
||||||
if not line:
|
if not line:
|
||||||
break
|
break
|
||||||
if (first_line):
|
if (first_line):
|
||||||
@ -585,16 +585,16 @@ def main(argv):
|
|||||||
|
|
||||||
# Open files
|
# Open files
|
||||||
if len(argv) == 1:
|
if len(argv) == 1:
|
||||||
input = sys.stdin
|
source = sys.stdin
|
||||||
output = sys.stdout
|
output = sys.stdout
|
||||||
elif len(argv) == 3:
|
elif len(argv) == 3:
|
||||||
input = open(argv[1], 'rb')
|
source = open(argv[1], 'rb')
|
||||||
output = open(argv[2], 'wb')
|
output = open(argv[2], 'wb')
|
||||||
else:
|
else:
|
||||||
error(usage(argv[0]))
|
error(usage(argv[0]))
|
||||||
|
|
||||||
# Do the real work
|
# Do the real work
|
||||||
lines = read(input)
|
lines = read(source)
|
||||||
format = 1
|
format = 1
|
||||||
while (format < currentFormat):
|
while (format < currentFormat):
|
||||||
format = convert(lines)
|
format = convert(lines)
|
||||||
@ -602,7 +602,7 @@ def main(argv):
|
|||||||
|
|
||||||
# Close files
|
# Close files
|
||||||
if len(argv) == 3:
|
if len(argv) == 3:
|
||||||
input.close()
|
source.close()
|
||||||
output.close()
|
output.close()
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user