We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
WR()
1 parent 2fd4b8b commit 0c1abebCopy full SHA for 0c1abeb
1 file changed
xtra/PATCH.LUA
@@ -17,7 +17,7 @@ local function patch(pf)
17
local function R()rl=rl+1 return rf:read("*l")end
18
local function W(s)wl=wl+1 return wf:write(s)end
19
local function WR()if h then if(h.o.l>0 and h.o.s>0)and(h.o.l~=rl-(h.o.s-1)or h.n.l~=wl-(h.n.s-1))then print(M)os.exit(1)else print(P)end end
20
- if wf then local r=R()while r do W(r..'\n')r=R()end wf:close()wf,wl=nil,0 end rf:close()rf,rl,h=nil,0,nil end
+ if wf then local r=R()while r do W(r..'\n')r=R()end wf:close()wf,wl=nil,0 end rf:close()rf,rl,h=nil,0,nil end --TODO: Write original to backup here
21
local n=pf:read("*l")while n do local l,f=n n=pf:read("*l")f=l:sub(1,1)if f=='+'then
22
if l:sub(2,4)~="++ "then W(l:sub(2)..(n and n:match("^\\ No newline at end of file")and""or'\n'))end
23
elseif f=='-'then
0 commit comments