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

Function parse_next_broadcast

sys/vms/vmsmail.c:343–362  ·  view source on GitHub ↗

fetch the text of a captured broadcast, then mangle and decipher it */

Source from the content-addressed store, hash-verified

341/* fetch the text of a captured broadcast, then mangle and decipher it
342 */
343struct 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 */

Callers 2

ckmailstatusFunction · 0.85
ckmailstatusFunction · 0.85

Calls 2

filter_brdcstFunction · 0.85
parse_brdcstFunction · 0.85

Tested by

no test coverage detected