diff 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 <rob@landley.net>
date Thu, 23 Oct 2008 16:44:30 -0500
parents 962bbf7341f8
children 83c461db9df7
line wrap: on
line diff
--- a/lib/lib.h	Thu Aug 28 17:32:05 2008 -0500
+++ b/lib/lib.h	Thu Oct 23 16:44:30 2008 -0500
@@ -27,7 +27,7 @@
 
 void llist_free(void *list, void (*freeit)(void *data));
 void *llist_pop(void *list);  // actually void **list, but the compiler's dumb
-void dlist_add(struct double_list **list, char *data);
+struct double_list *dlist_add(struct double_list **list, char *data);
 
 // args.c
 void get_optflags(void);