Sun Jan 4 09:42:43 2009 UTC ()
Fix HTML output.


(wiz)
diff -r1.19 -r1.20 src/lib/libc/gen/setmode.3

cvs diff -r1.19 -r1.20 src/lib/libc/gen/setmode.3 (expand / switch to unified diff)

--- src/lib/libc/gen/setmode.3 2009/01/04 07:54:15 1.19
+++ src/lib/libc/gen/setmode.3 2009/01/04 09:42:43 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: setmode.3,v 1.19 2009/01/04 07:54:15 dholland Exp $ 1.\" $NetBSD: setmode.3,v 1.20 2009/01/04 09:42:43 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1989, 1991, 1993 3.\" Copyright (c) 1989, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -90,27 +90,27 @@ If the mode passed to @@ -90,27 +90,27 @@ If the mode passed to
90is invalid, 90is invalid,
91.Fn setmode 91.Fn setmode
92returns 92returns
93.Dv NULL . 93.Dv NULL .
94.Sh EXAMPLES 94.Sh EXAMPLES
95The effects of the shell command 95The effects of the shell command
96.Ql "chmod a+x myscript.sh" 96.Ql "chmod a+x myscript.sh"
97can be duplicated as follows: 97can be duplicated as follows:
98.Bd -literal -offset indent 98.Bd -literal -offset indent
99const char *file = "myscript.sh"; 99const char *file = "myscript.sh";
100struct stat st; 100struct stat st;
101mode_t newmode; 101mode_t newmode;
102 102
103stat(file, &st); 103stat(file, \*[Am]st);
104newmode = getmode(setmode("a+x"), st.st_mode); 104newmode = getmode(setmode("a+x"), st.st_mode);
105chmod(file, newmode); 105chmod(file, newmode);
106.Ed 106.Ed
107.Sh ERRORS 107.Sh ERRORS
108The 108The
109.Fn setmode 109.Fn setmode
110function 110function
111may fail and set 111may fail and set
112.Va errno 112.Va errno
113for any of the errors specified for the library routines 113for any of the errors specified for the library routines
114.Xr malloc 3 114.Xr malloc 3
115or 115or
116.Xr strtol 3 . 116.Xr strtol 3 .