From: Carles Pina i Estany <carles@pina.cat>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: gettext util
Date: Sun, 28 Mar 2010 23:05:52 +0100 [thread overview]
Message-ID: <20100328220552.GA17773@pina.cat> (raw)
In-Reply-To: <4BAF5031.7050807@gmail.com>
Hello,
On Mar/28/2010, Vladimir '??-coder/phcoder' Serbinenko wrote:
> Carles Pina i Estany wrote:
> > b) Makes the alignment more difficult
> >
> Why not just do like
>
> " -h, --help %s\n"
> " -V, --version %s\n"
> " -v, --verbose %s\n", _("display this message and exit"), _ ("print version information and exit"), _("print verbose messages")
My reasons for argp:
a) if someone/something else can take care of counting how many spaces
before the short options, to write the "," and space and the long
option, etc. then is something that we don't need to think and do. Good for
consistency between Grub programs and other utilities
b) to not have some presentation things in Grub code (spaces, tabs,
etc.)
(main one:)
c) using above way is very easy to do mistakes and swap the description
and the command of some option, let's say, updating things OR options
that depends of the platform/compiler options. It needs two ifdef in two
places instead of only one in argp and more clear, since the argp structure is
like:
/* The options we understand. */
static struct argp_option options[] = {
{"verbose", 'v', 0, 0, "Produce verbose output" },
{"quiet", 'q', 0, 0, "Don't produce any output" },
All my reasons are valid if the implementation in Grub doesn't have
special problems, else I would re-consider...
Probably I'm forgetting some more positive things and missing some negative
ones.
Cheers,
--
Carles Pina i Estany
http://pinux.info
prev parent reply other threads:[~2010-03-28 22:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 23:56 gettext util Carles Pina i Estany
2010-03-26 16:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-03-27 0:54 ` Carles Pina i Estany
2010-03-27 0:59 ` Carles Pina i Estany
2010-03-27 11:29 ` Jordi Mallach
2010-03-27 21:42 ` Carles Pina i Estany
2010-03-27 22:20 ` Colin Watson
2010-03-27 22:36 ` Carles Pina i Estany
2010-03-27 23:16 ` Colin Watson
2010-03-28 12:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-03-28 22:05 ` Carles Pina i Estany [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100328220552.GA17773@pina.cat \
--to=carles@pina.cat \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.