]> wimlib.net Git - wimlib/blobdiff - programs/imagex-win32.h
Char encoding updates and misc. fixes
[wimlib] / programs / imagex-win32.h
index 1de8e9845bcfbc7fe25f52536b53dc4e57c35049..9e18eab549f91f4052b9250a23a565ca9e160945 100644 (file)
@@ -3,17 +3,19 @@
 
 #include <stddef.h>
 #include <stdbool.h>
+#include <wchar.h>
 
 typedef struct {
-       size_t gl_pathc;
-       char **gl_pathv;
-       size_t gl_offs;
+       size_t    gl_pathc;
+       wchar_t **gl_pathv;
+       size_t    gl_offs;
 } glob_t;
 
 /* WARNING: this is a reduced functionality replacement */
-extern int glob(const char *pattern, int flags,
-               int (*errfunc)(const char *epath, int eerrno),
-               glob_t *pglob);
+extern int
+win32_wglob(const wchar_t *pattern, int flags,
+           int (*errfunc)(const wchar_t *epath, int eerrno),
+           glob_t *pglob);
 
 extern void globfree(glob_t *pglob);
 
@@ -37,4 +39,22 @@ win32_acquire_restore_privileges();
 extern void
 win32_release_restore_privileges();
 
+extern wchar_t *
+win32_mbs_to_wcs(const char *mbs, size_t mbs_nbytes, size_t *num_wchars_ret);
+
+extern wchar_t *
+win32_wbasename(wchar_t *path);
+
+#include "wgetopt.h"
+
+#define optarg                 woptarg
+#define optind                 woptind
+#define opterr                 wopterr
+#define optopt                 woptopt
+#define option                 woption
+
+#define getopt_long_only       wgetopt_long_only
+#define getopt_long            wgetopt_long
+#define getopt                 wgetopt
+
 #endif