(0001394)
Don Cragun (manager)
2012-10-10 14:52
edited on: 2012-10-31 16:24
|
To fix the problem reported in this bug:
Change the last sentence of the first paragraph of the dirname
DESCRIPTION on P725, L24372-24373 from:
Trailing ’/’ characters in the path are not counted as part of the
path. to:Trailing ’/’ characters in the path that are not also leading '/'
characters shall not be counted as part of the path.
To more closely align the descriptions of baseame() and dirname():
Add a new paragraph in the dirname() DESCRIPTION section after P725,
L24375:
The dirname() function may modify the string pointed to by path, and may
return a pointer to static storage that may then be overwritten by a
subsequent call to dirname().
To make it obvious that the basename() and dirname() functions and the
basename and dirname utilities are closely related, make the following
additions and changes to EXAMPLES and SEE ALSO sections:
Change P614, L20996-21004 in the basename() EXAMPLES section from:
Sample Input and Output Strings for basename()
In the following table, the input string is the value pointed to by
path, and the output string is the return value of the basename()
function.
Input String Output String
============== =============
"/usr/lib" "lib"
"/usr/" "usr"
"/" "/"
"///" "/"
"//usr//lib//" "lib"
to:
Sample Input and Output Strings for the basename() and dirname()
functions and the basename and dirname utilities
In the following table, the input string is the value pointed to by
path, and the output string is the return value of the basename()
function.
output output
basename written written
basename() and string string and dirname by by
dirname() functions returned by returned by utilities basename dirname
path argument basename() dirname() string operand utility utility
================== =========== ============ ================ ======== ==========
"usr" "usr" "." usr usr
.
"usr/" "usr" "." usr/ usr
.
"" "." "." "" NOTE
.
"/" "/" "/" / /
/
"//" "/" or "//" "/" or "//" // / or //
/ or //
"///" "/" "/" /// /
/
"/usr/" "usr" "/" /usr/ usr
/
"/usr/lib" "lib" "/usr" /usr/lib lib
/usr
"//usr//lib//" "lib" "//usr" //usr//lib// lib
//usr
"/home//dwc//test" "test" "/home//dwc" /home//dwc//test test
/home//dwc
Note to the editor: Change "NOTE" in the above table to ". or empty string" split into multiple lines if needed under the heading "output written by basename utility".
Change the "Sample Input and Output Strings for dirname()" example in
the dirname() EXAMPLES on P726, L24404-24413 to:
The EXAMPLES section of the basename() function (see XREF basename()
EXAMPLES section on page XXX) includes a table showing examples of the
results of processing several sample pathnames by the basename() and
dirname() functions and by the basename and dirname utilities.
Add a new paragraph at the end of the basename utility's EXAMPLES
section after P2465, L78660:
The EXAMPLES section of the basename() function (see XREF to XSH
basename() EXAMPLES section) includes a table showing examples of the
results of processing several sample pathnames by the basename() and
dirname() functions and by the basename and dirname utilities.
Add a new paragraph at the end of the basename utility's SEE ALSO section after P2466, L78676:
XSH basename(),
Change the table in the dirname utility's EXAMPLES section on P2609,
L84125-84135 to:
The EXAMPLES section of the basename() function (see XREF to XSH
basename() EXAMPLES section) includes a table showing examples of the
results of processing several sample pathnames by the basename() and
dirname() functions and by the basename and dirname utilities.
Add a new paragraph to the end of the dirname utility's SEE ALSO section after P2610, L84154:
XSH dirname()
|