]> wimlib.net Git - wimlib/blobdiff - include/wimlib/dentry.h
win32_common.c: Refactor dll loading
[wimlib] / include / wimlib / dentry.h
index d0d1d0f5eced657a8787717c559532612063b73a..bdbd5f753ccde41c2fee16e9a1e02bde4347b598 100644 (file)
@@ -93,6 +93,9 @@ struct wim_dentry {
         * be extracted to it.  */
        u8 was_linked : 1;
 
+       /* Used by wimlib_update_image()  */
+       u8 is_orphan : 1;
+
        /* Temporary list field  */
        struct list_head tmp_list;
 
@@ -159,12 +162,8 @@ for_dentry_in_tree_depth(struct wim_dentry *root,
 /* Iterate through each @child dentry of the @dir directory inode,
  * in sorted order (by case sensitive name).  */
 #define for_inode_child(child, dir)                                            \
-       for (struct avl_tree_node *_tmp =                                       \
-                       avl_tree_first_in_order((dir)->i_children);             \
-            _tmp &&                                                            \
-               (((child) = avl_tree_entry(_tmp, struct wim_dentry,             \
-                                        d_index_node)), 1);                    \
-            _tmp = avl_tree_next_in_order(_tmp))
+       avl_tree_for_each_in_order((child), (dir)->i_children,                  \
+                                  struct wim_dentry, d_index_node)
 
 /* Iterate through each @child dentry of the @parent dentry,
  * in sorted order (by case sensitive name).  */
@@ -174,14 +173,8 @@ for_dentry_in_tree_depth(struct wim_dentry *root,
 /* Iterate through each @child dentry of the @dir directory inode,
  * in postorder (safe for freeing the child dentries).  */
 #define for_inode_child_postorder(child, dir)                          \
-       for (struct avl_tree_node *_parent, *_tmp =                     \
-                       avl_tree_first_in_postorder(                    \
-                               (dir)->i_children);                     \
-            _tmp &&                                                    \
-               (((child) = avl_tree_entry(_tmp, struct wim_dentry,     \
-                                        d_index_node)), 1) &&          \
-               ((_parent = avl_get_parent(_tmp)), 1);                  \
-            _tmp = avl_tree_next_in_postorder(_tmp, _parent))
+       avl_tree_for_each_in_postorder((child), (dir)->i_children,      \
+                                      struct wim_dentry, d_index_node)
 
 /* Iterate through each @child dentry of the @parent dentry,
  * in postorder (safe for freeing the child dentries).  */
@@ -204,6 +197,10 @@ calculate_subdir_offsets(struct wim_dentry *root, u64 *subdir_offset_p);
 extern int
 dentry_set_name(struct wim_dentry *dentry, const tchar *new_name);
 
+extern int
+dentry_set_name_utf16le(struct wim_dentry *dentry, const utf16lechar *new_name,
+                       size_t new_name_nbytes);
+
 extern struct wim_dentry *
 get_dentry(struct WIMStruct *wim, const tchar *path,
           CASE_SENSITIVITY_TYPE case_type);
@@ -240,9 +237,6 @@ wim_pathname_to_stream(WIMStruct *wim,
 extern int
 calculate_dentry_full_path(struct wim_dentry *dentry);
 
-extern int
-calculate_dentry_tree_full_paths(struct wim_dentry *root);
-
 extern tchar *
 dentry_full_path(struct wim_dentry *dentry);
 
@@ -259,7 +253,7 @@ extern void
 dentry_tree_clear_inode_visited(struct wim_dentry *root);
 
 extern int
-new_filler_directory(const tchar *name, struct wim_dentry **dentry_ret);
+new_filler_directory(struct wim_dentry **dentry_ret);
 
 extern void
 free_dentry(struct wim_dentry *dentry);
@@ -277,9 +271,12 @@ unlink_dentry(struct wim_dentry *dentry);
 extern struct wim_dentry *
 dentry_add_child(struct wim_dentry *parent, struct wim_dentry *child);
 
+struct update_command_journal;
+
 extern int
 rename_wim_path(WIMStruct *wim, const tchar *from, const tchar *to,
-               CASE_SENSITIVITY_TYPE case_type);
+               CASE_SENSITIVITY_TYPE case_type,
+               struct update_command_journal *j);
 
 
 extern int