From owner-freebsd-current Thu Nov 19 20:42:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA10995 for freebsd-current-outgoing; Thu, 19 Nov 1998 20:42:46 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA10990 for ; Thu, 19 Nov 1998 20:42:45 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id UAA24366; Thu, 19 Nov 1998 20:41:42 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma024362; Thu, 19 Nov 98 20:41:41 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id UAA18801; Thu, 19 Nov 1998 20:41:40 -0800 (PST) From: Archie Cobbs Message-Id: <199811200441.UAA18801@bubba.whistle.com> Subject: Re: snprintf() in the kernel In-Reply-To: <19981119203050.A4033@nuxi.com> from David O'Brien at "Nov 19, 98 08:30:50 pm" To: obrien@NUXI.com Date: Thu, 19 Nov 1998 20:41:40 -0800 (PST) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David O'Brien writes: > > 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. I don't have a problem with it.. I'm just pointing that out so people don't make the wrong assumption (I found out the hard way once :-) -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message