On Wed, Nov 11, 2009 at 09:41:29PM -0500, Chet Ramey wrote:
If your version of vsnprintf doesn't behave like that, I claim it's a
bug. The Posix and C standards explicitly allow the buffer to be NULL
if the size argument is 0, and guarantee that no data will be written
in this case.
Thanks
Greg Wooledge wool...@eeg.ccf.org writes:
It doesn't mention a null pointer. The OpenBSD man page does explicitly
say the null pointer is allowed if size is zero. The GNU/Linux man page
says that SUSv2 and C99 disagree, but that the implementation follows
C99 (allowing the null pointer when
what's the rasonable limit in using this compact contruct, after which
the for (( i=0; i1000...; i++ )) became better?
Antonio Macchi wrote:
what's the rasonable limit in using this compact contruct, after which
the for (( i=0; i1000...; i++ )) became better?
You didn't even bother trying eh?
$ for i in {0..10}; do echo $i/dev/null; done
bash: xmalloc: ../../../bash/lib/sh/stringvec.c:40: cannot
I'm on error, I know... but, in your bash-ref guide you don't explain a
lot printf
and in man printf don't do it too...
from man printf
-
NOTE: your shell may have its own version of printf, which usually
supersedes the version described here. Please refer to your
Antonio Macchi wrote:
I'm on error, I know... but, in your bash-ref guide you don't explain a
lot printf
and in man printf don't do it too...
from man printf
-
NOTE: your shell may have its own version of printf, which usually
supersedes the version
Antonio Macchi wrote:
I'm on error, I know... but, in your bash-ref guide you don't explain a
lot printf
and in man printf don't do it too...
http://www.opengroup.org/onlinepubs/9699919799/utilities/printf.html#tag_20_94
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
http://www.opengroup.org/onlinepubs/9699919799/utilities/printf.html#tag_20_94
(ouch!)
ok!
thanks!
Andreas Schwab wrote:
Greg Wooledge wool...@eeg.ccf.org writes:
It doesn't mention a null pointer. The OpenBSD man page does explicitly
say the null pointer is allowed if size is zero. The GNU/Linux man page
says that SUSv2 and C99 disagree, but that the implementation follows
C99
Antonio Macchi schrieb:
what's the rasonable limit in using this compact contruct, after which
the for (( i=0; i1000...; i++ )) became better?
Hardware/OS limits.
J.
On Thu, Nov 12, 2009 at 02:37:58PM -0500, Chet Ramey wrote:
I try to write to the current (well, ten-year-old) standards. The
replacement in lib/sh/snprintf.c behaves as C99 specifies; you might try
using it by #undefing HAVE_VSNPRINTF and HAVE_SNPRINTF in config.h.
Ah, wonderful. I wasted a
11 matches
Mail list logo