- Put "basedir" into a union "dir" and named it "root". The other
authorWayne Davison <wayned@samba.org>
Tue, 1 Feb 2005 09:21:30 +0000 (09:21 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 1 Feb 2005 09:21:30 +0000 (09:21 +0000)
  member of the union is "depth".
- Added members "low" and "high" to the file list structure (which
  are set when the list is cleaned).
- Got rid of the flist_up() inline function.

rsync.h

diff --git a/rsync.h b/rsync.h
index 690d5a6..6dc5a9c 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -473,9 +473,12 @@ struct file_struct {
                char *link;     /* Points to symlink string, if a symlink */
        } u;
        OFF_T length;
-       char *basename;
-       char *dirname;
-       char *basedir;
+       char *basename;         /* The current item's name (AKA filename) */
+       char *dirname;          /* The directory info inside the transfer */
+       union {
+               char *root;     /* Sender-side dir info outside transfer */
+               int depth;      /* Receiver-side directory depth info */
+       } dir;
        union {
                struct idev *idev;
                struct hlink *links;
@@ -515,6 +518,7 @@ struct file_list {
        alloc_pool_t hlink_pool;
        int count;
        int malloced;
+       int low, high;
 };
 
 #define SUMFLG_SAME_OFFSET     (1<<0)
@@ -594,15 +598,6 @@ struct stats {
 };
 
 
-/* we need this function because of the silly way in which duplicate
-   entries are handled in the file lists - we can't change this
-   without breaking existing versions */
-static inline int flist_up(struct file_list *flist, int i)
-{
-       while (!flist->files[i]->basename) i++;
-       return i;
-}
-
 #include "byteorder.h"
 #include "lib/mdfour.h"
 #include "lib/wildmatch.h"