.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $OpenBSD: basename.3,v 1.12 2000/04/18 03:01:25 aaron Exp $
-.\" $FreeBSD: src/lib/libc/gen/basename.3,v 1.6 2002/12/18 13:33:02 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/basename.3,v 1.7 2004/07/02 23:52:10 ru Exp $
.\"
.Dd August 17, 1997
.Dt BASENAME 3
.Sh SYNOPSIS
.In libgen.h
.Ft char *
-.Fn basename "const char *path"
+.Fo basename
+.Fa "char *path"
+.Fc
.Sh DESCRIPTION
The
.Fn basename
The
.Fn basename
function
-returns a pointer to internal static storage space that will be overwritten
-by subsequent calls.
+returns a pointer to internal static storage space
+that will be overwritten by subsequent calls.
+The function may modify the string pointed to by
+.Fa path .
+.Sh LEGACY SYNOPSIS
+.Fd #include <libgen.h>
+.Pp
+.Ft char *
+.br
+.Fo basename
+.Fa "const char *path"
+.Fc ;
+.Pp
+In legacy mode,
+.Fa path
+will not be changed.
.Sh SEE ALSO
.Xr basename 1 ,
.Xr dirname 1 ,
-.Xr dirname 3
+.Xr dirname 3 ,
+.Xr compat 5
.Sh STANDARDS
The
.Fn basename
and
.Fx 4.2 .
.Sh AUTHORS
-Todd C. Miller <Todd.Miller@courtesan.com>
+.An "Todd C. Miller" Aq Todd.Miller@courtesan.com