Skip to content

Commit 2d80f02

Browse files
committed
Move open() function into diff_u().
1 parent d5cfaeb commit 2d80f02

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

demo/xtra/DIFF.LUA

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
local function open(filename)
2-
local f,e=io.open(filename)
3-
if not f then print(e) os.exit(1) end
4-
return f
5-
end
6-
71
local function diff_u(fn1,fn2)
2+
local function open(fn) local f, e = io.open(fn) if not f then print(e) os.exit(1) end return f end
83
local f1, f2, pre, add, del, post, x, y, h, l1, l2 = open(fn1), open(fn2), {}, {}, {}, 0, 0, 0
94
local function flush_pre()
105
if not h then print("--- " .. fn1 .. "\n+++ " .. fn2) h = true end

0 commit comments

Comments
 (0)