libpathconv: Fix mandoc warnings in abs2rel(3) and rel2abs(3)
- cannot parse date, using it verbatim: Dec 15, 1997" - sections out of conventional order: Sh SEE ALSO - possible typo in section name: Sh EXAMPLE instead of EXAMPLES - AUTHORS section without An macro MFC after: 3 days
This commit is contained in:
parent
cd33039749
commit
094517119c
@ -25,7 +25,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd Dec 15, 1997"
|
.Dd December 15, 1997
|
||||||
.Dt ABS2REL 3
|
.Dt ABS2REL 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -60,6 +60,23 @@ function returns relative path name on success.
|
|||||||
If an error occurs,
|
If an error occurs,
|
||||||
it returns
|
it returns
|
||||||
.Dv NULL .
|
.Dv NULL .
|
||||||
|
.Sh EXAMPLES
|
||||||
|
char result[MAXPATHLEN];
|
||||||
|
char *path = abs2rel("/usr/src/sys", "/usr/local/lib", result, MAXPATHLEN);
|
||||||
|
|
||||||
|
yields:
|
||||||
|
|
||||||
|
path == "../../src/sys"
|
||||||
|
|
||||||
|
Similarly,
|
||||||
|
|
||||||
|
path1 = abs2rel("/usr/src/sys", "/usr", result, MAXPATHLEN);
|
||||||
|
path2 = abs2rel("/usr/src/sys", "/usr/src/sys", result, MAXPATHLEN);
|
||||||
|
|
||||||
|
yields:
|
||||||
|
|
||||||
|
path1 == "src/sys"
|
||||||
|
path2 == "."
|
||||||
.Sh ERRORS
|
.Sh ERRORS
|
||||||
The
|
The
|
||||||
.Fn abs2rel
|
.Fn abs2rel
|
||||||
@ -77,24 +94,11 @@ argument is zero.
|
|||||||
The
|
The
|
||||||
.Fa size
|
.Fa size
|
||||||
argument is greater than zero but smaller than the length of the pathname plus 1.
|
argument is greater than zero but smaller than the length of the pathname plus 1.
|
||||||
.Sh EXAMPLE
|
|
||||||
char result[MAXPATHLEN];
|
|
||||||
char *path = abs2rel("/usr/src/sys", "/usr/local/lib", result, MAXPATHLEN);
|
|
||||||
|
|
||||||
yields:
|
|
||||||
|
|
||||||
path == "../../src/sys"
|
|
||||||
|
|
||||||
Similarly,
|
|
||||||
|
|
||||||
path1 = abs2rel("/usr/src/sys", "/usr", result, MAXPATHLEN);
|
|
||||||
path2 = abs2rel("/usr/src/sys", "/usr/src/sys", result, MAXPATHLEN);
|
|
||||||
|
|
||||||
yields:
|
|
||||||
|
|
||||||
path1 == "src/sys"
|
|
||||||
path2 == "."
|
|
||||||
|
|
||||||
|
.Sh SEE ALSO
|
||||||
|
.Xr rel2abs 3
|
||||||
|
.Sh AUTHORS
|
||||||
|
.An Shigio Yamaguchi (shigio@tamacom.com)
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
If the
|
If the
|
||||||
.Fa base
|
.Fa base
|
||||||
@ -130,7 +134,3 @@ The
|
|||||||
function assures correct result, but don't forget that
|
function assures correct result, but don't forget that
|
||||||
.Fn realpath
|
.Fn realpath
|
||||||
requires that all but the last component of the path exist.
|
requires that all but the last component of the path exist.
|
||||||
.Sh "SEE ALSO"
|
|
||||||
.Xr rel2abs 3
|
|
||||||
.Sh AUTHORS
|
|
||||||
Shigio Yamaguchi (shigio@tamacom.com)
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd Dec 3, 1997"
|
.Dd December 3, 1997
|
||||||
.Dt REL2ABS 3
|
.Dt REL2ABS 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -58,6 +58,23 @@ The
|
|||||||
function returns absolute path name on success.
|
function returns absolute path name on success.
|
||||||
If an error occurs, it returns
|
If an error occurs, it returns
|
||||||
.Dv NULL .
|
.Dv NULL .
|
||||||
|
.Sh EXAMPLES
|
||||||
|
char result[MAXPATHLEN];
|
||||||
|
char *path = rel2abs("../../src/sys", "/usr/local/lib", result, MAXPATHLEN);
|
||||||
|
|
||||||
|
yields:
|
||||||
|
|
||||||
|
path == "/usr/src/sys"
|
||||||
|
|
||||||
|
Similarly,
|
||||||
|
|
||||||
|
path1 = rel2abs("src/sys", "/usr", result, MAXPATHLEN);
|
||||||
|
path2 = rel2abs(".", "/usr/src/sys", result, MAXPATHLEN);
|
||||||
|
|
||||||
|
yields:
|
||||||
|
|
||||||
|
path1 == "/usr/src/sys"
|
||||||
|
path2 == "/usr/src/sys"
|
||||||
.Sh ERRORS
|
.Sh ERRORS
|
||||||
The
|
The
|
||||||
.Fn rel2abs
|
.Fn rel2abs
|
||||||
@ -75,24 +92,7 @@ argument is zero.
|
|||||||
The
|
The
|
||||||
.Fa size
|
.Fa size
|
||||||
argument is greater than zero but smaller than the length of the pathname plus 1
|
argument is greater than zero but smaller than the length of the pathname plus 1
|
||||||
.Sh EXAMPLE
|
.Sh SEE ALSO
|
||||||
char result[MAXPATHLEN];
|
|
||||||
char *path = rel2abs("../../src/sys", "/usr/local/lib", result, MAXPATHLEN);
|
|
||||||
|
|
||||||
yields:
|
|
||||||
|
|
||||||
path == "/usr/src/sys"
|
|
||||||
|
|
||||||
Similarly,
|
|
||||||
|
|
||||||
path1 = rel2abs("src/sys", "/usr", result, MAXPATHLEN);
|
|
||||||
path2 = rel2abs(".", "/usr/src/sys", result, MAXPATHLEN);
|
|
||||||
|
|
||||||
yields:
|
|
||||||
|
|
||||||
path1 == "/usr/src/sys"
|
|
||||||
path2 == "/usr/src/sys"
|
|
||||||
.Sh "SEE ALSO"
|
|
||||||
.Xr abs2rel 3
|
.Xr abs2rel 3
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
Shigio Yamaguchi (shigio@tamacom.com)
|
.An Shigio Yamaguchi (shigio@tamacom.com)
|
||||||
|
Loading…
Reference in New Issue
Block a user