MCPcopy Create free account
hub / github.com/DFHack/dfhack / PrintHeader

Function PrintHeader

depends/lua/src/luac.c:396–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394#define S(x) (int)(x),SS(x)
395
396static void PrintHeader(const Proto* f)
397{
398 const char* s=f->source ? getstr(f->source) : "=?";
399 if (*s=='@' || *s=='=')
400 s++;
401 else if (*s==LUA_SIGNATURE[0])
402 s="(bstring)";
403 else
404 s="(string)";
405 printf("\n%s <%s:%d,%d> (%d instruction%s at %p)\n",
406 (f->linedefined==0)?"main":"function",s,
407 f->linedefined,f->lastlinedefined,
408 S(f->sizecode),VOID(f));
409 printf("%d%s param%s, %d slot%s, %d upvalue%s, ",
410 (int)(f->numparams),f->is_vararg?"+":"",SS(f->numparams),
411 S(f->maxstacksize),S(f->sizeupvalues));
412 printf("%d local%s, %d constant%s, %d function%s\n",
413 S(f->sizelocvars),S(f->sizek),S(f->sizep));
414}
415
416static void PrintDebug(const Proto* f)
417{

Callers 1

PrintFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected