Add a nonfatal() function everywhere, to be used for reporting things
[u/mdw/putty] / pscp.c
diff --git a/pscp.c b/pscp.c
index 70e3e7a..2eecad6 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -129,6 +129,19 @@ void modalfatalbox(char *fmt, ...)
 
     cleanup_exit(1);
 }
+void nonfatal(char *fmt, ...)
+{
+    char *str, *str2;
+    va_list ap;
+    va_start(ap, fmt);
+    str = dupvprintf(fmt, ap);
+    str2 = dupcat("Error: ", str, "\n", NULL);
+    sfree(str);
+    va_end(ap);
+    tell_str(stderr, str2);
+    sfree(str2);
+    errs++;
+}
 void connection_fatal(void *frontend, char *fmt, ...)
 {
     char *str, *str2;