* Figure out how much is owed to a given shopkeeper. * At present, we ignore any amount robbed from the shop, to avoid * turning the `$' command into a way to discover that the current * level is bones data which has a shk on the warpath. */
| 987 | * level is bones data which has a shk on the warpath. |
| 988 | */ |
| 989 | staticfn long |
| 990 | shop_debt(struct eshk *eshkp) |
| 991 | { |
| 992 | struct bill_x *bp; |
| 993 | int ct; |
| 994 | long debt = eshkp->debit; |
| 995 | |
| 996 | for (bp = eshkp->bill_p, ct = eshkp->billct; ct > 0; bp++, ct--) |
| 997 | debt += bp->price * bp->bquan; |
| 998 | return debt; |
| 999 | } |
| 1000 | |
| 1001 | /* called in response to the `$' command */ |
| 1002 | void |
no outgoing calls
no test coverage detected