| 495 | #ifndef SFCTOOL |
| 496 | |
| 497 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 498 | |
| 499 | /* to support '#stats' wizard-mode command */ |
| 500 | void |
| 501 | light_stats(const char *hdrfmt, char *hdrbuf, long *count, long *size) |
| 502 | { |
| 503 | light_source *ls; |
| 504 | |
| 505 | Sprintf(hdrbuf, hdrfmt, (long) sizeof (light_source)); |
| 506 | *count = *size = 0L; |
| 507 | for (ls = gl.light_base; ls; ls = ls->next) { |
| 508 | ++*count; |
| 509 | *size += (long) sizeof *ls; |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 514 |