MCPcopy Create free account
hub / github.com/NetHack/NetHack / engr_stats

Function engr_stats

src/engrave.c:1622–1640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1620
1621#ifndef SFCTOOL
1622DISABLE_WARNING_FORMAT_NONLITERAL
1623
1624/* to support '#stats' wizard-mode command */
1625void
1626engr_stats(
1627 const char *hdrfmt,
1628 char *hdrbuf,
1629 long *count,
1630 long *size)
1631{
1632 struct engr *ep;
1633
1634 Sprintf(hdrbuf, hdrfmt, (long) sizeof (struct engr));
1635 *count = *size = 0L;
1636 for (ep = head_engr; ep; ep = ep->nxt_engr) {
1637 ++*count;
1638 *size += (long) sizeof *ep + (long) ep->engr_alloc;
1639 }
1640}
1641
1642RESTORE_WARNING_FORMAT_NONLITERAL
1643

Callers 1

misc_statsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected