]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.h
Remove unneeded parameter from compression functions
[wimlib] / src / lookup_table.h
index d172cac9cb1c05b13a9fe060adc3af8572d7125e..78de61a3f523e06c1d9c6331644fba98d7d74a1b 100644 (file)
 #define LOOKUP_FLAG_ADS_OK             0x00000001
 #define LOOKUP_FLAG_DIRECTORY_OK       0x00000002
 
+#ifdef __WIN32__
+#include <windef.h>
+#endif
+
 
 /* The lookup table of a WIM file maps SHA1 message digests to streams of data.
  * Here, the in-memory structure is implemented as a hash table.
@@ -32,7 +36,7 @@ struct wim_lookup_table {
 
 #ifdef WITH_NTFS_3G
 struct ntfs_location {
-       mbchar *path;
+       tchar *path;
        utf16lechar *stream_name;
        u16 stream_name_nchars;
        struct _ntfs_volume **ntfs_vol_p;
@@ -150,16 +154,16 @@ struct wim_lookup_table_entry {
                 * extraction mode.   In these mode, all identical files are linked
                 * together, and @extracted_file will be set to the filename of the
                 * first extracted file containing this stream.  */
-               mbchar *extracted_file;
+               tchar *extracted_file;
        };
 
        /* Pointers to somewhere where the stream is actually located.  See the
         * comments for the @resource_location field above. */
        union {
                WIMStruct *wim;
-               mbchar *file_on_disk;
-               mbchar *staging_file_name;
-               u8 *attached_buffer;
+               tchar *file_on_disk;
+               tchar *staging_file_name;
+               void *attached_buffer;
        #ifdef WITH_NTFS_3G
                struct ntfs_location *ntfs_loc;
        #endif
@@ -168,6 +172,7 @@ struct wim_lookup_table_entry {
                /* @file_on_disk_fp and @attr are both used to cache file/stream
                 * handles so we don't have re-open them on every read */
 
+
                /* Valid iff resource_location == RESOURCE_IN_FILE_ON_DISK */
                FILE *file_on_disk_fp;
        #ifdef WITH_NTFS_3G
@@ -175,6 +180,10 @@ struct wim_lookup_table_entry {
                struct _ntfs_attr *attr;
        #endif
 
+       #ifdef __WIN32__
+               HANDLE win32_file_on_disk_fp;
+       #endif
+
                /* Pointer to inode that contains the opened file descriptors to
                 * this stream (valid iff resource_location ==
                 * RESOURCE_IN_STAGING_FILE) */
@@ -290,7 +299,7 @@ extern struct wim_lookup_table_entry *
 __lookup_resource(const struct wim_lookup_table *table, const u8 hash[]);
 
 extern int
-lookup_resource(WIMStruct *w, const mbchar *path,
+lookup_resource(WIMStruct *w, const tchar *path,
                int lookup_flags, struct wim_dentry **dentry_ret,
                struct wim_lookup_table_entry **lte_ret, u16 *stream_idx_ret);