wok view busybox/stuff/busybox-1.23-diff.u @ rev 18566
Up tazpkg-test(856), tazpanel(545): innerText
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Nov 09 14:00:27 2015 +0200 (2015-11-09) |
parents | 4a9f656c414b |
children | 364e68c766fd |
line source
1 --- busybox-1.23.0/editors/diff.c
2 +++ busybox-1.23.0/editors/diff.c
3 @@ -113,6 +113,7 @@
4 //usage: "\n -B Ignore changes whose lines are all blank"
5 //usage: "\n -d Try hard to find a smaller set of changes"
6 //usage: "\n -i Ignore case differences"
7 +//usage: "\n -l Ignore symbolic links"
8 //usage: "\n -L Use LABEL instead of the filename in the unified header"
9 //usage: "\n -N Treat absent files as empty"
10 //usage: "\n -q Output only whether files differ"
11 @@ -143,6 +144,7 @@
12 FLAG_b,
13 FLAG_d,
14 FLAG_i,
15 + FLAG_l,
16 FLAG_L, /* never used, handled by getopt32 */
17 FLAG_N,
18 FLAG_q,
19 @@ -756,6 +756,14 @@
20 j = fread(buf1, 1, sz, fp[1]);
21 if (i != j) {
22 differ = true;
23 + /* Ensure we detect binary file even if a file is empty or very
24 + short. */
25 + for (k = 0; k < i; k++)
26 + if (!buf0[k])
27 + binary = true;
28 + for (k = 0; k < j; k++)
29 + if (!buf1[k])
30 + binary = true;
31 i = MIN(i, j);
32 }
33 if (i == 0)
34 @@ -877,7 +887,9 @@
35 * Using list.len to specify its length,
36 * add_to_dirlist will remove it. */
37 list[i].len = strlen(p[i]);
38 - recursive_action(p[i], ACTION_RECURSE | ACTION_FOLLOWLINKS,
39 + recursive_action(p[i],
40 + (option_mask32 & FLAG(l)) ? ACTION_RECURSE :
41 + ACTION_RECURSE | ACTION_FOLLOWLINKS,
42 add_to_dirlist, skip_dir, &list[i], 0);
43 /* Sort dl alphabetically.
44 * GNU diff does this ignoring any number of trailing dots.
45 @@ -991,7 +1003,7 @@
46 #if ENABLE_FEATURE_DIFF_LONG_OPTIONS
47 applet_long_options = diff_longopts;
48 #endif
49 - getopt32(argv, "abdiL:NqrsS:tTU:wupBE",
50 + getopt32(argv, "abdilL:NqrsS:tTU:wupBE",
51 &L_arg, &s_start, &opt_U_context);
52 argv += optind;
53 while (L_arg)