Hi Bruno,
Bruno Haible wrote:
I think that it would be better to fix the problem for good by deprecating
getopt_long and recommending instead something that defines the options in
one place, as Arg_parser does. Even if this implies some minor changes in
the programs to adapt to the new (simpler)
On Thu, Jun 26, 2025 at 10:44 AM Bruno Haible wrote:
>
> Ben Pfaff wrote:
> > Another approach would be to provide a function that dynamically
> > generates the shortopts
> > argument to pass getopt_long(), given the long options. Then there
> > would be less work and
> > less to keep consistent f
Hi Antonio,
> I think that it would be better to fix the problem for good by deprecating
> getopt_long and recommending instead something that defines the options in
> one place, as Arg_parser does. Even if this implies some minor changes in
> the programs to adapt to the new (simpler) interfac
Ben Pfaff wrote:
> Another approach would be to provide a function that dynamically
> generates the shortopts
> argument to pass getopt_long(), given the long options. Then there
> would be less work and
> less to keep consistent for developers.
I like this idea, and was thinking in the same direc
Ben Pfaff writes:
>> I propose to add to getopt_long() — in Gnulib — code that verifies
>> the consistency between the two places, when a certain environment
>> variable (say, GETOPT_DEBUG) is set. And produces output on stderr
>> such as:
>> getopt_long: warning: option '--context' requires an
On Tue, Jun 24, 2025 at 6:16 PM Bruno Haible via Gnulib discussion
list wrote:
>
> I propose to add to getopt_long() — in Gnulib — code that verifies
> the consistency between the two places, when a certain environment
> variable (say, GETOPT_DEBUG) is set. And produces output on stderr
> such as:
Hi Bruno,
Bruno Haible wrote:
The problem is that the properties of an option have to be specified
in *two* places: in the long_options array *and* in the 3rd argument
to getopt_long().
I propose to add to getopt_long() - in Gnulib - code that verifies
the consistency between the two places, wh
Hello!
Le mercredi 25 juin 2025 à 10:06 -0700, Paul Eggert a écrit :
> It would be nice to do the getopt check statically, if we're going to
> do
> it at all.
>
> While we're on the getopt topic, glibc might add translation of
> getopt
> argument strings:
>
> https://sourceware.org/pipermail/l
On 2025-06-25 08:09, Antonio Diaz Diaz wrote:
I think that it would be better to fix the problem for good by
deprecating getopt_long and recommending instead something that defines
the options in one place
It's a question of reinventing the wheel yet again, vs patching the
wheel we have.
I
Hi Bruno,
Bruno Haible via Gnulib discussion list writes:
> The problem is that the properties of an option have to be specified
> in *two* places: in the long_options array *and* in the 3rd argument
> to getopt_long().
>
> I propose to add to getopt_long() — in Gnulib — code that verifies
> the
Collin Funk wrote:
> > The problem is that the properties of an option have to be specified
> > in *two* places: in the long_options array *and* in the 3rd argument
> > to getopt_long().
> ...
> I wonder that the historical rational was for having the third
> parameter, the short options, in 'getop
11 matches
Mail list logo