Skip to content

Commit c7b36dc

Browse files
committed
Implemented file header printing.
1 parent 244c08f commit c7b36dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

demo/xtra/DIFF.LUA

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ local function open(filename)
55
end
66

77
local function diff_u(fn1,fn2)
8-
local f1, f2, pre, post, x, y, l1, l2 = open(fn1), open(fn2), {}, 0, 0, 0
8+
local f1, f2, pre, post, x, y, h, l1, l2 = open(fn1), open(fn2), {}, 0, 0, 0
99
local function flush_pre()
10+
if not h then print("--- " .. fn1 .. "\n+++ " .. fn2) h = true end
1011
for _, v in ipairs(pre) do print(" " .. v) end
1112
pre = {}
1213
end

0 commit comments

Comments
 (0)