]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 1.5
authorJim Meyering <jim@meyering.net>
Fri, 7 May 1993 03:09:55 +0000 (03:09 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 7 May 1993 03:09:55 +0000 (03:09 +0000)
old/textutils/ChangeLog
old/textutils/NEWS
src/cat.c
src/csplit.c
src/od.c
src/split.c
src/tr.c
src/wc.c

index 02cafcda273f19a39c1f3e2f7cbe5412d93c86c9..7a85cf233576e369c831acc50b44f5ebd47d4374 100644 (file)
@@ -1,8 +1,35 @@
+Mon May  3 23:57:47 1993  Jim Meyering  (meyering@comco.com)
+
+       * Version 1.5.
+
+       * od.c (main): Remove set-but-not-used variable, `usage_error'.
+
+       * split.c (main): Call usage with an argument.
+
+Sun May  2 16:05:04 1993  Jim Meyering  (meyering@comco.com)
+
+       * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
+       for 8-bit clean memcmp.
+
+       * cat.c (usage, main): Remove unused argument.
+
+       * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
+       (check_for_offset): Remove unused argument `argnum.'
+
+       * configure.in: Add AC_SIZE_T.
+
 Sat May  1 09:03:19 1993  Jim Meyering  (meyering@comco.com)
 
-       * uniq.c (main.c): Interpret non-option arguments with a leading `+'
+       * uniq.c (main): Interpret non-option arguments with a leading `+'
        only if we haven't seen `--'.
 
+       * tr.c (main): Change variable name to avoid shadowed dcl.
+       * wc.c (write_counts): Ditto.
+
+       * sum.1: Make documentation agree with the code.
+
+       * od.c: Depend only on HAVE_LONG_DOUBLE for long double support.
+
 Fri Apr 30 20:16:03 1993  Jim Meyering  (meyering@comco.com)
 
        * configure.in [AC_HAVE_HEADERS]: Add limits.h.
index 4b98a3c107ceb39432d97f3cb3d9294c287460da..c63422fe5f6176902c6da357103a13fc0d552efc 100644 (file)
@@ -1,5 +1,6 @@
 Major changes in release 1.5:
 * sort is 8-bit clean
+* sort's -n and -M options no longer imply -b
 * several bugs in sort have been fixed
 * all programs accept --help and --version options
 * od --compatible accepts pre-POSIX arguments
index 044c9a97112136a5cf2c67a354bd44eb73090d97..98da7c971873d7919b8540194b52a830f5a50df4 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -74,12 +74,8 @@ static int newlines2 = 0;
 static int exit_stat = 0;
 
 static void
-usage (reason)
-     char *reason;
+usage ()
 {
-  if (reason != NULL)
-    fprintf (stderr, "%s: %s\n", program_name, reason);
-
   fprintf (stderr, "\
 Usage: %s [-benstuvAET] [--number] [--number-nonblank] [--squeeze-blank]\n\
        [--show-nonprinting] [--show-ends] [--show-tabs] [--show-all]\n\
@@ -224,7 +220,7 @@ main (argc, argv)
          break;
 
        default:
-         usage ((char *) 0);
+         usage ();
        }
     }
 
index e5b6ed68da6ce9e16f14c7085ce65c40db55c5ff..eaea8c314f208eb42e84ac69301460bcc2a82686 100644 (file)
@@ -599,7 +599,6 @@ static struct cstring *
 remove_line ()
 {
   struct cstring *line;                /* Return value. */
-  unsigned line_got;           /* Number of the line retrieved. */
   struct line *l;              /* For convenience. */
 
   if (head == NULL && !load_buffer ())
@@ -608,7 +607,7 @@ remove_line ()
   if (current_line < head->first_available)
     current_line = head->first_available;
 
-  line_got = head->first_available++;
+  ++(head->first_available);
 
   l = head->curr_line;
 
@@ -1076,13 +1075,11 @@ string_to_number (result, num)
 
 /* Check if there is a numeric offset after a regular expression.
    STR is the entire command line argument.
-   ARGNUM is the index in ARGV of STR.
    P is the control record for this regular expression.
    NUM is the numeric part of STR. */
 
 static void
-check_for_offset (argnum, p, str, num)
-     int argnum;
+check_for_offset (p, str, num)
      struct control *p;
      char *str;
      char *num;
@@ -1163,7 +1160,7 @@ extract_regexp (argnum, ignore, str)
     }
 
   if (closing_delim[1])
-    check_for_offset (argnum, p, str, closing_delim + 1);
+    check_for_offset (p, str, closing_delim + 1);
 
   return p;
 }
