All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Ruediger Meier <sweet_f_a@gmx.de>
Cc: J William Piggott <elseifthen@gmx.com>, util-linux@vger.kernel.org
Subject: Re: fputs() vs puts() (was: [PATCH] hwclock: remove unused usage() FILE argument)
Date: Thu, 29 Jun 2017 12:53:13 +0200	[thread overview]
Message-ID: <20170629105313.psiy2vw63spibaan@ws.net.home> (raw)
In-Reply-To: <201706291237.19507.sweet_f_a@gmx.de>

On Thu, Jun 29, 2017 at 12:37:19PM +0200, Ruediger Meier wrote:
> > than introduce another function. (It was also reason why I was not
> > sure with print_usage_help_options(), but it resolves more issues.)
> 
> I can still change it to be used like MAN_TAIL, then we are consistent 
> again.
> 
>   print_usage_help_options(16);
>   vs.
>   printf( USAGE_HELP_OPTIONS(16) );

Yes, I have no strong opinion about it, but somehow to have libc stuff
without any extra abstraction in the code seems always better.

> > For me it's about:
> >
> >     * nice usage() output
> >     * usage() function readability
> >     * all without extra complexity (random contributor has to be able
> >       add new option easily)
> >     * translators-friendly (minimize changes, keep it open as much as
> >       possible)
> 
> 
> I see it all like you, so let's stop code cosmetics unless we have real 
> changes. I'll send a patch for boilerpalate.c only. and maybe the 
> mentioned help_options macro.

I just pushed wipefs and uuidgen with puts(), it seems good. So my
suggestion

 1) use libc output functions if possible
 2) use puts() for new tools or after massive changes in usage()
 3) don't use puts() for already translated usage()
 4) use  
        --output <list>    COLUMNS to display (see below)
        ...
        COLUMNS:


   (William, can you update your "standardize USAGE_COLUMNS" patches? Please.)

 5) "perfect is the enemy of good" (your new (or first) tatto...)

 6) keep our maintainer happy and send patches with new regression
    tests, improve stability, implement new features, etc. :)

    Karel

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

  reply	other threads:[~2017-06-29 10:53 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19  0:35 [PATCH 00/12] pull request J William Piggott
2017-06-19  0:37 ` [PATCH 01/12] hwclock: remove dead code in usage() J William Piggott
2017-06-19  0:38 ` [PATCH 02/12] hwclock: update usage() to util-linux style J William Piggott
2017-06-19  0:40 ` [PATCH 03/12] hwclock: update usage() FILE name J William Piggott
2017-06-19  0:41 ` [PATCH 04/12] hwclock: add usage() functions heading J William Piggott
2017-06-20  8:36   ` Karel Zak
2017-06-21  0:59     ` J William Piggott
2017-06-21 12:21   ` Ruediger Meier
2017-06-21 15:59     ` J William Piggott
2017-06-19  0:42 ` [PATCH 05/12] include: update pathnames.h J William Piggott
2017-06-20  8:44   ` Karel Zak
2017-06-21  0:53     ` J William Piggott
2017-06-19  0:44 ` [PATCH 06/12] hwclock: use RTC in help output J William Piggott
2017-06-19  0:45 ` [PATCH 07/12] hwclock: update --help content and grammar J William Piggott
2017-06-20  8:51   ` Karel Zak
2017-06-21  0:53     ` J William Piggott
2017-06-21 13:05     ` Ruediger Meier
2017-06-21 14:55       ` Karel Zak
2017-06-21 15:30         ` J William Piggott
2017-06-22  2:04           ` Ruediger Meier
2017-06-22 18:46             ` J William Piggott
2017-06-21 15:01     ` Karel Zak
2017-06-21 17:02       ` J William Piggott
2017-06-19  0:46 ` [PATCH 08/12] hwclock: slice up the usage text J William Piggott
2017-06-19  0:47 ` [PATCH 09/12] hwclock: add --update-drift check J William Piggott
2017-06-19  0:48 ` [PATCH 10/12] Docs: update howto-usage-function.txt J William Piggott
2017-06-19  0:49 ` [PATCH 11/12] hwclock: remove unused usage() FILE argument J William Piggott
2017-06-20  8:56   ` Karel Zak
2017-06-21  0:52     ` J William Piggott
2017-06-28 19:29     ` fputs() vs puts() (was: [PATCH] hwclock: remove unused usage() FILE argument) Ruediger Meier
2017-06-29  8:51       ` Karel Zak
2017-06-29 10:37         ` Ruediger Meier
2017-06-29 10:53           ` Karel Zak [this message]
2017-06-29 14:46             ` fputs() vs puts() J William Piggott
2017-06-29 20:12               ` Karel Zak
2017-06-30 18:29                 ` J William Piggott
2017-07-03  8:30                   ` Ruediger Meier
2017-07-03 12:07                     ` Karel Zak
2017-07-03 12:38                       ` Ruediger Meier
2017-07-03 14:25                         ` Karel Zak
2017-07-03 15:09                           ` Bernhard Voelker
2017-07-03 15:15                             ` Bernhard Voelker
2017-06-29 10:37         ` fputs() vs puts() (was: [PATCH] hwclock: remove unused usage() FILE argument) Karel Zak
2017-06-21  9:26   ` [PATCH 11/12] hwclock: remove unused usage() FILE argument Karel Zak
2017-06-21 15:48     ` J William Piggott
2017-06-25 21:39       ` J William Piggott
2017-06-19  0:51 ` [PATCH 12/12] hwclock: remove unused stdarg.h J William Piggott
2017-06-21  9:27 ` [PATCH 00/12] pull request Karel Zak

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=20170629105313.psiy2vw63spibaan@ws.net.home \
    --to=kzak@redhat.com \
    --cc=elseifthen@gmx.com \
    --cc=sweet_f_a@gmx.de \
    --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 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.