diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-12-10 08:17:18 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-12-10 08:29:30 -0800 |
commit | 0a13c9e9defc771d8b101672f018b1b2de6b9e0e (patch) | |
tree | 5c55ceb3c7b77d29a52486bf71f0c9769a4ccde3 /manual/locale.texi | |
parent | d4e301c5c65393837e438b6d81feabfbfde7b9c7 (diff) | |
download | glibc-0a13c9e9defc771d8b101672f018b1b2de6b9e0e.tar.gz glibc-0a13c9e9defc771d8b101672f018b1b2de6b9e0e.tar.xz glibc-0a13c9e9defc771d8b101672f018b1b2de6b9e0e.zip |
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.
Diffstat (limited to 'manual/locale.texi')
-rw-r--r-- | manual/locale.texi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/manual/locale.texi b/manual/locale.texi index ee1c3a1201..1828500331 100644 --- a/manual/locale.texi +++ b/manual/locale.texi @@ -374,8 +374,8 @@ a null pointer as the @var{locale} argument. In this case, currently selected for category @var{category}. The string returned by @code{setlocale} can be overwritten by subsequent -calls, so you should make a copy of the string (@pxref{Copying and -Concatenation}) if you want to save it past any further calls to +calls, so you should make a copy of the string (@pxref{Copying Strings +and Arrays}) if you want to save it past any further calls to @code{setlocale}. (The standard library is guaranteed never to call @code{setlocale} itself.) |