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

Function light_stats

src/light.c:497–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495#ifndef SFCTOOL
496
497DISABLE_WARNING_FORMAT_NONLITERAL
498
499/* to support '#stats' wizard-mode command */
500void
501light_stats(const char *hdrfmt, char *hdrbuf, long *count, long *size)
502{
503 light_source *ls;
504
505 Sprintf(hdrbuf, hdrfmt, (long) sizeof (light_source));
506 *count = *size = 0L;
507 for (ls = gl.light_base; ls; ls = ls->next) {
508 ++*count;
509 *size += (long) sizeof *ls;
510 }
511}
512
513RESTORE_WARNING_FORMAT_NONLITERAL
514

Callers 1

misc_statsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected