bug-coreutils
[Top][All Lists]
Advanced

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

Re: ptx --copyright


From: Eric Blake
Subject: Re: ptx --copyright
Date: Mon, 27 Mar 2006 07:28:39 -0700
User-agent: Thunderbird 1.5 (Windows/20051201)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[Resend - this never seemed to make it to the list archives or distribution.]

> How about if we alias it to --version, and deprecate it?  That would
> avoid breaking anything depending on "ptx -C".  (Admittedly unlikely,
> but it's nicer to give users some warnings about changes like this.)

How about this?

ChangeLog:
2006-03-22  Eric Blake  <address@hidden>

        * src/ptx.c (usage): Remove mention of --copyright/-C.
        (main): Alias --copyright to --version plus a deprecation
        warning.
        * NEWS: Mention this.


doc/ChangeLog:
2006-03-22  Eric Blake  <address@hidden>

        * coreutils.texi (General options in ptx): Undocument --copyright.



- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEJ/aX84KuGfSFAYARAsH9AJ4uoySZZhLQ8mg9saD/FCbgOoWzaACgoH49
2ksLv3sNxrtznY0q1ab7CbA=
=BW7c
-----END PGP SIGNATURE-----
Index: doc/coreutils.texi
===================================================================
RCS file: /sources/coreutils/coreutils/doc/coreutils.texi,v
retrieving revision 1.316
diff -u -p -r1.316 coreutils.texi
--- doc/coreutils.texi  6 Mar 2006 07:21:40 -0000       1.316
+++ doc/coreutils.texi  23 Mar 2006 04:17:44 -0000
@@ -4205,11 +4205,6 @@ convention more than once per program in
 
 @table @samp
 
address@hidden -C
address@hidden --copyright
-Print a short note about the copyright and copying conditions, then
-exit without further processing.
-
 @item -G
 @itemx --traditional
 As already explained, this option disables all @sc{gnu} extensions to
Index: NEWS
===================================================================
RCS file: /sources/coreutils/coreutils/NEWS,v
retrieving revision 1.364
diff -u -p -r1.364 NEWS
--- NEWS        10 Mar 2006 21:44:30 -0000      1.364
+++ NEWS        23 Mar 2006 04:17:45 -0000
@@ -51,6 +51,9 @@ GNU coreutils NEWS                      
 
 ** Scheduled for removal
 
+  ptx's --copyright (-C) option is scheduled for removal in 2007, and
+  now evokes a warning.  Use --version instead.
+
   rm's --directory (-d) option is scheduled for removal in 2006.  This
   option has been silently ignored since coreutils 5.0.  On systems
   that support unlinking of directories, you can use the "unlink"
Index: src/ptx.c
===================================================================
RCS file: /sources/coreutils/coreutils/src/ptx.c,v
retrieving revision 1.52
diff -u -p -r1.52 ptx.c
--- src/ptx.c   9 Sep 2005 21:11:07 -0000       1.52
+++ src/ptx.c   23 Mar 2006 04:17:45 -0000
@@ -1,5 +1,5 @@
 /* Permuted index for GNU, with keywords in their context.
-   Copyright (C) 1990, 1991, 1993, 1998-2005 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1991, 1993, 1998-2006 Free Software Foundation, Inc.
    François Pinard <address@hidden>, 1988.
 
    This program is free software; you can redistribute it and/or modify
@@ -1897,7 +1897,6 @@ Mandatory arguments to long options are 
 "), stdout);
       fputs (_("\
   -A, --auto-reference           output automatically generated references\n\
-  -C, --copyright                display Copyright and copying conditions\n\
   -G, --traditional              behave more like System V `ptx'\n\
   -F, --flag-truncation=STRING   use STRING for flagging line truncations\n\
 "), stdout);
@@ -1942,7 +1941,7 @@ static const struct option long_options[
 {
   {"auto-reference", no_argument, NULL, 'A'},
   {"break-file", required_argument, NULL, 'b'},
-  {"copyright", no_argument, NULL, 'C'},
+  {"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'},
@@ -2001,29 +2000,6 @@ main (int argc, char **argv)
        default:
          usage (EXIT_FAILURE);
 
-       case 'C':
-         fputs (_("\
-This program is free software; you can redistribute it and/or modify\n\
-it under the terms of the GNU General Public License as published by\n\
-the Free Software Foundation; either version 2, or (at your option)\n\
-any later version.\n\
-\n\
-"), stdout);
-         fputs (_("\
-This program is distributed in the hope that it will be useful,\n\
-but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
-GNU General Public License for more details.\n\
-\n\
-"), stdout);
-         fputs (_("\
-You should have received a copy of the GNU General Public License\n\
-along with this program; if not, write to the Free Software Foundation,\n\
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"),
-                stdout);
-
-         exit (EXIT_SUCCESS);
-
        case 'G':
          gnu_extensions = false;
          break;
@@ -2111,6 +2087,11 @@ Inc., 51 Franklin Street, Fifth Floor, B
                                     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);
        }
     }


reply via email to

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