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

Function obj_chain

src/wizcmds.c:1155–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1153DISABLE_WARNING_FORMAT_NONLITERAL /* RESTORE_WARNING follows wiz_show_stats */
1154
1155staticfn void
1156obj_chain(
1157 winid win,
1158 const char *src,
1159 struct obj *chain,
1160 boolean force,
1161 long *total_count, long *total_size)
1162{
1163 char buf[BUFSZ];
1164 long count = 0L, size = 0L;
1165
1166 count_obj(chain, &count, &size, TRUE, FALSE);
1167
1168 if (count || size || force) {
1169 *total_count += count;
1170 *total_size += size;
1171 Sprintf(buf, template, src, count, size);
1172 putstr(win, 0, buf);
1173 }
1174}
1175
1176staticfn void
1177mon_invent_chain(

Callers 1

wiz_show_statsFunction · 0.85

Calls 1

count_objFunction · 0.85

Tested by

no test coverage detected