From: Junio C Hamano <gitster@pobox.com>
To: Brian Gernhardt <benji@silverinsanity.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] grep: make show_line more portable
Date: Sun, 08 Mar 2009 18:35:35 -0700 [thread overview]
Message-ID: <7vhc23iil4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1236561326-1231-1-git-send-email-benji@silverinsanity.com> (Brian Gernhardt's message of "Sun, 8 Mar 2009 21:15:26 -0400")
Brian Gernhardt <benji@silverinsanity.com> writes:
> On OS X the printf specifier "%.0s" outputs the entire string instead
> of 0 characters as POSIX states.
>
> In addition, for * width or precision printf expects an integer
> argument. On systems were regoff_t is 64-bit, unexpected results can
> occur.
I would prefer to see these two issues solved as separate issues.
Specifically, I'd like to know if the patch from me to you a few message
ago solves the issue.
If you still need a "some implementations of printf is broken with respect
to 0 precision" workaround on top of that patch, we would want to add it
separately, but it may have to cover not just this printf(), as I am not
convinced this is the only place that lets (integer) 0 passed to the
"%.*s" format. That patch needs to be written after a separate auditing
of output from "git grep -n -e 'printf.*%\.\*s'", which I do not think
happened yet (at least I haven't done that, and I somehow do not think you
have yet either).
next prev parent reply other threads:[~2009-03-09 1:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 1:15 [PATCH] grep: make show_line more portable Brian Gernhardt
2009-03-09 1:35 ` Junio C Hamano [this message]
2009-03-09 2:22 ` Jay Soffian
2009-03-09 2:23 ` Jay Soffian
2009-03-09 2:44 ` Brian Gernhardt
2009-03-09 3:52 ` Junio C Hamano
2009-03-09 9:50 ` Johannes Schindelin
2009-03-09 19:34 ` René Scharfe
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=7vhc23iil4.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=benji@silverinsanity.com \
--cc=git@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.