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

Function flush_broadcasts

sys/vms/vmsmail.c:366–383  ·  view source on GitHub ↗

spit out any pending broadcast messages whenever we leave */

Source from the content-addressed store, hash-verified

364/* spit out any pending broadcast messages whenever we leave
365 */
366static void flush_broadcasts(void) /* called from disable_broadcast_trapping() */
367{
368 if (broadcasts > 0) {
369 short len, typ;
370 $DESCRIPTOR(msg_dsc, empty_string);
371 char buf[512 + 1];
372
373 msg_dsc.dsc$a_pointer = buf, msg_dsc.dsc$w_length = sizeof buf - 1;
374 raw_print(""); /* print at least one line for wait_synch() */
375 do {
376 typ = len = 0;
377 smg$get_broadcast_message(&pasteboard_id, &msg_dsc, &len, &typ);
378 if (typ == MSG$_TRMBRDCST)
379 buf[len] = '\0', raw_print(buf);
380 } while (--broadcasts);
381 wait_synch(); /* prompt with "Hit return to continue: " */
382 }
383}
384
385/* AST routine called when terminal's associated mailbox receives a message
386 */

Callers 1

Calls 2

raw_printFunction · 0.85
wait_synchFunction · 0.85

Tested by

no test coverage detected