support direct conversion from format 1 to format 3

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2007-03-24 12:39:45 +00:00
parent 3a74b10d91
commit c27dce2b16

View File

@ -138,11 +138,11 @@ def convert(lines):
only_comment = 0
elif format == 3:
# nothing to do
return
return format
else:
error('Cannot convert file format %s' % format)
else:
lines.insert(i, "Format 3")
lines.insert(i, "Format 2")
only_comment = 0
continue
@ -352,6 +352,8 @@ def convert(lines):
i = i + 1
return format + 1
def main(argv):
@ -367,7 +369,9 @@ def main(argv):
# Do the real work
lines = read(input)
convert(lines)
format = 1
while (format < 3):
format = convert(lines)
write(output, lines)
# Close files