/**
* @mainpage
*
- * This is the documentation for the library interface of wimlib 1.13.6, a C
+ * This is the documentation for the library interface of wimlib 1.14.2, a C
* library for creating, modifying, extracting, and mounting files in the
* Windows Imaging (WIM) format. This documentation is intended for developers
* only. If you have installed wimlib and want to know how to use the @b
* wimlib-imagex program, please see the manual pages and also the <a
- * href="https://wimlib.net/git/?p=wimlib;a=blob;f=README">README file</a>.
+ * href="https://wimlib.net/git/?p=wimlib;a=blob;f=README.md">README file</a>.
*
* @section sec_installing Installing
*
* @subsection Windows
*
* Download the Windows binary distribution with the appropriate architecture
- * (i686 or x86_64 --- also called "x86" and "amd64" respectively) from
- * https://wimlib.net. Link your program with libwim-15.dll. If needed by your
- * programming language or development environment, the import library
+ * from https://wimlib.net. Link your program with libwim-15.dll. If needed by
+ * your programming language or development environment, the import library
* libwim.lib and C/C++ header wimlib.h can be found in the directory "devel" in
* the ZIP file.
*
#include <time.h>
#ifdef BUILDING_WIMLIB
+ /*
+ * On i386, gcc assumes that the stack is 16-byte aligned at function entry.
+ * However, some compilers (e.g. MSVC) and programming languages (e.g. Delphi)
+ * only guarantee 4-byte alignment when calling functions. This is mainly an
+ * issue on Windows, but it can occur on Linux too. Work around this ABI
+ * incompatibility by realigning the stack pointer when entering the library.
+ * This prevents crashes in SSE/AVX code.
+ */
+# if defined(__GNUC__) && defined(__i386__)
+# define WIMLIB_ALIGN_STACK __attribute__((force_align_arg_pointer))
+# else
+# define WIMLIB_ALIGN_STACK
+# endif
# ifdef _WIN32
-# define WIMLIBAPI __declspec(dllexport)
+# define WIMLIBAPI __declspec(dllexport) WIMLIB_ALIGN_STACK
# else
-# define WIMLIBAPI __attribute__((visibility("default")))
+# define WIMLIBAPI __attribute__((visibility("default"))) WIMLIB_ALIGN_STACK
# endif
#else
# define WIMLIBAPI
#define WIMLIB_MAJOR_VERSION 1
/** Minor version of the library (for example, the 2 in 1.2.5). */
-#define WIMLIB_MINOR_VERSION 13
+#define WIMLIB_MINOR_VERSION 14
/** Patch version of the library (for example, the 5 in 1.2.5). */
-#define WIMLIB_PATCH_VERSION 6
+#define WIMLIB_PATCH_VERSION 2
#ifdef __cplusplus
extern "C" {
wimlib_progress_func_t progfunc,
void *progctx);
+/**
+ * @ingroup G_general
+ *
+ * Load a UTF-8 or UTF-16LE encoded text file into memory.
+ *
+ * @param path
+ * The path to the file, or NULL or "-" to use standard input.
+ * @param tstr_ret
+ * On success, a buffer containing the file's text as a "wimlib_tchar"
+ * string is returned here. The buffer must be freed using free().
+ * @param tstr_nchars_ret
+ * On success, the length of the text in "wimlib_tchar"s is returned here.
+ *
+ * @return 0 on success; a ::wimlib_error_code value on failure.
+ */
+WIMLIBAPI int
+wimlib_load_text_file(const wimlib_tchar *path,
+ wimlib_tchar **tstr_ret, size_t *tstr_nchars_ret);
/**
* @ingroup G_mounting_wim_images