hi Andriy,

On Sun, May 03, 2015 at 05:33:48PM +0300, Andrej N. Gritsenko wrote:
>     Hello!
> 
> acefael has written on Sunday,  3 May, at 12:06:
> 
> >the diff removes "puts (_(Copyright));"
> >and it adds the loop wherein it calls "puts (_(Copyright[i]));".
> >agreed?
> 
>     Mea culpa. I paid not enough attention to the diff, I'm sorry. Your
> recent patch looks pretty much fine although if that was me then I would
> rather not do calculations like sizeof(Copyright)/sizeof(Copyright[0])
> but would do something like this:
> 
> static const char *Copyright[] = {
>     N_(....),
>     .....
>     NULL
> };
> 
> .....
> 
>     const char **c;
>     for (c = Copyright; *c; c++)
>         puts (_(*c));
> 
> That way it will not require any calculations at all. I'm sorry for the
> intervention.

i don't mind superior intervention and attached a new
patch version.

my c got a little rusty over the decades ;)

> 
>     With best regards,
>     Andriy.

acefael
changeset:   6446:657e43205e86
tag:         tip
user:        acete <[email protected]>
date:        Sun May 03 19:08:31 2015 +0200
summary:     main.c:75: warning: string length '558' is greater than the length 
'509' ISO C90 compilers are required to support (see #3638)

diff -r 755a18da99bc -r 657e43205e86 main.c
--- a/main.c    Sat Apr 25 19:00:13 2015 -0700
+++ b/main.c    Sun May 03 19:08:31 2015 +0200
@@ -72,18 +72,19 @@
 Mutt is free software, and you are welcome to redistribute it\n\
 under certain conditions; type `mutt -vv' for details.\n");
 
-static const char *Copyright = N_("\
-Copyright (C) 1996-2007 Michael R. Elkins <[email protected]>\n\
-Copyright (C) 1996-2002 Brandon Long <[email protected]>\n\
-Copyright (C) 1997-2008 Thomas Roessler <[email protected]>\n\
-Copyright (C) 1998-2005 Werner Koch <[email protected]>\n\
-Copyright (C) 1999-2009 Brendan Cully <[email protected]>\n\
-Copyright (C) 1999-2002 Tommi Komulainen <[email protected]>\n\
-Copyright (C) 2000-2002 Edmund Grimley Evans <[email protected]>\n\
-Copyright (C) 2006-2009 Rocco Rutte <[email protected]>\n\
-\n\
-Many others not mentioned here contributed code, fixes,\n\
-and suggestions.\n");
+static const char *Copyright[] = {
+N_("Copyright (C) 1996-2007 Michael R. Elkins <[email protected]>"),
+N_("Copyright (C) 1996-2002 Brandon Long <[email protected]>"),
+N_("Copyright (C) 1997-2008 Thomas Roessler <[email protected]>"),
+N_("Copyright (C) 1998-2005 Werner Koch <[email protected]>"),
+N_("Copyright (C) 1999-2009 Brendan Cully <[email protected]>"),
+N_("Copyright (C) 1999-2002 Tommi Komulainen <[email protected]>"),
+N_("Copyright (C) 2000-2002 Edmund Grimley Evans <[email protected]>"),
+N_("Copyright (C) 2006-2009 Rocco Rutte <[email protected]>"),
+N_(""),
+N_("Many others not mentioned here contributed code, fixes,"),
+N_("and suggestions.\n"),
+NULL };
 
 static const char *Licence = N_("\
     This program is free software; you can redistribute it and/or modify\n\
@@ -749,7 +750,13 @@
       break;
     default:
       puts (mutt_make_version ());
-      puts (_(Copyright));
+      {
+        const char **c;
+        for (c = Copyright; *c; c++)
+        {
+          puts (_(*c));
+        }
+      }
       puts (_(Licence));
       puts (_(Obtaining));
       puts (_(ReachingUs));

Reply via email to