iterate all living monsters on current level, calling vfunc for each. */
| 4524 | |
| 4525 | /* iterate all living monsters on current level, calling vfunc for each. */ |
| 4526 | void |
| 4527 | iter_mons(void (*vfunc)(struct monst *)) |
| 4528 | { |
| 4529 | struct monst *mtmp, *mtmp2; |
| 4530 | |
| 4531 | for (mtmp = fmon; mtmp; mtmp = mtmp2) { |
| 4532 | mtmp2 = mtmp->nmon; |
| 4533 | if (DEADMONSTER(mtmp) || mon_offmap(mtmp)) |
| 4534 | continue; |
| 4535 | (*vfunc)(mtmp); |
| 4536 | } |
| 4537 | return; |
| 4538 | } |
| 4539 | |
| 4540 | |
| 4541 | /* iterate all living monsters on current level, calling bfunc for each. |
no outgoing calls
no test coverage detected