]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.h
split, join: Read input WIM(s) sequentially
[wimlib] / src / lookup_table.h
index 1759df4e5357215fb428342118a2ecfe886af583..eacd9aa4596dfae4441de5ec9fb338f2973f1048 100644 (file)
@@ -163,7 +163,7 @@ struct wim_lookup_table_entry {
                WIMStruct *wim;
                tchar *file_on_disk;
                tchar *staging_file_name;
-               u8 *attached_buffer;
+               void *attached_buffer;
        #ifdef WITH_NTFS_3G
                struct ntfs_location *ntfs_loc;
        #endif
@@ -261,8 +261,8 @@ extern int
 read_lookup_table(WIMStruct *w);
 
 extern int
-write_lookup_table(struct wim_lookup_table *table, FILE *out,
-                  struct resource_entry *out_res_entry);
+write_lookup_table(WIMStruct *w, int image, struct resource_entry *out_res_entry);
+
 extern void
 free_lookup_table(struct wim_lookup_table *table);
 
@@ -274,6 +274,7 @@ static inline void
 lookup_table_unlink(struct wim_lookup_table *table, struct wim_lookup_table_entry *lte)
 {
        hlist_del(&lte->hash_list);
+       wimlib_assert(table->num_entries != 0);
        table->num_entries--;
 }
 
@@ -295,6 +296,15 @@ for_lookup_table_entry(struct wim_lookup_table *table,
                       int (*visitor)(struct wim_lookup_table_entry *, void *),
                       void *arg);
 
+extern int
+sort_stream_list_by_wim_position(struct list_head *stream_list);
+
+extern int
+for_lookup_table_entry_pos_sorted(struct wim_lookup_table *table,
+                                 int (*visitor)(struct wim_lookup_table_entry *,
+                                                void *),
+                                 void *arg);
+
 extern struct wim_lookup_table_entry *
 __lookup_resource(const struct wim_lookup_table *table, const u8 hash[]);