wok annotate busybox/stuff/busybox-1.23-diff.u @ rev 19895

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