Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: kerolasa@gmail.com
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [git pull] schedutils
Date: Thu, 21 Jul 2011 21:03:28 +0200	[thread overview]
Message-ID: <20110721190328.GH22568@nb.net.home> (raw)
In-Reply-To: <CAG27Bk1R_fG+SkFd1JfoiEyg7z8saJv4V+=K02Cz8_OHL9tz=w@mail.gmail.com>

On Thu, Jul 21, 2011 at 08:37:52PM +0200, Sami Kerola wrote:
> >  * I think that
> >        -c, --class NUM
> >   is better than
> >        -c, --class=NUM
> 
> With equals sign is FSFism, which seemed like good starting point...

 :-)

 The '=' is required only for optional arguments, the it's probably
 the best to use

    --foo[=NUM]

> >  I have fixed this in ionice man page, but not in usage(). It would be
> >  nice to use in all man pages and usage() functions the same syntax.
> >  Maybe we can create any template or so to have it documented.
> 
> ...but you are absolutely right again. Converting README.devel in
> small chunks to a Documentation directory might be a way to go.

 Good idea!

> Contents of the directory could have help_and_version.txt for what you
> said above, and I can recall recent minix & kernel headers
> conversation which ought also be documented.

 OK.

> BTW what would you think about having a util-linux.h with inline

 Should be enough to use c.h ?

> function to print in usage help & version option descriptions and
> proper version output function. The first would make translation teams
> happier when they do not need to write time after time the same
> translations. Second would simply unify how version is printed, and if

 Well, .po files never contains duplicate strings.

> it ever needs a modification it's easier to do.

 I agree.

> In practice the file would be similar to coreutils system.h.

 Hmm... I don't like 

  #define case_GETOPT_VERSION_CHAR(Program_name, Authors)
          case GETOPT_VERSION_CHAR:


 We don't use the same char everywhere and hide keywords (e.g. case)
 to macros is not nice too.
 
 It would be enough to use 

   case 'V':
        ul_print_version();
        break;
        
 The result should be readable C language, not any gnulib meta-language :-)

   Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2011-07-21 19:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-17 18:37 [git pull] schedutils Sami Kerola
2011-07-18 22:17 ` Karel Zak
2011-07-20  8:15   ` Sami Kerola
2011-07-21 15:43     ` Karel Zak
2011-07-21 18:37       ` Sami Kerola
2011-07-21 19:03         ` Karel Zak [this message]
2011-07-21 20:03           ` Sami Kerola

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=20110721190328.GH22568@nb.net.home \
    --to=kzak@redhat.com \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox