about summary refs log tree commit diff stats
path: root/src/HTAlert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTAlert.c')
-rw-r--r--src/HTAlert.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/HTAlert.c b/src/HTAlert.c
index f47c0251..e36fbf66 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -30,11 +30,34 @@ PUBLIC void HTAlert ARGS1(
 {
     CTRACE(tfp, "\nAlert!: %s\n\n", Msg);
     CTRACE_FLUSH(tfp);
-    _user_message("Alert!: %s", Msg);
+    _user_message(ALERT_FORMAT, Msg);
 
     sleep(AlertSecs);
 }
 
+PUBLIC void HTAlwaysAlert ARGS2(
+	CONST char *,	extra_prefix,
+	CONST char *,	Msg)
+{
+    if (!dump_output_immediately && LYCursesON) {
+	HTAlert(Msg);
+    } else {
+	if (extra_prefix) {
+	    fprintf(((TRACE) ? stdout : stderr),
+		    "%s %s!\n",
+		    extra_prefix, Msg);
+	} else {
+	    fprintf(((TRACE) ? stdout : stderr),
+		    ALERT_FORMAT,
+		    (Msg == 0) ? "" : Msg);
+	}
+	fflush(stdout);
+	sleep(AlertSecs);
+	CTRACE(tfp, "\nAlert!: %s\n\n", Msg);
+	CTRACE_FLUSH(tfp);
+    }
+}
+
 /*	Issue an informational message.			HTInfoMsg()
 **	--------------------------------
 */