@ -1,6 +1,6 @@
diff -urNp coreutils-8.1 5-orig/lib/linebuffer.h coreutils-8.15 /lib/linebuffer.h
--- coreutils-8.1 5 -orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100
+++ coreutils-8.1 5/lib/linebuffer.h 2012-03-07 21:25:39.499333158 +01 00
diff -urNp coreutils-8.1 6-orig/lib/linebuffer.h coreutils-8.16 /lib/linebuffer.h
--- coreutils-8.1 6 -orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100
+++ coreutils-8.1 6/lib/linebuffer.h 2012-03-26 18:02:00.993889446 +02 00
@@ -21,6 +21,11 @@
# include <stdio.h>
@ -23,9 +23,9 @@ diff -urNp coreutils-8.15-orig/lib/linebuffer.h coreutils-8.15/lib/linebuffer.h
};
/* Initialize linebuffer LINEBUFFER for use. */
diff -urNp coreutils-8.1 5-orig/src/cut.c coreutils-8.15 /src/cut.c
--- coreutils-8.1 5-orig/src/cut.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/cut.c 2012-03-07 21:25:39.501333069 +01 00
diff -urNp coreutils-8.1 6-orig/src/cut.c coreutils-8.16 /src/cut.c
--- coreutils-8.1 6-orig/src/cut.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/cut.c 2012-03-26 17:46:48.000000000 +02 00
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
@ -54,7 +54,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif
+
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
#define PROGRAM_NAME "cut"
@@ -72,6 +89,52 @@
@ -118,7 +118,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
+/* The largest byte, character or field index used as an endpoint of a closed
or degenerate range specification; this doesn't include the starting
index of right-open-ended ranges. For example, with either range spec
`2-5,9-', ` 2-3,5,9-' this variable would be set to 5. */
'2-5,9-', ' 2-3,5,9-' this variable would be set to 5. */
@@ -102,10 +165,11 @@ static size_t eol_range_start;
/* This is a bit vector.
@ -170,7 +170,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
/* True if the --output-delimiter=STRING option was specified. */
static bool output_delimiter_specified;
@@ -20 7,7 +284 ,7 @@ Mandatory arguments to long options are
@@ -20 6,7 +283 ,7 @@ Mandatory arguments to long options are
-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\
@ -179,7 +179,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
"), stdout);
fputs (_("\
--complement complement the set of selected bytes, characters\n\
@@ -36 6,7 +443 ,7 @@ set_fields (const char *fieldstr)
@@ -36 5,7 +442 ,7 @@ set_fields (const char *fieldstr)
in_digits = false;
/* Starting a range. */
if (dash_found)
@ -188,10 +188,10 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
dash_found = true;
fieldstr++;
@@ -3 90,14 +467 ,16 @@ set_fields (const char *fieldstr)
@@ -3 89,14 +466 ,16 @@ set_fields (const char *fieldstr)
if (!rhs_specified)
{
/* `n-'. From ` initial' to end of line. */
/* 'n-'. From ' initial' to end of line. */
- eol_range_start = initial;
+ if (eol_range_start == 0 ||
+ (eol_range_start != 0 && eol_range_start > initial))
@ -200,14 +200,14 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
}
else
{
/* `m-n' or ` -n' (1-n). */
/* 'm-n' or ' -n' (1-n). */
if (value < initial)
- FATAL_ERROR (_("invalid decreasing range"));
+ FATAL_ERROR (_("invalid byte, character or field list"));
/* Is there already a range going to end of line? */
if (eol_range_start != 0)
@@ -47 7,6 +556 ,9 @@ set_fields (const char *fieldstr)
@@ -47 6,6 +555 ,9 @@ set_fields (const char *fieldstr)
if (operating_mode == byte_mode)
error (0, 0,
_("byte offset %s is too large"), quote (bad_num));
@ -217,7 +217,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
else
error (0, 0,
_("field number %s is too large"), quote (bad_num));
@@ -48 7,7 +569 ,7 @@ set_fields (const char *fieldstr)
@@ -48 6,7 +568 ,7 @@ set_fields (const char *fieldstr)
fieldstr++;
}
else
@ -226,7 +226,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
}
max_range_endpoint = 0;
@@ -58 2,6 +664 ,77 @@ cut_bytes (FILE *stream)
@@ -58 1,6 +663 ,77 @@ cut_bytes (FILE *stream)
}
}
@ -304,7 +304,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
/* Read from stream STREAM, printing to standard output any selected fields. */
static void
@@ -70 4,13 +857 ,195 @@ cut_fields (FILE *stream)
@@ -70 3,13 +856 ,195 @@ cut_fields (FILE *stream)
}
}
@ -503,7 +503,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
}
/* Process file FILE to standard output.
@@ -76 2,6 +1097 ,8 @@ main (int argc, char **argv)
@@ -76 1,6 +1096 ,8 @@ main (int argc, char **argv)
bool ok;
bool delim_specified = false;
char *spec_list_string IF_LINT ( = NULL);
@ -512,7 +512,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
initialize_main (&argc, &argv);
set_program_name (argv[0]);
@@ -78 4,7 +1121 ,6 @@ main (int argc, char **argv)
@@ -78 3,7 +1120 ,6 @@ main (int argc, char **argv)
switch (optc)
{
case 'b':
@ -520,7 +520,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
/* Build the byte list. */
if (operating_mode != undefined_mode)
FATAL_ERROR (_("only one type of list may be specified"));
@@ -79 2,6 +1128 ,14 @@ main (int argc, char **argv)
@@ -79 1,6 +1127 ,14 @@ main (int argc, char **argv)
spec_list_string = optarg;
break;
@ -535,10 +535,10 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
case 'f':
/* Build the field list. */
if (operating_mode != undefined_mode)
@@ -80 3,10 +1147 ,35 @@ main (int argc, char **argv)
@@ -80 2,10 +1146 ,35 @@ main (int argc, char **argv)
case 'd':
/* New delimiter. */
/* Interpret -d '' to mean ` use the NUL byte as the delimiter.' */
/* Interpret -d '' to mean ' use the NUL byte as the delimiter.' */
- if (optarg[0] != '\0' && optarg[1] != '\0')
- FATAL_ERROR (_("the delimiter must be a single character"));
- delim = optarg[0];
@ -575,7 +575,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
break;
case OUTPUT_DELIMITER_OPTION:
@@ -81 9,6 +1188 ,7 @@ main (int argc, char **argv)
@@ -81 8,6 +1187 ,7 @@ main (int argc, char **argv)
break;
case 'n':
@ -583,7 +583,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
break;
case 's':
@@ -84 1,7 +1211 ,7 @@ main (int argc, char **argv)
@@ -84 0,7 +1210 ,7 @@ main (int argc, char **argv)
if (operating_mode == undefined_mode)
FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
@ -592,7 +592,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
FATAL_ERROR (_("an input delimiter may be specified only\
when operating on fields"));
@@ -86 8,15 +1238 ,34 @@ main (int argc, char **argv)
@@ -86 7,15 +1237 ,34 @@ main (int argc, char **argv)
}
if (!delim_specified)
@ -633,10 +633,10 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
}
if (optind == argc)
diff -urNp coreutils-8.1 5-orig/src/expand.c coreutils-8.15 /src/expand.c
--- coreutils-8.1 5-orig/src/expand.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/expand.c 2012-03-07 21:25:39.502358144 +01 00
@@ -3 8,12 +38 ,29 @@
diff -urNp coreutils-8.1 6-orig/src/expand.c coreutils-8.16 /src/expand.c
--- coreutils-8.1 6-orig/src/expand.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/expand.c 2012-03-26 17:42:56.000000000 +02 00
@@ -3 7,12 +37 ,29 @@
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
@ -663,10 +663,10 @@ diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif
+
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
#define PROGRAM_NAME "expand"
@@ -3 60,6 +377 ,142 @@ expand (void)
@@ -3 58,6 +375 ,142 @@ expand (void)
}
}
@ -809,7 +809,7 @@ diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c
int
main (int argc, char **argv)
{
@@ -42 4,7 +577 ,12 @@ main (int argc, char **argv)
@@ -42 2,7 +575 ,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv);
@ -823,9 +823,9 @@ diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c
if (have_read_stdin && fclose (stdin) != 0)
error (EXIT_FAILURE, errno, "-");
diff -urNp coreutils-8.1 5-orig/src/fold.c coreutils-8.15 /src/fold.c
--- coreutils-8.1 5-orig/src/fold.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/fold.c 2012-03-07 21:25:39.504360585 +01 00
diff -urNp coreutils-8.1 6-orig/src/fold.c coreutils-8.16 /src/fold.c
--- coreutils-8.1 6-orig/src/fold.c 2012-03-24 19:22:13 .000000000 +0100
+++ coreutils-8.1 6/src/fold.c 2012-03-26 17:48:37.000000000 +02 00
@@ -22,12 +22,34 @@
#include <getopt.h>
#include <sys/types.h>
@ -860,7 +860,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
+
#define TAB_WIDTH 8
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
@@ -35,20 +57,41 @@
#define AUTHORS proper_name ("David MacKenzie")
@ -907,7 +907,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
{"spaces", no_argument, NULL, 's'},
{"width", required_argument, NULL, 'w'},
{GETOPT_HELP_OPTION_DECL},
@@ -7 8,6 +121 ,7 @@ Mandatory arguments to long options are
@@ -7 7,6 +120 ,7 @@ Mandatory arguments to long options are
"), stdout);
fputs (_("\
-b, --bytes count bytes rather than columns\n\
@ -915,7 +915,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
-s, --spaces break at spaces\n\
-w, --width=WIDTH use WIDTH columns instead of 80\n\
"), stdout);
@@ -9 5,7 +139 ,7 @@ Mandatory arguments to long options are
@@ -9 4,7 +138 ,7 @@ Mandatory arguments to long options are
static size_t
adjust_column (size_t column, char c)
{
@ -924,7 +924,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
{
if (c == '\b')
{
@@ -11 8,30 +162 ,14 @@ adjust_column (size_t column, char c)
@@ -11 7,30 +161 ,14 @@ adjust_column (size_t column, char c)
to stdout, with maximum line length WIDTH.
Return true if successful. */
@ -936,7 +936,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
- FILE *istream;
int c;
size_t column = 0; /* Screen column where next char will go. */
size_t offset_out = 0; /* Index in ` line_out' for next char. */
size_t offset_out = 0; /* Index in ' line_out' for next char. */
static char *line_out = NULL;
static size_t allocated_out = 0;
- int saved_errno;
@ -957,7 +957,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
fadvise (istream, FADVISE_SEQUENTIAL);
@@ -17 1,6 +199 ,15 @@ fold_file (char const *filename, size_t
@@ -17 0,6 +198 ,15 @@ fold_file (char const *filename, size_t
bool found_blank = false;
size_t logical_end = offset_out;
@ -973,7 +973,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
/* Look for the last blank. */
while (logical_end)
{
@@ -21 7,11 +254 ,221 @@ fold_file (char const *filename, size_t
@@ -21 6,11 +253 ,221 @@ fold_file (char const *filename, size_t
line_out[offset_out++] = c;
}
@ -1196,7 +1196,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
if (ferror (istream))
{
error (0, saved_errno, "%s", filename);
@@ -25 4,7 +501 ,8 @@ main (int argc, char **argv)
@@ -25 3,7 +500 ,8 @@ main (int argc, char **argv)
atexit (close_stdout);
@ -1206,7 +1206,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
{
@@ -26 3,7 +511 ,15 @@ main (int argc, char **argv)
@@ -26 2,7 +510 ,15 @@ main (int argc, char **argv)
switch (optc)
{
case 'b': /* Count bytes rather than columns. */
@ -1223,9 +1223,9 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
break;
case 's': /* Break at word boundaries. */
diff -urNp coreutils-8.1 5-orig/src/join.c coreutils-8.15 /src/join.c
--- coreutils-8.1 5-orig/src/join.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/join.c 2012-03-07 21:25:39.506358365 +01 00
diff -urNp coreutils-8.1 6-orig/src/join.c coreutils-8.16 /src/join.c
--- coreutils-8.1 6-orig/src/join.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/join.c 2012-03-26 17:50:02.000000000 +02 00
@@ -22,18 +22,32 @@
#include <sys/types.h>
#include <getopt.h>
@ -1257,11 +1257,11 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif
+
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
#define PROGRAM_NAME "join"
@@ -135,10 +149,12 @@ static struct outlist outlist_head;
/* Last element in ` outlist', where a new element can be added. */
/* Last element in ' outlist', where a new element can be added. */
static struct outlist *outlist_end = &outlist_head;
-/* Tab character separating fields. If negative, fields are separated
@ -1277,7 +1277,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
/* If nonzero, check that the input is correctly ordered. */
static enum
@@ -26 3,13 +279 ,14 @@ xfields (struct line *line)
@@ -26 2,13 +278 ,14 @@ xfields (struct line *line)
if (ptr == lim)
return;
@ -1295,7 +1295,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
{
/* Skip leading blanks before the first field. */
while (isblank (to_uchar (*ptr)))
@@ -29 3,6 +310 ,148 @@ xfields (struct line *line)
@@ -29 2,6 +309 ,148 @@ xfields (struct line *line)
extract_field (line, ptr, lim - ptr);
}
@ -1444,7 +1444,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
static void
freeline (struct line *line)
{
@@ -31 4,56 +473 ,115 @@ keycmp (struct line const *line1, struct
@@ -31 3,56 +472 ,115 @@ keycmp (struct line const *line1, struct
size_t jf_1, size_t jf_2)
{
/* Start of field to compare in each file. */
@ -1583,7 +1583,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
}
/* Check that successive input lines PREV and CURRENT from input file
@@ -45 5,6 +673 ,11 @@ get_line (FILE *fp, struct line **linep,
@@ -45 4,6 +672 ,11 @@ get_line (FILE *fp, struct line **linep,
}
++line_no[which - 1];
@ -1595,7 +1595,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
xfields (line);
if (prevline[which - 1])
@@ -55 4,21 +777 ,28 @@ prfield (size_t n, struct line const *li
@@ -55 3,21 +776 ,28 @@ prfield (size_t n, struct line const *li
/* Output all the fields in line, other than the join field. */
@ -1627,7 +1627,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
prfield (i, line);
}
}
@@ -57 9,7 +809 ,6 @@ static void
@@ -57 8,7 +808 ,6 @@ static void
prjoin (struct line const *line1, struct line const *line2)
{
const struct outlist *outlist;
@ -1635,7 +1635,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
size_t field;
struct line const *line;
@@ -61 3,7 +842 ,7 @@ prjoin (struct line const *line1, struct
@@ -61 2,7 +841 ,7 @@ prjoin (struct line const *line1, struct
o = o->next;
if (o == NULL)
break;
@ -1644,7 +1644,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
}
putchar ('\n');
}
@@ -109 1,21 +1320 ,46 @@ main (int argc, char **argv)
@@ -109 0,21 +1319 ,46 @@ main (int argc, char **argv)
case 't':
{
@ -1701,9 +1701,9 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
break;
case NOCHECK_ORDER_OPTION:
diff -urNp coreutils-8.1 5-orig/src/pr.c coreutils-8.15 /src/pr.c
--- coreutils-8.1 5-orig/src/pr.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/pr.c 2012-03-07 21:25:39.509333048 +01 00
diff -urNp coreutils-8.1 6-orig/src/pr.c coreutils-8.16 /src/pr.c
--- coreutils-8.1 6-orig/src/pr.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/pr.c 2012-03-26 17:50:48.000000000 +02 00
@@ -312,6 +312,32 @@
#include <getopt.h>
@ -1753,7 +1753,7 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
+extern int wcwidth ();
+#endif
+
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
#define PROGRAM_NAME "pr"
@@ -415,7 +453,20 @@ struct COLUMN
@ -1840,7 +1840,7 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
/* (-n) line counting starts with 1st line of input file (not with 1st
line of 1st page printed). */
@@ -691,6 +751,7 @@ static bool use_col_separator = false;
-a|COLUMN|-m is a `space' and with the -J option a ` tab'. */
-a|COLUMN|-m is a 'space' and with the -J option a ' tab'. */
static char *col_sep_string = (char *) "";
static int col_sep_length = 0;
+static int col_sep_width = 0;
@ -2082,7 +2082,7 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
@@ -2050,22 +2181,24 @@ add_line_number (COLUMN *p)
/* Tabification is assumed for multiple columns, also for n-separators,
but ` default n-separator = TAB' hasn't been given priority over
but ' default n-separator = TAB' hasn't been given priority over
equal column_width also specified by POSIX. */
- if (number_separator == '\t')
+ if (number_separator[0] == '\t')
@ -2447,9 +2447,9 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
/* We've just printed some files and need to clean up things before
looking for more options and printing the next batch of files.
diff -urNp coreutils-8.1 5-orig/src/sort.c coreutils-8.15 /src/sort.c
--- coreutils-8.1 5-orig/src/sort.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/sort.c 2012-03-07 21:28:21.856210178 +01 00
diff -urNp coreutils-8.1 6-orig/src/sort.c coreutils-8.16 /src/sort.c
--- coreutils-8.1 6-orig/src/sort.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/sort.c 2012-03-26 17:35:09.000000000 +02 00
@@ -22,11 +22,20 @@
#include <config.h>
@ -2524,7 +2524,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* Flag to remove consecutive duplicate lines from the output.
Only the last of a sequence of equal lines will be output. */
@@ -78 3,6 +812 ,46 @@ reap_all (void)
@@ -78 2,6 +811 ,46 @@ reap_all (void)
reap (-1);
}
@ -2571,7 +2571,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* Clean up any remaining temporary files. */
static void
@@ -121 5,7 +1284 ,7 @@ zaptemp (char const *name)
@@ -121 4,7 +1283 ,7 @@ zaptemp (char const *name)
free (node);
}
@ -2580,7 +2580,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
static int
struct_month_cmp (void const *m1, void const *m2)
@@ -12 30,7 +1299 ,7 @@ struct_month_cmp (void const *m1, void c
@@ -12 29,7 +1298 ,7 @@ struct_month_cmp (void const *m1, void c
/* Initialize the character class tables. */
static void
@ -2589,7 +2589,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{
size_t i;
@@ -124 2,7 +1311 ,7 @@ inittables (void)
@@ -124 1,7 +1310 ,7 @@ inittables (void)
fold_toupper[i] = toupper (i);
}
@ -2598,7 +2598,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* If we're not in the "C" locale, read different names for months. */
if (hard_LC_TIME)
{
@@ -132 4,6 +1393 ,84 @@ specify_nmerge (int oi, char c, char con
@@ -132 3,6 +1392 ,84 @@ specify_nmerge (int oi, char c, char con
xstrtol_fatal (e, oi, c, long_options, s);
}
@ -2683,7 +2683,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* Specify the amount of main memory to use when sorting. */
static void
specify_sort_size (int oi, char c, char const *s)
@@ -155 2,7 +1699 ,7 @@ buffer_linelim (struct buffer const *buf
@@ -155 1,7 +1698 ,7 @@ buffer_linelim (struct buffer const *buf
by KEY in LINE. */
static char *
@ -2692,7 +2692,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t sword = key->sword;
@@ -156 1,10 +1708 ,10 @@ begfield (struct line const *line, struc
@@ -156 0,10 +1707 ,10 @@ begfield (struct line const *line, struc
/* The leading field separator itself is included in a field when -t
is absent. */
@ -2705,7 +2705,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
++ptr;
if (ptr < lim)
++ptr;
@@ -15 90,11 +1737 ,70 @@ begfield (struct line const *line, struc
@@ -15 89,11 +1736 ,70 @@ begfield (struct line const *line, struc
return ptr;
}
@ -2777,9 +2777,9 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{
char *ptr = line->text, *lim = ptr + line->length - 1;
size_t eword = key->eword, echar = key->echar;
@@ -160 9,10 +1815 ,10 @@ limfield (struct line const *line, struc
` beginning' is the first character following the delimiting TAB.
Otherwise, leave PTR pointing at the first ` blank' character after
@@ -160 8,10 +1814 ,10 @@ limfield (struct line const *line, struc
' beginning' is the first character following the delimiting TAB.
Otherwise, leave PTR pointing at the first ' blank' character after
the preceding field. */
- if (tab != TAB_DEFAULT)
+ if (tab_length)
@ -2790,7 +2790,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
++ptr;
if (ptr < lim && (eword || echar))
++ptr;
@@ -165 8,10 +1864 ,10 @@ limfield (struct line const *line, struc
@@ -165 7,10 +1863 ,10 @@ limfield (struct line const *line, struc
*/
/* Make LIM point to the end of (one byte past) the current field. */
@ -2803,7 +2803,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
if (newlim)
lim = newlim;
}
@@ -169 2,6 +1898 ,130 @@ limfield (struct line const *line, struc
@@ -169 1,6 +1897 ,130 @@ limfield (struct line const *line, struc
return ptr;
}
@ -2934,7 +2934,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* 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
@@ -177 8,8 +2108 ,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
@@ -177 7,8 +2107 ,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
else
{
if (key->skipsblanks)
@ -2959,7 +2959,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
line->keybeg = line_start;
}
}
@@ -1 900,7 +2244 ,7 @@ human_numcompare (char const *a, char co
@@ -1 899,7 +2243 ,7 @@ human_numcompare (char const *a, char co
hideously fast. */
static int
@ -2968,7 +2968,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{
while (blanks[to_uchar (*a)])
a++;
@@ -19 10,6 +2254 ,25 @@ numcompare (char const *a, char const *b
@@ -19 09,6 +2253 ,25 @@ numcompare (char const *a, char const *b
return strnumcmp (a, b, decimal_point, thousands_sep);
}
@ -2994,7 +2994,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* 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
@@ -19 60,7 +2323 ,7 @@ general_numcompare (char const *sa, char
@@ -19 59,7 +2322 ,7 @@ general_numcompare (char const *sa, char
Return 0 if the name in S is not recognized. */
static int
@ -3003,7 +3003,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{
size_t lo = 0;
size_t hi = MONTHS_PER_YEAR;
@@ -223 5,15 +2598 ,14 @@ debug_key (struct line const *line, stru
@@ -223 4,15 +2597 ,14 @@ debug_key (struct line const *line, stru
char saved = *lim;
*lim = '\0';
@ -3021,7 +3021,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
else if (key->general_numeric)
ignore_value (strtold (beg, &tighter_lim));
else if (key->numeric || key->human_numeric)
@@ -238 7,7 +2749 ,7 @@ key_warnings (struct keyfield const *gke
@@ -238 6,7 +2748 ,7 @@ key_warnings (struct keyfield const *gke
bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key)
&& !(key->schar || key->echar);
bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */
@ -3030,8 +3030,8 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
&& ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
|| (!key->skipsblanks && key->schar)
|| (!key->skipeblanks && key->echar)))
@@ -244 5,11 +2807 ,83 @@ key_warnings (struct keyfield const *gke
error (0, 0, _("option ` -r' only applies to last-resort comparison"));
@@ -244 4,11 +2806 ,83 @@ key_warnings (struct keyfield const *gke
error (0, 0, _("option ' -r' only applies to last-resort comparison"));
}
+#if HAVE_MBRTOWC
@ -3115,7 +3115,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{
struct keyfield *key = keylist;
@@ -253 4,7 +2968 ,7 @@ keycompare (struct line const *a, struct
@@ -253 3,7 +2967 ,7 @@ keycompare (struct line const *a, struct
else if (key->human_numeric)
diff = human_numcompare (ta, tb);
else if (key->month)
@ -3124,7 +3124,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
else if (key->random)
diff = compare_random (ta, tlena, tb, tlenb);
else if (key->version)
@@ -26 50,6 +3084 ,180 @@ keycompare (struct line const *a, struct
@@ -26 49,6 +3083 ,180 @@ keycompare (struct line const *a, struct
return key->reverse ? -diff : diff;
}
@ -3305,7 +3305,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* Compare two lines A and B, returning negative, zero, or positive
depending on whether A compares less than, equal to, or greater than B. */
@@ -41 10,7 +4718 ,7 @@ main (int argc, char **argv)
@@ -41 09,7 +4717 ,7 @@ main (int argc, char **argv)
initialize_exit_failure (SORT_FAILURE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@ -3314,7 +3314,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
hard_LC_TIME = hard_locale (LC_TIME);
#endif
@@ -413 1,6 +4739 ,29 @@ main (int argc, char **argv)
@@ -413 0,6 +4738 ,29 @@ main (int argc, char **argv)
thousands_sep = -1;
}
@ -3344,7 +3344,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
have_read_stdin = false;
inittables ();
@@ -440 1,13 +5032 ,34 @@ main (int argc, char **argv)
@@ -440 0,13 +5031 ,34 @@ main (int argc, char **argv)
case 't':
{
@ -3382,8 +3382,8 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
+ newtab[0] = '\0';
else
{
/* Provoke with ` sort -txx'. Complain about
@@ -441 8,9 +5070 ,12 @@ main (int argc, char **argv)
/* Provoke with ' sort -txx'. Complain about
@@ -441 7,9 +5069 ,12 @@ main (int argc, char **argv)
quote (optarg));
}
}
@ -3398,10 +3398,10 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
}
break;
diff -urNp coreutils-8.1 5-orig/src/unexpand.c coreutils-8.15 /src/unexpand.c
--- coreutils-8.1 5-orig/src/unexpand.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/unexpand.c 2012-03-07 21:25:39.517457874 +01 00
@@ -3 9,12 +39 ,29 @@
diff -urNp coreutils-8.1 6-orig/src/unexpand.c coreutils-8.16 /src/unexpand.c
--- coreutils-8.1 6-orig/src/unexpand.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/unexpand.c 2012-03-26 17:51:46.000000000 +02 00
@@ -3 8,12 +38 ,29 @@
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>
@ -3428,10 +3428,10 @@ diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif
+
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
#define PROGRAM_NAME "unexpand"
@@ -10 4,6 +121 ,208 @@ static struct option const longopts[] =
@@ -10 3,6 +120 ,208 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
@ -3640,7 +3640,7 @@ diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c
void
usage (int status)
{
@@ -52 6,7 +745 ,12 @@ main (int argc, char **argv)
@@ -52 4,7 +743 ,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv);
@ -3654,9 +3654,9 @@ diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c
if (have_read_stdin && fclose (stdin) != 0)
error (EXIT_FAILURE, errno, "-");
diff -urNp coreutils-8.1 5-orig/src/uniq.c coreutils-8.15 /src/uniq.c
--- coreutils-8.1 5-orig/src/uniq.c 2012-01-01 10:04:06 .000000000 +0100
+++ coreutils-8.1 5/src/uniq.c 2012-03-07 21:25:39.519460555 +01 00
diff -urNp coreutils-8.1 6-orig/src/uniq.c coreutils-8.16 /src/uniq.c
--- coreutils-8.1 6-orig/src/uniq.c 2012-03-24 21:26:51 .000000000 +0100
+++ coreutils-8.1 6/src/uniq.c 2012-03-26 17:35:09.000000000 +02 00
@@ -21,6 +21,16 @@
#include <getopt.h>
#include <sys/types.h>
@ -3693,7 +3693,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
+#endif
+
/* The official name of this program (e.g., no ` g' prefix). */
/* The official name of this program (e.g., no ' g' prefix). */
#define PROGRAM_NAME "uniq"
@@ -108,6 +130,10 @@ static enum delimit_method const delimit
/* Select whether/how to delimit groups of duplicate lines. */
@ -3706,7 +3706,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
static struct option const longopts[] =
{
{"count", no_argument, NULL, 'c'},
@@ -20 7,7 +233 ,7 @@ size_opt (char const *opt, char const *m
@@ -20 6,7 +232 ,7 @@ size_opt (char const *opt, char const *m
return a pointer to the beginning of the line's field to be compared. */
static char * _GL_ATTRIBUTE_PURE
@ -3715,7 +3715,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
{
size_t count;
char const *lp = line->buffer;
@@ -22 7,6 +253 ,83 @@ find_field (struct linebuffer const *lin
@@ -22 6,6 +252 ,83 @@ find_field (struct linebuffer const *lin
return line->buffer + i;
}
@ -3799,7 +3799,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
/* Return false if two strings OLD and NEW match, true if not.
OLD and NEW point not to the beginnings of the lines
but rather to the beginnings of the fields to compare.
@@ -23 5,6 +338 ,8 @@ find_field (struct linebuffer const *lin
@@ -23 4,6 +337 ,8 @@ find_field (struct linebuffer const *lin
static bool
different (char *old, char *new, size_t oldlen, size_t newlen)
{
@ -3808,7 +3808,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (check_chars < oldlen)
oldlen = check_chars;
if (check_chars < newlen)
@@ -24 2,14 +347 ,92 @@ different (char *old, char *new, size_t
@@ -24 1,14 +346 ,92 @@ different (char *old, char *new, size_t
if (ignore_case)
{
@ -3906,7 +3906,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
/* Output the line in linebuffer LINE to standard output
provided that the switches say it should be output.
@@ -30 5,15 +488 ,43 @@ check_file (const char *infile, const ch
@@ -30 4,15 +487 ,43 @@ check_file (const char *infile, const ch
{
char *prevfield IF_LINT ( = NULL);
size_t prevlen IF_LINT ( = 0);
@ -3950,7 +3950,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (prevline->length == 0
|| different (thisfield, prevfield, thislen, prevlen))
{
@@ -33 2,17 +543 ,26 @@ check_file (const char *infile, const ch
@@ -33 1,17 +542 ,26 @@ check_file (const char *infile, const ch
size_t prevlen;
uintmax_t match_count = 0;
bool first_delimiter = true;
@ -3977,7 +3977,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
{
if (ferror (stdin))
@@ -35 1,6 +571 ,14 @@ check_file (const char *infile, const ch
@@ -35 0,6 +570 ,14 @@ check_file (const char *infile, const ch
}
thisfield = find_field (thisline);
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
@ -3992,7 +3992,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
match = !different (thisfield, prevfield, thislen, prevlen);
match_count += match;
@@ -38 3,6 +611 ,9 @@ check_file (const char *infile, const ch
@@ -38 2,6 +610 ,9 @@ check_file (const char *infile, const ch
SWAP_LINES (prevline, thisline);
prevfield = thisfield;
prevlen = thislen;
@ -4002,7 +4002,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (!match)
match_count = 0;
}
@@ -42 8,6 +659 ,19 @@ main (int argc, char **argv)
@@ -42 7,6 +658 ,19 @@ main (int argc, char **argv)
atexit (close_stdout);
@ -4022,18 +4022,18 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
skip_chars = 0;
skip_fields = 0;
check_chars = SIZE_MAX;
diff -urNp coreutils-8.15-orig/tests/Makefile.am coreutils-8.15/tests/Makefile.am
--- coreutils-8.15-orig/tests/Makefile.am 2012-03-07 21:25:03.149233957 +0100
+++ coreutils-8.15/tests/Makefile.am 2012-03-07 21:25:39.520458288 +0100
@@ -240,6 +240,7 @@ TESTS = \
misc/sort-debug-keys \
diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.am
--- coreutils-8.16-orig/tests/Makefile.am 2012-03-26 18:01:35.564014659 +0200
+++ coreutils-8.16/tests/Makefile.am 2012-03-26 18:02:01.023015013 +0200
@@ -242,6 +242,7 @@ TESTS = \
misc/sort-debug-warn \
misc/sort-discrim \
misc/sort-files0-from \
+ misc/sort-mb-tests \
misc/sort-float \
misc/sort-merge \
misc/sort-merge-fdlimit \
@@ -5 26,6 +527 ,10 @@ TESTS = \
@@ -5 37,6 +538 ,10 @@ TESTS = \
$(root_tests)
pr_data = \
@ -4044,9 +4044,9 @@ diff -urNp coreutils-8.15-orig/tests/Makefile.am coreutils-8.15/tests/Makefile.a
pr/0F \
pr/0FF \
pr/0FFnt \
diff -urNp coreutils-8.1 5-orig/tests/misc/cut coreutils-8.15 /tests/misc/cut
--- coreutils-8.1 5-orig/tests/misc/cut 2012-01-01 10:04 :06.000000000 +0100
+++ coreutils-8.1 5/tests/misc/cut 2012-03-07 21:25:39.521460928 +01 00
diff -urNp coreutils-8.1 6-orig/tests/misc/cut coreutils-8.16 /tests/misc/cut
--- coreutils-8.1 6-orig/tests/misc/cut 2012-02-03 10:22 :06.000000000 +0100
+++ coreutils-8.1 6/tests/misc/cut 2012-03-26 17:40:49.000000000 +02 00
@@ -23,14 +23,15 @@ use strict;
# Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4060,7 +4060,7 @@ diff -urNp coreutils-8.15-orig/tests/misc/cut coreutils-8.15/tests/misc/cut
+my $mb_locale = 'C';
my $prog = 'cut';
my $try = "Try \` $prog --help' for more information.\n";
my $try = "Try ' $prog --help' for more information.\n";
my $from_1 = "$prog: fields and positions are numbered from 1\n$try";
-my $inval = "$prog: invalid byte or field list\n$try";
+my $inval = "$prog: invalid byte, character or field list\n$try";
@ -4076,41 +4076,41 @@ diff -urNp coreutils-8.15-orig/tests/misc/cut coreutils-8.15/tests/misc/cut
['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},
diff -urNp coreutils-8.1 5-orig/tests/misc/mb1.I coreutils-8.15 /tests/misc/mb1.I
--- coreutils-8.1 5 -orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 5/tests/misc/mb1.I 2012-03-07 21:25:39.521460928 +01 00
diff -urNp coreutils-8.1 6-orig/tests/misc/mb1.I coreutils-8.16 /tests/misc/mb1.I
--- coreutils-8.1 6 -orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 6/tests/misc/mb1.I 2012-03-26 17:35:09.000000000 +02 00
@@ -0,0 +1,4 @@
+Apple@ 10
+Banana@ 5
+Citrus@ 20
+Cherry@ 30
diff -urNp coreutils-8.1 5-orig/tests/misc/mb1.X coreutils-8.15 /tests/misc/mb1.X
--- coreutils-8.1 5 -orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 5/tests/misc/mb1.X 2012-03-07 21:25:39.522458368 +01 00
diff -urNp coreutils-8.1 6-orig/tests/misc/mb1.X coreutils-8.16 /tests/misc/mb1.X
--- coreutils-8.1 6 -orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 6/tests/misc/mb1.X 2012-03-26 17:35:09.000000000 +02 00
@@ -0,0 +1,4 @@
+Banana@ 5
+Apple@ 10
+Citrus@ 20
+Cherry@ 30
diff -urNp coreutils-8.1 5-orig/tests/misc/mb2.I coreutils-8.15 /tests/misc/mb2.I
--- coreutils-8.1 5 -orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 5/tests/misc/mb2.I 2012-03-07 21:25:39.523458000 +01 00
diff -urNp coreutils-8.1 6-orig/tests/misc/mb2.I coreutils-8.16 /tests/misc/mb2.I
--- coreutils-8.1 6 -orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 6/tests/misc/mb2.I 2012-03-26 17:35:09.000000000 +02 00
@@ -0,0 +1,4 @@
+Apple@ A A 10@ @ 20
+Banana@ A A 5@ @ 30
+Citrus@ A A 20@ @ 5
+Cherry@ A A 30@ @ 10
diff -urNp coreutils-8.1 5-orig/tests/misc/mb2.X coreutils-8.15 /tests/misc/mb2.X
--- coreutils-8.1 5 -orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 5/tests/misc/mb2.X 2012-03-07 21:25:39.523458000 +01 00
diff -urNp coreutils-8.1 6-orig/tests/misc/mb2.X coreutils-8.16 /tests/misc/mb2.X
--- coreutils-8.1 6 -orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 6/tests/misc/mb2.X 2012-03-26 17:35:09.000000000 +02 00
@@ -0,0 +1,4 @@
+Citrus@ A A 20@ @ 5
+Cherry@ A A 30@ @ 10
+Apple@ A A 10@ @ 20
+Banana@ A A 5@ @ 30
diff -urNp coreutils-8.1 5-orig/tests/misc/sort-mb-tests coreutils-8.15 /tests/misc/sort-mb-tests
--- coreutils-8.1 5 -orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 5/tests/misc/sort-mb-tests 2012-03-07 21:25:39.524460637 +01 00
diff -urNp coreutils-8.1 6-orig/tests/misc/sort-mb-tests coreutils-8.16 /tests/misc/sort-mb-tests
--- coreutils-8.1 6 -orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.1 6/tests/misc/sort-mb-tests 2012-03-26 17:35:09.000000000 +02 00
@@ -0,0 +1,58 @@
+#! /bin/sh
+case $# in