X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib.h;h=56b6c89398be69a9284dd82feef529cd72d21899;hb=e61f93d517a76c23a3bfc2fdbd32fa190fbbc286;hp=9c043c1ba5d31e2d112c4ba8997ec481508bc832;hpb=4c532e2a9f1a40e1c1a6ed44a50025cfbfab6e4f;p=wimlib
diff --git a/include/wimlib.h b/include/wimlib.h
index 9c043c1b..56b6c893 100644
--- a/include/wimlib.h
+++ b/include/wimlib.h
@@ -3661,6 +3661,39 @@ extern int
wimlib_resolve_image(WIMStruct *wim,
const wimlib_tchar *image_name_or_num);
+/**
+ * Sets the file to which the library will print error and warning messages.
+ *
+ * This version of the function takes a C library FILE * opened for
+ * writing (or appending). Use wimlib_set_error_file_by_name() to specify the
+ * file by name instead.
+ *
+ * This also enables error messages, as if by a call to
+ * wimlib_set_print_errors(true).
+ *
+ * @return 0 on success; nonzero on error.
+ * @retval ::WIMLIB_ERR_UNSUPPORTED
+ * wimlib was compiled using the --without-error-messages option.
+ */
+extern int
+wimlib_set_error_file(FILE *fp);
+
+/**
+ * Sets the path to the file to which the library will print error and warning
+ * messages. The library will open this file for appending.
+ *
+ * This also enables error messages, as if by a call to
+ * wimlib_set_print_errors(true).
+ *
+ * @return 0 on success; nonzero on error.
+ * @retval ::WIMLIB_ERR_OPEN
+ * The file named by @p path could not be opened for appending.
+ * @retval ::WIMLIB_ERR_UNSUPPORTED
+ * wimlib was compiled using the --without-error-messages option.
+ */
+extern int
+wimlib_set_error_file_by_name(const char *path);
+
/**
* @ingroup G_modifying_wims
*