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

Function append_message

win/X11/winmesg.c:240–256  ·  view source on GitHub ↗

* Append a line of text to the message window. Split the line if the * rendering of the text is too long for the window. */

Source from the content-addressed store, hash-verified

238 * rendering of the text is too long for the window.
239 */
240void
241append_message(struct xwindow *wp, const char *str)
242{
243 char *mark, *remainder, buf[BUFSZ];
244
245 if (!str)
246 return;
247
248 Strcpy(buf, str); /* we might mark it up */
249
250 remainder = buf;
251 do {
252 mark = remainder;
253 remainder = split(mark, wp->mesg_information->fs, wp->pixel_width);
254 add_line(wp->mesg_information, mark);
255 } while (remainder);
256}
257
258/* private functions =======================================================
259 */

Callers 2

X11_putmsghistoryFunction · 0.85
X11_putstrFunction · 0.85

Calls 2

splitFunction · 0.85
add_lineFunction · 0.85

Tested by

no test coverage detected