bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] Re: version-etc.c and non-FSF copyrights


From: Simon Josefsson
Subject: [bug-gnulib] Re: version-etc.c and non-FSF copyrights
Date: Thu, 20 Jan 2005 13:33:41 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Simon Josefsson <address@hidden> writes:
>
>> This reminds me, couldn't we use a xalloc/xalloc-die-approach for
>> version-etc?
>>
>> I.e., put the version_etc_copyright variable definition in a separate
>> module, version-etc-fsf, and remove it from version-etc.c?  And add a
>> 'extern char* version_etc_copyright' to version-etc.h or something.
>
> That works for me, though (while we're on the subject) I'd mildly
> prefer to change the signature to "extern char const
> version_etc_copyright[]" while we're at it, as I don't see much point
> in having it be a variable pointer to variable data.  It's not
> supposed to be translated.  (And I think it's unlikely that the
> copyright owner will change during the execution of the program --
> though I suppose we could make it an option if that problem comes
> up. :-)

How about this?

2005-01-20  Simon Josefsson  <address@hidden>

        * version-etc-fsf.c: New file, with version_etc_copyright.

        * version-etc.c: Remove version_etc_copyright.

        * version-etc.h (version_etc_copyright): Use [] instead of * in
        prototype, suggested by Paul Eggert <address@hidden>.

2005-01-20  Simon Josefsson  <address@hidden>

        * modules/version-etc-fsf: New file.

Index: lib/version-etc.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/version-etc.c,v
retrieving revision 1.17
diff -u -p -r1.17 version-etc.c
--- lib/version-etc.c   18 Jan 2005 22:08:49 -0000      1.17
+++ lib/version-etc.c   20 Jan 2005 12:31:19 -0000
@@ -35,13 +35,6 @@
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-/* Default copyright goes to the FSF. */
-
-const char* version_etc_copyright =
-  /* Do *not* mark this string for translation.  */
-  "Copyright (C) 2005 Free Software Foundation, Inc.";
-
-
 /* Like version_etc, below, but with the NULL-terminated author list
    provided via a variable of type va_list.  */
 void
Index: lib/version-etc.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/version-etc.h,v
retrieving revision 1.7
diff -u -p -r1.7 version-etc.h
--- lib/version-etc.h   6 Oct 2003 20:30:18 -0000       1.7
+++ lib/version-etc.h   20 Jan 2005 12:31:19 -0000
@@ -1,5 +1,5 @@
 /* Utility to help print --version output in a consistent format.
-   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 # include <stdarg.h>
 # include <stdio.h>
 
-extern const char *version_etc_copyright;
+extern const char version_etc_copyright[];
 
 extern void version_etc_va (FILE *stream,
                            const char *command_name, const char *package,
Index: lib/version-etc-fsf.c
===================================================================
RCS file: lib/version-etc-fsf.c
diff -N lib/version-etc-fsf.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lib/version-etc-fsf.c       20 Jan 2005 12:31:19 -0000
@@ -0,0 +1,31 @@
+/* Variable with FSF copyright information, for version-etc.
+   Copyright (C) 1999-2005 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+/* Written by Jim Meyering. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include "version-etc.h"
+
+/* Default copyright goes to the FSF. */
+
+const char version_etc_copyright[] =
+  /* Do *not* mark this string for translation.  */
+  "Copyright (C) 2005 Free Software Foundation, Inc.";
Index: modules/version-etc-fsf
===================================================================
RCS file: modules/version-etc-fsf
diff -N modules/version-etc-fsf
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ modules/version-etc-fsf     20 Jan 2005 12:31:19 -0000
@@ -0,0 +1,22 @@
+Description:
+Copyright variable for FSF projects
+
+Files:
+lib/version-etc-fsf.c
+
+Depends-on:
+version-etc
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += version-etc-fsf.c
+
+Include:
+
+License:
+GPL
+
+Maintainer:
+Jim Meyering
+




reply via email to

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