| 516 | |
| 517 | #ifdef DUMPLOG |
| 518 | staticfn void |
| 519 | dump_plines(void) |
| 520 | { |
| 521 | int i, j; |
| 522 | char buf[BUFSZ], **strp; |
| 523 | |
| 524 | Strcpy(buf, " "); /* one space for indentation */ |
| 525 | putstr(0, 0, "Latest messages:"); |
| 526 | for (i = 0, j = (int) gs.saved_pline_index; i < DUMPLOG_MSG_COUNT; |
| 527 | ++i, j = (j + 1) % DUMPLOG_MSG_COUNT) { |
| 528 | strp = &gs.saved_plines[j]; |
| 529 | if (*strp) { |
| 530 | copynchars(&buf[1], *strp, BUFSZ - 1 - 1); |
| 531 | putstr(0, 0, buf); |
| 532 | #ifdef FREE_ALL_MEMORY |
| 533 | free(*strp), *strp = 0; |
| 534 | #endif |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | #endif /* DUMPLOG */ |
| 539 | |
| 540 | /*ARGSUSED*/ |
no test coverage detected