MCPcopy Create free account
hub / github.com/NetHack/NetHack / dump_plines

Function dump_plines

src/end.c:518–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516
517#ifdef DUMPLOG
518staticfn void
519dump_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*/

Callers 1

dump_everythingFunction · 0.85

Calls 1

copyncharsFunction · 0.85

Tested by

no test coverage detected