Re: New module argp-version-etc

2009-06-26 Thread Jim Meyering
Eric Blake wrote: ... I will be checking in this patch, if no one else beats me to it. Thanks! Next time I'll build with coreutils before saying ok.

Re: New module argp-version-etc

2009-06-26 Thread Bruno Haible
Hi Jim, Thanks for your understanding. It's not a big deal for me, now that I'm used to seeing no documentation in gnulib's .c files for certain public functions, but it still does rankle a little, each time I notice. Well, for me, it's the opposite: I start boiling a bit, each time I see a

Re: New module argp-version-etc

2009-06-26 Thread Bruno Haible
Paolo Bonzini wrote: With Bruno's approach, a public function must have *no* spec just before its definition, while each private one does. That also depends on whether you insist on prototypes for all static functions. In that case, that's the place for specs of private functions, and

Re: New module argp-version-etc

2009-06-26 Thread Paolo Bonzini
With Bruno's approach, a public function must have *no* spec just before its definition, while each private one does. That also depends on whether you insist on prototypes for all static functions. In that case, that's the place for specs of private functions, and *no* function has a spec

Re: New module argp-version-etc

2009-06-25 Thread Sergey Poznyakoff
Bruno Haible br...@clisp.org ha escrit: - Do you really need *two* array-taking functions? Yes, I believe so. I could remove one of them, but that would make the interface more awkward. E.g. retaining only version_etc_ar would mean extra iteration when called from version_etc_va. On the other

Re: New module argp-version-etc

2009-06-25 Thread Jim Meyering
Sergey Poznyakoff wrote: Bruno Haible br...@clisp.org ha escrit: ... +/* Like version_etc, below, but with the NULL-terminated author list + provided via a variable of type va_list. */ Ouch! Not only you expect the user to look up the documentation of the API inside a long source

Re: New module argp-version-etc

2009-06-25 Thread Sergey Poznyakoff
Hello, I have fixed the issues Bruno pointed out in his posting, and committed the following changes. Regards, Sergey From 3457fcf5632d0411821c6ca61b09c945da9b1063 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff g...@gnu.org.ua Date: Thu, 25 Jun 2009 10:31:56 +0300 Subject: [PATCH] Provide

Re: New module argp-version-etc

2009-06-25 Thread Sergey Poznyakoff
Hi Jim, Another issue: consistency. With Bruno's approach, a public function must have *no* spec just before its definition, while each private one does. I think we all agree that duplicating the spec (before definition and in the .h file) is not maintainable. Unfortunately your mail

Re: New module argp-version-etc

2009-06-25 Thread Jim Meyering
Sergey Poznyakoff wrote: Hi Jim, Another issue: consistency. With Bruno's approach, a public function must have *no* spec just before its definition, while each private one does. I think we all agree that duplicating the spec (before definition and in the .h file) is not maintainable.

Re: New module argp-version-etc

2009-06-25 Thread Bruno Haible
Sergey Poznyakoff wrote: I have fixed the issues Bruno pointed out in his posting, and committed the following changes. Thanks. The doc is fine: Putting general comments at the top of the file is a good solution. + If NAME is NULL, the package name (as given by the PACKAGE macro) + is

Re: New module argp-version-etc

2009-06-25 Thread Paolo Bonzini
Another issue: consistency. With Bruno's approach, a public function must have *no* spec just before its definition, while each private one does. I think we all agree that duplicating the spec (before definition and in the .h file) is not maintainable. That also depends on whether you insist

Re: New module argp-version-etc

2009-06-25 Thread Sergey Poznyakoff
Bruno Haible br...@clisp.org ha escrit: typo:assumed [..] A dependency to 'version-etc' is missing. It leads to this error: Thanks, Bruno. I've fixed it. $ ./gnulib-tool --test argp-version-etc I ran ./gnulib-tool --test --with-tests argp-version-etc, and it pulled the missing

Re: New module argp-version-etc

2009-06-25 Thread Eric Blake
Sergey Poznyakoff gray at gnu.org.ua writes: default: /* 10 or more authors. Use an abbreviation, since the human reader @@ -147,12 +158,49 @@ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and % s.\n), /* TRANSLATORS: Each %s denotes an author name. You can use line

Re: New module argp-version-etc

2009-06-25 Thread Sergey Poznyakoff
Eric Blake e...@byu.net ha escrit: And introduced a bug to plain version_etc clients in the process, with the potential to make --version segfault. Sorry for not spotting it before you committed: Oops, it's me who should apologize for not spotting it! I will be checking in this patch, if

Re: New module argp-version-etc

2009-06-25 Thread Eric Blake
Sergey Poznyakoff gray at gnu.org.ua writes: I have fixed the issues Bruno pointed out in his posting, and committed the following changes. And introduced a bug to plain version_etc clients in the process, with the potential to make --version segfault. Sorry for not spotting it before you

New module argp-version-etc

2009-06-24 Thread Sergey Poznyakoff
Hello, The new module argp-version-etc (patch 2) is designed to facilitate the use of argp and version-etc modules together. This will ensure uniform version output between several programs within the same project, and will be useful for such projects as, for example, GNU Inetutils. This new

Re: New module argp-version-etc

2009-06-24 Thread Eric Blake
Sergey Poznyakoff gray at gnu.org.ua writes: The new module argp-version-etc (patch 2) is designed to facilitate the use of argp and version-etc modules together. This will ensure uniform version output between several programs within the same project, and will be useful for such projects

Re: New module argp-version-etc

2009-06-24 Thread Sergey Poznyakoff
Eric Blake e...@byu.net ha escrit: Why'd you drop the comments describing what the method does? I did not. I simply retained the original comment before version_etc_va. I should have supplied comments before the two new functions, that's true. I'll fix this. I'd like to see the arguments

Re: New module argp-version-etc

2009-06-24 Thread Sergey Poznyakoff
Here's the updated patch. It swaps the n_authors and authors arguments, provides additional comments, removes the year-dependency from the test case and adds a call to va_end in version_etc. Regards, Sergey 2009-06-24 Sergey Poznyakoff g...@gnu.org.ua Provide additional interfaces for

Re: New module argp-version-etc

2009-06-24 Thread Eric Blake
Sergey Poznyakoff gray at gnu.org.ua writes: Why'd you drop the comments describing what the method does? I did not. I simply retained the original comment before version_etc_va. I should have supplied comments before the two new functions, that's true. I'll fix this. I see now. It was

Re: New module argp-version-etc

2009-06-24 Thread Sergey Poznyakoff
Eric Blake e...@byu.net ha escrit: One alternative is to massage the actual output through sed to match the expected output, regardless of the year from version-etc.c. Such as: ./test-ave --version | sed 's/(C) [0-9][0-9][0-9][0-9]/(C) 2009/' \ | diff -c $TMP - || ERR=1 That's exactly

Re: New module argp-version-etc

2009-06-24 Thread Bruno Haible
Hi Sergey, Here's the updated patch. I agree that if there is need for two variants, one taking an array and the other taking a va_list as argument, the one with the array should be the basic one, because it's easier to convert a va_list to an array than vice versa. Regarding version-etc.h: