bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] 4-gary-version-etc-full-author-string.patch


From: Bruno Haible
Subject: Re: [Bug-gnulib] 4-gary-version-etc-full-author-string.patch
Date: Wed, 17 Sep 2003 14:43:17 +0200
User-agent: KMail/1.5

Jim Meyering wrote:

> >          printf (_("Written by %s."), AUTHOR1);
> >          printf (_("Written by %s and %s."), AUTHOR1, AUTHOR2);
> >          printf (_("Written by %s, %s and %s."), AUTHOR1, AUTHOR2,
> > AUTHOR3); etc.
>
> Instead, how about just changing "Written by %s\n."
> in version_etc.c to              "Author(s): %s\n"
>             or just              "Authors: %s\n"

This goes backward: It eliminates natural language. Full sentences are
more pleasant to read for most people than this kind of computerized
   "Authors: XY
    Size: 10 KB
    Last modification: 2002
   "
staccato.

How about the appended patch? With it, you change each AUTHORS definition,
like this:

#define AUTHORS N_ ("Joseph Arceneaux, David MacKenzie, and Kaveh Ghazi")
->
#define AUTHORS AUTHORS3 ("Joseph Arceneaux", "David MacKenzie", "Kaveh Ghazi")

This is not more work for you than what you proposed. And it keeps the
friendly natural language for the user.

Bruno


*** version-etc.h       18 Jun 2003 05:52:19 -0000      1.6
--- version-etc.h       17 Sep 2003 12:37:05 -0000
***************
*** 26,31 ****
  
  void version_etc (FILE *stream,
                  const char *command_name, const char *package,
!                 const char *version, const char *authors);
  
  #endif /* VERSION_ETC_H */
--- 26,44 ----
  
  void version_etc (FILE *stream,
                  const char *command_name, const char *package,
!                 const char *version, const char *written_by);
! 
! # define AUTHORS1(author1) \
!   xasprintf (_("Written by %s."), author1)
! # define AUTHORS2(author1, author2) \
!   xasprintf (_("Written by %s and %s."), author1, author2)
! # define AUTHORS3(author1, author2, author3) \
!   xasprintf (_("Written by %s, %s and %s."), author1, author2, author3)
! # define AUTHORS4(author1, author2, author3, author4) \
!   xasprintf (_("Written by %s, %s, %s and %s."), \
!            author1, author2, author3, author4)
! # define AUTHORS5(author1, author2, author3, author4, author5) \
!   xasprintf (_("Written by %s, %s, %s, %s and %s."), \
!            author1, author2, author3, author4, author5)
  
  #endif /* VERSION_ETC_H */
*** version-etc.c       6 Jan 2003 13:20:08 -0000       1.12
--- version-etc.c       17 Sep 2003 12:37:05 -0000
***************
*** 48,60 ****
  void
  version_etc (FILE *stream,
             const char *command_name, const char *package,
!            const char *version, const char *authors)
  {
    if (command_name)
      fprintf (stream, "%s (%s) %s\n", command_name, package, version);
    else
      fprintf (stream, "%s %s\n", package, version);
!   fprintf (stream, _("Written by %s.\n"), authors);
    putc ('\n', stream);
  
    fputs (version_etc_copyright, stream);
--- 48,60 ----
  void
  version_etc (FILE *stream,
             const char *command_name, const char *package,
!            const char *version, const char *written_by)
  {
    if (command_name)
      fprintf (stream, "%s (%s) %s\n", command_name, package, version);
    else
      fprintf (stream, "%s %s\n", package, version);
!   fputs (written_by, stream);
    putc ('\n', stream);
  
    fputs (version_etc_copyright, stream);





reply via email to

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