Re: [PATCH] grep: make show_line more portable

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] grep: make show_line more portable

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:21

Brian Gernhardt [off-list ref] writes:
On Mar 8, 2009, at 10:22 PM, Jay Soffian wrote:
quoted
On Sun, Mar 8, 2009 at 9:15 PM, Brian Gernhardt
[off-list ref] wrote:
quoted
On OS X the printf specifier "%.0s" outputs the entire string instead
of 0 characters as POSIX states.
Does not reproduce for me:
Nor for me, as I noted on the other thread...  And looking again, I
was reading the man page for printf(1), not printf(3).  Ouch.
*grumble, grumble*  I'm crawling back under my rock now.
Heh, people make mistakes and others are here to help spot them.
Collectively we all win.

Thanks for a breakage report, initial fix and a confirmation.

Re: [PATCH] grep: make show_line more portable

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:46:21

Hi,

On Sun, 8 Mar 2009, Junio C Hamano wrote:
Brian Gernhardt [off-list ref] writes:
quoted
On Mar 8, 2009, at 10:22 PM, Jay Soffian wrote:
quoted
On Sun, Mar 8, 2009 at 9:15 PM, Brian Gernhardt
[off-list ref] wrote:
quoted
On OS X the printf specifier "%.0s" outputs the entire string instead
of 0 characters as POSIX states.
Does not reproduce for me:
Nor for me, as I noted on the other thread...  And looking again, I
was reading the man page for printf(1), not printf(3).  Ouch.
*grumble, grumble*  I'm crawling back under my rock now.
Heh, people make mistakes and others are here to help spot them.
Collectively we all win.
One of my favorite quotes these days:

The computer "doth make fools of us all," so that any fool without the 
ability to share a laugh on himself will be unable to tolerate programming 
for long. ''(Gerald M. Weinberg)''
Thanks for a breakage report, initial fix and a confirmation.
Yes, I think this discussion was valuable, not only because it fixed a 
bug, but also because I learnt that %.*s with a negative length defaults 
to the total string.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help