new snapshot available: coreutils-8.30.79-efa3e

This commit is contained in:
Kamil Dudka 2019-03-04 15:32:05 +01:00
commit d7513b90bb
8 changed files with 61 additions and 663 deletions

View file

@ -13,17 +13,14 @@ diff --git a/DIR_COLORS b/DIR_COLORS
index d2ea453..27af9d7 100644
--- a/DIR_COLORS
+++ b/DIR_COLORS
@@ -1,6 +1,10 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
@@ -1,3 +1,7 @@
+# This file goes in the /etc directory, and must be world readable.
+# You can copy this file to .dir_colors in your $HOME directory to override
+# the system defaults.
+
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
@@ -8,6 +12,9 @@
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
@ -34,7 +31,7 @@ index d2ea453..27af9d7 100644
# Below are TERM entries, which can be a glob patterns, to match
# against the TERM environment variable to determine if it is colorizable.
TERM Eterm
@@ -56,7 +63,7 @@ DOOR 01;35 # door
@@ -58,7 +65,7 @@ DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
@ -43,7 +40,7 @@ index d2ea453..27af9d7 100644
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
@@ -184,21 +191,21 @@ EXEC 01;32
@@ -186,21 +193,21 @@ EXEC 01;32
.ogx 01;35
# audio formats
@ -131,9 +128,9 @@ index d2ea453..74c34ba 100644
+TERM *256color*
+TERM rxvt-unicode256
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
@@ -43,29 +30,40 @@ TERM xterm*
# Below are the color init strings for the basic file types.
# One can use codes for 256 or more colors supported by modern terminals.
@@ -45,29 +32,40 @@ TERM xterm*
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
@ -190,7 +187,7 @@ index d2ea453..74c34ba 100644
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
@@ -83,122 +81,122 @@ EXEC 01;32
@@ -85,122 +83,122 @@ EXEC 01;32
#.csh 01;32
# archives or compressed (bright red)
@ -448,7 +445,7 @@ index d2ea453..95d6879 100644
# Below are TERM entries, which can be a glob patterns, to match
# against the TERM environment variable to determine if it is colorizable.
TERM Eterm
@@ -46,17 +55,17 @@ TERM xterm*
@@ -48,17 +57,17 @@ TERM xterm*
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
@ -471,7 +468,7 @@ index d2ea453..95d6879 100644
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
@@ -65,7 +74,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
@@ -67,7 +76,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
@ -480,7 +477,7 @@ index d2ea453..95d6879 100644
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
@@ -83,105 +92,105 @@ EXEC 01;32
@@ -85,105 +94,105 @@ EXEC 01;32
#.csh 01;32
# archives or compressed (bright red)

View file

@ -1,13 +0,0 @@
diff -urNp coreutils-8.5-orig/src/dircolors.hin coreutils-8.5/src/dircolors.hin
--- coreutils-8.5-orig/src/dircolors.hin 2010-04-20 21:52:04.000000000 +0200
+++ coreutils-8.5/src/dircolors.hin 2010-07-22 16:18:41.978036926 +0200
@@ -127,6 +127,9 @@ EXEC 01;32
.deb 01;31
.rpm 01;31
.jar 01;31
+.war 01;31
+.ear 01;31
+.sar 01;31
.rar 01;31
.ace 01;31
.zoo 01;31

View file

