|
@@ -104,10 +104,24 @@ out_destroy_form:
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
-static const char yes[] = "Yes", no[] = "No";
|
|
|
|
|
|
+static const char yes[] = "Yes", no[] = "No",
|
|
|
|
+ warning_str[] = "Warning!", ok[] = "Ok";
|
|
|
|
|
|
bool ui__dialog_yesno(const char *msg)
|
|
bool ui__dialog_yesno(const char *msg)
|
|
{
|
|
{
|
|
/* newtWinChoice should really be accepting const char pointers... */
|
|
/* newtWinChoice should really be accepting const char pointers... */
|
|
return newtWinChoice(NULL, (char *)yes, (char *)no, (char *)msg) == 1;
|
|
return newtWinChoice(NULL, (char *)yes, (char *)no, (char *)msg) == 1;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+void ui__warning(const char *format, ...)
|
|
|
|
+{
|
|
|
|
+ va_list args;
|
|
|
|
+
|
|
|
|
+ va_start(args, format);
|
|
|
|
+ if (use_browser > 0)
|
|
|
|
+ newtWinMessagev((char *)warning_str, (char *)ok,
|
|
|
|
+ (char *)format, args);
|
|
|
|
+ else
|
|
|
|
+ vfprintf(stderr, format, args);
|
|
|
|
+ va_end(args);
|
|
|
|
+}
|