From owner-freebsd-current Thu Nov 19 20:31:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA09133 for freebsd-current-outgoing; Thu, 19 Nov 1998 20:31:24 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [128.120.56.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA09128 for ; Thu, 19 Nov 1998 20:31:23 -0800 (PST) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by relay.nuxi.com (8.9.1/8.9.1) id UAA04139; Thu, 19 Nov 1998 20:30:50 -0800 (PST) (envelope-from obrien) Message-ID: <19981119203050.A4033@nuxi.com> Date: Thu, 19 Nov 1998 20:30:50 -0800 From: "David O'Brien" To: Archie Cobbs Cc: freebsd-current@FreeBSD.ORG Subject: Re: snprintf() in the kernel Reply-To: obrien@NUXI.com References: <19981120093817.K467@freebie.lemis.com> <199811200057.QAA29023@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199811200057.QAA29023@bubba.whistle.com>; from Archie Cobbs on Thu, Nov 19, 1998 at 04:57:47PM -0800 X-Operating-System: FreeBSD 3.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. -- -- David (obrien@NUXI.ucdavis.edu -or- obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message