Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
-- (find-sfcfile "sfc-0.0.1-0.rockspec")
-- (find-angg "peek/peek-0.0.1-0.rockspec")
-- (find-angg "peek/")

package="sfc"
version="0.0.1-0"
source = {
   url = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua//5.0/lposix.tar.gz",
   md5 = "f22871247e444412a901d179028a0d82",
   dir = "posix"
}
description = {
   summary = "Sheaves for Children",
   detailed = [[
     Sheaves for Children
   ]],
   homepage = "http://angg.twu.net/sheavesforchildren/",
   license = "GPL3"
}
dependencies = {
   "lua >= 5.1"
}

build = {
   -- type = "module",
   type = "builtin",
   modules = {
      modal = "modal.c"
   },
}


--[[

# «build»  (to ".build")
# http://luarocks.org/en/Creating_a_rock
# http://luarocks.org/en/Rockspec_format

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/sheavesforchildren/
rm -fv peek*
rm -fv modal.o modal.so
~/usrc/luarocks/bin/luarocks make sfc-0.0.1-0.rockspec  \
            |& tee olm-sfc
# (find-angg "peek/olm-peek")
ls -laF


# «test»  (to ".test")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
require "modal"
= modal_ess_("a ab ac bd cd de", "01111")
= modal_interior_("a ab ac bd cd de", "10111")
= modal_paint_("a ab ac bd cd de", "00100")

-- (find-angg "peek/peek.c" "init")
-- (find-angg "LUA/lua50init.lua" "loadpeek")
DIR  = getenv("HOME").."/peek"
-- assert(package.loadlib(DIR.."/peek.so", "peek_init"))()
assert(package.loadlib(DIR.."/peek.so", "luaopen_peek"))()
buf = malloc_(20)
poke_(buf, "abcd")
PP(peek_(buf+2, 2))   --> "cd"
--
-- Tests for toptr:
--   strtohex uses: (find-angg "LUA/lua50init.lua" "map" "mapconcat")
oaddr = function (o) return tonumber(tostring(o):match("0x(.*)"), 16) end
hex   = function (n) return string.format("%x", n) end
hex2  = function (n) return string.format("%02x", n) end
strtohex = function (str, sep)
    return mapconcat(hex2, {str:byte(1, #str)}, sep or "")
  end
-- strtohex(" !@#$")
-- strtohex(" !@#$", "_")
opeek = function (o, len) return strtohex(peek_(oaddr(o), len or 20), "_") end
=            print
=     toptr_(print)
= hex(toptr_(print))
= opeek(print)
= opeek(opeek)
= opeek({})
= opeek(debug)

--]]



-- Local Variables:
-- mode:               lua
-- coding:             raw-text-unix
-- ee-anchor-format:   "«%s»"
-- End: