count_wsegs() * returns the number of segments that a worm has. */
| 833 | * returns the number of segments that a worm has. |
| 834 | */ |
| 835 | int |
| 836 | count_wsegs(struct monst *mtmp) |
| 837 | { |
| 838 | int i = 0; |
| 839 | struct wseg *curr; |
| 840 | |
| 841 | if (mtmp->wormno) { |
| 842 | for (curr = wtails[mtmp->wormno]->nseg; curr; curr = curr->nseg) |
| 843 | i++; |
| 844 | } |
| 845 | return i; |
| 846 | } |
| 847 | |
| 848 | /* create_worm_tail() |
| 849 | * will create a worm tail chain of (num_segs + 1) and return pointer to it. |
no outgoing calls
no test coverage detected