Minor rewordings of previous fix

This commit is contained in:
Michael Kerrisk 2007-04-03 09:56:33 +00:00
parent 538d54d9e9
commit 4fd481a37b
1 changed files with 11 additions and 11 deletions

View File

@ -21,7 +21,7 @@
.\" .\"
.TH DIRNAME 3 2000-12-14 "GNU" "Linux Programmer's Manual" .TH DIRNAME 3 2000-12-14 "GNU" "Linux Programmer's Manual"
.SH NAME .SH NAME
dirname, basename \- Parse pathname components dirname, basename \- parse pathname components
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.B #include <libgen.h> .B #include <libgen.h>
@ -83,17 +83,17 @@ and
.BR basename () .BR basename ()
may modify the contents of may modify the contents of
.IR path , .IR path ,
so a copy should be passed when calling one of these functions. so it may be desirable to pass a copy when calling one of
(Because either function may return a pointer to some part of these functions.
.IR path , .PP
the copy should not be freed until the pointer returned by These functions may return pointers to statically allocated memory
the function is no longer required.)
Furthermore,
.BR dirname ()
and
.BR basename ()
may return pointers to statically allocated memory
which may be overwritten by subsequent calls. which may be overwritten by subsequent calls.
Alternatively, they may return a pointer to some part of
.IR path ,
so that the string referred to by
.I path
should not be modified or freed until the pointer returned by
the function is no longer required.
.PP .PP
The following list of examples (taken from SUSv2) The following list of examples (taken from SUSv2)
shows the strings returned by shows the strings returned by