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

Function count_unpaid

src/invent.c:3525–3538  ·  view source on GitHub ↗

* Returns the number of unpaid items within the given list. This includes * contained objects. */

Source from the content-addressed store, hash-verified

3523 * contained objects.
3524 */
3525int
3526count_unpaid(struct obj *list)
3527{
3528 int count = 0;
3529
3530 while (list) {
3531 if (list->unpaid)
3532 count++;
3533 if (Has_contents(list))
3534 count += count_unpaid(list->cobj);
3535 list = list->nobj;
3536 }
3537 return count;
3538}
3539
3540/*
3541 * Returns the number of items with b/u/c/unknown within the given list.

Callers 9

mpickobjFunction · 0.85
ckunpaidFunction · 0.85
ggetobjFunction · 0.85
dotypeinvFunction · 0.85
query_classesFunction · 0.85
allow_categoryFunction · 0.85
query_categoryFunction · 0.85
is_unpaidFunction · 0.85
addtobillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected