Date: 02 Sep 2003 14:33:23 +0200 Message-Id: From: Eli Zaretskii To: "Melvin Curran" CC: djgpp-workers AT delorie DOT com In-reply-to: (Melvin AT HME DOT Ltd DOT uk) Subject: Re: Non-compliant strxfrm References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Tue, 2 Sep 2003 09:37:41 +0100 > From: "Melvin Curran" > > The only thing bothering me now is the the statement in the standard > that says "If n is zero, dst is permitted to be a null pointer." > Does this imply that if n isn't zero then dst must point to something? It implies that if n is zero, the function's code _must_not_ dereference dst. Otherwise, it _can_ dereference dst, and if it does, what follows depends on the underlying OS and runtime environment; on most systems (including DJGPP), the program will crash and burn. In other words, if n is not zero, you get the same as what you get with other string functions, like strcpy, if one of its arguments is a NULL pointer.