[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] [PATCH 05/19] maint: define/use PROGRAM_NAME and AUTHORS
From: |
Jim Meyering |
Subject: |
[bug-diffutils] [PATCH 05/19] maint: define/use PROGRAM_NAME and AUTHORS; use propername module |
Date: |
Fri, 20 Nov 2009 10:12:14 +0100 |
From: Jim Meyering <address@hidden>
* bootstrap.conf (gnulib_modules): Add propername.
* src/cmp.c (PROGRAM_NAME, AUTHORS): Define.
(main): Use them in use of version_etc.
* src/diff.c (PROGRAM_NAME, AUTHORS, main): Likewise.
* src/diff3.c (PROGRAM_NAME, AUTHORS, main): Likewise.
* src/sdiff.c (PROGRAM_NAME, AUTHORS, main): Likewise.
* src/system.h: Include "propername.h".
---
bootstrap.conf | 1 +
src/cmp.c | 14 +++++++++-----
src/diff.c | 15 ++++++++++++---
src/diff3.c | 10 ++++++++--
src/sdiff.c | 10 ++++++++--
src/system.h | 1 +
6 files changed, 39 insertions(+), 12 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index 5f51731..e5e8ca3 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -49,6 +49,7 @@ maintainer-makefile
mbrtowc
mkstemp
progname
+propername
regex
sh-quote
stat-macros
diff --git a/src/cmp.c b/src/cmp.c
index 18056a6..0111e37 100644
--- a/src/cmp.c
+++ b/src/cmp.c
@@ -35,6 +35,13 @@
#include <xalloc.h>
#include <xstrtol.h>
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "cmp"
+
+#define AUTHORS \
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ proper_name ("David MacKenzie")
+
#if defined LC_MESSAGES && ENABLE_NLS
# define hard_locale_LC_MESSAGES hard_locale (LC_MESSAGES)
#else
@@ -234,11 +241,8 @@ main (int argc, char **argv)
break;
case 'v':
- /* TRANSLATORS: Please translate the second "o" in "Torbjorn
- Granlund" to an o-with-umlaut (U+00F6, LATIN SMALL LETTER O
- WITH DIAERESIS) if possible. */
- version_etc (stdout, "cmp", PACKAGE_NAME, PACKAGE_VERSION,
- _("Torbjorn Granlund"), "David MacKenzie", (char *) 0);
+ version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION,
+ AUTHORS, (char *) NULL);
check_stdout ();
return EXIT_SUCCESS;
diff --git a/src/diff.c b/src/diff.c
index b0ad81b..708d892 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -38,6 +38,16 @@
#include <version-etc.h>
#include <xalloc.h>
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "diff"
+
+#define AUTHORS \
+ proper_name ("Paul Eggert"), \
+ proper_name ("Mike Haertel"), \
+ proper_name ("David Hayes"), \
+ proper_name ("Richard Stallman"), \
+ proper_name ("Len Tower")
+
#ifndef GUTTER_WIDTH_MINIMUM
# define GUTTER_WIDTH_MINIMUM 3
#endif
@@ -467,9 +477,8 @@ main (int argc, char **argv)
break;
case 'v':
- version_etc (stdout, "diff", PACKAGE_NAME, PACKAGE_VERSION,
- "Paul Eggert", "Mike Haertel", "David Hayes",
- "Richard Stallman", "Len Tower", (char *) NULL);
+ version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION,
+ AUTHORS, (char *) NULL);
check_stdout ();
return EXIT_SUCCESS;
diff --git a/src/diff3.c b/src/diff3.c
index d70b3fc..f682745 100644
--- a/src/diff3.c
+++ b/src/diff3.c
@@ -34,6 +34,12 @@
#include <version-etc.h>
#include <xalloc.h>
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "diff3"
+
+#define AUTHORS \
+ proper_name ("Randy Smith")
+
/* Internal data structures and macros for the diff3 program; includes
data structures for both diff3 diffs and normal diffs. */
@@ -273,8 +279,8 @@ main (int argc, char **argv)
strip_trailing_cr = true;
break;
case 'v':
- version_etc (stdout, "diff3", PACKAGE_NAME, PACKAGE_VERSION,
- "Randy Smith", (char *) 0);
+ version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION,
+ AUTHORS, (char *) NULL);
check_stdout ();
return EXIT_SUCCESS;
case DIFF_PROGRAM_OPTION:
diff --git a/src/sdiff.c b/src/sdiff.c
index d44ffcb..07ac0cb 100644
--- a/src/sdiff.c
+++ b/src/sdiff.c
@@ -35,6 +35,12 @@
#include <version-etc.h>
#include <xalloc.h>
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "sdiff"
+
+#define AUTHORS \
+ proper_name ("Thomas Lord")
+
/* Size of chunks read from files which must be parsed into lines. */
#define SDIFF_BUFSIZE ((size_t) 65536)
@@ -526,8 +532,8 @@ main (int argc, char *argv[])
break;
case 'v':
- version_etc (stdout, "sdiff", PACKAGE_NAME, PACKAGE_VERSION,
- "Thomas Lord", (char *) 0);
+ version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION,
+ AUTHORS, (char *) NULL);
check_stdout ();
return EXIT_SUCCESS;
diff --git a/src/system.h b/src/system.h
index 2ba53a4..3e37bbc 100644
--- a/src/system.h
+++ b/src/system.h
@@ -134,6 +134,7 @@ int strcasecmp (char const *, char const *);
#endif
#include <intprops.h>
+#include "propername.h"
/* Type used for fast comparison of several bytes at a time. */
--
1.6.5.3.433.g11067
- [bug-diffutils] [PATCH 01/19] tests: add the first script; hook up gnulib-tests, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 06/19] build: avoid link failure when libsigsegv is used, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 05/19] maint: define/use PROGRAM_NAME and AUTHORS; use propername module,
Jim Meyering <=
- [bug-diffutils] [PATCH 14/19] build: enable many warnings, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 02/19] sdiff, diff3: exec diff, not $(bindir)/diff, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 19/19] maint: remove hard-coded macro definitions provided by intprops.h, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 04/19] maint: no longer define *_FILENO constants, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 12/19] build: update gnulib submodule to latest, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 17/19] build: suppress warnings about bindtextdomain and textdomain, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 15/19] use xfreopen rather than freopen, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 10/19] build: let automake generate better man-installation rules, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 11/19] maint: hide build commands behind $(AM_V_GEN), Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 18/19] maint: add gnulib's announce-gen module, Jim Meyering, 2009/11/20