/* * when desparate to communicate an error, enable popup messages and * use mlforce(). */ static void lastditch_msg(char *msg) { #if OPT_POPUP_MSGS int save = global_g_val(GMDPOPUP_MSGS); set_global_g_val(GMDPOPUP_MSGS, TRUE); #endif mlforce(msg); #if OPT_POPUP_MSGS update(FALSE); popup_msgs(); update(FALSE); set_global_g_val(GMDPOPUP_MSGS, save); #endif }
/* * If no warning messages were encountered during startup, and the popup-msgs * mode wasn't enabled, discard the informational messages that are there * already. */ void purge_msgs(void) { TRACE(("purge_msgs mode:%d, warnings:%d\n", global_g_val(GMDPOPUP_MSGS), warnings)); if ((global_g_val(GMDPOPUP_MSGS) == -TRUE) && (warnings == 0)) { BUFFER *bp = find_b_name(MESSAGES_BufName); if (valid_buffer(bp) && bp->b_nwnd == 0) { (void) zotbuf(bp); } set_global_g_val(GMDPOPUP_MSGS, FALSE); } }