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

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