@ -1,587 +0,0 @@
(sb) lin18nux/lsb compliance - cut - not stable enough, not applied
--- coreutils-8.24/src/cut.c 2015-06-26 19:05:22.000000000 +0200
+++ cut.c 2016-01-15 10:15:04.863804121 +0100
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
#include <sys/types.h>
+
+#include <mbfile.h>
+#include <mbiter.h>
+#include <string.h>
+
#include "system.h"
#include "error.h"
@@ -61,25 +66,16 @@
CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */
static struct field_range_pair *current_rp;
-/* This buffer is used to support the semantics of the -s option
- (or lack of same) when the specified field list includes (does
- not include) the first field. In both of those cases, the entire
- first field must be read into this buffer to determine whether it
- is followed by a delimiter or a newline before any of it may be
- output. Otherwise, cut_fields can do the job without using this
- buffer. */
-static char *field_1_buffer;
-
-/* The number of bytes allocated for FIELD_1_BUFFER. */
-static size_t field_1_bufsize;
-
enum operating_mode
{
undefined_mode,
- /* Output characters that are in the given bytes. */
+ /* Output the given bytes. */
byte_mode,
+ /* Output characters that are in the given positions . */
+ char_mode,
+
/* Output the given delimiter-separated fields. */
field_mode
};
@@ -91,12 +87,16 @@ static enum operating_mode operating_mode;
with field mode. */
static bool suppress_non_delimited;
+/* Unless true, we do not recognize multibyte characters in byte-splitting
+ mode. */
+static bool no_break_mb_chars;
+
/* If true, print all bytes, characters, or fields _except_
those that were specified. */
static bool complement;
/* The delimiter character for field mode. */
-static unsigned char delim;
+static mbf_char_t delim;
/* The delimiter for each line/record. */
static unsigned char line_delim = '\n';
@@ -109,7 +109,7 @@ static size_t output_delimiter_length;
/* The output field separator string. Defaults to the 1-character
string consisting of the input delimiter. */
-static char *output_delimiter_string;
+static char const *output_delimiter_string;
/* True if we have ever read standard input. */
static bool have_read_stdin;
@@ -164,7 +164,7 @@ Print selected parts of lines from each FILE to standard output.\n\
-f, --fields=LIST select only these fields; also print any line\n\
that contains no delimiter character, unless\n\
the -s option is specified\n\
- -n (ignored)\n\
+ -n with -b, don't split multibyte characters\n\
"), stdout);
fputs (_("\
--complement complement the set of selected bytes, characters\n\
@@ -211,6 +211,12 @@ next_item (size_t *item_idx)
current_rp++;
}
+static inline void
+next_item_n (size_t *item_idx, size_t n)
+{
+ while (n-- > 0)
+ next_item (item_idx);
+}
/* Return nonzero if the K'th field or byte is printable. */
static inline bool
@@ -219,6 +225,15 @@ print_kth (size_t k)
return current_rp->lo <= k;
}
+/* The lo and hi params should be used for the current characters byte position
+ * and byte size, respectively. */
+static inline bool
+rp_intersect (size_t lo, size_t hi)
+{
+ return ((current_rp->lo <= lo && current_rp->hi >= lo)
+ || (current_rp->lo <= hi && current_rp->hi >= hi));
+}
+
/* Return nonzero if K'th byte is the beginning of a range. */
static inline bool
@@ -281,23 +296,215 @@ cut_bytes (FILE *stream)
}
/* Read from stream STREAM, printing to standard output any selected fields. */
+extern ssize_t
+mb_getndelim2 (mbf_char_t **lineptr, size_t *linesize, size_t nmax,
+ mbf_char_t delim1, mbf_char_t delim2, mb_file_t *stream)
+{
+/* The maximum value that getndelim2 can return without suffering from
+ overflow problems, either internally (because of pointer
+ subtraction overflow) or due to the API (because of ssize_t). */
+#define GETNDELIM2_MAXIMUM (PTRDIFF_MAX < SSIZE_MAX ? PTRDIFF_MAX : SSIZE_MAX)
+
+/* Try to add at least this many bytes when extending the buffer.
+ MIN_CHUNK must be no greater than GETNDELIM2_MAXIMUM. */
+#define MIN_CHUNK 64
+ size_t nchars_avail; /* Allocated but unused chars in *LINEPTR. */
+ mbf_char_t *read_pos; /* Where we're reading into *LINEPTR. */
+ ssize_t chars_stored = -1;
+ mbf_char_t *ptr = *lineptr;
+ size_t size = *linesize;
+ bool found_delimiter;
+
+ if (!ptr)
+ {
+ size = nmax < MIN_CHUNK ? nmax : MIN_CHUNK;
+ ptr = malloc (size * sizeof (mbf_char_t));
+ if (!ptr)
+ return -1;
+ }
+
+ if (size < 0)
+ goto done;
+
+ nchars_avail = size;
+ read_pos = ptr;
+
+ if (nchars_avail == 0 && nmax <= size)
+ goto done;
+
+ /* Normalize delimiters, since memchr2 doesn't handle EOF. */
+ if (mb_iseof (delim1))
+ mb_copy (&delim1, &delim2);
+ else if (mb_iseof (delim2))
+ mb_copy (&delim2, &delim1);
+
+ flockfile (stream);
+
+ found_delimiter = false;
+ do
+ {
+ /* Here always ptr + size == read_pos + nchars_avail.
+ Also nchars_avail > 0 || size < nmax. */
+
+ mbf_char_t c IF_LINT (= 0);
+ {
+ mbf_getc (c, *stream);
+ if (mb_iseof (c))
+ {
+ /* Return partial line, if any. */
+ if (read_pos == ptr)
+ goto unlock_done;
+ else
+ break;
+ }
+ if (mb_equal (c, delim1) || mb_equal (c, delim2))
+ found_delimiter = true;
+ }
+
+ /* We always want at least one byte left in the buffer, since we
+ always (unless we get an error while reading the first byte)
+ NUL-terminate the line buffer. */
+
+ if (!nchars_avail)
+ {
+ /* Grow size proportionally, not linearly, to avoid O(n^2)
+ running time. */
+ size_t newsize = size < MIN_CHUNK ? size + MIN_CHUNK : 2 * size;
+ mbf_char_t *newptr;
+
+ /* Respect nmax. This handles possible integer overflow. */
+ if (! (size < newsize && newsize <= nmax))
+ newsize = nmax;
+
+ if (GETNDELIM2_MAXIMUM < newsize)
+ {
+ size_t newsizemax = GETNDELIM2_MAXIMUM + 1;
+ if (size == newsizemax)
+ goto unlock_done;
+ newsize = newsizemax;
+ }
+ nchars_avail = newsize - (read_pos - ptr);
+ newptr = realloc (ptr, newsize * sizeof (mbf_char_t));
+ if (!newptr)
+ goto unlock_done;
+ ptr = newptr;
+ size = newsize;
+ read_pos = size - nchars_avail + ptr;
+ }
+
+ /* Here, if size < nmax, nchars_avail >= buffer_len + 1.
+ If size == nmax, nchars_avail > 0. */
+
+ if (1 < nchars_avail--)
+ {
+ mb_copy(read_pos++, &c);
+ }
+
+ }
+ while (!found_delimiter);
+
+ chars_stored = (read_pos - ptr);
+
+ unlock_done:
+ funlockfile (stream);
+
+ done:
+ *lineptr = ptr;
+ *linesize = size;
+ return chars_stored;
+}
+
+static void
+cut_chars (FILE *stream)
+{
+ size_t char_idx; /* Number of chars in the line so far. */
+ bool print_delimiter;
+ mbf_char_t c;
+ mb_file_t mbf;
+
+ print_delimiter = false;
+ char_idx = 0;
+ current_rp = frp;
+
+ mbf_init (mbf, stream);
+ while (true)
+ {
+ mbf_getc (c, mbf);
+
+ if (mb_iseq (c, line_delim))
+ {
+ putc (line_delim, stdout);
+ char_idx = 0;
+ print_delimiter = false;
+ current_rp = frp;
+ }
+ else if (mb_iseof (c))
+ {
+ if (char_idx > 0)
+ putc (line_delim, stdout);
+ break;
+ }
+ else
+ {
+ /* Forward by one byte. */
+ next_item (&char_idx);
+
+ /* Check if the current characters byte range is within
+ * the argument list. */
+ if (rp_intersect (char_idx, char_idx + mb_len (c) - 1))
+ {
+ if (output_delimiter_specified)
+ {
+ if (print_delimiter && is_range_start_index (char_idx))
+ {
+ fwrite (output_delimiter_string, sizeof (char),
+ output_delimiter_length, stdout);
+ }
+ print_delimiter = true;
+ }
+ mb_putc (c, stdout);
+ }
+
+ /* Byte mode with multibyte characters uncut (-b -n). */
+ if (no_break_mb_chars)
+ /* Forward by an additional byte_length (c) - 1. */
+ next_item_n (&char_idx, mb_len (c) - 1);
+ }
+ }
+}
static void
cut_fields (FILE *stream)
{
- int c;
+
+ /* This buffer is used to support the semantics of the -s option
+ (or lack of same) when the specified field list includes (does
+ not include) the first field. In both of those cases, the entire
+ first field must be read into this buffer to determine whether it
+ is followed by a delimiter or a newline before any of it may be
+ output. Otherwise, cut_fields can do the job without using this
+ buffer. */
+ mbf_char_t *field_1_buffer = 0;
+ /* The number of bytes allocated for FIELD_1_BUFFER. */
+ size_t field_1_bufsize;
+
+
+ mbf_char_t c, d;
+ mb_file_t mbf;
size_t field_idx = 1;
bool found_any_selected_field = false;
bool buffer_first_field;
current_rp = frp;
- c = getc (stream);
- if (c == EOF)
+ mbf_init (mbf, stream);
+ mbf_getc (c, mbf);
+ if (mb_iseof (c))
return;
- ungetc (c, stream);
- c = 0;
+ mbf_ungetc (c, mbf);
+ mb_setascii (&c, 0);
+ mb_copy (&d, &delim);
/* To support the semantics of the -s flag, we may have to buffer
all of the first field to determine whether it is 'delimited.'
@@ -312,10 +519,14 @@ cut_fields (FILE *stream)
if (field_idx == 1 && buffer_first_field)
{
ssize_t len;
- size_t n_bytes;
+ size_t n_chars;
+ mbf_char_t nl;
+ mb_setascii (&nl, line_delim);
+
+ len = mb_getndelim2 (&field_1_buffer, &field_1_bufsize,
+ GETNLINE_NO_LIMIT, d, nl, &mbf);
+
- len = getndelim2 (&field_1_buffer, &field_1_bufsize, 0,
- GETNLINE_NO_LIMIT, delim, line_delim, stream);
if (len < 0)
{
free (field_1_buffer);
@@ -325,15 +536,15 @@ cut_fields (FILE *stream)
xalloc_die ();
}
- n_bytes = len;
- assert (n_bytes != 0);
+ n_chars = len;
+ //assert (n_chars != 0);
- c = 0;
+ mb_setascii (&c, 0);
/* If the first field extends to the end of line (it is not
delimited) and we are printing all non-delimited lines,
print this one. */
- if (to_uchar (field_1_buffer[n_bytes - 1]) != delim)
+ if (!mb_equal (field_1_buffer[n_chars - 1], d))
{
if (suppress_non_delimited)
{
@@ -341,26 +552,30 @@ cut_fields (FILE *stream)
}
else
{
- fwrite (field_1_buffer, sizeof (char), n_bytes, stdout);
+ for (int i = 0; i < n_chars; ++i)
+ mb_putc (field_1_buffer[i], stdout);
+
/* Make sure the output line is newline terminated. */
- if (field_1_buffer[n_bytes - 1] != line_delim)
+ if (!mb_iseq (field_1_buffer[n_chars - 1], line_delim))
putchar (line_delim);
- c = line_delim;
+ mb_setascii (&c, line_delim);
}
continue;
}
if (print_kth (1))
{
/* Print the field, but not the trailing delimiter. */
- fwrite (field_1_buffer, sizeof (char), n_bytes - 1, stdout);
+ for (int i = 0; i < n_chars - 1; ++i)
+ mb_putc (field_1_buffer[i], stdout);
/* With -d$'\n' don't treat the last '\n' as a delimiter. */
- if (delim == line_delim)
+ if (mb_iseq (d, line_delim))
{
- int last_c = getc (stream);
- if (last_c != EOF)
+ mbf_char_t last_c;
+ mbf_getc (last_c, mbf);
+ if (!mb_iseof (last_c))
{
- ungetc (last_c, stream);
+ mbf_ungetc (last_c, mbf);
found_any_selected_field = true;
}
}
@@ -370,7 +585,8 @@ cut_fields (FILE *stream)
next_item (&field_idx);
}
- int prev_c = c;
+ mbf_char_t prev_c;
+ mb_copy (&prev_c, &c);
if (print_kth (field_idx))
{
@@ -381,42 +597,46 @@ cut_fields (FILE *stream)
}
found_any_selected_field = true;
- while ((c = getc (stream)) != delim && c != line_delim && c != EOF)
+ mbf_getc (c, mbf);
+ while (!mb_equal (c, d) && !mb_iseq (c, line_delim) && !mb_iseof (c))
{
- putchar (c);
- prev_c = c;
+ mb_putc (c, stdout);
+ mb_copy (&prev_c, &c);
+ mbf_getc (c, mbf);
}
}
else
{
- while ((c = getc (stream)) != delim && c != line_delim && c != EOF)
+ mbf_getc (c, mbf);
+ while (!mb_equal (c, d) && !mb_iseq (c, line_delim) && !mb_iseof (c))
{
- prev_c = c;
+ mb_copy (&prev_c, &c);
+ mbf_getc (c, mbf);
}
}
/* With -d$'\n' don't treat the last '\n' as a delimiter. */
- if (delim == line_delim && c == delim)
+ if (mb_iseq (d, line_delim) && mb_equal (c, d))
{
- int last_c = getc (stream);
- if (last_c != EOF)
- ungetc (last_c, stream);
+ mbf_char_t last_c;
+ mbf_getc (last_c, mbf);
+ if (!mb_iseof (last_c))
+ mbf_ungetc (last_c, mbf);
else
- c = last_c;
+ mb_copy (&c, &last_c);
}
- if (c == delim)
+ if (mb_equal (c, d))
next_item (&field_idx);
- else if (c == line_delim || c == EOF)
+ else if (mb_iseq (c, line_delim) || mb_iseof (c))
{
if (found_any_selected_field
|| !(suppress_non_delimited && field_idx == 1))
{
- if (c == line_delim || prev_c != line_delim
- || delim == line_delim)
+ if (mb_iseq (c, line_delim) || !mb_iseq (prev_c, line_delim) || mb_iseq (d, line_delim))
putchar (line_delim);
}
- if (c == EOF)
+ if (mb_iseof (c))
break;
field_idx = 1;
current_rp = frp;
@@ -429,7 +649,14 @@ static void
cut_stream (FILE *stream)
{
if (operating_mode == byte_mode)
- cut_bytes (stream);
+ {
+ if (no_break_mb_chars)
+ cut_chars (stream);
+ else
+ cut_bytes (stream);
+ }
+ else if (operating_mode == char_mode)
+ cut_chars (stream);
else
cut_fields (stream);
}
@@ -483,6 +710,7 @@ main (int argc, char **argv)
bool ok;
bool delim_specified = false;
char *spec_list_string IF_LINT ( = NULL);
+ mbi_iterator_t iter;
initialize_main (&argc, &argv);
set_program_name (argv[0]);
@@ -496,8 +724,10 @@ main (int argc, char **argv)
/* By default, all non-delimited lines are printed. */
suppress_non_delimited = false;
+ /* Default behaviour for -b, unless -n is also specified. */
+ no_break_mb_chars = false;
- delim = '\0';
+ mb_setascii (&delim, '\0');
have_read_stdin = false;
while ((optc = getopt_long (argc, argv, "b:c:d:f:nsz", longopts, NULL)) != -1)
@@ -505,7 +735,6 @@ main (int argc, char **argv)
switch (optc)
{
case 'b':
- case 'c':
/* Build the byte list. */
if (operating_mode != undefined_mode)
FATAL_ERROR (_("only one type of list may be specified"));
@@ -513,6 +742,14 @@ main (int argc, char **argv)
spec_list_string = optarg;
break;
+ case 'c':
+ /* Build the char list. */
+ if (operating_mode != undefined_mode)
+ FATAL_ERROR (_("only one type of list may be specified"));
+ operating_mode = char_mode;
+ spec_list_string = optarg;
+ break;
+
case 'f':
/* Build the field list. */
if (operating_mode != undefined_mode)
@@ -524,9 +761,17 @@ main (int argc, char **argv)
case 'd':
/* New delimiter. */
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
- if (optarg[0] != '\0' && optarg[1] != '\0')
+ mbi_init (iter, optarg, strlen (optarg));
+ if (!mbi_avail (iter))
+ mb_setascii (&delim, '\0');
+ else
+ {
+ mb_copy (&delim, &mbi_cur (iter));
+
+ mbi_advance (iter);
+ if (mbi_avail (iter))
FATAL_ERROR (_("the delimiter must be a single character"));
- delim = optarg[0];
+ }
delim_specified = true;
break;
@@ -540,6 +785,7 @@ main (int argc, char **argv)
break;
case 'n':
+ no_break_mb_chars = true;
break;
case 's':
@@ -579,15 +825,12 @@ main (int argc, char **argv)
| (complement ? SETFLD_COMPLEMENT : 0) );
if (!delim_specified)
- delim = '\t';
+ mb_setascii (&delim, '\t');
if (output_delimiter_string == NULL)
{
- static char dummy[2];
- dummy[0] = delim;
- dummy[1] = '\0';
- output_delimiter_string = dummy;
- output_delimiter_length = 1;
+ output_delimiter_string = mb_ptr (delim);
+ output_delimiter_length = mb_len (delim);
}
if (optind == argc)

View file

@ -1731,7 +1731,7 @@ index 6d2eec5..f189a0d 100644
#include "system.h"
#include "argmatch.h"
#include "die.h"
@@ -169,14 +177,39 @@ static int decimal_point;
@@ -161,14 +169,39 @@ static int decimal_point;
/* Thousands separator; if -1, then there isn't one. */
static int thousands_sep;
@ -1772,7 +1772,7 @@ index 6d2eec5..f189a0d 100644
/* The kind of blanks for '-b' to skip in various options. */
enum blanktype { bl_start, bl_end, bl_both };
@@ -350,13 +383,11 @@ static bool reverse;
@@ -342,13 +375,11 @@ static bool reverse;
they were read if all keys compare equal. */
static bool stable;
@ -1789,7 +1789,7 @@ index 6d2eec5..f189a0d 100644
/* Flag to remove consecutive duplicate lines from the output.
Only the last of a sequence of equal lines will be output. */
@@ -814,6 +845,46 @@ reap_all (void)
@@ -806,6 +837,46 @@ reap_all (void)
reap (-1);
}
@ -1836,7 +1836,7 @@ index 6d2eec5..f189a0d 100644
/* Clean up any remaining temporary files. */
static void
@@ -1264,7 +1335,7 @@ zaptemp (char const *name)
@@ -1274,7 +1345,7 @@ zaptemp (char const *name)
free (node);
}
@ -1845,7 +1845,7 @@ index 6d2eec5..f189a0d 100644
static int
struct_month_cmp (void const *m1, void const *m2)
@@ -1279,7 +1350,7 @@ struct_month_cmp (void const *m1, void const *m2)
@@ -1289,7 +1360,7 @@ struct_month_cmp (void const *m1, void const *m2)
/* Initialize the character class tables. */
static void
@ -1854,7 +1854,7 @@ index 6d2eec5..f189a0d 100644
{
size_t i;
@@ -1291,7 +1362,7 @@ inittables (void)
@@ -1301,7 +1372,7 @@ inittables (void)
fold_toupper[i] = toupper (i);
}
@ -1863,7 +1863,7 @@ index 6d2eec5..f189a0d 100644
/* If we're not in the "C" locale, read different names for months. */
if (hard_LC_TIME)
{
@@ -1373,6 +1444,84 @@ specify_nmerge (int oi, char c, char const *s)
@@ -1383,6 +1454,84 @@ specify_nmerge (int oi, char c, char const *s)
xstrtol_fatal (e, oi, c, long_options, s);
}
@ -1948,7 +1948,7 @@ index 6d2eec5..f189a0d 100644
/* Specify the amount of main memory to use when sorting. */
static void
specify_sort_size (int oi, char c, char const *s)
@@ -1604,7 +1753,7 @@ buffer_linelim (struct buffer const *buf)
@@ -1614,7 +1763,7 @@ buffer_linelim (struct buffer const *buf)
by KEY in LINE. */
static char *
@ -1957,7 +1957,7 @@ index 6d2eec5..f189a0d 100644
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t sword = key->sword;
@@ -1613,10 +1762,10 @@ begfield (struct line const *line, struct keyfield const *key)
@@ -1623,10 +1772,10 @@ begfield (struct line const *line, struct keyfield const *key)
/* The leading field separator itself is included in a field when -t
is absent. */
@ -1970,7 +1970,7 @@ index 6d2eec5..f189a0d 100644
++ptr;
if (ptr < lim)
++ptr;
@@ -1642,11 +1791,70 @@ begfield (struct line const *line, struct keyfield const *key)
@@ -1652,11 +1801,70 @@ begfield (struct line const *line, struct keyfield const *key)
return ptr;
}
@ -2042,7 +2042,7 @@ index 6d2eec5..f189a0d 100644
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t eword = key->eword, echar = key->echar;
@@ -1661,10 +1869,10 @@ limfield (struct line const *line, struct keyfield const *key)
@@ -1671,10 +1879,10 @@ limfield (struct line const *line, struct keyfield const *key)
'beginning' is the first character following the delimiting TAB.
Otherwise, leave PTR pointing at the first 'blank' character after
the preceding field. */
@ -2055,7 +2055,7 @@ index 6d2eec5..f189a0d 100644
++ptr;
if (ptr < lim && (eword || echar))
++ptr;
@@ -1710,10 +1918,10 @@ limfield (struct line const *line, struct keyfield const *key)
@@ -1720,10 +1928,10 @@ limfield (struct line const *line, struct keyfield const *key)
*/
/* Make LIM point to the end of (one byte past) the current field. */
@ -2068,7 +2068,7 @@ index 6d2eec5..f189a0d 100644
if (newlim)
lim = newlim;
}
@@ -1744,6 +1952,130 @@ limfield (struct line const *line, struct keyfield const *key)
@@ -1754,6 +1962,130 @@ limfield (struct line const *line, struct keyfield const *key)
return ptr;
}
@ -2199,7 +2199,7 @@ index 6d2eec5..f189a0d 100644
/* Fill BUF reading from FP, moving buf->left bytes from the end
of buf->buf to the beginning first. If EOF is reached and the
file wasn't terminated by a newline, supply one. Set up BUF's line
@@ -1830,8 +2162,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
@@ -1840,8 +2172,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)
else
{
if (key->skipsblanks)
@ -2224,7 +2224,7 @@ index 6d2eec5..f189a0d 100644
line->keybeg = line_start;
}
}
@@ -1981,7 +2327,7 @@ human_numcompare (char const *a, char const *b)
@@ -1991,7 +2337,7 @@ human_numcompare (char const *a, char const *b)
hideously fast. */
static int
@ -2233,7 +2233,7 @@ index 6d2eec5..f189a0d 100644
{
while (blanks[to_uchar (*a)])
a++;
@@ -1991,6 +2337,25 @@ numcompare (char const *a, char const *b)
@@ -2001,6 +2347,25 @@ numcompare (char const *a, char const *b)
return strnumcmp (a, b, decimal_point, thousands_sep);
}
@ -2258,8 +2258,8 @@ index 6d2eec5..f189a0d 100644
+
/* Work around a problem whereby the long double value returned by glibc's
strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
A and B before calling strtold. FIXME: remove this function once
@@ -2041,7 +2406,7 @@ general_numcompare (char const *sa, char const *sb)
A and B before calling strtold. FIXME: remove this function if
@@ -2051,7 +2416,7 @@ general_numcompare (char const *sa, char const *sb)
Return 0 if the name in S is not recognized. */
static int
@ -2268,7 +2268,7 @@ index 6d2eec5..f189a0d 100644
{
size_t lo = 0;
size_t hi = MONTHS_PER_YEAR;
@@ -2317,15 +2682,14 @@ debug_key (struct line const *line, struct keyfield const *key)
@@ -2327,15 +2692,14 @@ debug_key (struct line const *line, struct keyfield const *key)
char saved = *lim;
*lim = '\0';
@ -2286,7 +2286,7 @@ index 6d2eec5..f189a0d 100644
else if (key->general_numeric)
ignore_value (strtold (beg, &tighter_lim));
else if (key->numeric || key->human_numeric)
@@ -2459,7 +2823,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
@@ -2469,7 +2833,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
/* Warn about significant leading blanks. */
bool implicit_skip = key_numeric (key) || key->month;
bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */
@ -2295,7 +2295,7 @@ index 6d2eec5..f189a0d 100644
&& ((!key->skipsblanks && !implicit_skip)
|| (!key->skipsblanks && key->schar)
|| (!key->skipeblanks && key->echar)))
@@ -2517,11 +2881,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
@@ -2527,11 +2891,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only)
error (0, 0, _("option '-r' only applies to last-resort comparison"));
}
@ -2384,7 +2384,7 @@ index 6d2eec5..f189a0d 100644
{
struct keyfield *key = keylist;
@@ -2606,7 +3046,7 @@ keycompare (struct line const *a, struct line const *b)
@@ -2616,7 +3056,7 @@ keycompare (struct line const *a, struct line const *b)
else if (key->human_numeric)
diff = human_numcompare (ta, tb);
else if (key->month)
@ -2393,7 +2393,7 @@ index 6d2eec5..f189a0d 100644
else if (key->random)
diff = compare_random (ta, tlena, tb, tlenb);
else if (key->version)
@@ -2722,6 +3162,211 @@ keycompare (struct line const *a, struct line const *b)
@@ -2732,6 +3172,211 @@ keycompare (struct line const *a, struct line const *b)
return key->reverse ? -diff : diff;
}
@ -2605,7 +2605,7 @@ index 6d2eec5..f189a0d 100644
/* Compare two lines A and B, returning negative, zero, or positive
depending on whether A compares less than, equal to, or greater than B. */
@@ -2749,7 +3394,7 @@ compare (struct line const *a, struct line const *b)
@@ -2759,7 +3404,7 @@ compare (struct line const *a, struct line const *b)
diff = - NONZERO (blen);
else if (blen == 0)
diff = 1;
@ -2614,7 +2614,7 @@ index 6d2eec5..f189a0d 100644
{
/* xmemcoll0 is a performance enhancement as
it will not unconditionally write '\0' after the
@@ -4144,6 +4789,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype)
@@ -4149,6 +4794,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype)
break;
case 'f':
key->translate = fold_toupper;
@ -2622,7 +2622,7 @@ index 6d2eec5..f189a0d 100644
break;
case 'g':
key->general_numeric = true;
@@ -4223,7 +4869,7 @@ main (int argc, char **argv)
@@ -4228,7 +4874,7 @@ main (int argc, char **argv)
initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@ -2631,7 +2631,7 @@ index 6d2eec5..f189a0d 100644
hard_LC_TIME = hard_locale (LC_TIME);
#endif
@@ -4244,6 +4890,29 @@ main (int argc, char **argv)
@@ -4249,6 +4895,29 @@ main (int argc, char **argv)
thousands_sep = -1;
}
@ -2661,7 +2661,7 @@ index 6d2eec5..f189a0d 100644
have_read_stdin = false;
inittables ();
@@ -4518,13 +5187,34 @@ main (int argc, char **argv)
@@ -4523,13 +5192,34 @@ main (int argc, char **argv)
case 't':
{
@ -2700,7 +2700,7 @@ index 6d2eec5..f189a0d 100644
else
{
/* Provoke with 'sort -txx'. Complain about
@@ -4535,9 +5225,11 @@ main (int argc, char **argv)
@@ -4540,9 +5230,11 @@ main (int argc, char **argv)
quote (optarg));
}
}
@ -2714,7 +2714,7 @@ index 6d2eec5..f189a0d 100644
}
break;
@@ -4765,12 +5457,10 @@ main (int argc, char **argv)
@@ -4771,12 +5463,10 @@ main (int argc, char **argv)
sort (files, nfiles, outfile, nthreads);
}
@ -3156,7 +3156,7 @@ diff --git a/tests/local.mk b/tests/local.mk
index 568944e..192f776 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -362,6 +362,8 @@ all_tests = \
@@ -368,6 +368,8 @@ all_tests = \
tests/misc/sort-discrim.sh \
tests/misc/sort-files0-from.pl \
tests/misc/sort-float.sh \
@ -3325,7 +3325,7 @@ index 4d399d8..07f2823 100755
my $delim = chr 0247;
sub t_subst ($)
{
@@ -329,8 +338,49 @@ foreach my $t (@tv)
@@ -333,8 +342,49 @@ foreach my $t (@tv)
push @Tests, $new_ent;
}

View file

@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJbM129AAoJEN9v2XEwYDfZpYMP/01bh5Nu0n2a5hk1omwMmxAr
qgieycKINFQtD5TD6DCIpBMwXHSlNCvEipwXfMjTvgxRTpVfbXx45FkcphEvuzta
PEC13liS+tXWUYv1tQ+v2tEturUcGLIy1FioyFUKck55mpd2EtGrZYVZBwjDzBxp
4Y49qfUZQuirzv2X+yHXKvvGe+twtWfQxeinmrjwZrNQ7TF5C1y3pJsg0FQ/kQh7
Ooe/epSHspneLYRO5mAnWVTz6Soc4vTPvrQ67loyHuL281OowUFdTtZ5mDNoUWW4
UojAhSGAkxGBHVDltOm6wnWlkZwcafeWbstaJhOLOBYnw1y/O4fKMqls/mr5Wm24
wIrv1rf77hWusForE3ndA4/ZnqrhL3RB9mwxeff/UCR1pHyo7De0EZVuifVzrg8F
tb84cVWm12V+OylChNFEpb4AEejHtUBrWElWoI/AHeQcmQAuPRM/fvV/q133rfTo
1Om2JzHN7LCpBY5Kz/9D15lCWLc6cPXVIyugBANVc7+GvmDLFrQzSHIeFcW5HbUr
sqkllCcsh7myG/Td2B6Ir69CTRa5TiHMv1c1chJiZv6xIIJWQYH4g6SE0zjquLVf
GZSZpK/Kl1Uqk5IPA5r9W3h+YV3th1RuLYGC6ejr9U+3E4bgEz6SFijdEwyNOI5Q
7blgThgOJFU62XqYvIUT
=9+BR
iQIcBAABAgAGBQJcfPYnAAoJEN9v2XEwYDfZ1ecQAJP0fMf31OOMyvhzxxAKOHwB
8ludnxfDVSjf8j/n6R//6tgWaGx5/pzvFxC+4OEGhVOKD8rJwkjIdzcb5SjSdiIa
rS4X4kYGblvy8TCSntR3d2oEhXqRzvrSqNNQABetraP/n8bP7pipu8+eGmrDragK
z8ytQXgjfXks2vdrWkb/TMEM4uGkylpqZmJ/Blc1W2wCEH48Hp0JIB72T51a7SGA
Cq3qz4lSmtDXdBOrLv7tMyupD+GfgWwGBjARI1sYCXJwIvJ3VQRopustVhniawfo
cVnLcCHf5OnwcUD4sMlG20GBIQimq6uQW98qQdAt+mhOuibv3xrGIEIVaoIw9HIz
fcqDf9mf3N/G2JF4x9afKp2COiM8Rc5Eo1zZ370iIzzpNIAjXwBNiP4HqXqAeFSP
IqKuAWmNUF9iWR9Ywp9QdVxYqKZXTD+WBeT66b9B5QT0crVUtPJq6NA2K985eU4p
HqmR//+0FOm/8+/ha8uTtyKum2mKGaoOc2ygb06LwR1cEBP/C2tMl5agR+9Nfp3D
fviUI1OEEvqxkwlSM15x2HN4BZUSQPDxKeFvwQBr4Hf8qUlKUZsKTGJO79yZLdxR
2TzsE8SQ+F1VusoKprX2Ge+E7Z+0KZsNO35Zci6eLcGgNEkkVnYZcNyLhwbbbjQ8
K43WsLwMVFgpBmPG2k0N
=E4em
-----END PGP SIGNATURE-----

View file

@ -122,7 +122,7 @@ Optional though recommended components,
including documentation and translations.
%prep
%autosetup -N -n %{name}-%{version}.64-1755f
%autosetup -N -n %{name}-%{version}.79-efa3e
# will be modified by coreutils-8.25-DIR_COLORS.patch
tee DIR_COLORS{,.256color,.lightbgcolor} <src/dircolors.hin >/dev/null

View file

@ -1 +1 @@
SHA512 (coreutils-ss.tar.xz) = 7f333b308e5b30c3f47e8a85165afa6fb11f8a6c825196d8becd39bffbed9dfea785a06f8f3d86cf863543e32e926129b7aba6e9259fe3b7a518dbec1ecce560
SHA512 (coreutils-ss.tar.xz) = 8565b41d7d3022c5cd0a38eb60d69cf69acfce2e93c9fc54737c2a01bdbf2ccd2e14008d4b101dd8eb335cf5b5fbbbac4ce973426a9d471b48b4d179c4d5464f

View file

@ -1,6 +1,7 @@
%{_bindir}/arch
%{_bindir}/b2sum
%{_bindir}/basename
%{_bindir}/basenc
%{_bindir}/cat
%{_bindir}/chgrp
%{_bindir}/chmod