wok annotate busybox/stuff/busybox-1.30-diff.u @ rev 21015

updated gujin (2.8.6 -> 2.8.7)
author Hans-G?nter Theisgen
date Sun Mar 10 08:09:36 2019 +0100 (2019-03-10)
parents
children
rev   line source
pascal@20652 1 --- busybox-1.30/editors/diff.c
pascal@20652 2 +++ busybox-1.30/editors/diff.c
pascal@20652 3 @@ -109,6 +109,7 @@
pascal@20652 4 //usage: "\n -B Ignore changes whose lines are all blank"
pascal@20652 5 //usage: "\n -d Try hard to find a smaller set of changes"
pascal@20652 6 //usage: "\n -i Ignore case differences"
pascal@20652 7 +//usage: "\n -l Ignore symbolic links"
pascal@20652 8 //usage: "\n -L Use LABEL instead of the filename in the unified header"
pascal@20652 9 //usage: "\n -N Treat absent files as empty"
pascal@20652 10 //usage: "\n -q Output only whether files differ"
pascal@20652 11 @@ -140,6 +141,7 @@
pascal@20652 12 FLAG_b,
pascal@20652 13 FLAG_d,
pascal@20652 14 FLAG_i,
pascal@20652 15 + FLAG_l,
pascal@20652 16 FLAG_L, /* never used, handled by getopt32 */
pascal@20652 17 FLAG_N,
pascal@20652 18 FLAG_q,
pascal@20652 19 @@ -754,6 +756,14 @@
pascal@20652 20 j = fread(buf1, 1, sz, fp[1]);
pascal@20652 21 if (i != j) {
pascal@20652 22 differ = true;
pascal@20652 23 + /* Ensure we detect binary file even if a file is empty or very
pascal@20652 24 + short. */
pascal@20652 25 + for (k = 0; k < i; k++)
pascal@20652 26 + if (!buf0[k])
pascal@20652 27 + binary = true;
pascal@20652 28 + for (k = 0; k < j; k++)
pascal@20652 29 + if (!buf1[k])
pascal@20652 30 + binary = true;
pascal@20652 31 i = MIN(i, j);
pascal@20652 32 }
pascal@20652 33 if (i == 0)
pascal@20652 34 @@ -867,7 +877,9 @@
pascal@20652 35 * Using list.len to specify its length,
pascal@20652 36 * add_to_dirlist will remove it. */
pascal@20652 37 list[i].len = strlen(p[i]);
pascal@20652 38 - recursive_action(p[i], ACTION_RECURSE | ACTION_FOLLOWLINKS,
pascal@20652 39 + recursive_action(p[i],
pascal@20652 40 + (option_mask32 & FLAG(l)) ? ACTION_RECURSE :
pascal@20652 41 + ACTION_RECURSE | ACTION_FOLLOWLINKS,
pascal@20652 42 add_to_dirlist, skip_dir, &list[i], 0);
pascal@20652 43 /* Sort dl alphabetically.
pascal@20652 44 * GNU diff does this ignoring any number of trailing dots.
pascal@20652 45 @@ -982,7 +994,7 @@
pascal@20652 46 INIT_G();
pascal@20652 47
pascal@20652 48 /* exactly 2 params; collect multiple -L <label>; -U N */
pascal@20652 49 - GETOPT32(argv, "^" "abdiL:*NqrsS:tTU:+wupBE" "\0" "=2"
pascal@20652 50 + GETOPT32(argv, "^" "abdilL:*NqrsS:tTU:+wupBE" "\0" "=2"
pascal@20652 51 LONGOPTS,
pascal@20652 52 &L_arg, &s_start, &opt_U_context);
pascal@20652 53 argv += optind;