Re: [PATCH 2/8] kern: add snprintf

2014-02-01 Thread Samuel Thibault
Justus Winter, le Sat 01 Feb 2014 15:09:22 +0100, a écrit : > * kern/printf.c (snprintf): New function. > * kern/printf.h (snprintf): New declaration. Ack. > --- > kern/printf.c | 10 ++ > kern/printf.h | 1 + > 2 files changed, 11 insertions(+) > > diff --gi

[PATCH 2/8] kern: add snprintf

2014-02-01 Thread Justus Winter
* kern/printf.c (snprintf): New function. * kern/printf.h (snprintf): New declaration. --- kern/printf.c | 10 ++ kern/printf.h | 1 + 2 files changed, 11 insertions(+) diff --git a/kern/printf.c b/kern/printf.c index af59d5a..ea78d48 100644 --- a/kern/printf.c +++ b/kern/printf.c

Re: snprintf

2001-11-29 Thread Marcus Brinkmann
On Wed, Nov 28, 2001 at 06:27:31PM -0800, James Morrison wrote: > This same code on GNU/Hurd with stdio sets limited[0] to '\0' > but does not touch any other characters. snprintf returns 5 > on GNU/Hurd as well. It's a bug in stdio. Please debug and fix it. Ma

Re: snprintf

2001-11-29 Thread Andreas Schwab
James Morrison <[EMAIL PROTECTED]> writes: |> Hello, |> I've noticed that on GNU/Hurd snprintf doesn't work if |> the expanded template exceeds the size given. |> |> eg |> char limited[5]; |> snprintf(limited,5,"12345"

snprintf

2001-11-28 Thread James Morrison
Hello, I've noticed that on GNU/Hurd snprintf doesn't work if the expanded template exceeds the size given. eg char limited[5]; snprintf(limited,5,"12345"); On GNU/Linux with libio snprintf sets limited to "1234" and returns 5. This sa