File-RsyncP

 view release on metacpan or  search on metacpan

FileList/rsync.h  view on Meta::CPAN


struct exclude_struct {
	struct exclude_struct *next;
	char *pattern;
	unsigned int match_flags;
	int slash_cnt;
};

struct exclude_list_struct {
	struct exclude_struct *head;
	struct exclude_struct *tail;
	char *debug_type;
};

/*
 * Start the flist array at FLIST_START entries and grow it
 * by doubling until FLIST_LINEAR then grow by FLIST_LINEAR
 */
#define FLIST_START	(32 * 1024)
#define FLIST_LINEAR	(FLIST_START * 512)

/*
 * Extent size for allocation pools A minimum size of 128KB
 * is needed to mmap them so that freeing will release the
 * space to the OS.
 *
 * Larger sizes reduce leftover fragments and speed free calls
 * (when they happen) Smaller sizes increase the chance of
 * freed allocations freeing whole extents.
 */
#define FILE_EXTENT	(256 * 1024)
#define HLINK_EXTENT	(128 * 1024)

#define WITH_HLINK	1
#define WITHOUT_HLINK	0

struct file_list {
	int count;
	int malloced;
	alloc_pool_t file_pool;
	alloc_pool_t idev_pool;
	alloc_pool_t hlink_pool;
	struct file_struct **files;
        /*
         * Added for perl interface.
         */
        /* 
         * command-line options
         */
        int always_checksum;
        int protocol_version;
        int preserve_uid;
        int preserve_gid;
        int preserve_devices;
        int preserve_links;
        int preserve_hard_links;
        int sanitize_paths;
        int eol_nulls;

        /* 
         * incoming (decoded) string being processed
         */
        unsigned char *inBuf;
        uint32 inLen;
        uint32 inPosn;
        uint32 inFileStart;
        int inError;
        int decodeDone;
        int fatalError;
        /*
         * outgoing (encoded) string being generated
         */
        unsigned char *outBuf;
        uint32 outLen;
        uint32 outPosn;

        /*
         * state variables
         */
        time_t modtime;
        mode_t mode;
        uint64 dev;
        dev_t rdev;
        uint32 rdev_major;
        uid_t uid;
        gid_t gid;
        char *lastdir;
        int lastdir_depth, lastdir_len;

        char *encode_lastdir;
        int encode_lastdir_len;

        struct file_struct **hlink_list;
        unsigned int hlink_count;
        int link_idev_data_done;

        /*
         * Exclude state variables
         */
        char exclude_curr_dir[MAXPATHLEN];
        struct exclude_list_struct exclude_list;
        char *exclude_path_prefix;

        /*
         * Warning: perl.h might define MAXPATHLEN differently from
         * flist.h, so keep this at the end of the struct...
         */
	char lastname[MAXPATHLEN];
};

#define SUMFLG_SAME_OFFSET	(1<<0)

struct sum_buf {
	OFF_T offset;		/**< offset in file of this chunk */
	unsigned int len;	/**< length of chunk of file */
	uint32 sum1;	        /**< simple checksum */
	short flags;		/**< flag bits */
	char sum2[SUM_LENGTH];	/**< checksum  */
};

struct sum_struct {



( run in 1.435 second using v1.01-cache-2.11-cpan-bbe5e583499 )