summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-05-15 08:31:54 +0200
committerErich Eckner <git@eckner.net>2022-05-15 08:31:54 +0200
commit8c8ca978c03d22ea4d74700ade589e80750c43bf (patch)
tree88e675db29cf1bfbca5240f0cc065e84c5a928d4
parent5348052acb25602784a58294f649eaf3299b61b4 (diff)
downloadcrux-patches-master.tar.xz
core/coreutils: adapt patchHEADmaster
-rw-r--r--core/coreutils/coreutils-uniq.patch.new32
1 files changed, 16 insertions, 16 deletions
diff --git a/core/coreutils/coreutils-uniq.patch.new b/core/coreutils/coreutils-uniq.patch.new
index 9acb2d7..5e331dc 100644
--- a/core/coreutils/coreutils-uniq.patch.new
+++ b/core/coreutils/coreutils-uniq.patch.new
@@ -1,6 +1,6 @@
---- old/src/uniq.c 2016-10-05 20:45:05.445188226 +0200
-+++ new/src/uniq.c 2016-10-05 21:25:24.298871811 +0200
-@@ -58,6 +58,9 @@
+--- old/src/uniq.c 2022-04-08 13:22:18.000000000 +0200
++++ new/src/uniq.c 2022-05-15 08:30:20.222140293 +0200
+@@ -53,6 +53,9 @@
/* Number of fields to skip on each line when doing comparisons. */
static size_t skip_fields;
@@ -10,7 +10,7 @@
/* Number of chars to skip after skipping any fields. */
static size_t skip_chars;
-@@ -153,6 +156,7 @@
+@@ -148,6 +151,7 @@
{"ignore-case", no_argument, NULL, 'i'},
{"unique", no_argument, NULL, 'u'},
{"skip-fields", required_argument, NULL, 'f'},
@@ -18,7 +18,7 @@
{"skip-chars", required_argument, NULL, 's'},
{"check-chars", required_argument, NULL, 'w'},
{"zero-terminated", no_argument, NULL, 'z'},
-@@ -200,6 +204,11 @@
+@@ -195,6 +199,11 @@
"), stdout);
fputs (_("\
-i, --ignore-case ignore differences in case when comparing\n\
@@ -30,16 +30,16 @@
-s, --skip-chars=N avoid comparing the first N characters\n\
-u, --unique only print unique lines\n\
"), stdout);
-@@ -260,7 +269,7 @@
- return a pointer to the beginning of the line's field to be compared. */
+@@ -254,7 +263,7 @@
- static char * _GL_ATTRIBUTE_PURE
+ ATTRIBUTE_PURE
+ static char *
-find_field (struct linebuffer const *line)
+find_field (struct linebuffer const *line, size_t *len)
{
size_t count;
char const *lp = line->buffer;
-@@ -277,6 +286,21 @@
+@@ -271,6 +280,21 @@
i += MIN (skip_chars, size - i);
@@ -61,7 +61,7 @@
return line->buffer + i;
}
-@@ -377,8 +401,7 @@
+@@ -366,8 +390,7 @@
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
break;
@@ -69,9 +69,9 @@
- thislen = thisline->length - 1 - (thisfield - thisline->buffer);
+ thisfield = find_field (thisline,&thislen);
- new_group = (prevline->length == 0
+ new_group = (!prevfield
|| different (thisfield, prevfield, thislen, prevlen));
-@@ -412,8 +435,7 @@
+@@ -401,8 +424,7 @@
if (readlinebuffer_delim (prevline, stdin, delimiter) == 0)
goto closefiles;
@@ -81,7 +81,7 @@
while (!feof (stdin))
{
-@@ -426,8 +448,7 @@
+@@ -415,8 +437,7 @@
goto closefiles;
break;
}
@@ -91,7 +91,7 @@
match = !different (thisfield, prevfield, thislen, prevlen);
match_count += match;
-@@ -508,6 +529,7 @@
+@@ -496,6 +517,7 @@
skip_chars = 0;
skip_fields = 0;
@@ -99,7 +99,7 @@
check_chars = SIZE_MAX;
output_unique = output_first_repeated = true;
output_later_repeated = false;
-@@ -523,7 +545,7 @@
+@@ -511,7 +533,7 @@
if (optc == -1
|| (posixly_correct && nfiles != 0)
|| ((optc = getopt_long (argc, argv,
@@ -108,7 +108,7 @@
== -1))
{
if (argc <= optind)
-@@ -617,6 +639,11 @@
+@@ -605,6 +627,11 @@
ignore_case = true;
break;