bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: User <the.f8er@gmail.com>
To: eggert@cs.ucla.edu
Cc: 69636@debbugs.gnu.org
Subject: bug#69636: Re: [PATCH] Improve quality of format-checking code for seq.
Date: Fri, 8 Mar 2024 14:29:45 +0200	[thread overview]
Message-ID: <0e68f0b4-c48a-4d82-a407-b87b20570c49@gmail.com> (raw)


Jim Meyering <jim@meyering.net> wrote:

> Paul Eggert <eggert@CS.UCLA.EDU> wrote:
> > * src/seq.c (validate_format): Remove. Migrate its checks into...
> > (long_double_format): Report an error and exit if an error is found,
> > instead of returning NULL.  All callers changed.
> > Use a more-consistent format for diagnostics.
> > * tests/misc/seq: Adjust to the more-consistent format for diagnostics.
> > ---
> >  src/seq.c      |   71 
> +++++++++++++++----------------------------------------
> >  tests/misc/seq |   10 ++++----
> >  2 files changed, 25 insertions(+), 56 deletions(-)
>
> Thanks.
> As far as I can see this is a "no semantic change"
> patch (modulo diagnostics), and it looks fine, so I pushed it.

Dear Paul Eggert and Jim Meyering,


Thank you very much for the contribution and care! I hope you have 
awesome and cozy day!

It is a nice addition to check the format in the most and explicitly 
safe cases, I believe, however it disallows to use it in cases when you 
need to just repeat a character without ANY processing directive! For 
example, `a=10; seq -f 'x' -s '' -- "$a";` would print 10 characters "x" 
without the check added prior and significantly (or little but still) 
support development in long codes which would require explicit loops or 
additional dependencies like awesome Perl.

Is it possible to reconsider the check or add an option to ignore the 
format which does not have a required directive? If you know a better 
alternative to the standard utility which would result in the same small 
code but great result, please suggest if possible!

Again, appreciated, and please stay safe!


Best and kind regards,

Artfaith





             reply	other threads:[~2024-03-08 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 12:29 User [this message]
2024-03-08 13:47 ` bug#69636: Re: [PATCH] Improve quality of format-checking code for seq Pádraig Brady
2024-03-08 19:14   ` Paul Eggert

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e68f0b4-c48a-4d82-a407-b87b20570c49@gmail.com \
    --to=the.f8er@gmail.com \
    --cc=69636@debbugs.gnu.org \
    --cc=877i7vyf3l.fsf@penguin.cs.ucla.edu \
    --cc=eggert@cs.ucla.edu \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).