[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Built-in printf Sits Awkwardly with UDP.
From: |
Chet Ramey |
Subject: |
Re: Built-in printf Sits Awkwardly with UDP. |
Date: |
Sun, 24 Jul 2011 21:08:16 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 |
On 7/22/11 10:38 AM, Ralph Corderoy wrote:
>> OK, well for %b and %q bash's built-in printf calls it's own
>> printstr() and that does do things like `fw = -fw' without checking if
>> fw was already the largest negative.
>
> On a related note, I can't interrupt this, e.g. Ctrl-C.
>
> printf '%-92233720368547758q.\n' foo
>
That's interesting, since the fieldwidth (and precision) end up getting
set to 0 if they overflow INT_MAX, at least on my machine, and the result
is more or less instantaneous. I agree that bash should do the same
thing in printstr when presented with an overflowing field width that it
does when using getint(). I will look at making that change.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
- Re: Built-in printf Sits Awkwardly with UDP., (continued)
- Re: Built-in printf Sits Awkwardly with UDP., Sven Mascheck, 2011/07/18
- Re: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/18
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/18
- Re: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/19
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/19
- Re: Built-in printf Sits Awkwardly with UDP., Bob Proulx, 2011/07/19
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/20
- Re: Built-in printf Sits Awkwardly with UDP., Eric Blake, 2011/07/20
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/20
- Message not available
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/22
- Re: Built-in printf Sits Awkwardly with UDP.,
Chet Ramey <=
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/25
- Re: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/25
- Re: bug#9129: Built-in printf Sits Awkwardly with UDP., Jim Meyering, 2011/07/22
- Re: bug#9129: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/22
- Re: bug#9129: Built-in printf Sits Awkwardly with UDP., Chet Ramey, 2011/07/24
- Re: Built-in printf Sits Awkwardly with UDP., Andre Majorel, 2011/07/21
- Re: Built-in printf Sits Awkwardly with UDP., Ben Pfaff, 2011/07/21
- Message not available
- Re: Built-in printf Sits Awkwardly with UDP., Ralph Corderoy, 2011/07/22