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

Function enable_broadcast_trapping

sys/vms/vmsmail.c:416–434  ·  view source on GitHub ↗

set up the terminal driver to deliver $brkthru data to a mailbox device */

Source from the content-addressed store, hash-verified

414/* set up the terminal driver to deliver $brkthru data to a mailbox device
415 */
416unsigned long
417enable_broadcast_trapping(void) /* called by setftty() */
418{
419 unsigned long sts = 1;
420
421 if (broadcasts >= 0) { /* (-1 => no pasteboard, so don't even try) */
422 /* register callback routine to be triggered when broadcasts arrive */
423 /* Note side effect: also intercepts hangup notification. */
424 /* Another note: TMPMBX privilege is required. */
425 sts = smg$set_broadcast_trapping(&pasteboard_id, broadcast_ast, 0);
426 if (!vms_ok(sts)) {
427 errno = EVMSERR, vaxc$errno = sts;
428 raw_print("");
429 perror("?can't enable broadcast trapping");
430 wait_synch();
431 }
432 }
433 return sts;
434}
435
436/* return to 'normal'; $brkthru data goes straight to the terminal
437 */

Callers 2

setfttyFunction · 0.85
mainFunction · 0.85

Calls 2

raw_printFunction · 0.85
wait_synchFunction · 0.85

Tested by

no test coverage detected