In clean_flist(), if a duplicate is found for a dir and a non-dir,
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index 6dc5a9c..75e3a26 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -41,7 +41,7 @@
 
 /* These flags are only used during the flist transfer. */
 
-#define XMIT_DEL_START (1<<0)
+#define XMIT_TOP_DIR (1<<0)
 #define XMIT_SAME_MODE (1<<1)
 #define XMIT_EXTENDED_FLAGS (1<<2)
 #define XMIT_SAME_RDEV_pre28 XMIT_EXTENDED_FLAGS /* Only in protocols < 28 */
 
 /* These flags are used in the live flist data. */
 
-#define FLAG_DEL_START (1<<0)
+#define FLAG_TOP_DIR (1<<0)
 #define FLAG_HLINK_EOL (1<<1)  /* generator only */
 #define FLAG_MOUNT_POINT (1<<2)        /* sender only */
+#define FLAG_DEL_HERE (1<<3)   /* receiver/generator */
 
 /* update this if you make incompatible changes */
 #define PROTOCOL_VERSION 29
 #define ALL_FILTERS    2
 
 #define XFLG_FATAL_ERRORS      (1<<0)
-#define XFLG_DEF_INCLUDE       (1<<1)
-#define XFLG_DEF_EXCLUDE       (1<<2)
-#define XFLG_WORD_SPLIT        (1<<3)
-#define XFLG_DIRECTORY         (1<<4)
-#define XFLG_NO_PREFIXES       (1<<5)
-#define XFLG_ANCHORED2ABS      (1<<6)
+#define XFLG_OLD_PREFIXES      (1<<1)
+#define XFLG_ANCHORED2ABS      (1<<2)
 
 #define PERMS_REPORT           (1<<0)
 #define PERMS_SKIP_MTIME       (1<<1)
@@ -566,10 +563,19 @@ struct map_struct {
 #define MATCHFLG_PERDIR_MERGE  (1<<11)/* merge-file is searched per-dir */
 #define MATCHFLG_EXCLUDE_SELF  (1<<12)/* merge-file name should be excluded */
 #define MATCHFLG_FINISH_SETUP  (1<<13)/* per-dir merge file needs setup */
+#define MATCHFLG_NEGATE        (1<<14)/* rule matches when pattern does not */
+#define MATCHFLG_CVS_IGNORE    (1<<15)/* rule was -C or :C */
+#define MATCHFLG_SENDER_SIDE   (1<<16)/* rule applies to the sending side */
+#define MATCHFLG_RECEIVER_SIDE (1<<17)/* rule applies to the receiving side */
+
+#define MATCHFLGS_FROM_CONTAINER (MATCHFLG_ABS_PATH | MATCHFLG_INCLUDE \
+                               | MATCHFLG_DIRECTORY | MATCHFLG_SENDER_SIDE \
+                               | MATCHFLG_NEGATE | MATCHFLG_RECEIVER_SIDE)
+
 struct filter_struct {
        struct filter_struct *next;
        char *pattern;
-       unsigned int match_flags;
+       uint32 match_flags;
        union {
                int slash_cnt;
                struct filter_list_struct *mergelist;
@@ -748,7 +754,7 @@ extern int errno;
 #define INITACCESSPERMS 0700
 
 /* handler for null strings in printf format */
-#define NS(s) ((s)?(s):"<NULL>")
+#define NS(s) ((s)?safe_fname(s):"<NULL>")
 
 #if !defined(__GNUC__) || defined(APPLE)
 /* Apparently the OS X port of gcc gags on __attribute__.