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

Function deliver_by_window

src/questpgr.c:438–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438staticfn void
439deliver_by_window(const char *msg, int how)
440{
441 char in_line[BUFSZ], out_line[BUFSZ];
442 const char *msgp = msg, *msgend = eos((char *) msg);
443 winid datawin = create_nhwindow(how);
444
445 while (msgp < msgend) {
446 /* copynchars() will stop at newline if it finds one */
447 copynchars(in_line, msgp, (int) sizeof in_line - 1);
448 msgp += strlen(in_line) + 1;
449
450 convert_line(in_line, out_line);
451 putstr(datawin, 0, out_line);
452 }
453
454 display_nhwindow(datawin, TRUE);
455 destroy_nhwindow(datawin);
456}
457
458staticfn boolean
459skip_pager(boolean common UNUSED)

Callers 1

com_pager_coreFunction · 0.85

Calls 3

eosFunction · 0.85
copyncharsFunction · 0.85
convert_lineFunction · 0.85

Tested by

no test coverage detected