| 1254 | } |
| 1255 | |
| 1256 | staticfn void |
| 1257 | mon_chain( |
| 1258 | winid win, |
| 1259 | const char *src, |
| 1260 | struct monst *chain, |
| 1261 | boolean force, |
| 1262 | long *total_count, long *total_size) |
| 1263 | { |
| 1264 | char buf[BUFSZ]; |
| 1265 | long count, size; |
| 1266 | struct monst *mon; |
| 1267 | /* mon->wormno means something different for migrating_mons and mydogs */ |
| 1268 | boolean incl_wsegs = !strcmpi(src, "fmon"); |
| 1269 | |
| 1270 | count = size = 0L; |
| 1271 | for (mon = chain; mon; mon = mon->nmon) { |
| 1272 | count++; |
| 1273 | size += size_monst(mon, incl_wsegs); |
| 1274 | } |
| 1275 | if (count || size || force) { |
| 1276 | *total_count += count; |
| 1277 | *total_size += size; |
| 1278 | Sprintf(buf, template, src, count, size); |
| 1279 | putstr(win, 0, buf); |
| 1280 | } |
| 1281 | } |
| 1282 | |
| 1283 | staticfn void |
| 1284 | misc_stats( |
no test coverage detected