]> granicus.if.org Git - onig/commitdiff
refactoring
authorK.Kosako <kosako@sofnec.co.jp>
Mon, 10 Sep 2018 01:11:38 +0000 (10:11 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Mon, 10 Sep 2018 01:11:38 +0000 (10:11 +0900)
src/gperf_fold_key_conv.py

index 376d343113fb0d1d5f9b907f48fa6803f90ce9d1..f45318677269691795d262f1a2ebd545831c088f 100755 (executable)
@@ -54,11 +54,13 @@ def parse_line(s, key_len):
 def parse_file(f, key_len):
     print "/* This file was converted by gperf_fold_key_conv.py\n      from gperf output file. */"
 
-    line = f.readline()
-    while line:
+    while True:
+        line = f.readline()
+        if not line:
+            break
+
         s = parse_line(line, key_len)
         print s
-        line = f.readline()
 
 
 # main