Show More
@@ -64,7 +64,7 b' static ssize_t lsize(struct mpatch_flist' | |||||
64 | for changes in offset. the last hunk may be split if necessary. |
|
64 | for changes in offset. the last hunk may be split if necessary. | |
65 | */ |
|
65 | */ | |
66 | static int gather(struct mpatch_flist *dest, struct mpatch_flist *src, int cut, |
|
66 | static int gather(struct mpatch_flist *dest, struct mpatch_flist *src, int cut, | |
67 | int offset) |
|
67 | int offset) | |
68 | { |
|
68 | { | |
69 | struct mpatch_frag *d = dest->tail, *s = src->head; |
|
69 | struct mpatch_frag *d = dest->tail, *s = src->head; | |
70 | int postend, c, l; |
|
70 | int postend, c, l; | |
@@ -145,7 +145,7 b' static int discard(struct mpatch_flist *' | |||||
145 | /* combine hunk lists a and b, while adjusting b for offset changes in a/ |
|
145 | /* combine hunk lists a and b, while adjusting b for offset changes in a/ | |
146 | this deletes a and b and returns the resultant list. */ |
|
146 | this deletes a and b and returns the resultant list. */ | |
147 | static struct mpatch_flist *combine(struct mpatch_flist *a, |
|
147 | static struct mpatch_flist *combine(struct mpatch_flist *a, | |
148 | struct mpatch_flist *b) |
|
148 | struct mpatch_flist *b) | |
149 | { |
|
149 | { | |
150 | struct mpatch_flist *c = NULL; |
|
150 | struct mpatch_flist *c = NULL; | |
151 | struct mpatch_frag *bh, *ct; |
|
151 | struct mpatch_frag *bh, *ct; | |
@@ -239,7 +239,7 b' ssize_t mpatch_calcsize(ssize_t len, str' | |||||
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | int mpatch_apply(char *buf, const char *orig, ssize_t len, |
|
241 | int mpatch_apply(char *buf, const char *orig, ssize_t len, | |
242 |
|
|
242 | struct mpatch_flist *l) | |
243 | { |
|
243 | { | |
244 | struct mpatch_frag *f = l->head; |
|
244 | struct mpatch_frag *f = l->head; | |
245 | int last = 0; |
|
245 | int last = 0; | |
@@ -261,9 +261,9 b' int mpatch_apply(char *buf, const char *' | |||||
261 | } |
|
261 | } | |
262 |
|
262 | |||
263 | /* recursively generate a patch of all bins between start and end */ |
|
263 | /* recursively generate a patch of all bins between start and end */ | |
264 |
struct mpatch_flist * |
|
264 | struct mpatch_flist * | |
265 |
|
|
265 | mpatch_fold(void *bins, struct mpatch_flist *(*get_next_item)(void *, ssize_t), | |
266 |
|
|
266 | ssize_t start, ssize_t end) | |
267 | { |
|
267 | { | |
268 | ssize_t len; |
|
268 | ssize_t len; | |
269 |
|
269 |
@@ -14,13 +14,13 b' struct mpatch_flist {' | |||||
14 | struct mpatch_frag *base, *head, *tail; |
|
14 | struct mpatch_frag *base, *head, *tail; | |
15 | }; |
|
15 | }; | |
16 |
|
16 | |||
17 |
int mpatch_decode(const char *bin, ssize_t len, struct mpatch_flist** |
|
17 | int mpatch_decode(const char *bin, ssize_t len, struct mpatch_flist **res); | |
18 | ssize_t mpatch_calcsize(ssize_t len, struct mpatch_flist *l); |
|
18 | ssize_t mpatch_calcsize(ssize_t len, struct mpatch_flist *l); | |
19 | void mpatch_lfree(struct mpatch_flist *a); |
|
19 | void mpatch_lfree(struct mpatch_flist *a); | |
20 | int mpatch_apply(char *buf, const char *orig, ssize_t len, |
|
20 | int mpatch_apply(char *buf, const char *orig, ssize_t len, | |
21 |
|
|
21 | struct mpatch_flist *l); | |
22 |
struct mpatch_flist * |
|
22 | struct mpatch_flist * | |
23 |
|
|
23 | mpatch_fold(void *bins, struct mpatch_flist *(*get_next_item)(void *, ssize_t), | |
24 |
|
|
24 | ssize_t start, ssize_t end); | |
25 |
|
25 | |||
26 | #endif |
|
26 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now