OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2baa73f
)
Make the patch -x option (only enabled with CONFIG_DEBUG) provide more information...
author
Rob Landley
<rob@landley.net>
Thu, 31 Oct 2013 14:36:55 +0000
(09:36 -0500)
committer
Rob Landley
<rob@landley.net>
Thu, 31 Oct 2013 14:36:55 +0000
(09:36 -0500)
toys/posix/patch.c
patch
|
blob
|
history
diff --git
a/toys/posix/patch.c
b/toys/posix/patch.c
index
7fb6add
..
ae24ff9
100644
(file)
--- a/
toys/posix/patch.c
+++ b/
toys/posix/patch.c
@@
-201,7
+201,13
@@
static int apply_one_hunk(void)
// Match failed. Write out first line of buffered data and
// recheck remaining buffered data for a new match.
- if (PATCH_DEBUG) fprintf(stderr, "NOT: %s\n", plist->data);
+ if (PATCH_DEBUG) {
+ int bug = 0;
+
+ while (plist->data[bug] == check->data[bug]) bug++;
+ fprintf(stderr, "NOT(%d:%d!=%d): %s\n", bug, plist->data[bug],
+ check->data[bug], plist->data);
+ }
TT.state = 3;
do_line(check = dlist_pop(&buf));