/[packages]/updates/2/coreutils/current/SOURCES/coreutils-8.15-new-i18n.patch
ViewVC logotype

Diff of /updates/2/coreutils/current/SOURCES/coreutils-8.15-new-i18n.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 393949 by schedbot, Sun May 27 16:02:26 2012 UTC revision 393950 by luigiwalser, Fri Feb 1 21:39:35 2013 UTC
# Line 1  Line 1 
1  diff -urNp coreutils-8.13-orig/lib/linebuffer.h coreutils-8.13/lib/linebuffer.h  diff -urNp coreutils-8.15-orig/lib/linebuffer.h coreutils-8.15/lib/linebuffer.h
2  --- coreutils-8.13-orig/lib/linebuffer.h        2011-04-24 19:21:45.000000000 +0200  --- coreutils-8.15-orig/lib/linebuffer.h        2012-01-06 10:14:31.000000000 +0100
3  +++ coreutils-8.13/lib/linebuffer.h     2011-09-09 10:23:14.163704760 +0200  +++ coreutils-8.15/lib/linebuffer.h     2013-01-30 13:40:37.339145671 +0100
4  @@ -21,6 +21,11 @@  @@ -21,6 +21,11 @@
5    
6   # include <stdio.h>   # include <stdio.h>
# Line 23  diff -urNp coreutils-8.13-orig/lib/lineb Line 23  diff -urNp coreutils-8.13-orig/lib/lineb
23   };   };
24    
25   /* Initialize linebuffer LINEBUFFER for use. */   /* Initialize linebuffer LINEBUFFER for use. */
26  diff -urNp coreutils-8.13-orig/src/cut.c coreutils-8.13/src/cut.c  diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
27  --- coreutils-8.13-orig/src/cut.c       2011-07-28 12:38:27.000000000 +0200  --- coreutils-8.15-orig/src/cut.c       2012-01-01 10:04:06.000000000 +0100
28  +++ coreutils-8.13/src/cut.c    2011-09-09 10:23:14.165701039 +0200  +++ coreutils-8.15/src/cut.c    2013-01-30 13:40:37.341145459 +0100
29  @@ -28,6 +28,11 @@  @@ -28,6 +28,11 @@
30   #include <assert.h>   #include <assert.h>
31   #include <getopt.h>   #include <getopt.h>
# Line 304  diff -urNp coreutils-8.13-orig/src/cut.c Line 304  diff -urNp coreutils-8.13-orig/src/cut.c
304   /* Read from stream STREAM, printing to standard output any selected fields.  */   /* Read from stream STREAM, printing to standard output any selected fields.  */
305    
306   static void   static void
307  @@ -704,13 +843,195 @@ cut_fields (FILE *stream)  @@ -704,13 +857,195 @@ cut_fields (FILE *stream)
308       }       }
309   }   }
310    
# Line 376  diff -urNp coreutils-8.13-orig/src/cut.c Line 376  diff -urNp coreutils-8.13-orig/src/cut.c
376  +                break;  +                break;
377  +            }  +            }
378  +  +
379  +          if (wc == WEOF)  +          if (len<=0 && wc == WEOF)
380  +            break;  +            break;
381  +  +
382  +          /* If the first field extends to the end of line (it is not  +          /* If the first field extends to the end of line (it is not
# Line 503  diff -urNp coreutils-8.13-orig/src/cut.c Line 503  diff -urNp coreutils-8.13-orig/src/cut.c
503   }   }
504    
505   /* Process file FILE to standard output.   /* Process file FILE to standard output.
506  @@ -762,6 +1080,8 @@ main (int argc, char **argv)  @@ -762,6 +1097,8 @@ main (int argc, char **argv)
507     bool ok;     bool ok;
508     bool delim_specified = false;     bool delim_specified = false;
509     char *spec_list_string IF_LINT ( = NULL);     char *spec_list_string IF_LINT ( = NULL);
# Line 512  diff -urNp coreutils-8.13-orig/src/cut.c Line 512  diff -urNp coreutils-8.13-orig/src/cut.c
512    
513     initialize_main (&argc, &argv);     initialize_main (&argc, &argv);
514     set_program_name (argv[0]);     set_program_name (argv[0]);
515  @@ -784,7 +1104,6 @@ main (int argc, char **argv)  @@ -784,7 +1121,6 @@ main (int argc, char **argv)
516         switch (optc)         switch (optc)
517           {           {
518           case 'b':           case 'b':
# Line 520  diff -urNp coreutils-8.13-orig/src/cut.c Line 520  diff -urNp coreutils-8.13-orig/src/cut.c
520             /* Build the byte list. */             /* Build the byte list. */
521             if (operating_mode != undefined_mode)             if (operating_mode != undefined_mode)
522               FATAL_ERROR (_("only one type of list may be specified"));               FATAL_ERROR (_("only one type of list may be specified"));
523  @@ -792,6 +1111,14 @@ main (int argc, char **argv)  @@ -792,6 +1128,14 @@ main (int argc, char **argv)
524             spec_list_string = optarg;             spec_list_string = optarg;
525             break;             break;
526    
# Line 535  diff -urNp coreutils-8.13-orig/src/cut.c Line 535  diff -urNp coreutils-8.13-orig/src/cut.c
535           case 'f':           case 'f':
536             /* Build the field list. */             /* Build the field list. */
537             if (operating_mode != undefined_mode)             if (operating_mode != undefined_mode)
538  @@ -803,10 +1130,35 @@ main (int argc, char **argv)  @@ -803,10 +1147,35 @@ main (int argc, char **argv)
539           case 'd':           case 'd':
540             /* New delimiter. */             /* New delimiter. */
541             /* Interpret -d '' to mean `use the NUL byte as the delimiter.'  */             /* Interpret -d '' to mean `use the NUL byte as the delimiter.'  */
# Line 575  diff -urNp coreutils-8.13-orig/src/cut.c Line 575  diff -urNp coreutils-8.13-orig/src/cut.c
575             break;             break;
576    
577           case OUTPUT_DELIMITER_OPTION:           case OUTPUT_DELIMITER_OPTION:
578  @@ -819,6 +1171,7 @@ main (int argc, char **argv)  @@ -819,6 +1188,7 @@ main (int argc, char **argv)
579             break;             break;
580    
581           case 'n':           case 'n':
# Line 583  diff -urNp coreutils-8.13-orig/src/cut.c Line 583  diff -urNp coreutils-8.13-orig/src/cut.c
583             break;             break;
584    
585           case 's':           case 's':
586  @@ -841,7 +1194,7 @@ main (int argc, char **argv)  @@ -841,7 +1211,7 @@ main (int argc, char **argv)
587     if (operating_mode == undefined_mode)     if (operating_mode == undefined_mode)
588       FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));       FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
589    
# Line 592  diff -urNp coreutils-8.13-orig/src/cut.c Line 592  diff -urNp coreutils-8.13-orig/src/cut.c
592       FATAL_ERROR (_("an input delimiter may be specified only\       FATAL_ERROR (_("an input delimiter may be specified only\
593    when operating on fields"));    when operating on fields"));
594    
595  @@ -868,15 +1221,34 @@ main (int argc, char **argv)  @@ -868,15 +1238,34 @@ main (int argc, char **argv)
596       }       }
597    
598     if (!delim_specified)     if (!delim_specified)
# Line 633  diff -urNp coreutils-8.13-orig/src/cut.c Line 633  diff -urNp coreutils-8.13-orig/src/cut.c
633       }       }
634    
635     if (optind == argc)     if (optind == argc)
636  diff -urNp coreutils-8.13-orig/src/expand.c coreutils-8.13/src/expand.c  diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c
637  --- coreutils-8.13-orig/src/expand.c    2011-07-28 12:38:27.000000000 +0200  --- coreutils-8.15-orig/src/expand.c    2012-01-01 10:04:06.000000000 +0100
638  +++ coreutils-8.13/src/expand.c 2011-09-09 10:23:14.167583399 +0200  +++ coreutils-8.15/src/expand.c 2013-01-30 13:40:37.343145830 +0100
639  @@ -38,12 +38,29 @@  @@ -38,12 +38,29 @@
640   #include <stdio.h>   #include <stdio.h>
641   #include <getopt.h>   #include <getopt.h>
# Line 733  diff -urNp coreutils-8.13-orig/src/expan Line 733  diff -urNp coreutils-8.13-orig/src/expan
733  +         if (convert)  +         if (convert)
734  +           {  +           {
735  +             ++column;  +             ++column;
736  +             if (convert_entire_line == 0)  +             if (convert_entire_line == 0 && !isblank(*bufpos))
737  +               convert = 0;  +               convert = 0;
738  +           }  +           }
739  +         putchar (*bufpos);  +         putchar (*bufpos);
# Line 793  diff -urNp coreutils-8.13-orig/src/expan Line 793  diff -urNp coreutils-8.13-orig/src/expan
793  +  +
794  +                     width = wcwidth (wc);  +                     width = wcwidth (wc);
795  +                     column += (width > 0) ? width : 0;  +                     column += (width > 0) ? width : 0;
796  +                     if (convert_entire_line == 0)  +                     if (convert_entire_line == 0 && !iswblank(wc))
797  +                       convert = 0;  +                       convert = 0;
798  +                   }  +                   }
799  +               }  +               }
# Line 823  diff -urNp coreutils-8.13-orig/src/expan Line 823  diff -urNp coreutils-8.13-orig/src/expan
823    
824     if (have_read_stdin && fclose (stdin) != 0)     if (have_read_stdin && fclose (stdin) != 0)
825       error (EXIT_FAILURE, errno, "-");       error (EXIT_FAILURE, errno, "-");
826  diff -urNp coreutils-8.13-orig/src/fold.c coreutils-8.13/src/fold.c  diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
827  --- coreutils-8.13-orig/src/fold.c      2011-07-28 12:38:27.000000000 +0200  --- coreutils-8.15-orig/src/fold.c      2012-01-01 10:04:06.000000000 +0100
828  +++ coreutils-8.13/src/fold.c   2011-09-09 10:23:14.169583741 +0200  +++ coreutils-8.15/src/fold.c   2013-01-30 13:40:37.344145705 +0100
829  @@ -22,12 +22,34 @@  @@ -22,12 +22,34 @@
830   #include <getopt.h>   #include <getopt.h>
831   #include <sys/types.h>   #include <sys/types.h>
# Line 1223  diff -urNp coreutils-8.13-orig/src/fold. Line 1223  diff -urNp coreutils-8.13-orig/src/fold.
1223             break;             break;
1224    
1225           case 's':              /* Break at word boundaries. */           case 's':              /* Break at word boundaries. */
1226  diff -urNp coreutils-8.13-orig/src/join.c coreutils-8.13/src/join.c  diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
1227  --- coreutils-8.13-orig/src/join.c      2011-08-08 10:16:09.000000000 +0200  --- coreutils-8.15-orig/src/join.c      2012-01-01 10:04:06.000000000 +0100
1228  +++ coreutils-8.13/src/join.c   2011-09-09 10:23:14.172687087 +0200  +++ coreutils-8.15/src/join.c   2013-01-30 15:59:19.544250392 +0100
1229  @@ -22,18 +22,32 @@  @@ -22,18 +22,32 @@
1230   #include <sys/types.h>   #include <sys/types.h>
1231   #include <getopt.h>   #include <getopt.h>
# Line 1444  diff -urNp coreutils-8.13-orig/src/join. Line 1444  diff -urNp coreutils-8.13-orig/src/join.
1444   static void   static void
1445   freeline (struct line *line)   freeline (struct line *line)
1446   {   {
1447  @@ -314,56 +473,115 @@ keycmp (struct line const *line1, struct  @@ -314,56 +473,129 @@ keycmp (struct line const *line1, struct
1448           size_t jf_1, size_t jf_2)           size_t jf_1, size_t jf_2)
1449   {   {
1450     /* Start of field to compare in each file.  */     /* Start of field to compare in each file.  */
# Line 1458  diff -urNp coreutils-8.13-orig/src/join. Line 1458  diff -urNp coreutils-8.13-orig/src/join.
1458  +  size_t len[2];       /* Length of fields to compare.  */  +  size_t len[2];       /* Length of fields to compare.  */
1459     int diff;     int diff;
1460  +  int i, j;  +  int i, j;
1461    +  int mallocd = 0;
1462    
1463     if (jf_1 < line1->nfields)     if (jf_1 < line1->nfields)
1464       {       {
# Line 1513  diff -urNp coreutils-8.13-orig/src/join. Line 1514  diff -urNp coreutils-8.13-orig/src/join.
1514  +  +
1515  +        for (i = 0; i < 2; i++)  +        for (i = 0; i < 2; i++)
1516  +          {  +          {
1517  +            copy[i] = alloca (len[i] + 1);  +            copy[i] = xmalloc (len[i] + 1);
1518    +            mallocd = 1;
1519  +  +
1520  +            for (j = 0; j < MIN (len[0], len[1]);)  +            for (j = 0; j < MIN (len[0], len[1]);)
1521  +              {  +              {
# Line 1553  diff -urNp coreutils-8.13-orig/src/join. Line 1555  diff -urNp coreutils-8.13-orig/src/join.
1555  +      {  +      {
1556  +        for (i = 0; i < 2; i++)  +        for (i = 0; i < 2; i++)
1557  +          {  +          {
1558  +            copy[i] = alloca (len[i] + 1);  +            copy[i] = xmalloc (len[i] + 1);
1559    +            mallocd = 1;
1560  +  +
1561  +            for (j = 0; j < MIN (len[0], len[1]); j++)  +            for (j = 0; j < MIN (len[0], len[1]); j++)
1562  +              copy[i][j] = toupper (beg[i][j]);  +              copy[i][j] = toupper (beg[i][j]);
# Line 1569  diff -urNp coreutils-8.13-orig/src/join. Line 1572  diff -urNp coreutils-8.13-orig/src/join.
1572  -      diff = memcmp (beg1, beg2, MIN (len1, len2));  -      diff = memcmp (beg1, beg2, MIN (len1, len2));
1573  +      copy[0] = (unsigned char *) beg[0];  +      copy[0] = (unsigned char *) beg[0];
1574  +      copy[1] = (unsigned char *) beg[1];  +      copy[1] = (unsigned char *) beg[1];
1575       }  +    }
1576    +
1577  +  if (hard_LC_COLLATE)  +  if (hard_LC_COLLATE)
1578  +    return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]);  +    {
1579  +  diff = memcmp (copy[0], copy[1], MIN (len[0], len[1]));  +      diff = xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]);
1580    +
1581    +      if (mallocd)
1582    +        for (i = 0; i < 2; i++)
1583    +          free (copy[i]);
1584  +  +
1585    +      return diff;
1586         }
1587    +  diff = memcmp (copy[0], copy[1], MIN (len[0], len[1]));
1588  +  +
1589    +  if (mallocd)
1590    +    for (i = 0; i < 2; i++)
1591    +      free (copy[i]);
1592    
1593     if (diff)     if (diff)
1594       return diff;       return diff;
1595  -  return len1 < len2 ? -1 : len1 != len2;  -  return len1 < len2 ? -1 : len1 != len2;
# Line 1583  diff -urNp coreutils-8.13-orig/src/join. Line 1597  diff -urNp coreutils-8.13-orig/src/join.
1597   }   }
1598    
1599   /* Check that successive input lines PREV and CURRENT from input file   /* Check that successive input lines PREV and CURRENT from input file
1600  @@ -455,6 +673,11 @@ get_line (FILE *fp, struct line **linep,  @@ -455,6 +687,11 @@ get_line (FILE *fp, struct line **linep,
1601       }       }
1602     ++line_no[which - 1];     ++line_no[which - 1];
1603    
# Line 1595  diff -urNp coreutils-8.13-orig/src/join. Line 1609  diff -urNp coreutils-8.13-orig/src/join.
1609     xfields (line);     xfields (line);
1610    
1611     if (prevline[which - 1])     if (prevline[which - 1])
1612  @@ -554,21 +777,28 @@ prfield (size_t n, struct line const *li  @@ -554,21 +791,28 @@ prfield (size_t n, struct line const *li
1613    
1614   /* Output all the fields in line, other than the join field.  */   /* Output all the fields in line, other than the join field.  */
1615    
# Line 1627  diff -urNp coreutils-8.13-orig/src/join. Line 1641  diff -urNp coreutils-8.13-orig/src/join.
1641         prfield (i, line);         prfield (i, line);
1642       }       }
1643   }   }
1644  @@ -579,7 +809,6 @@ static void  @@ -579,7 +823,6 @@ static void
1645   prjoin (struct line const *line1, struct line const *line2)   prjoin (struct line const *line1, struct line const *line2)
1646   {   {
1647     const struct outlist *outlist;     const struct outlist *outlist;
# Line 1635  diff -urNp coreutils-8.13-orig/src/join. Line 1649  diff -urNp coreutils-8.13-orig/src/join.
1649     size_t field;     size_t field;
1650     struct line const *line;     struct line const *line;
1651    
1652  @@ -613,7 +842,7 @@ prjoin (struct line const *line1, struct  @@ -613,7 +856,7 @@ prjoin (struct line const *line1, struct
1653             o = o->next;             o = o->next;
1654             if (o == NULL)             if (o == NULL)
1655               break;               break;
# Line 1644  diff -urNp coreutils-8.13-orig/src/join. Line 1658  diff -urNp coreutils-8.13-orig/src/join.
1658           }           }
1659         putchar ('\n');         putchar ('\n');
1660       }       }
1661  @@ -1091,21 +1320,46 @@ main (int argc, char **argv)  @@ -1091,21 +1334,46 @@ main (int argc, char **argv)
1662    
1663           case 't':           case 't':
1664             {             {
# Line 1670  diff -urNp coreutils-8.13-orig/src/join. Line 1684  diff -urNp coreutils-8.13-orig/src/join.
1684  +#endif  +#endif
1685  +              newtablen = 1;  +              newtablen = 1;
1686               if (! newtab)               if (! newtab)
 +            {  
1687  -              newtab = '\n'; /* '' => process the whole line.  */  -              newtab = '\n'; /* '' => process the whole line.  */
1688    +            {
1689  +              newtab = "\n"; /* '' => process the whole line.  */  +              newtab = "\n"; /* '' => process the whole line.  */
1690  +            }  +            }
1691               else if (optarg[1])               else if (optarg[1])
# Line 1701  diff -urNp coreutils-8.13-orig/src/join. Line 1715  diff -urNp coreutils-8.13-orig/src/join.
1715             break;             break;
1716    
1717           case NOCHECK_ORDER_OPTION:           case NOCHECK_ORDER_OPTION:
1718  diff -urNp coreutils-8.13-orig/src/pr.c coreutils-8.13/src/pr.c  diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
1719  --- coreutils-8.13-orig/src/pr.c        2011-08-30 23:01:40.000000000 +0200  --- coreutils-8.15-orig/src/pr.c        2012-01-01 10:04:06.000000000 +0100
1720  +++ coreutils-8.13/src/pr.c     2011-09-09 10:23:14.177658905 +0200  +++ coreutils-8.15/src/pr.c     2013-01-30 13:40:37.350146206 +0100
1721  @@ -312,6 +312,32 @@  @@ -312,6 +312,32 @@
1722    
1723   #include <getopt.h>   #include <getopt.h>
# Line 1786  diff -urNp coreutils-8.13-orig/src/pr.c Line 1800  diff -urNp coreutils-8.13-orig/src/pr.c
1800                          int *number);                          int *number);
1801   static void print_files (int number_of_files, char **av);   static void print_files (int number_of_files, char **av);
1802   static void init_parameters (int number_of_files);   static void init_parameters (int number_of_files);
1803  @@ -439,7 +491,6 @@ static void store_char (char c);  @@ -438,7 +490,6 @@ static void store_char (char c);
1804   static void pad_down (int lines);   static void pad_down (int lines);
1805   static void read_rest_of_line (COLUMN *p);   static void read_rest_of_line (COLUMN *p);
1806   static void skip_read (COLUMN *p, int column_number);   static void skip_read (COLUMN *p, int column_number);
# Line 1794  diff -urNp coreutils-8.13-orig/src/pr.c Line 1808  diff -urNp coreutils-8.13-orig/src/pr.c
1808   static void cleanup (void);   static void cleanup (void);
1809   static void print_sep_string (void);   static void print_sep_string (void);
1810   static void separator_string (const char *optarg_S);   static void separator_string (const char *optarg_S);
1811  @@ -451,7 +502,7 @@ static COLUMN *column_vector;  @@ -450,7 +501,7 @@ static COLUMN *column_vector;
1812      we store the leftmost columns contiguously in buff.      we store the leftmost columns contiguously in buff.
1813      To print a line from buff, get the index of the first character      To print a line from buff, get the index of the first character
1814      from line_vector[i], and print up to line_vector[i + 1]. */      from line_vector[i], and print up to line_vector[i + 1]. */
# Line 1803  diff -urNp coreutils-8.13-orig/src/pr.c Line 1817  diff -urNp coreutils-8.13-orig/src/pr.c
1817    
1818   /* Index of the position in buff where the next character   /* Index of the position in buff where the next character
1819      will be stored. */      will be stored. */
1820  @@ -555,7 +606,7 @@ static int chars_per_column;  @@ -554,7 +605,7 @@ static int chars_per_column;
1821   static bool untabify_input = false;   static bool untabify_input = false;
1822    
1823   /* (-e) The input tab character. */   /* (-e) The input tab character. */
# Line 1812  diff -urNp coreutils-8.13-orig/src/pr.c Line 1826  diff -urNp coreutils-8.13-orig/src/pr.c
1826    
1827   /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ...   /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ...
1828      where the leftmost column is 1. */      where the leftmost column is 1. */
1829  @@ -565,7 +616,10 @@ static int chars_per_input_tab = 8;  @@ -564,7 +615,10 @@ static int chars_per_input_tab = 8;
1830   static bool tabify_output = false;   static bool tabify_output = false;
1831    
1832   /* (-i) The output tab character. */   /* (-i) The output tab character. */
# Line 1824  diff -urNp coreutils-8.13-orig/src/pr.c Line 1838  diff -urNp coreutils-8.13-orig/src/pr.c
1838    
1839   /* (-i) The width of the output tab. */   /* (-i) The width of the output tab. */
1840   static int chars_per_output_tab = 8;   static int chars_per_output_tab = 8;
1841  @@ -639,7 +693,13 @@ static int power_10;  @@ -638,7 +692,13 @@ static int power_10;
1842   static bool numbered_lines = false;   static bool numbered_lines = false;
1843    
1844   /* (-n) Character which follows each line number. */   /* (-n) Character which follows each line number. */
# Line 1839  diff -urNp coreutils-8.13-orig/src/pr.c Line 1853  diff -urNp coreutils-8.13-orig/src/pr.c
1853    
1854   /* (-n) line counting starts with 1st line of input file (not with 1st   /* (-n) line counting starts with 1st line of input file (not with 1st
1855      line of 1st page printed). */      line of 1st page printed). */
1856  @@ -692,6 +752,7 @@ static bool use_col_separator = false;  @@ -691,6 +751,7 @@ static bool use_col_separator = false;
1857      -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'. */
1858   static char *col_sep_string = (char *) "";   static char *col_sep_string = (char *) "";
1859   static int col_sep_length = 0;   static int col_sep_length = 0;
# Line 1847  diff -urNp coreutils-8.13-orig/src/pr.c Line 1861  diff -urNp coreutils-8.13-orig/src/pr.c
1861   static char *column_separator = (char *) " ";   static char *column_separator = (char *) " ";
1862   static char *line_separator = (char *) "\t";   static char *line_separator = (char *) "\t";
1863    
1864  @@ -848,6 +909,13 @@ separator_string (const char *optarg_S)  @@ -847,6 +908,13 @@ separator_string (const char *optarg_S)
1865     col_sep_length = (int) strlen (optarg_S);     col_sep_length = (int) strlen (optarg_S);
1866     col_sep_string = xmalloc (col_sep_length + 1);     col_sep_string = xmalloc (col_sep_length + 1);
1867     strcpy (col_sep_string, optarg_S);     strcpy (col_sep_string, optarg_S);
# Line 1861  diff -urNp coreutils-8.13-orig/src/pr.c Line 1875  diff -urNp coreutils-8.13-orig/src/pr.c
1875   }   }
1876    
1877   int   int
1878  @@ -872,6 +940,21 @@ main (int argc, char **argv)  @@ -871,6 +939,21 @@ main (int argc, char **argv)
1879    
1880     atexit (close_stdout);     atexit (close_stdout);
1881    
# Line 1883  diff -urNp coreutils-8.13-orig/src/pr.c Line 1897  diff -urNp coreutils-8.13-orig/src/pr.c
1897     n_files = 0;     n_files = 0;
1898     file_names = (argc > 1     file_names = (argc > 1
1899                   ? xmalloc ((argc - 1) * sizeof (char *))                   ? xmalloc ((argc - 1) * sizeof (char *))
1900  @@ -948,8 +1031,12 @@ main (int argc, char **argv)  @@ -947,8 +1030,12 @@ main (int argc, char **argv)
1901             break;             break;
1902           case 'e':           case 'e':
1903             if (optarg)             if (optarg)
# Line 1898  diff -urNp coreutils-8.13-orig/src/pr.c Line 1912  diff -urNp coreutils-8.13-orig/src/pr.c
1912             /* Could check tab width > 0. */             /* Could check tab width > 0. */
1913             untabify_input = true;             untabify_input = true;
1914             break;             break;
1915  @@ -962,8 +1049,12 @@ main (int argc, char **argv)  @@ -961,8 +1048,12 @@ main (int argc, char **argv)
1916             break;             break;
1917           case 'i':           case 'i':
1918             if (optarg)             if (optarg)
# Line 1913  diff -urNp coreutils-8.13-orig/src/pr.c Line 1927  diff -urNp coreutils-8.13-orig/src/pr.c
1927             /* Could check tab width > 0. */             /* Could check tab width > 0. */
1928             tabify_output = true;             tabify_output = true;
1929             break;             break;
1930  @@ -990,8 +1081,8 @@ main (int argc, char **argv)  @@ -989,8 +1080,8 @@ main (int argc, char **argv)
1931           case 'n':           case 'n':
1932             numbered_lines = true;             numbered_lines = true;
1933             if (optarg)             if (optarg)
# Line 1924  diff -urNp coreutils-8.13-orig/src/pr.c Line 1938  diff -urNp coreutils-8.13-orig/src/pr.c
1938             break;             break;
1939           case 'N':           case 'N':
1940             skip_count = false;             skip_count = false;
1941  @@ -1030,7 +1121,7 @@ main (int argc, char **argv)  @@ -1029,7 +1120,7 @@ main (int argc, char **argv)
1942             old_s = false;             old_s = false;
1943             /* Reset an additional input of -s, -S dominates -s */             /* Reset an additional input of -s, -S dominates -s */
1944             col_sep_string = bad_cast ("");             col_sep_string = bad_cast ("");
# Line 1933  diff -urNp coreutils-8.13-orig/src/pr.c Line 1947  diff -urNp coreutils-8.13-orig/src/pr.c
1947             use_col_separator = true;             use_col_separator = true;
1948             if (optarg)             if (optarg)
1949               separator_string (optarg);               separator_string (optarg);
1950  @@ -1187,10 +1278,45 @@ main (int argc, char **argv)  @@ -1186,10 +1277,45 @@ main (int argc, char **argv)
1951      a number. */      a number. */
1952    
1953   static void   static void
# Line 1981  diff -urNp coreutils-8.13-orig/src/pr.c Line 1995  diff -urNp coreutils-8.13-orig/src/pr.c
1995     if (*arg)     if (*arg)
1996       {       {
1997         long int tmp_long;         long int tmp_long;
1998  @@ -1249,7 +1375,7 @@ init_parameters (int number_of_files)  @@ -1211,6 +1337,11 @@ static void
1999     init_parameters (int number_of_files)
2000     {
2001       int chars_used_by_number = 0;
2002    +  int mb_len = 1;
2003    +#if HAVE_MBRTOWC
2004    +  if (MB_CUR_MAX > 1)
2005    +    mb_len = MB_LEN_MAX;
2006    +#endif
2007    
2008       lines_per_body = lines_per_page - lines_per_header - lines_per_footer;
2009       if (lines_per_body <= 0)
2010    @@ -1248,7 +1379,7 @@ init_parameters (int number_of_files)
2011             else             else
2012               col_sep_string = column_separator;               col_sep_string = column_separator;
2013    
# Line 1990  diff -urNp coreutils-8.13-orig/src/pr.c Line 2016  diff -urNp coreutils-8.13-orig/src/pr.c
2016             use_col_separator = true;             use_col_separator = true;
2017           }           }
2018         /* It's rather pointless to define a TAB separator with column         /* It's rather pointless to define a TAB separator with column
2019  @@ -1280,11 +1406,11 @@ init_parameters (int number_of_files)  @@ -1279,11 +1410,11 @@ init_parameters (int number_of_files)
2020                TAB_WIDTH (chars_per_input_tab, chars_per_number);   */                TAB_WIDTH (chars_per_input_tab, chars_per_number);   */
2021    
2022         /* Estimate chars_per_text without any margin and keep it constant. */         /* Estimate chars_per_text without any margin and keep it constant. */
# Line 2004  diff -urNp coreutils-8.13-orig/src/pr.c Line 2030  diff -urNp coreutils-8.13-orig/src/pr.c
2030    
2031         /* The number is part of the column width unless we are         /* The number is part of the column width unless we are
2032            printing files in parallel. */            printing files in parallel. */
2033  @@ -1299,7 +1425,7 @@ init_parameters (int number_of_files)  @@ -1298,7 +1429,7 @@ init_parameters (int number_of_files)
2034       }       }
2035    
2036     chars_per_column = (chars_per_line - chars_used_by_number -     chars_per_column = (chars_per_line - chars_used_by_number -
# Line 2013  diff -urNp coreutils-8.13-orig/src/pr.c Line 2039  diff -urNp coreutils-8.13-orig/src/pr.c
2039    
2040     if (chars_per_column < 1)     if (chars_per_column < 1)
2041       error (EXIT_FAILURE, 0, _("page width too narrow"));       error (EXIT_FAILURE, 0, _("page width too narrow"));
2042  @@ -1424,7 +1550,7 @@ init_funcs (void)  @@ -1315,7 +1446,7 @@ init_parameters (int number_of_files)
2043          We've to use 8 as the lower limit, if we use chars_per_default_tab = 8
2044          to expand a tab which is not an input_tab-char. */
2045       free (clump_buff);
2046    -  clump_buff = xmalloc (MAX (8, chars_per_input_tab));
2047    +  clump_buff = xmalloc (mb_len * MAX (8, chars_per_input_tab));
2048     }
2049    
2050     /* Open the necessary files,
2051    @@ -1423,7 +1554,7 @@ init_funcs (void)
2052    
2053     /* Enlarge p->start_position of first column to use the same form of     /* Enlarge p->start_position of first column to use the same form of
2054        padding_not_printed with all columns. */        padding_not_printed with all columns. */
# Line 2022  diff -urNp coreutils-8.13-orig/src/pr.c Line 2057  diff -urNp coreutils-8.13-orig/src/pr.c
2057    
2058     /* This loop takes care of all but the rightmost column. */     /* This loop takes care of all but the rightmost column. */
2059    
2060  @@ -1458,7 +1584,7 @@ init_funcs (void)  @@ -1457,7 +1588,7 @@ init_funcs (void)
2061           }           }
2062         else         else
2063           {           {
# Line 2031  diff -urNp coreutils-8.13-orig/src/pr.c Line 2066  diff -urNp coreutils-8.13-orig/src/pr.c
2066             h_next = h + chars_per_column;             h_next = h + chars_per_column;
2067           }           }
2068       }       }
2069  @@ -1749,9 +1875,9 @@ static void  @@ -1748,9 +1879,9 @@ static void
2070   align_column (COLUMN *p)   align_column (COLUMN *p)
2071   {   {
2072     padding_not_printed = p->start_position;     padding_not_printed = p->start_position;
# Line 2043  diff -urNp coreutils-8.13-orig/src/pr.c Line 2078  diff -urNp coreutils-8.13-orig/src/pr.c
2078         padding_not_printed = ANYWHERE;         padding_not_printed = ANYWHERE;
2079       }       }
2080    
2081  @@ -2022,13 +2148,13 @@ store_char (char c)  @@ -2021,13 +2152,13 @@ store_char (char c)
2082         /* May be too generous. */         /* May be too generous. */
2083         buff = X2REALLOC (buff, &buff_allocated);         buff = X2REALLOC (buff, &buff_allocated);
2084       }       }
# Line 2059  diff -urNp coreutils-8.13-orig/src/pr.c Line 2094  diff -urNp coreutils-8.13-orig/src/pr.c
2094     char *s;     char *s;
2095     int left_cut;     int left_cut;
2096    
2097  @@ -2051,22 +2177,24 @@ add_line_number (COLUMN *p)  @@ -2050,22 +2181,24 @@ add_line_number (COLUMN *p)
2098         /* Tabification is assumed for multiple columns, also for n-separators,         /* Tabification is assumed for multiple columns, also for n-separators,
2099            but `default n-separator = TAB' hasn't been given priority over            but `default n-separator = TAB' hasn't been given priority over
2100            equal column_width also specified by POSIX. */            equal column_width also specified by POSIX. */
# Line 2088  diff -urNp coreutils-8.13-orig/src/pr.c Line 2123  diff -urNp coreutils-8.13-orig/src/pr.c
2123           output_position = POS_AFTER_TAB (chars_per_output_tab,           output_position = POS_AFTER_TAB (chars_per_output_tab,
2124                             output_position);                             output_position);
2125       }       }
2126  @@ -2227,7 +2355,7 @@ print_white_space (void)  @@ -2226,7 +2359,7 @@ print_white_space (void)
2127     while (goal - h_old > 1     while (goal - h_old > 1
2128            && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal)            && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal)
2129       {       {
# Line 2097  diff -urNp coreutils-8.13-orig/src/pr.c Line 2132  diff -urNp coreutils-8.13-orig/src/pr.c
2132         h_old = h_new;         h_old = h_new;
2133       }       }
2134     while (++h_old <= goal)     while (++h_old <= goal)
2135  @@ -2247,6 +2375,7 @@ print_sep_string (void)  @@ -2246,6 +2379,7 @@ print_sep_string (void)
2136   {   {
2137     char *s;     char *s;
2138     int l = col_sep_length;     int l = col_sep_length;
# Line 2105  diff -urNp coreutils-8.13-orig/src/pr.c Line 2140  diff -urNp coreutils-8.13-orig/src/pr.c
2140    
2141     s = col_sep_string;     s = col_sep_string;
2142    
2143  @@ -2260,6 +2389,7 @@ print_sep_string (void)  @@ -2259,6 +2393,7 @@ print_sep_string (void)
2144       {       {
2145         for (; separators_not_printed > 0; --separators_not_printed)         for (; separators_not_printed > 0; --separators_not_printed)
2146           {           {
# Line 2113  diff -urNp coreutils-8.13-orig/src/pr.c Line 2148  diff -urNp coreutils-8.13-orig/src/pr.c
2148             while (l-- > 0)             while (l-- > 0)
2149               {               {
2150                 /* 3 types of sep_strings: spaces only, spaces and chars,                 /* 3 types of sep_strings: spaces only, spaces and chars,
2151  @@ -2273,12 +2403,15 @@ print_sep_string (void)  @@ -2272,12 +2407,15 @@ print_sep_string (void)
2152                   }                   }
2153                 else                 else
2154                   {                   {
# Line 2130  diff -urNp coreutils-8.13-orig/src/pr.c Line 2165  diff -urNp coreutils-8.13-orig/src/pr.c
2165             /* sep_string ends with some spaces */             /* sep_string ends with some spaces */
2166             if (spaces_not_printed > 0)             if (spaces_not_printed > 0)
2167               print_white_space ();               print_white_space ();
2168  @@ -2306,7 +2439,7 @@ print_clump (COLUMN *p, int n, char *clu  @@ -2305,7 +2443,7 @@ print_clump (COLUMN *p, int n, char *clu
2169      required number of tabs and spaces. */      required number of tabs and spaces. */
2170    
2171   static void   static void
# Line 2139  diff -urNp coreutils-8.13-orig/src/pr.c Line 2174  diff -urNp coreutils-8.13-orig/src/pr.c
2174   {   {
2175     if (tabify_output)     if (tabify_output)
2176       {       {
2177  @@ -2330,6 +2463,74 @@ print_char (char c)  @@ -2329,6 +2467,74 @@ print_char (char c)
2178     putchar (c);     putchar (c);
2179   }   }
2180    
# Line 2214  diff -urNp coreutils-8.13-orig/src/pr.c Line 2249  diff -urNp coreutils-8.13-orig/src/pr.c
2249   /* Skip to page PAGE before printing.   /* Skip to page PAGE before printing.
2250      PAGE may be larger than total number of pages. */      PAGE may be larger than total number of pages. */
2251    
2252  @@ -2509,9 +2710,9 @@ read_line (COLUMN *p)  @@ -2508,9 +2714,9 @@ read_line (COLUMN *p)
2253             align_empty_cols = false;             align_empty_cols = false;
2254           }           }
2255    
# Line 2226  diff -urNp coreutils-8.13-orig/src/pr.c Line 2261  diff -urNp coreutils-8.13-orig/src/pr.c
2261             padding_not_printed = ANYWHERE;             padding_not_printed = ANYWHERE;
2262           }           }
2263    
2264  @@ -2612,9 +2813,9 @@ print_stored (COLUMN *p)  @@ -2611,9 +2817,9 @@ print_stored (COLUMN *p)
2265           }           }
2266       }       }
2267    
# Line 2238  diff -urNp coreutils-8.13-orig/src/pr.c Line 2273  diff -urNp coreutils-8.13-orig/src/pr.c
2273         padding_not_printed = ANYWHERE;         padding_not_printed = ANYWHERE;
2274       }       }
2275    
2276  @@ -2627,8 +2828,8 @@ print_stored (COLUMN *p)  @@ -2626,8 +2832,8 @@ print_stored (COLUMN *p)
2277     if (spaces_not_printed == 0)     if (spaces_not_printed == 0)
2278       {       {
2279         output_position = p->start_position + end_vector[line];         output_position = p->start_position + end_vector[line];
# Line 2249  diff -urNp coreutils-8.13-orig/src/pr.c Line 2284  diff -urNp coreutils-8.13-orig/src/pr.c
2284       }       }
2285    
2286     return true;     return true;
2287  @@ -2647,7 +2848,7 @@ print_stored (COLUMN *p)  @@ -2646,7 +2852,7 @@ print_stored (COLUMN *p)
2288      number of characters is 1.) */      number of characters is 1.) */
2289    
2290   static int   static int
# Line 2258  diff -urNp coreutils-8.13-orig/src/pr.c Line 2293  diff -urNp coreutils-8.13-orig/src/pr.c
2293   {   {
2294     unsigned char uc = c;     unsigned char uc = c;
2295     char *s = clump_buff;     char *s = clump_buff;
2296  @@ -2657,10 +2858,10 @@ char_to_clump (char c)  @@ -2656,10 +2862,10 @@ char_to_clump (char c)
2297     int chars;     int chars;
2298     int chars_per_c = 8;     int chars_per_c = 8;
2299    
# Line 2271  diff -urNp coreutils-8.13-orig/src/pr.c Line 2306  diff -urNp coreutils-8.13-orig/src/pr.c
2306       {       {
2307         width = TAB_WIDTH (chars_per_c, input_position);         width = TAB_WIDTH (chars_per_c, input_position);
2308    
2309  @@ -2741,6 +2942,155 @@ char_to_clump (char c)  @@ -2740,6 +2946,154 @@ char_to_clump (char c)
2310     return chars;     return chars;
2311   }   }
2312    
# Line 2279  diff -urNp coreutils-8.13-orig/src/pr.c Line 2314  diff -urNp coreutils-8.13-orig/src/pr.c
2314  +static int  +static int
2315  +char_to_clump_multi (char c)  +char_to_clump_multi (char c)
2316  +{  +{
 +  unsigned char uc = c;  
2317  +  static size_t mbc_pos = 0;  +  static size_t mbc_pos = 0;
2318  +  static char mbc[MB_LEN_MAX] = {'\0'};  +  static char mbc[MB_LEN_MAX] = {'\0'};
2319  +  static mbstate_t state = {'\0'};  +  static mbstate_t state = {'\0'};
# Line 2317  diff -urNp coreutils-8.13-orig/src/pr.c Line 2351  diff -urNp coreutils-8.13-orig/src/pr.c
2351  +              width = +4;  +              width = +4;
2352  +              chars = +4;  +              chars = +4;
2353  +              *s++ = '\\';  +              *s++ = '\\';
2354  +              sprintf (esc_buff, "%03o", mbc[0]);  +              sprintf (esc_buff, "%03o", (unsigned char) mbc[0]);
2355  +              for (i = 0; i <= 2; ++i)  +              for (i = 0; i <= 2; ++i)
2356  +                *s++ = (int) esc_buff[i];  +                *s++ = (int) esc_buff[i];
2357  +            }  +            }
# Line 2366  diff -urNp coreutils-8.13-orig/src/pr.c Line 2400  diff -urNp coreutils-8.13-orig/src/pr.c
2400  +                      width += 4;  +                      width += 4;
2401  +                      chars += 4;  +                      chars += 4;
2402  +                      *s++ = '\\';  +                      *s++ = '\\';
2403  +                      sprintf (esc_buff, "%03o", uc);  +                      sprintf (esc_buff, "%03o", (unsigned char) mbc[i]);
2404  +                      for (j = 0; j <= 2; ++j)  +                      for (j = 0; j <= 2; ++j)
2405  +                        *s++ = (int) esc_buff[j];  +                        *s++ = (int) esc_buff[j];
2406  +                    }  +                    }
# Line 2387  diff -urNp coreutils-8.13-orig/src/pr.c Line 2421  diff -urNp coreutils-8.13-orig/src/pr.c
2421  +                          width += 4;  +                          width += 4;
2422  +                          chars += 4;  +                          chars += 4;
2423  +                          *s++ = '\\';  +                          *s++ = '\\';
2424  +                          sprintf (esc_buff, "%03o", uc);  +                          sprintf (esc_buff, "%03o", (unsigned char) mbc[i]);
2425  +                          for (j = 0; j <= 2; ++j)  +                          for (j = 0; j <= 2; ++j)
2426  +                            *s++ = (int) esc_buff[j];  +                            *s++ = (int) esc_buff[j];
2427  +                        }  +                        }
# Line 2427  diff -urNp coreutils-8.13-orig/src/pr.c Line 2461  diff -urNp coreutils-8.13-orig/src/pr.c
2461   /* We've just printed some files and need to clean up things before   /* We've just printed some files and need to clean up things before
2462      looking for more options and printing the next batch of files.      looking for more options and printing the next batch of files.
2463    
2464  diff -urNp coreutils-8.13-orig/src/sort.c coreutils-8.13/src/sort.c  diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
2465  --- coreutils-8.13-orig/src/sort.c      2011-07-29 10:12:25.000000000 +0200  --- coreutils-8.15-orig/src/sort.c      2013-01-30 13:39:59.892046631 +0100
2466  +++ coreutils-8.13/src/sort.c   2011-09-09 10:23:14.183686800 +0200  +++ coreutils-8.15/src/sort.c   2013-01-30 15:56:48.675032507 +0100
2467  @@ -22,11 +22,20 @@  @@ -22,11 +22,20 @@
2468    
2469   #include <config.h>   #include <config.h>
# Line 2487  diff -urNp coreutils-8.13-orig/src/sort. Line 2521  diff -urNp coreutils-8.13-orig/src/sort.
2521   /* The kind of blanks for '-b' to skip in various options. */   /* The kind of blanks for '-b' to skip in various options. */
2522   enum blanktype { bl_start, bl_end, bl_both };   enum blanktype { bl_start, bl_end, bl_both };
2523    
2524  @@ -343,13 +374,11 @@ static bool reverse;  @@ -346,13 +377,11 @@ static bool reverse;
2525      they were read if all keys compare equal.  */      they were read if all keys compare equal.  */
2526   static bool stable;   static bool stable;
2527    
# Line 2504  diff -urNp coreutils-8.13-orig/src/sort. Line 2538  diff -urNp coreutils-8.13-orig/src/sort.
2538    
2539   /* Flag to remove consecutive duplicate lines from the output.   /* Flag to remove consecutive duplicate lines from the output.
2540      Only the last of a sequence of equal lines will be output. */      Only the last of a sequence of equal lines will be output. */
2541  @@ -783,6 +812,46 @@ reap_all (void)  @@ -786,6 +815,46 @@ reap_all (void)
2542       reap (-1);       reap (-1);
2543   }   }
2544    
# Line 2551  diff -urNp coreutils-8.13-orig/src/sort. Line 2585  diff -urNp coreutils-8.13-orig/src/sort.
2585   /* Clean up any remaining temporary files.  */   /* Clean up any remaining temporary files.  */
2586    
2587   static void   static void
2588  @@ -1215,7 +1284,7 @@ zaptemp (char const *name)  @@ -1218,7 +1287,7 @@ zaptemp (char const *name)
2589     free (node);     free (node);
2590   }   }
2591    
# Line 2560  diff -urNp coreutils-8.13-orig/src/sort. Line 2594  diff -urNp coreutils-8.13-orig/src/sort.
2594    
2595   static int   static int
2596   struct_month_cmp (void const *m1, void const *m2)   struct_month_cmp (void const *m1, void const *m2)
2597  @@ -1230,7 +1299,7 @@ struct_month_cmp (void const *m1, void c  @@ -1233,7 +1302,7 @@ struct_month_cmp (void const *m1, void c
2598   /* Initialize the character class tables. */   /* Initialize the character class tables. */
2599    
2600   static void   static void
# Line 2569  diff -urNp coreutils-8.13-orig/src/sort. Line 2603  diff -urNp coreutils-8.13-orig/src/sort.
2603   {   {
2604     size_t i;     size_t i;
2605    
2606  @@ -1242,7 +1311,7 @@ inittables (void)  @@ -1245,7 +1314,7 @@ inittables (void)
2607         fold_toupper[i] = toupper (i);         fold_toupper[i] = toupper (i);
2608       }       }
2609    
# Line 2578  diff -urNp coreutils-8.13-orig/src/sort. Line 2612  diff -urNp coreutils-8.13-orig/src/sort.
2612     /* If we're not in the "C" locale, read different names for months.  */     /* If we're not in the "C" locale, read different names for months.  */
2613     if (hard_LC_TIME)     if (hard_LC_TIME)
2614       {       {
2615  @@ -1324,6 +1393,84 @@ specify_nmerge (int oi, char c, char con  @@ -1327,6 +1396,84 @@ specify_nmerge (int oi, char c, char con
2616       xstrtol_fatal (e, oi, c, long_options, s);       xstrtol_fatal (e, oi, c, long_options, s);
2617   }   }
2618    
# Line 2663  diff -urNp coreutils-8.13-orig/src/sort. Line 2697  diff -urNp coreutils-8.13-orig/src/sort.
2697   /* Specify the amount of main memory to use when sorting.  */   /* Specify the amount of main memory to use when sorting.  */
2698   static void   static void
2699   specify_sort_size (int oi, char c, char const *s)   specify_sort_size (int oi, char c, char const *s)
2700  @@ -1552,7 +1699,7 @@ buffer_linelim (struct buffer const *buf  @@ -1555,7 +1702,7 @@ buffer_linelim (struct buffer const *buf
2701      by KEY in LINE. */      by KEY in LINE. */
2702    
2703   static char *   static char *
# Line 2672  diff -urNp coreutils-8.13-orig/src/sort. Line 2706  diff -urNp coreutils-8.13-orig/src/sort.
2706   {   {
2707     char *ptr = line->text, *lim = ptr + line->length - 1;     char *ptr = line->text, *lim = ptr + line->length - 1;
2708     size_t sword = key->sword;     size_t sword = key->sword;
2709  @@ -1561,10 +1708,10 @@ begfield (struct line const *line, struc  @@ -1564,10 +1711,10 @@ begfield (struct line const *line, struc
2710     /* The leading field separator itself is included in a field when -t     /* The leading field separator itself is included in a field when -t
2711        is absent.  */        is absent.  */
2712    
# Line 2685  diff -urNp coreutils-8.13-orig/src/sort. Line 2719  diff -urNp coreutils-8.13-orig/src/sort.
2719             ++ptr;             ++ptr;
2720           if (ptr < lim)           if (ptr < lim)
2721             ++ptr;             ++ptr;
2722  @@ -1590,11 +1737,70 @@ begfield (struct line const *line, struc  @@ -1593,11 +1740,70 @@ begfield (struct line const *line, struc
2723     return ptr;     return ptr;
2724   }   }
2725    
# Line 2757  diff -urNp coreutils-8.13-orig/src/sort. Line 2791  diff -urNp coreutils-8.13-orig/src/sort.
2791   {   {
2792     char *ptr = line->text, *lim = ptr + line->length - 1;     char *ptr = line->text, *lim = ptr + line->length - 1;
2793     size_t eword = key->eword, echar = key->echar;     size_t eword = key->eword, echar = key->echar;
2794  @@ -1609,10 +1815,10 @@ limfield (struct line const *line, struc  @@ -1612,10 +1818,10 @@ limfield (struct line const *line, struc
2795        `beginning' is the first character following the delimiting TAB.        `beginning' is the first character following the delimiting TAB.
2796        Otherwise, leave PTR pointing at the first `blank' character after        Otherwise, leave PTR pointing at the first `blank' character after
2797        the preceding field.  */        the preceding field.  */
# Line 2770  diff -urNp coreutils-8.13-orig/src/sort. Line 2804  diff -urNp coreutils-8.13-orig/src/sort.
2804             ++ptr;             ++ptr;
2805           if (ptr < lim && (eword || echar))           if (ptr < lim && (eword || echar))
2806             ++ptr;             ++ptr;
2807  @@ -1658,10 +1864,10 @@ limfield (struct line const *line, struc  @@ -1661,10 +1867,10 @@ limfield (struct line const *line, struc
2808        */        */
2809    
2810     /* Make LIM point to the end of (one byte past) the current field.  */     /* Make LIM point to the end of (one byte past) the current field.  */
# Line 2783  diff -urNp coreutils-8.13-orig/src/sort. Line 2817  diff -urNp coreutils-8.13-orig/src/sort.
2817         if (newlim)         if (newlim)
2818           lim = newlim;           lim = newlim;
2819       }       }
2820  @@ -1692,6 +1898,130 @@ limfield (struct line const *line, struc  @@ -1695,6 +1901,130 @@ limfield (struct line const *line, struc
2821     return ptr;     return ptr;
2822   }   }
2823    
# Line 2914  diff -urNp coreutils-8.13-orig/src/sort. Line 2948  diff -urNp coreutils-8.13-orig/src/sort.
2948   /* Fill BUF reading from FP, moving buf->left bytes from the end   /* Fill BUF reading from FP, moving buf->left bytes from the end
2949      of buf->buf to the beginning first.  If EOF is reached and the      of buf->buf to the beginning first.  If EOF is reached and the
2950      file wasn't terminated by a newline, supply one.  Set up BUF's line      file wasn't terminated by a newline, supply one.  Set up BUF's line
2951  @@ -1778,8 +2108,22 @@ fillbuf (struct buffer *buf, FILE *fp, c  @@ -1781,8 +2111,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
2952                     else                     else
2953                       {                       {
2954                         if (key->skipsblanks)                         if (key->skipsblanks)
# Line 2939  diff -urNp coreutils-8.13-orig/src/sort. Line 2973  diff -urNp coreutils-8.13-orig/src/sort.
2973                         line->keybeg = line_start;                         line->keybeg = line_start;
2974                       }                       }
2975                   }                   }
2976  @@ -1900,7 +2244,7 @@ human_numcompare (char const *a, char co  @@ -1903,7 +2247,7 @@ human_numcompare (char const *a, char co
2977      hideously fast. */      hideously fast. */
2978    
2979   static int   static int
# Line 2948  diff -urNp coreutils-8.13-orig/src/sort. Line 2982  diff -urNp coreutils-8.13-orig/src/sort.
2982   {   {
2983     while (blanks[to_uchar (*a)])     while (blanks[to_uchar (*a)])
2984       a++;       a++;
2985  @@ -1910,6 +2254,25 @@ numcompare (char const *a, char const *b  @@ -1913,6 +2257,25 @@ numcompare (char const *a, char const *b
2986     return strnumcmp (a, b, decimal_point, thousands_sep);     return strnumcmp (a, b, decimal_point, thousands_sep);
2987   }   }
2988    
# Line 2974  diff -urNp coreutils-8.13-orig/src/sort. Line 3008  diff -urNp coreutils-8.13-orig/src/sort.
3008   /* Work around a problem whereby the long double value returned by glibc's   /* Work around a problem whereby the long double value returned by glibc's
3009      strtold ("NaN", ...) contains uninitialized bits: clear all bytes of      strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
3010      A and B before calling strtold.  FIXME: remove this function once      A and B before calling strtold.  FIXME: remove this function once
3011  @@ -1942,7 +2305,7 @@ general_numcompare (char const *sa, char  @@ -1963,7 +2326,7 @@ general_numcompare (char const *sa, char
3012      Return 0 if the name in S is not recognized.  */      Return 0 if the name in S is not recognized.  */
3013    
3014   static int   static int
# Line 2983  diff -urNp coreutils-8.13-orig/src/sort. Line 3017  diff -urNp coreutils-8.13-orig/src/sort.
3017   {   {
3018     size_t lo = 0;     size_t lo = 0;
3019     size_t hi = MONTHS_PER_YEAR;     size_t hi = MONTHS_PER_YEAR;
3020  @@ -2217,15 +2580,14 @@ debug_key (struct line const *line, stru  @@ -2238,15 +2601,14 @@ debug_key (struct line const *line, stru
3021             char saved = *lim;             char saved = *lim;
3022             *lim = '\0';             *lim = '\0';
3023    
# Line 3001  diff -urNp coreutils-8.13-orig/src/sort. Line 3035  diff -urNp coreutils-8.13-orig/src/sort.
3035             else if (key->general_numeric)             else if (key->general_numeric)
3036               ignore_value (strtold (beg, &tighter_lim));               ignore_value (strtold (beg, &tighter_lim));
3037             else if (key->numeric || key->human_numeric)             else if (key->numeric || key->human_numeric)
3038  @@ -2369,7 +2731,7 @@ key_warnings (struct keyfield const *gke  @@ -2390,7 +2752,7 @@ key_warnings (struct keyfield const *gke
3039         bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key)         bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key)
3040                                    && !(key->schar || key->echar);                                    && !(key->schar || key->echar);
3041         bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y  */         bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y  */
# Line 3010  diff -urNp coreutils-8.13-orig/src/sort. Line 3044  diff -urNp coreutils-8.13-orig/src/sort.
3044             && ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))             && ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
3045                 || (!key->skipsblanks && key->schar)                 || (!key->skipsblanks && key->schar)
3046                 || (!key->skipeblanks && key->echar)))                 || (!key->skipeblanks && key->echar)))
3047  @@ -2427,11 +2789,83 @@ key_warnings (struct keyfield const *gke  @@ -2448,11 +2810,87 @@ key_warnings (struct keyfield const *gke
3048       error (0, 0, _("option `-r' only applies to last-resort comparison"));       error (0, 0, _("option `-r' only applies to last-resort comparison"));
3049   }   }
3050    
# Line 3037  diff -urNp coreutils-8.13-orig/src/sort. Line 3071  diff -urNp coreutils-8.13-orig/src/sort.
3071  +  if (len == 0)  +  if (len == 0)
3072  +    return 0;  +    return 0;
3073  +  +
3074  +  month = (char *) alloca (len + 1);  +  month = (char *) xmalloc (len + 1);
3075  +  +
3076  +  tmp = (char *) alloca (len + 1);  +  tmp = (char *) xmalloc (len + 1);
3077  +  memcpy (tmp, s, len);  +  memcpy (tmp, s, len);
3078  +  tmp[len] = '\0';  +  tmp[len] = '\0';
3079  +  pp = (const char **)&tmp;  +  pp = (const char **)&tmp;
3080  +  month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t));  +  month_wcs = (wchar_t *) xmalloc ((len + 1) * sizeof (wchar_t));
3081  +  memset (&state, '\0', sizeof(mbstate_t));  +  memset (&state, '\0', sizeof(mbstate_t));
3082  +  +
3083  +  wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);  +  wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);
# Line 3076  diff -urNp coreutils-8.13-orig/src/sort. Line 3110  diff -urNp coreutils-8.13-orig/src/sort.
3110  +    }  +    }
3111  +  while (hi - lo > 1);  +  while (hi - lo > 1);
3112  +  +
 +  if (ea)  
 +     *ea = (char *) month;  
 +  
3113  +  result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name))  +  result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name))
3114  +      ? monthtab[lo].val : 0);  +      ? monthtab[lo].val : 0);
3115  +  +
3116    +  if (ea && result)
3117    +     *ea = s + strlen (monthtab[lo].name);
3118    +
3119    +  free (month);
3120    +  free (tmp);
3121    +  free (month_wcs);
3122    +
3123  +  return result;  +  return result;
3124  +}  +}
3125  +#endif  +#endif
# Line 3095  diff -urNp coreutils-8.13-orig/src/sort. Line 3133  diff -urNp coreutils-8.13-orig/src/sort.
3133   {   {
3134     struct keyfield *key = keylist;     struct keyfield *key = keylist;
3135    
3136  @@ -2516,7 +2950,7 @@ keycompare (struct line const *a, struct  @@ -2537,7 +2975,7 @@ keycompare (struct line const *a, struct
3137             else if (key->human_numeric)             else if (key->human_numeric)
3138               diff = human_numcompare (ta, tb);               diff = human_numcompare (ta, tb);
3139             else if (key->month)             else if (key->month)
# Line 3104  diff -urNp coreutils-8.13-orig/src/sort. Line 3142  diff -urNp coreutils-8.13-orig/src/sort.
3142             else if (key->random)             else if (key->random)
3143               diff = compare_random (ta, tlena, tb, tlenb);               diff = compare_random (ta, tlena, tb, tlenb);
3144             else if (key->version)             else if (key->version)
3145  @@ -2632,6 +3066,180 @@ keycompare (struct line const *a, struct  @@ -2653,6 +3091,181 @@ keycompare (struct line const *a, struct
3146     return key->reverse ? -diff : diff;     return key->reverse ? -diff : diff;
3147   }   }
3148    
# Line 3160  diff -urNp coreutils-8.13-orig/src/sort. Line 3198  diff -urNp coreutils-8.13-orig/src/sort.
3198  +        {  +        {
3199  +          if (ignore || translate)  +          if (ignore || translate)
3200  +            {  +            {
3201  +              char *copy_a = (char *) alloca (lena + 1 + lenb + 1);  +              char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1);
3202  +              char *copy_b = copy_a + lena + 1;  +              char *copy_b = copy_a + lena + 1;
3203  +              size_t new_len_a, new_len_b;  +              size_t new_len_a, new_len_b;
3204  +              size_t i, j;  +              size_t i, j;
# Line 3236  diff -urNp coreutils-8.13-orig/src/sort. Line 3274  diff -urNp coreutils-8.13-orig/src/sort.
3274  +              IGNORE_CHARS (new_len_b, lenb, textb, copy_b,  +              IGNORE_CHARS (new_len_b, lenb, textb, copy_b,
3275  +                            wc_b, mblength_b, state_b);  +                            wc_b, mblength_b, state_b);
3276  +              diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b);  +              diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b);
3277    +              free(copy_a);
3278  +            }  +            }
3279  +          else if (lena == 0)  +          else if (lena == 0)
3280  +            diff = - NONZERO (lenb);  +            diff = - NONZERO (lenb);
# Line 3285  diff -urNp coreutils-8.13-orig/src/sort. Line 3324  diff -urNp coreutils-8.13-orig/src/sort.
3324   /* Compare two lines A and B, returning negative, zero, or positive   /* Compare two lines A and B, returning negative, zero, or positive
3325      depending on whether A compares less than, equal to, or greater than B. */      depending on whether A compares less than, equal to, or greater than B. */
3326    
3327  @@ -4095,7 +4702,7 @@ main (int argc, char **argv)  @@ -4113,7 +4726,7 @@ main (int argc, char **argv)
3328     initialize_exit_failure (SORT_FAILURE);     initialize_exit_failure (SORT_FAILURE);
3329    
3330     hard_LC_COLLATE = hard_locale (LC_COLLATE);     hard_LC_COLLATE = hard_locale (LC_COLLATE);
# Line 3294  diff -urNp coreutils-8.13-orig/src/sort. Line 3333  diff -urNp coreutils-8.13-orig/src/sort.
3333     hard_LC_TIME = hard_locale (LC_TIME);     hard_LC_TIME = hard_locale (LC_TIME);
3334   #endif   #endif
3335    
3336  @@ -4116,6 +4723,29 @@ main (int argc, char **argv)  @@ -4134,6 +4747,29 @@ main (int argc, char **argv)
3337         thousands_sep = -1;         thousands_sep = -1;
3338     }     }
3339    
# Line 3324  diff -urNp coreutils-8.13-orig/src/sort. Line 3363  diff -urNp coreutils-8.13-orig/src/sort.
3363     have_read_stdin = false;     have_read_stdin = false;
3364     inittables ();     inittables ();
3365    
3366  @@ -4386,13 +5016,34 @@ main (int argc, char **argv)  @@ -4404,13 +5040,34 @@ main (int argc, char **argv)
3367    
3368           case 't':           case 't':
3369             {             {
# Line 3363  diff -urNp coreutils-8.13-orig/src/sort. Line 3402  diff -urNp coreutils-8.13-orig/src/sort.
3402                   else                   else
3403                     {                     {
3404                       /* Provoke with `sort -txx'.  Complain about                       /* Provoke with `sort -txx'.  Complain about
3405  @@ -4403,9 +5054,12 @@ main (int argc, char **argv)  @@ -4421,9 +5078,12 @@ main (int argc, char **argv)
3406                              quote (optarg));                              quote (optarg));
3407                     }                     }
3408                 }                 }
# Line 3378  diff -urNp coreutils-8.13-orig/src/sort. Line 3417  diff -urNp coreutils-8.13-orig/src/sort.
3417             }             }
3418             break;             break;
3419    
3420  diff -urNp coreutils-8.13-orig/src/unexpand.c coreutils-8.13/src/unexpand.c  diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c
3421  --- coreutils-8.13-orig/src/unexpand.c  2011-07-28 12:38:27.000000000 +0200  --- coreutils-8.15-orig/src/unexpand.c  2012-01-01 10:04:06.000000000 +0100
3422  +++ coreutils-8.13/src/unexpand.c       2011-09-09 10:23:14.185647633 +0200  +++ coreutils-8.15/src/unexpand.c       2013-01-30 13:40:37.358398268 +0100
3423  @@ -39,12 +39,29 @@  @@ -39,12 +39,29 @@
3424   #include <stdio.h>   #include <stdio.h>
3425   #include <getopt.h>   #include <getopt.h>
# Line 3634  diff -urNp coreutils-8.13-orig/src/unexp Line 3673  diff -urNp coreutils-8.13-orig/src/unexp
3673    
3674     if (have_read_stdin && fclose (stdin) != 0)     if (have_read_stdin && fclose (stdin) != 0)
3675       error (EXIT_FAILURE, errno, "-");       error (EXIT_FAILURE, errno, "-");
3676  diff -urNp coreutils-8.13-orig/src/uniq.c coreutils-8.13/src/uniq.c  diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
3677  --- coreutils-8.13-orig/src/uniq.c      2011-07-28 12:38:27.000000000 +0200  --- coreutils-8.15-orig/src/uniq.c      2012-01-01 10:04:06.000000000 +0100
3678  +++ coreutils-8.13/src/uniq.c   2011-09-09 10:24:19.631560964 +0200  +++ coreutils-8.15/src/uniq.c   2013-01-30 15:54:04.584020982 +0100
3679  @@ -21,6 +21,16 @@  @@ -21,6 +21,16 @@
3680   #include <getopt.h>   #include <getopt.h>
3681   #include <sys/types.h>   #include <sys/types.h>
# Line 3788  diff -urNp coreutils-8.13-orig/src/uniq. Line 3827  diff -urNp coreutils-8.13-orig/src/uniq.
3827     if (check_chars < oldlen)     if (check_chars < oldlen)
3828       oldlen = check_chars;       oldlen = check_chars;
3829     if (check_chars < newlen)     if (check_chars < newlen)
3830  @@ -242,14 +347,92 @@ different (char *old, char *new, size_t  @@ -242,14 +347,100 @@ different (char *old, char *new, size_t
3831    
3832     if (ignore_case)     if (ignore_case)
3833       {       {
# Line 3796  diff -urNp coreutils-8.13-orig/src/uniq. Line 3835  diff -urNp coreutils-8.13-orig/src/uniq.
3835  -      return oldlen != newlen || memcasecmp (old, new, oldlen);  -      return oldlen != newlen || memcasecmp (old, new, oldlen);
3836  +      size_t i;  +      size_t i;
3837  +  +
3838  +      copy_old = alloca (oldlen + 1);  +      copy_old = xmalloc (oldlen + 1);
3839  +      copy_new = alloca (oldlen + 1);  +      copy_new = xmalloc (oldlen + 1);
3840  +  +
3841  +      for (i = 0; i < oldlen; i++)  +      for (i = 0; i < oldlen; i++)
3842  +        {  +        {
3843  +          copy_old[i] = toupper (old[i]);  +          copy_old[i] = toupper (old[i]);
3844  +          copy_new[i] = toupper (new[i]);  +          copy_new[i] = toupper (new[i]);
3845  +        }  +        }
3846    +      bool rc = xmemcoll (copy_old, oldlen, copy_new, newlen);
3847    +      free (copy_old);
3848    +      free (copy_new);
3849    +      return rc;
3850       }       }
3851  -  else if (hard_LC_COLLATE)  -  else if (hard_LC_COLLATE)
3852  -    return xmemcoll (old, oldlen, new, newlen) != 0;  -    return xmemcoll (old, oldlen, new, newlen) != 0;
# Line 3839  diff -urNp coreutils-8.13-orig/src/uniq. Line 3882  diff -urNp coreutils-8.13-orig/src/uniq.
3882  +  +
3883  +  for (i = 0; i < 2; i++)  +  for (i = 0; i < 2; i++)
3884  +    {  +    {
3885  +      copy[i] = alloca (len[i] + 1);  +      copy[i] = xmalloc (len[i] + 1);
3886  +  +
3887  +      for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)  +      for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
3888  +        {  +        {
# Line 3880  diff -urNp coreutils-8.13-orig/src/uniq. Line 3923  diff -urNp coreutils-8.13-orig/src/uniq.
3923  +      len[i] = j;  +      len[i] = j;
3924  +    }  +    }
3925  +  +
3926  +  return xmemcoll (copy[0], len[0], copy[1], len[1]);  +  int rc = xmemcoll (copy[0], len[0], copy[1], len[1]);
3927    +  free (copy[0]);
3928    +  free (copy[1]);
3929    +  return rc;
3930    +
3931   }   }
3932  +#endif  +#endif
3933    
3934   /* Output the line in linebuffer LINE to standard output   /* Output the line in linebuffer LINE to standard output
3935      provided that the switches say it should be output.      provided that the switches say it should be output.
3936  @@ -305,15 +488,43 @@ check_file (const char *infile, const ch  @@ -305,15 +496,43 @@ check_file (const char *infile, const ch
3937       {       {
3938         char *prevfield IF_LINT ( = NULL);         char *prevfield IF_LINT ( = NULL);
3939         size_t prevlen IF_LINT ( = 0);         size_t prevlen IF_LINT ( = 0);
# Line 3930  diff -urNp coreutils-8.13-orig/src/uniq. Line 3977  diff -urNp coreutils-8.13-orig/src/uniq.
3977             if (prevline->length == 0             if (prevline->length == 0
3978                 || different (thisfield, prevfield, thislen, prevlen))                 || different (thisfield, prevfield, thislen, prevlen))
3979               {               {
3980  @@ -332,17 +543,26 @@ check_file (const char *infile, const ch  @@ -332,17 +551,26 @@ check_file (const char *infile, const ch
3981         size_t prevlen;         size_t prevlen;
3982         uintmax_t match_count = 0;         uintmax_t match_count = 0;
3983         bool first_delimiter = true;         bool first_delimiter = true;
# Line 3957  diff -urNp coreutils-8.13-orig/src/uniq. Line 4004  diff -urNp coreutils-8.13-orig/src/uniq.
4004             if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)             if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
4005               {               {
4006                 if (ferror (stdin))                 if (ferror (stdin))
4007  @@ -351,6 +571,14 @@ check_file (const char *infile, const ch  @@ -351,6 +579,14 @@ check_file (const char *infile, const ch
4008               }               }
4009             thisfield = find_field (thisline);             thisfield = find_field (thisline);
4010             thislen = thisline->length - 1 - (thisfield - thisline->buffer);             thislen = thisline->length - 1 - (thisfield - thisline->buffer);
# Line 3972  diff -urNp coreutils-8.13-orig/src/uniq. Line 4019  diff -urNp coreutils-8.13-orig/src/uniq.
4019             match = !different (thisfield, prevfield, thislen, prevlen);             match = !different (thisfield, prevfield, thislen, prevlen);
4020             match_count += match;             match_count += match;
4021    
4022  @@ -383,6 +611,9 @@ check_file (const char *infile, const ch  @@ -383,6 +619,9 @@ check_file (const char *infile, const ch
4023                 SWAP_LINES (prevline, thisline);                 SWAP_LINES (prevline, thisline);
4024                 prevfield = thisfield;                 prevfield = thisfield;
4025                 prevlen = thislen;                 prevlen = thislen;
# Line 3982  diff -urNp coreutils-8.13-orig/src/uniq. Line 4029  diff -urNp coreutils-8.13-orig/src/uniq.
4029                 if (!match)                 if (!match)
4030                   match_count = 0;                   match_count = 0;
4031               }               }
4032  @@ -428,6 +659,19 @@ main (int argc, char **argv)  @@ -428,6 +667,19 @@ main (int argc, char **argv)
4033    
4034     atexit (close_stdout);     atexit (close_stdout);
4035    
# Line 4002  diff -urNp coreutils-8.13-orig/src/uniq. Line 4049  diff -urNp coreutils-8.13-orig/src/uniq.
4049     skip_chars = 0;     skip_chars = 0;
4050     skip_fields = 0;     skip_fields = 0;
4051     check_chars = SIZE_MAX;     check_chars = SIZE_MAX;
4052  diff -urNp coreutils-8.13-orig/tests/Makefile.am coreutils-8.13/tests/Makefile.am  diff -urNp coreutils-8.15-orig/tests/Makefile.am coreutils-8.15/tests/Makefile.am
4053  --- coreutils-8.13-orig/tests/Makefile.am       2011-09-09 10:22:43.352561668 +0200  --- coreutils-8.15-orig/tests/Makefile.am       2013-01-30 13:39:59.940175847 +0100
4054  +++ coreutils-8.13/tests/Makefile.am    2011-09-09 10:23:14.189688942 +0200  +++ coreutils-8.15/tests/Makefile.am    2013-01-30 13:40:37.361294753 +0100
4055  @@ -238,6 +238,7 @@ TESTS =                                             \  @@ -240,6 +240,7 @@ TESTS =                                             \
4056     misc/sort-debug-keys                         \     misc/sort-debug-keys                         \
4057     misc/sort-debug-warn                         \     misc/sort-debug-warn                         \
4058     misc/sort-files0-from                                \     misc/sort-files0-from                                \
# Line 4013  diff -urNp coreutils-8.13-orig/tests/Mak Line 4060  diff -urNp coreutils-8.13-orig/tests/Mak
4060     misc/sort-float                              \     misc/sort-float                              \
4061     misc/sort-merge                              \     misc/sort-merge                              \
4062     misc/sort-merge-fdlimit                      \     misc/sort-merge-fdlimit                      \
4063  @@ -518,6 +519,10 @@ TESTS =                                            \  @@ -529,6 +530,10 @@ TESTS =                                            \
4064     $(root_tests)     $(root_tests)
4065    
4066   pr_data =                                      \   pr_data =                                      \
# Line 4024  diff -urNp coreutils-8.13-orig/tests/Mak Line 4071  diff -urNp coreutils-8.13-orig/tests/Mak
4071     pr/0F                                                \     pr/0F                                                \
4072     pr/0FF                                       \     pr/0FF                                       \
4073     pr/0FFnt                                     \     pr/0FFnt                                     \
4074  diff -urNp coreutils-8.13-orig/tests/misc/cut coreutils-8.13/tests/misc/cut  diff -urNp coreutils-8.15-orig/tests/misc/cut coreutils-8.15/tests/misc/cut
4075  --- coreutils-8.13-orig/tests/misc/cut  2011-09-02 14:08:40.000000000 +0200  --- coreutils-8.15-orig/tests/misc/cut  2012-01-01 10:04:06.000000000 +0100
4076  +++ coreutils-8.13/tests/misc/cut       2011-09-09 10:23:14.190686793 +0200  +++ coreutils-8.15/tests/misc/cut       2013-01-30 13:40:37.361294753 +0100
4077  @@ -23,14 +23,15 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};  @@ -23,14 +23,15 @@ use strict;
4078   # Turn off localization of executable's output.   # Turn off localization of executable's output.
4079   @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;   @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
4080    
# Line 4047  diff -urNp coreutils-8.13-orig/tests/mis Line 4094  diff -urNp coreutils-8.13-orig/tests/mis
4094   my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";   my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
4095    
4096   my @Tests =   my @Tests =
4097  @@ -147,7 +147,7 @@ my @Tests =  @@ -147,7 +148,7 @@ my @Tests =
4098    
4099     # None of the following invalid ranges provoked an error up to coreutils-6.9.     # None of the following invalid ranges provoked an error up to coreutils-6.9.
4100     ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},     ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
# Line 4056  diff -urNp coreutils-8.13-orig/tests/mis Line 4103  diff -urNp coreutils-8.13-orig/tests/mis
4103     ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],     ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
4104     ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],     ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
4105     ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},     ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},
4106  diff -urNp coreutils-8.13-orig/tests/misc/mb1.I coreutils-8.13/tests/misc/mb1.I  diff -urNp coreutils-8.15-orig/tests/misc/mb1.I coreutils-8.15/tests/misc/mb1.I
4107  --- coreutils-8.13-orig/tests/misc/mb1.I        1970-01-01 01:00:00.000000000 +0100  --- coreutils-8.15-orig/tests/misc/mb1.I        1970-01-01 01:00:00.000000000 +0100
4108  +++ coreutils-8.13/tests/misc/mb1.I     2011-09-09 10:23:14.191687037 +0200  +++ coreutils-8.15/tests/misc/mb1.I     2013-01-30 13:40:37.362395749 +0100
4109  @@ -0,0 +1,4 @@  @@ -0,0 +1,4 @@
4110  +Apple@10  +Apple@10
4111  +Banana@5  +Banana@5
4112  +Citrus@20  +Citrus@20
4113  +Cherry@30  +Cherry@30
4114  diff -urNp coreutils-8.13-orig/tests/misc/mb1.X coreutils-8.13/tests/misc/mb1.X  diff -urNp coreutils-8.15-orig/tests/misc/mb1.X coreutils-8.15/tests/misc/mb1.X
4115  --- coreutils-8.13-orig/tests/misc/mb1.X        1970-01-01 01:00:00.000000000 +0100  --- coreutils-8.15-orig/tests/misc/mb1.X        1970-01-01 01:00:00.000000000 +0100
4116  +++ coreutils-8.13/tests/misc/mb1.X     2011-09-09 10:23:14.192581910 +0200  +++ coreutils-8.15/tests/misc/mb1.X     2013-01-30 13:40:37.363395657 +0100
4117  @@ -0,0 +1,4 @@  @@ -0,0 +1,4 @@
4118  +Banana@5  +Banana@5
4119  +Apple@10  +Apple@10
4120  +Citrus@20  +Citrus@20
4121  +Cherry@30  +Cherry@30
4122  diff -urNp coreutils-8.13-orig/tests/misc/mb2.I coreutils-8.13/tests/misc/mb2.I  diff -urNp coreutils-8.15-orig/tests/misc/mb2.I coreutils-8.15/tests/misc/mb2.I
4123  --- coreutils-8.13-orig/tests/misc/mb2.I        1970-01-01 01:00:00.000000000 +0100  --- coreutils-8.15-orig/tests/misc/mb2.I        1970-01-01 01:00:00.000000000 +0100
4124  +++ coreutils-8.13/tests/misc/mb2.I     2011-09-09 10:23:14.192581910 +0200  +++ coreutils-8.15/tests/misc/mb2.I     2013-01-30 13:40:37.363395657 +0100
4125  @@ -0,0 +1,4 @@  @@ -0,0 +1,4 @@
4126  +Apple@AA10@@20  +Apple@AA10@@20
4127  +Banana@AA5@@30  +Banana@AA5@@30
4128  +Citrus@AA20@@5  +Citrus@AA20@@5
4129  +Cherry@AA30@@10  +Cherry@AA30@@10
4130  diff -urNp coreutils-8.13-orig/tests/misc/mb2.X coreutils-8.13/tests/misc/mb2.X  diff -urNp coreutils-8.15-orig/tests/misc/mb2.X coreutils-8.15/tests/misc/mb2.X
4131  --- coreutils-8.13-orig/tests/misc/mb2.X        1970-01-01 01:00:00.000000000 +0100  --- coreutils-8.15-orig/tests/misc/mb2.X        1970-01-01 01:00:00.000000000 +0100
4132  +++ coreutils-8.13/tests/misc/mb2.X     2011-09-09 10:23:14.193687456 +0200  +++ coreutils-8.15/tests/misc/mb2.X     2013-01-30 13:40:37.364411214 +0100
4133  @@ -0,0 +1,4 @@  @@ -0,0 +1,4 @@
4134  +Citrus@AA20@@5  +Citrus@AA20@@5
4135  +Cherry@AA30@@10  +Cherry@AA30@@10
4136  +Apple@AA10@@20  +Apple@AA10@@20
4137  +Banana@AA5@@30  +Banana@AA5@@30
4138  diff -urNp coreutils-8.13-orig/tests/misc/sort-mb-tests coreutils-8.13/tests/misc/sort-mb-tests  diff -urNp coreutils-8.15-orig/tests/misc/sort-mb-tests coreutils-8.15/tests/misc/sort-mb-tests
4139  --- coreutils-8.13-orig/tests/misc/sort-mb-tests        1970-01-01 01:00:00.000000000 +0100  --- coreutils-8.15-orig/tests/misc/sort-mb-tests        1970-01-01 01:00:00.000000000 +0100
4140  +++ coreutils-8.13/tests/misc/sort-mb-tests     2011-09-09 10:23:14.194687565 +0200  +++ coreutils-8.15/tests/misc/sort-mb-tests     2013-01-30 13:40:37.365177992 +0100
4141  @@ -0,0 +1,58 @@  @@ -0,0 +1,58 @@
4142  +#! /bin/sh  +#! /bin/sh
4143  +case $# in  +case $# in

Legend:
Removed from v.393949  
changed lines
  Added in v.393950

  ViewVC Help
Powered by ViewVC 1.1.30