Skip to content

Commit ae02d29

Browse files
committed
Small refactoring of help message in FATSTAT.LUA and PE95TIME.LUA.
1 parent ea2ea44 commit ae02d29

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

demo/xtra/FATSTAT.LUA

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env lua
22

33
H=[[This script shows what blocks are allocated to what files on a FAT12/16 formatted floppy disk image (.IMA).
4-
The -z option will zero out unallocated clusters. Always backup the IMA before using the -z option on it.]]
5-
if #arg<1 then print(arg[-1].." "..arg[0].." [-z] [FILE...]"..'\n\n'..H)os.exit(1)end
4+
The -z option will shred unallocated clusters. Backup any file before using the -z option on it.]]
5+
if #arg<1 then print(arg[-1].." "..arg[0].." [-z] [IMA...]"..'\n\n'..H)os.exit(1)end
66
function R16(s,o)local a,b=s:byte(o,o+1)return a+b*256 end
77
function R32(s,o)local a,b,c,d=s:byte(o,o+3)return a+b*256+c*65536+d*16777216 end
88
function F12(f,o,s)f:seek("set",o)local fd,fat,mc=f:read(s),{},math.floor(s*8/12)

demo/xtra/PE95TIME.LUA

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/env lua
1+
#!/usr/bin/env lua
22

33
I,X,V,H="<I4",0x80000000,809222400,[[This script edits timestamps in a PE formatted EXE to the Windows 95 release date.
4-
This allows repeatable builds to be verified by checksum tools. Backup the EXE before using this tool on it.]]
4+
This allows repeatable builds to be verified by checksum tools. Backup any file before using this tool on it.]]
55
function C(x)return F:seek("cur",x)end
66
function S(x)return F:seek("set",x)end
77
function R(l)local b=F:read(l)if b and#b>=l then return string.unpack(l==2 and"<I2"or I,b)end error("!EOF")end
@@ -19,5 +19,5 @@ function A(o,l,v)
1919
for j=0,t-1 do S(e+(j*8))i,d=R(4),R(4)
2020
if(d&X)~=0 then A(d&(X-1),l+1,v or(l==1 and i==16))
2121
elseif v and l==3 then local r=C()S(K+d)B(R(4),R(4))S(r)end end end
22-
if #arg<1 then print(arg[0],"'PEFORMAT.EXE'\n\n"..H)os.exit(1)end
22+
if #arg<1 then print(arg[0],"'[PE...]'\n\n"..H)os.exit(1)end
2323
for _,v in ipairs(arg)do io.write(v..": ")F=assert(io.open(v,"r+b"))J=P()W(J+8,V)O()A(0,1)F:close()print("OK")end

0 commit comments

Comments
 (0)