Mercurial > public > mercurial-scm > hg
diff mercurial/mpatch.h @ 29693:b9b9f9a92481
mpatch: split mpatch into two files
author | Maciej Fijalkowski <fijall@gmail.com> |
---|---|
date | Mon, 18 Jul 2016 19:02:30 +0200 |
parents | |
children | 55dd12204b8e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/mpatch.h Mon Jul 18 19:02:30 2016 +0200 @@ -0,0 +1,20 @@ +#ifndef _HG_MPATCH_H_ +#define _HG_MPATCH_H_ + +struct mpatch_frag { + int start, end, len; + const char *data; +}; + +struct mpatch_flist { + struct mpatch_frag *base, *head, *tail; +}; + +int mpatch_decode(const char *bin, ssize_t len, struct mpatch_flist** res); +ssize_t mpatch_calcsize(ssize_t len, struct mpatch_flist *l); +void mpatch_lfree(struct mpatch_flist *a); +int mpatch_apply(char *buf, const char *orig, ssize_t len, + struct mpatch_flist *l); +struct mpatch_flist *mpatch_fold(void *bins, ssize_t start, ssize_t end); + +#endif