Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
#include <lua.h> #include <lauxlib.h> /* (find-angg "vtutil4/piofontx.c") * (find-luamanualw3m "#luaL_checkint") * (find-luamanualw3m "#lua_pushlstring") * (find-luamanualw3m "#lua_register") * (find-luamanualw3m "#pdf-package.loadlib") * (find-luamanualw3m "#lua_CFunction") * (find-lua51file "src/lua.h" "push functions (C -> stack)") * (find-lua51file "src/loadlib.c" "luaL_checkstring") * (find-lua51file "src/") * (find-lua51file "src/lua.h") * (find-lua51file "src/lauxlib.h" "checkint") * (find-sh0 "gcc -shared -o peek.so -I$LUA51SRC/src peek.c; ls -l peek.so") * (find-pilfile "") * (find-pilw3m "index.html") * (find-pilw3m "26.2.html") */ static int lua_peek(lua_State* L) { int addr = luaL_checkint(L, 1); int len = luaL_checkint(L, 2); lua_pushlstring(L, (void *)addr, len); return 1; } LUALIB_API int peek_init(lua_State *L) { lua_register(L, "peek", lua_peek); return 0; }