dirname.3.patch   [plain text]


--- dirname.3	2004-11-25 11:38:00.000000000 -0800
+++ dirname.3.edit	2006-07-12 11:18:01.000000000 -0700
@@ -36,7 +36,9 @@
 .Sh SYNOPSIS
 .In libgen.h
 .Ft char *
-.Fn dirname "const char *path"
+.Fo dirname
+.Fa "char *path"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn dirname
@@ -88,12 +90,25 @@
 .Fn dirname
 may modify the contents of the string passed to
 .Fn dirname ;
-this should be taken into account when writing code which calls this function
-if portability is desired.
+if portability is desired,
+this should be taken into account when writing code which calls this function.
+.Sh LEGACY SYNOPSIS
+.Fd #include <libgen.h>
+.Pp
+.Ft char *
+.br
+.Fo dirname
+.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 basename 3
+.Xr basename 3 ,
+.Xr compat 5
 .Sh STANDARDS
 The
 .Fn dirname