spit out any pending broadcast messages whenever we leave */
| 364 | /* spit out any pending broadcast messages whenever we leave |
| 365 | */ |
| 366 | static 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 | */ |
no test coverage detected