mercurial/mpatch.h
changeset 29707 b9b9f9a92481
child 29708 55dd12204b8e
equal deleted inserted replaced
29706:6b3a8d034b69 29707:b9b9f9a92481
       
     1 #ifndef _HG_MPATCH_H_
       
     2 #define _HG_MPATCH_H_
       
     3 
       
     4 struct mpatch_frag {
       
     5 	int start, end, len;
       
     6 	const char *data;
       
     7 };
       
     8 
       
     9 struct mpatch_flist {
       
    10 	struct mpatch_frag *base, *head, *tail;
       
    11 };
       
    12 
       
    13 int mpatch_decode(const char *bin, ssize_t len, struct mpatch_flist** res);
       
    14 ssize_t mpatch_calcsize(ssize_t len, struct mpatch_flist *l);
       
    15 void mpatch_lfree(struct mpatch_flist *a);
       
    16 int mpatch_apply(char *buf, const char *orig, ssize_t len,
       
    17 	struct mpatch_flist *l);
       
    18 struct mpatch_flist *mpatch_fold(void *bins, ssize_t start, ssize_t end);
       
    19 
       
    20 #endif