Add a nonfatal() function everywhere, to be used for reporting things
[sgt/putty] / unix / uxplink.c
index 560ec38..9e10c48 100644 (file)
@@ -63,6 +63,22 @@ void modalfatalbox(char *p, ...)
     }
     cleanup_exit(1);
 }
+void nonfatal(char *p, ...)
+{
+    struct termios cf;
+    va_list ap;
+    premsg(&cf);
+    fprintf(stderr, "ERROR: ");
+    va_start(ap, p);
+    vfprintf(stderr, p, ap);
+    va_end(ap);
+    fputc('\n', stderr);
+    postmsg(&cf);
+    if (logctx) {
+        log_free(logctx);
+        logctx = NULL;
+    }
+}
 void connection_fatal(void *frontend, char *p, ...)
 {
     struct termios cf;