bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Remove long-deprecated options


From: Jim Meyering
Subject: [PATCH] Remove long-deprecated options
Date: Sat, 14 Jul 2007 21:00:10 +0200

FYI, A bunch of options have been undocumented for some time (years)
and evoking warnings for nearly as long.  I've just removed
some of them.

        Remove long-deprecated options.
        * NEWS: Mention this.
        * src/df.c, src/ls.c: Remove --kilobytes option.
        * src/du.c: Remove --kilobytes and --megabytes options.
        * src/who.c: Remove -i and --idle options.
        * src/ptx.c: Remove --copyright option.

diff --git a/NEWS b/NEWS
index dc60e88..89c20bb 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,14 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   and installation of other programs, don't be surprised if some parts
   of "make check" fail.

+** Remove deprecated options
+
+  df no longer accepts the --kilobytes option.
+  du no longer accepts the --kilobytes or --megabytes options.
+  ls no longer accepts the --kilobytes option.
+  ptx longer accepts the --copyright option.
+  who no longer accepts -i or --idle.
+
 ** Bug fixes

   cp no longer fails to write through a dangling symlink
diff --git a/src/df.c b/src/df.c
index a72b17f..b6e600a 100644
--- a/src/df.c
+++ b/src/df.c
@@ -116,8 +116,6 @@ static bool print_type;
 enum
 {
   NO_SYNC_OPTION = CHAR_MAX + 1,
-  /* FIXME: --kilobytes is deprecated (but not -k); remove in late 2006 */
-  KILOBYTES_LONG_OPTION,
   SYNC_OPTION
 };

@@ -128,7 +126,6 @@ static struct option const long_options[] =
   {"inodes", no_argument, NULL, 'i'},
   {"human-readable", no_argument, NULL, 'h'},
   {"si", no_argument, NULL, 'H'},
-  {"kilobytes", no_argument, NULL, KILOBYTES_LONG_OPTION},
   {"local", no_argument, NULL, 'l'},
   {"megabytes", no_argument, NULL, 'm'}, /* obsolescent */
   {"portability", no_argument, NULL, 'P'},
@@ -824,10 +821,6 @@ main (int argc, char **argv)
          human_output_opts = human_autoscale | human_SI;
          output_block_size = 1;
          break;
-       case KILOBYTES_LONG_OPTION:
-         error (0, 0,
-                _("the --kilobytes option is deprecated; use -k instead"));
-         /* fall through */
        case 'k':
          human_output_opts = 0;
          output_block_size = 1024;
diff --git a/src/du.c b/src/du.c
index 74eb9b2..8f9bfc0 100644
--- a/src/du.c
+++ b/src/du.c
@@ -195,15 +195,8 @@ enum
   EXCLUDE_OPTION,
   FILES0_FROM_OPTION,
   HUMAN_SI_OPTION,
-
-  /* FIXME: --kilobytes is deprecated (but not -k); remove in late 2006 */
-  KILOBYTES_LONG_OPTION,
-
   MAX_DEPTH_OPTION,
-
-  /* FIXME: --megabytes is deprecated (but not -m); remove in late 2006 */
   MEGABYTES_LONG_OPTION,
-
   TIME_OPTION,
   TIME_STYLE_OPTION
 };
@@ -222,10 +215,8 @@ static struct option const long_options[] =
   {"files0-from", required_argument, NULL, FILES0_FROM_OPTION},
   {"human-readable", no_argument, NULL, 'h'},
   {"si", no_argument, NULL, HUMAN_SI_OPTION},
-  {"kilobytes", no_argument, NULL, KILOBYTES_LONG_OPTION},
   {"max-depth", required_argument, NULL, MAX_DEPTH_OPTION},
   {"null", no_argument, NULL, '0'},
-  {"megabytes", no_argument, NULL, MEGABYTES_LONG_OPTION},
   {"no-dereference", no_argument, NULL, 'P'},
   {"one-file-system", no_argument, NULL, 'x'},
   {"separate-dirs", no_argument, NULL, 'S'},
@@ -758,10 +749,6 @@ main (int argc, char **argv)
          output_block_size = 1;
          break;

-       case KILOBYTES_LONG_OPTION:
-         error (0, 0,
-                _("the --kilobytes option is deprecated; use -k instead"));
-         /* fall through */
        case 'k':
          human_output_opts = 0;
          output_block_size = 1024;