index a6967d1fbc5291ca4804e49fe656405ece58751d..ea4f12b392ca639c454db0a916b1a059fb7ae0c3 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -43,7 +43,7 @@ char *alloca ();
 #include <float.h>
 #endif
 
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
+#ifdef HAVE_LONG_DOUBLE
 typedef long double LONG_DOUBLE;
 #else
 typedef double LONG_DOUBLE;
@@ -553,7 +553,7 @@ print_double (n_bytes, block, fmt_string)
     }
 }
 
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
+#ifdef HAVE_LONG_DOUBLE
 static void
 print_long_double (n_bytes, block, fmt_string)
      long unsigned int n_bytes;
@@ -885,7 +885,7 @@ decode_one_format (s, next, tspec)
                   DBL_DIG + 8, DBL_DIG);
          break;
 
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
+#ifdef HAVE_LONG_DOUBLE
        case FP_LONG_DOUBLE:
          print_function = print_long_double;
          pre_fmt_string = "%%%d.%dle%%c";
@@ -1808,7 +1808,6 @@ main (argc, argv)
   if (flag_compatibility)
     {
       long int offset;
-      int usage_error = 0;
 
       if (n_files == 1)
        {
@@ -1840,7 +1839,6 @@ main (argc, argv)
            }
          else
            {
-             usage_error = 1;
              error (0, 0,
                     "invalid second operand in compatibility mode `%s'",
                     argv[optind + 1]);
index 07b37aef920c5bdfb8e258b3d6d86dda02ef6cfd..addddd9823dcaa9bdeacd3cbafa05abedadb5ec0 100644 (file)
@@ -188,7 +188,7 @@ main (argc, argv)
     fprintf (stderr, "%s\n", version_string);
 
   if (flag_help)
-    usage ();
+    usage ((char *)0);
 
   /* Handle default case.  */
   if (split_type == type_undef)
index 9010f450004a4538ba1c971ecc7444eb1ac7ddd4..f2a3fac76b059249975d3a78c893037555095e83 100644 (file)
--- a/src/tr.c
+++ b/src/tr.c
@@ -371,7 +371,7 @@ is_char_class_member (char_class, c)
     case CC_XDIGIT:
       return ISXDIGIT (c);
       break;
-    case CC_NO_CLASS:
+    default:
       abort ();
       break;
     }
@@ -1759,15 +1759,15 @@ deleting and squeezing repeats");
            {
              if (!in_s1[i])
                {
-                 int c = get_next (s2, NULL);
-                 assert (c != -1 || truncate_set1);
-                 if (c == -1)
+                 int ch = get_next (s2, NULL);
+                 assert (ch != -1 || truncate_set1);
+                 if (ch == -1)
                    {
                      /* This will happen when tr is invoked like e.g.
                         tr -cs A-Za-z0-9 '\012'.  */
                      break;
                    }
-                 xlate[i] = c;
+                 xlate[i] = ch;
                }
            }
          assert (get_next (s2, NULL) == -1 || truncate_set1);
index 678e179aea08d133081fc7b824aaba8db324652b..22aa533338e29a94547f0acd05244ce410f3deb3 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -234,23 +234,23 @@ wc (fd, file)
 }
 
 static void
-write_counts (lc, wc, cc, file)
-     unsigned long lc, wc, cc;
+write_counts (lines, words, chars, file)
+     unsigned long lines, words, chars;
      char *file;
 {
   if (print_lines)
-    printf ("%7lu", lc);
+    printf ("%7lu", lines);
   if (print_words)
     {
       if (print_lines)
        putchar (' ');
-      printf ("%7lu", wc);
+      printf ("%7lu", words);
     }
   if (print_chars)
     {
       if (print_lines || print_words)
        putchar (' ');
-      printf ("%7lu", cc);
+      printf ("%7lu", chars);
     }
   if (*file)
     printf (" %s", file);