Re: c equivilant to "copy"

From: bd (bdonlan_at_gmail.com)
Date: 01/17/05


Date: Mon, 17 Jan 2005 14:47:30 -0500


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

CBFalconer wrote:

[snip]
> However you will get better and safer results by using strlcpy (and
> strlcat) as proposed by the BSD group. You can find an
> implementation, justification, and description at:
>
> <http://cbfalconer.home.att.net/download/strlcpy.zip>
>

Until this becomes standard one must not use it in ANSI/ISO C comforming
programs, as it intrudes upon the str*() namespace.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFB7BZS+hz2VlChukwRAkV4AJ9RSs/cdfx1vwnw9t64mGo6k3HYswCfYcdk
n+A4IQXI6M/7M66UM7ggeuE=
=bL30
-----END PGP SIGNATURE-----



Relevant Pages

  • Re: c equivilant to "copy"
    ... >> However you will get better and safer results by using strlcpy ... >> (and strlcat) as proposed by the BSD group. ... the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)
  • Re: Safer and Better C
    ... The recent reply to use strlcpy and strlcat showed ... more widely available (FreeBSD's snprintf() is one such implementation, ... fair with and generally fit in well amongst the wider body of C code. ...
    (comp.lang.c)
  • Re: Safer and Better C
    ... >> strlcpy() and strlcatare fairly unique in that they're additions ... >> which play fair with and generally fit in well amongst the wider ... Using fancy libraries can often create more ... strlcat() code in many of my projects. ...
    (comp.lang.c)
  • Re: How to learn C ?
    ... Look up strlcpy and strlcat. ... Either extensions are topical here or they aren't. ... provided we give a reference URL? ...
    (comp.lang.c)
  • Re: How to learn C ?
    ... Look up strlcpy and strlcat. ... Either extensions are topical here or they aren't. ... provided we give a reference URL? ...
    (comp.lang.c)