Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] patch: zstrncpy() (PR#112)
Home

Re: [Freeciv-Dev] patch: zstrncpy() (PR#112)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jazepeda@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Freeciv-Dev] patch: zstrncpy() (PR#112)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 26 Aug 1999 11:55:21 +1000 (EST)

Alex Zepeda wrote:
> On Wed, 25 Aug 1999, David Pfitzner wrote:

> >  * zstrncpy():
> >  *
> >  * Like strncpy(), but with some features to make it easier to
> >  * keep strings null-terminated.  In particular, always writes
> >  * a terminating null, including when input is longer than n.
> 
> Have you seen strlcpy and strlcat?

Thanks, strlcpy looks like just what I was wanting.  :-)

(The only real difference looks like they made a slightly 
different decision on the return value if src is too long.)

-- David

[Prev in Thread] Current Thread [Next in Thread]