1 .\" Copyright (c) [year] [your name]
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" Note: The date here should be updated whenever a non-trivial
27 .\" change is made to the manual page.
33 .Nd "example library function manual page"
35 .\" Note: list of available libraries is available in mdoc(7)
40 .Fn example "char *ptr" "int mode"
42 This is an example library function manual page for the
45 It is intended that this example can be used as a template
46 when writing a new manual page.
50 function takes two arguments:
56 may have one of the following values:
57 .Bl -tag -width ".Dv EXAMPLE_ONE"
59 First example of a defined variable.
66 The above values are defined in
73 .Sh IMPLEMENTATION NOTES
76 function is not actually implemented.
82 library function ignores the
86 .Bl -tag -width ".Pa /dev/null" -compact
88 Example of a file in the
97 function has no known compatibility issues.
99 .\" Delete any errno's that are not returned by your
100 .\" function or system call and then tailor the
101 .\" remaining text as needed.
104 function will fail if:
107 Operation not permitted.
109 No such file or directory.
113 Interrupted system call.
117 Device not configured.
119 Argument list too long.
127 Resource deadlock avoided.
129 Cannot allocate memory.
135 Block device required.
143 Operation not supported by device.
151 Too many open files in system.
155 Inappropriate ioctl for device.
161 No space left on device.
165 Read-only file system.
171 Numerical argument out of domain.
175 Resource temporarily unavailable.
176 .It Bq Er EWOULDBLOCK
177 Operation would block.
178 .It Bq Er EINPROGRESS
179 Operation now in progress.
181 Operation already in progress.
183 Socket operation on non-socket.
184 .It Bq Er EDESTADDRREQ
185 Destination address required.
189 Protocol wrong type for socket.
190 .It Bq Er ENOPROTOOPT
191 Protocol not available.
192 .It Bq Er EPROTONOSUPPORT
193 Protocol not supported.
194 .It Bq Er ESOCKTNOSUPPORT
195 Socket type not supported.
197 Operation not supported.
198 .It Bq Er EPFNOSUPPORT
199 Protocol family not supported.
200 .It Bq Er EAFNOSUPPORT
201 Address family not supported by protocol family.
203 Address already in use.
204 .It Bq Er EADDRNOTAVAIL
205 Cannot assign requested address.
208 .It Bq Er ENETUNREACH
209 Network is unreachable.
211 Network dropped connection on reset.
212 .It Bq Er ECONNABORTED
213 Software causes connection abort.
215 No buffer space available.
217 Socket is already connected.
219 Socket is not connected.
221 Cannot send after socket shutdown.
222 .It Bq Er ETOOMANYREFS
223 Too many references: cannot splice.
226 .It Bq Er ECONNREFUSED
229 Too many levels of symbolic links.
230 .It Bq Er ENAMETOOLONG
234 .It Bq Er EHOSTUNREACH
245 Stale NFS file handle.
247 Too many levels of remote in path.
250 .It Bq Er ERPCMISMATCH
252 .It Bq Er EPROGUNAVAIL
253 RPC program not available.
254 .It Bq Er EPROGMISMATCH
255 Program version wrong.
256 .It Bq Er EPROCUNAVAIL
257 Bad procedure for program.
261 Function not implemented.
263 Inappropriate file type or format.
265 Authentication error.
271 No message of desired type.
273 Value too large to be stored in data type.
277 Illegal byte sequence.
290 .%T "Example RFC Title"
295 .%B "Example Book Title"
296 .%O ISBN-0-000-00000-0
301 .%J "Example Journal Name"
302 .%T "Example Article Title"
305 If the function conforms to some standard, such as
309 it should be noted here.
313 manual page example first appeared in
318 section examples are:
322 manual page example first appeared in
327 manual page example first appeared in
331 manual page was written by
332 .An Mike Pritchard Aq Mt mpp@FreeBSD.org .
334 The actual code for this function is vaporware.