From 0a13c9e9defc771d8b101672f018b1b2de6b9e0e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Dec 2015 08:17:18 -0800 Subject: Split large string section; add truncation advice * manual/examples/strncat.c: Remove. This example was misleading, as the code would have undefined behavior if "hello" was longer than SIZE. Anyway, the manual shouldn't encourage strncpy+strncat for this sort of thing. * manual/string.texi (Copying Strings and Arrays): Split into three sections Copying Strings and Arrays, Concatenating Strings, and Truncating Strings, as this section was way too long. All cross-referenced changed. Add advice about string-truncation functions. Remove misleading strncat example. --- manual/memory.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manual/memory.texi') diff --git a/manual/memory.texi b/manual/memory.texi index cea2cd7ba7..700555ed46 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -547,7 +547,7 @@ The contents of the block are undefined; you must initialize it yourself Normally you would cast the value as a pointer to the kind of object that you want to store in the block. Here we show an example of doing so, and of initializing the space with zeros using the library function -@code{memset} (@pxref{Copying and Concatenation}): +@code{memset} (@pxref{Copying Strings and Arrays}): @smallexample struct foo *ptr; -- cgit v1.2.3