mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 19:55:40 +02:00
Changes after dll integration
This commit is contained in:
14
03_Perun_Lua_Wrapper/lua-5.1.5/test/xd.lua
Normal file
14
03_Perun_Lua_Wrapper/lua-5.1.5/test/xd.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
-- hex dump
|
||||
-- usage: lua xd.lua < file
|
||||
|
||||
local offset=0
|
||||
while true do
|
||||
local s=io.read(16)
|
||||
if s==nil then return end
|
||||
io.write(string.format("%08X ",offset))
|
||||
string.gsub(s,"(.)",
|
||||
function (c) io.write(string.format("%02X ",string.byte(c))) end)
|
||||
io.write(string.rep(" ",3*(16-string.len(s))))
|
||||
io.write(" ",string.gsub(s,"%c","."),"\n")
|
||||
offset=offset+16
|
||||
end
|
||||
Reference in New Issue
Block a user