set up the terminal driver to deliver $brkthru data to a mailbox device */
| 414 | /* set up the terminal driver to deliver $brkthru data to a mailbox device |
| 415 | */ |
| 416 | unsigned long |
| 417 | enable_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 | */ |
no test coverage detected