From owner-freebsd-hackers Thu Jul 15 17:49:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from aurora.sol.net (aurora.sol.net [206.55.65.76]) by hub.freebsd.org (Postfix) with ESMTP id EC39A15557 for ; Thu, 15 Jul 1999 17:49:54 -0700 (PDT) (envelope-from jgreco@aurora.sol.net) Received: (from jgreco@localhost) by aurora.sol.net (8.9.2/8.9.2/SNNS-1.02) id TAA21505; Thu, 15 Jul 1999 19:48:23 -0500 (CDT) From: Joe Greco Message-Id: <199907160048.TAA21505@aurora.sol.net> Subject: Re: OpenBSD's strlcpy(3) and strlcat(3) In-Reply-To: <199907160014.RAA01977_dingo.cdrom.com@ns.sol.net> from Mike Smith at "Jul 16, 1999 0:22:40 am" To: mike@smith.net.au (Mike Smith) Date: Thu, 15 Jul 1999 19:48:23 -0500 (CDT) Cc: julian@whistle.com, hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > but what about > > > > While ( more data items) > > { > > copy data items onto end of buffer > > if full{ > > write out buffer > > clear buffer, copy in rest of last item. > > } > > } > > > > > > I'd certainly not want to use xxprintf() for that > > This is what stdio does, funnily enough. See fwrite() etc. I do like the idea of these functions... just ran into a problem a day or two ago which would be completely awful to do with *printf, since it involved assembling a line of text through two functions and a for() loop... I thought briefly about trying to do it with strncat but I gagged a bit at the obtuse way it would have needed to have been done. ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/342-4847 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message