[openbeos] Re: strlcpy in string.h

  • From: Mat Hounsell <mat_geek@xxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Wed, 28 Jan 2004 14:42:20 +1100 (EST)

I get the digest so this might be answered.

> I got annoyed by watching the syslog_daemon build failing ...  It turns out
that strlcpy is actually a really good thing, more efficient than strncpy and
also more secure.  ...  I realized that I  could implement a simple macro ... 
> ...  Then I noticed, hey! we already have a strlcpy proto in string.h ... 
> ... it's correct according to some man pages out there.  ...
> What should we do about these?  ... 

If a function is not in the library, but its prototype is, it is a temporary
solution to add the implementation to the application code. The code can then
be removed later when the libraries code is tested and ready.

strlcpy is not a great example but other function are more trouble, like 
is_image_of_legal_currency ;) (See Slashdot).


http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.

Other related posts: