Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 1999 19:48:23 -0500 (CDT)
From:      Joe Greco <jgreco@ns.sol.net>
To:        mike@smith.net.au (Mike Smith)
Cc:        julian@whistle.com, hackers@freebsd.org
Subject:   Re: OpenBSD's strlcpy(3) and strlcat(3)
Message-ID:  <199907160048.TAA21505@aurora.sol.net>
In-Reply-To: <199907160014.RAA01977_dingo.cdrom.com@ns.sol.net> from Mike Smith at "Jul 16, 1999  0:22:40 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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




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