wok annotate busybox/stuff/busybox-1.26-diff.u @ rev 19767

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