#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <locale.h>
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
const struct imagex_command *cmd;
int ret;
+ setlocale(LC_ALL, "");
+
if (argc < 2) {
imagex_error("No command specified");
usage_all();
/* The user may like to see more informative error messages. */
wimlib_set_print_errors(true);
- /* Calling wimlib_global_init() is not strictly necessary because
- * 'imagex' is single-threaded. */
+ /* Do any initializations that the library needs */
ret = wimlib_global_init();
if (ret)
goto out;
if (ret == WIMLIB_ERR_NTFS_3G && errno != 0)
imagex_error_with_errno("errno");
}
- /* Calling wimlib_global_cleanup() is not strictly necessary because the
- * process is exiting anyway. */
+
+ /* Make the library free any resources it's holding (not strictly
+ * necessary because the process is ending anyway). */
wimlib_global_cleanup();
return ret;
}