80 lines (61 with data), 1.2 kB
#if 0
/*
*
* LPC / C interface
*
*/
#endif
#include <security.h>
int handle;
reset()
{
int x;
handle = load_shared_object("modules/disass.so");
}
query_destruct()
{
unload_shared_object(handle);
}
array disass(object ob, string func, int start, int nlines)
{
#if 0
if ((caller() < GOD) && !o_read_ok(Scurrent(), obj->u.ob->name))
{
throw("disassemble(%s): no read permission\n", file_name(ob));
return 0;
}
#endif
return ext_c_call(handle, "lpc_disass", ob, func, start, nlines);
}
int function_exists(string func, object ob)
{
return ext_c_call(handle, "lpc_function_exists", func, ob);
}
array registers()
{
return ext_c_call(handle, "lpvm_registers");
}
array dump_status()
{
return ext_c_call(handle, "lpc_dump_status");
}
array dump_objects()
{
return ext_c_call(handle, "lpc_dump_all_objects");
}
array top_functions()
{
return ext_c_call(handle, "lpc_function_count");
}
real command_load()
{
return ext_c_call(handle, "lpc_command_load");
}
real compile_load()
{
return ext_c_call(handle, "lpc_compile_load");
}
string creator(object o)
{
return ext_c_call(handle, "lpc_creator", o);
}