Mercurial > hg > mercurial-source
comparison mercurial/mpatch.h @ 30454: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 |
comparison
equal
deleted
inserted
replaced
30453:6b3a8d034b69 | 30454: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 |