fetch the text of a captured broadcast, then mangle and decipher it */
| 341 | /* fetch the text of a captured broadcast, then mangle and decipher it |
| 342 | */ |
| 343 | struct mail_info *parse_next_broadcast(void) /* called by ckmailstatus(mail.c) */ |
| 344 | { |
| 345 | short length, msg_type; |
| 346 | $DESCRIPTOR(message, empty_string); /* string descriptor for buf[] */ |
| 347 | struct mail_info *result = 0; |
| 348 | /* messages could actually be longer; let long ones be truncated */ |
| 349 | char buf[255 + 1]; |
| 350 | |
| 351 | message.dsc$a_pointer = buf, message.dsc$w_length = sizeof buf - 1; |
| 352 | msg_type = length = 0; |
| 353 | smg$get_broadcast_message(&pasteboard_id, &message, &length, &msg_type); |
| 354 | if (msg_type == MSG$_TRMBRDCST) { |
| 355 | buf[length] = '\0'; |
| 356 | filter_brdcst(buf); /* mask non-printable characters */ |
| 357 | result = parse_brdcst(buf); /* do the real work */ |
| 358 | } else if (msg_type == MSG$_TRMHANGUP) { |
| 359 | (void) gsignal(SIGHUP); |
| 360 | } |
| 361 | return result; |
| 362 | } |
| 363 | |
| 364 | /* spit out any pending broadcast messages whenever we leave |
| 365 | */ |
no test coverage detected