www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/08/23/14:34:15

Date: Sun, 23 Aug 1998 14:34:09 -0400 (EDT)
Message-Id: <199808231834.OAA10438@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: robert DOT hoehne AT gmx DOT net
CC: djgpp-workers AT delorie DOT com
In-reply-to: <35DFED7B.6AC8212D@gmx.net> (message from Robert Hoehne on Sun,
23 Aug 1998 10:22:51 +0000)
Subject: Re: Bug in crt1.c (alpha 980712)

> I don't know if the current behaviour is correct, but after looking
> in the sources, I found, that strncpy copies _ALWAYS_ as many
> characters as given in the third argument.

This is correct.  strncpy always stores exactly N characters in the
destination, regardless of the source.  Its purpose in life is to fill
in fixed-width fields.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019