diff --git a/src/ls.c b/src/ls.c
index 840f310..751dc3d 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -729,10 +729,6 @@ enum
   GROUP_DIRECTORIES_FIRST_OPTION,
   HIDE_OPTION,
   INDICATOR_STYLE_OPTION,
-
-  /* FIXME: --kilobytes is deprecated (but not -k); remove in late 2006 */
-  KILOBYTES_LONG_OPTION,
-
   QUOTING_STYLE_OPTION,
   SHOW_CONTROL_CHARS_OPTION,
   SI_OPTION,
@@ -752,7 +748,6 @@ static struct option const long_options[] =
    GROUP_DIRECTORIES_FIRST_OPTION},
   {"human-readable", no_argument, NULL, 'h'},
   {"inode", no_argument, NULL, 'i'},
-  {"kilobytes", no_argument, NULL, KILOBYTES_LONG_OPTION},
   {"numeric-uid-gid", no_argument, NULL, 'n'},
   {"no-group", no_argument, NULL, 'G'},
   {"hide-control-chars", no_argument, NULL, 'q'},
@@ -1564,10 +1559,6 @@ decode_switches (int argc, char **argv)
          print_inode = true;
          break;

-       case KILOBYTES_LONG_OPTION:
-         error (0, 0,
-                _("the --kilobytes option is deprecated; use -k instead"));
-         /* fall through */
        case 'k':
          human_output_opts = 0;
          file_output_block_size = output_block_size = 1024;
diff --git a/src/ptx.c b/src/ptx.c
index b421137..23b0605 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -1,5 +1,5 @@
 /* Permuted index for GNU, with keywords in their context.
-   Copyright (C) 1990, 1991, 1993, 1998-2006 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1991, 1993, 1998-2007 Free Software Foundation, Inc.
    François Pinard <address@hidden>, 1988.

    This program is free software; you can redistribute it and/or modify
@@ -1937,7 +1937,6 @@ static const struct option long_options[] =
 {
   {"auto-reference", no_argument, NULL, 'A'},
   {"break-file", required_argument, NULL, 'b'},
-  {"copyright", no_argument, NULL, 'C'}, /* Deprecated, remove in 2007.  */
   {"flag-truncation", required_argument, NULL, 'F'},
   {"ignore-case", no_argument, NULL, 'f'},
   {"gap-size", required_argument, NULL, 'g'},
@@ -1987,7 +1986,7 @@ main (int argc, char **argv)
   setchrclass (NULL);
 #endif

-  while (optchar = getopt_long (argc, argv, "ACF:GM:ORS:TW:b:i:fg:o:trw:",
+  while (optchar = getopt_long (argc, argv, "AF:GM:ORS:TW:b:i:fg:o:trw:",
                                long_options, NULL),
         optchar != EOF)
     {
@@ -2085,11 +2084,6 @@ main (int argc, char **argv)
                                     format_args, format_vals);
        case_GETOPT_HELP_CHAR;

-       case 'C':
-         error (0, 0, _("\
-the --copyright option is deprecated; use --version instead"));
-          /* fallthrough */
-
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        }
     }
diff --git a/src/who.c b/src/who.c
index 37d444e..fe3fb02 100644
--- a/src/who.c
+++ b/src/who.c
@@ -166,7 +166,6 @@ static struct option const longopts[] = {
   {"count", no_argument, NULL, 'q'},
   {"dead", no_argument, NULL, 'd'},
   {"heading", no_argument, NULL, 'H'},
-  {"idle", no_argument, NULL, 'i'}, /* FIXME: deprecated: remove in late 2006 
*/
   {"login", no_argument, NULL, 'l'},
   {"lookup", no_argument, NULL, LOOKUP_OPTION},
   {"message", no_argument, NULL, 'T'},
@@ -683,7 +682,7 @@ main (int argc, char **argv)

   atexit (close_stdout);

-  while ((optc = getopt_long (argc, argv, "abdilmpqrstuwHT", longopts, NULL))
+  while ((optc = getopt_long (argc, argv, "abdlmpqrstuwHT", longopts, NULL))
         != -1)
     {
       switch (optc)
@@ -757,11 +756,6 @@ main (int argc, char **argv)
          include_mesg = true;
          break;

-       case 'i':
-         error (0, 0,
-                _("Warning: -i will be removed in a future release; \
-  use -u instead"));
-         /* Fall through.  */
        case 'u':
          need_users = true;
          include_idle = true;
--
1.5.3.rc1.5.g9d947




reply via email to

[Prev in Thread] Current Thread [Next in Thread]