Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Nov 1998 08:51:55 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        obrien@NUXI.com
Cc:        current@FreeBSD.ORG
Subject:   Re: snprintf() in the kernel
Message-ID:  <199811201651.IAA18059@vashon.polstra.com>
In-Reply-To: <19981119203050.A4033@nuxi.com>
References:  <19981120093817.K467@freebie.lemis.com> <199811200057.QAA29023@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <19981119203050.A4033@nuxi.com>,
David O'Brien <obrien@NUXI.com> wrote:
> > The only subtle gotcha with snprintf() is that it returns
> > the number of characters that *would* have been printed,
> > not the number that actually were printed. 
> 
> So, create a new function called ksprintf() that has the calling semantics
> of sprintf(), but the return semantics you like.

Too confusing.  Either make it act exactly like snprintf() (or at
least a subset), or give it a dissimilar name.

Extra much so, since there's unlikely to be a man page for the new
function.

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Nobody ever went broke underestimating the taste of the American public."
                                                            -- H. L. Mencken

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811201651.IAA18059>