comparison lib/lib.h @ 315:aaac01796688

Upgrade patch to detect hunks that start after a false start. Imagine a hunk that starts with a blank line, but the site to patch starts with two blank lines. Before we'd read the first blank line, think it was the start of the hunk and buffer it, read the second blank line, notice that it didn't match the second line of the hunk, and discard _both_ buffered lines of context (writing them to the output file) without checking that one of the later context lines might have been the real start of the hunk. Make it re-check the rest of the buffered context for matches each time it discards a line of buffered context.
author Rob Landley <>
date Thu, 23 Oct 2008 16:44:30 -0500
parents 962bbf7341f8
children 83c461db9df7
equal deleted inserted replaced
314:5ab9d0e5e0f8 315:aaac01796688
25 char *data; 25 char *data;
26 }; 26 };
27 27
28 void llist_free(void *list, void (*freeit)(void *data)); 28 void llist_free(void *list, void (*freeit)(void *data));
29 void *llist_pop(void *list); // actually void **list, but the compiler's dumb 29 void *llist_pop(void *list); // actually void **list, but the compiler's dumb
30 void dlist_add(struct double_list **list, char *data); 30 struct double_list *dlist_add(struct double_list **list, char *data);
31 31
32 // args.c 32 // args.c
33 void get_optflags(void); 33 void get_optflags(void);
34 34
35 // dirtree.c 35 // dirtree.c