example.3 (c13b19be64e4516f29da6154371b2dedfd2939be) example.3 (81fba91b52ba48715f76b37439681f7f66001a9e)
1.\" Copyright (c) [year]
2.\" [you name here]. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"
1.\" Copyright (c) [year]
2.\" [you name here]. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"
33.Dd "January 2, 1997"
33.\" Note: The date here should be updated whenever a non-trivial
34.\" change is made to the manual page.
35.Dd January 8, 1997
34.Dt EXAMPLE 3
35.\" Note: Only specify the operating system when the command
36.\" is FreeBSD specific, otherwise use the .Os macro with no
37.\" arguments.
38.Os FreeBSD 3.0
39.Sh NAME
40.Nm example
41.Nd example library function manual page

--- 34 unchanged lines hidden (view full) ---

76#define EXAMPLE_TWO 2
77.Ed
78.Sh RETURN VALUES
79A 0 value is returned if the operation succeeds,
80otherwise
81.Fn example
82returns -1 and the global variable
83.Va errno
36.Dt EXAMPLE 3
37.\" Note: Only specify the operating system when the command
38.\" is FreeBSD specific, otherwise use the .Os macro with no
39.\" arguments.
40.Os FreeBSD 3.0
41.Sh NAME
42.Nm example
43.Nd example library function manual page

--- 34 unchanged lines hidden (view full) ---

78#define EXAMPLE_TWO 2
79.Ed
80.Sh RETURN VALUES
81A 0 value is returned if the operation succeeds,
82otherwise
83.Fn example
84returns -1 and the global variable
85.Va errno
84indicates the reason for the falure.
86indicates the reason for the failure.
85.Sh ENVIRONMENT
86The
87.Fn example
88library function ignores the
89.Ev EXAMPLE
90environment variable.
91.Sh FILES
92.Bl -tag -width /dev/null -compact
93.It Pa /dev/null
94Example of a file in the
95.Sx FILES
96section.
97.El
98.Sh SEE ALSO
99.Xr example 1 ,
100.Xr example 4 ,
101.Xr mdoc 7 ,
102.Xr mdoc.samples 7
87.Sh ENVIRONMENT
88The
89.Fn example
90library function ignores the
91.Ev EXAMPLE
92environment variable.
93.Sh FILES
94.Bl -tag -width /dev/null -compact
95.It Pa /dev/null
96Example of a file in the
97.Sx FILES
98section.
99.El
100.Sh SEE ALSO
101.Xr example 1 ,
102.Xr example 4 ,
103.Xr mdoc 7 ,
104.Xr mdoc.samples 7
105.Rs
106.%A A. B. Author
107.%T Example RFC Title
108.%O RFC0000
109.Re
110.Rs
111.%A A. B. Author
112.%B Example Book Title
113.%O ISBN-0-000-00000-0
114.Re
115.Rs
116.%A A. B. Author
117.%D January 1997
118.%J Example Journal Name
119.%T Example Article Title
120.Re
103.Sh STANDARDS
104If the command conforms to some standard, such as
105.St -p1003.2
106or
107.St -ansiC ,
108it should be noted here.
109.Sh DIAGNOSTICS
110None.
111.Sh ERRORS
121.Sh STANDARDS
122If the command conforms to some standard, such as
123.St -p1003.2
124or
125.St -ansiC ,
126it should be noted here.
127.Sh DIAGNOSTICS
128None.
129.Sh ERRORS
130.\" Delete any errno's that are not returned by your
131.\" function or system call and then tailor the
132.\" remaining text as needed.
112.Fn Example
113will fail if:
114.Bl -tag -width Er
133.Fn Example
134will fail if:
135.Bl -tag -width Er
115.It Bq Er EINVAL
116One of the arguments passed to
117.Fn example
118was invalid.
119.It Bq Er EPERM
136.It Bq Er EPERM
120The caller did not have permission to
121use the
122.Fn example
123function.
137Operation not permitted.
138.It Bq Er ENOENT
139No such file or directory.
140.It Bq Er ESRCH
141No such process.
142.It Bq Er EINTR
143Interrupted system call.
144.It Bq Er EIO
145Input/output error.
146.It Bq Er ENXIO
147Device not configured.
148.It Bq Er E2BIG
149Argument list too long.
150.It Bq Er ENOEXEC
151Exec format error.
152.It Bq Er EBADF
153Bad file descriptor.
154.It Bq Er ECHILD
155No child processes.
156.It Bq Er EDEADLK
157Resource deadlock avoided.
158.It Bq Er ENOMEM
159Cannot allocate memory.
160.It Bq Er EACCES
161Permission denied.
162.It Bq Er EFAULT
163Bad address.
164.It Bq Er ENOTBLK
165Block device required.
166.It Bq Er EBUSY
167Device busy.
168.It Bq Er EEXIST
169File exists.
170.It Bq Er EXDEV
171Cross-device link.
172.It Bq Er ENODEV
173Operation not supported by device.
174.It Bq Er ENOTDIR
175Not a directory.
176.It Bq Er EISDIR
177Is a directory.
178.It Bq Er EINVAL
179Invalid argument.
180.It Bq Er ENFILE
181Too many open files in system.
182.It Bq Er EMFILE
183Too many open files.
184.It Bq Er ENOTTY
185Inappropriate ioctl for device.
186.It Bq Er ETXTBSY
187Text file busy.
188.It Bq Er EFBIG
189File too large.
190.It Bq Er ENOSPC
191No space left on device.
192.It Bq Er ESPIPE
193Illegal seek.
194.It Bq Er EROFS
195Read-only file system.
196.It Bq Er EMLINK
197Too many links.
198.It Bq Er EPIPE
199Broken pipe.
200.It Bq Er EDOM
201Numerical argument out of domain.
202.It Bq Er ERANGE
203Result too large.
204.It Bq Er EAGAIN
205Resource temporarily unavailable.
206.It Bq Er EWOULDBLOCK
207Operation would block.
208.It Bq Er EINPROGRESS
209Operation now in progress.
210.It Bq Er EALREADY
211Operation already in progress.
212.It Bq Er ENOTSOCK
213Socket operation on non-socket.
214.It Bq Er EDESTADDRREQ
215Destination address required.
216.It Bq Er EMSGSIZE
217Message too long.
218.It Bq Er EPROTOTYPE
219Protocol wrong type for socket.
220.It Bq Er ENOPROTOOPT
221Protocol not available.
222.It Bq Er EPROTONOSUPPORT
223Protocol not supported.
224.It Bq Er ESOCKNOTSUPORT
225Socket type not supported.
226.It Bq Er EOPNOTSUPP
227Operation not supported.
228.It Bq Er EPFNOSUPPORT
229Protocol family not supported.
230.It Bq Er EAFNNOSUPPORT
231Address family not supported by protocol family.
232.It Bq Er EADDRINUSE
233Address already in use.
234.It Bq Er EADDRNOTAVAIL
235Cannot assign requested address.
236.It Bq Er ENETDOWN
237Network is down.
238.It Bq Er ENETUNREACH
239Network is unreachable.
240.It Bq Er ENETRESET
241Network dropped connection on reset.
242.It Bq Er ECONNABORTED
243Software causes connection abort.
244.It Bq Er ENOBUFS
245No buffer space available.
246.It Bq Er EISCONN
247Socket is already connected.
248.It Bq Er ENOTCONN
249Socket is not connected.
250.It Bq Er ESHUTDOWN
251Cannot send after socket shutdown.
252.It Bq Er ETOOMANYREFS
253Too many references: cannot splice.
254.It Bq Er ETIMEDOUT
255Operation timed out.
256.It Bq Er ECONNREFUSED
257Connection refused.
258.It Bq Er ELOOP
259Too many levels of symbolic links.
260.It Bq Er ENAMETOOLONG
261File name too long.
262.It Bq Er EHOSTDOWN
263Host is down.
264.It Bq Er EHOSTUNREACH
265No route to host.
266.It Bq Er ENOTEMPTY
267Directory not empty.
268.It Bq Er EPROCLIM
269Too many processes.
270.It Bq Er EUSERS
271Too many users.
272.It Bq Er EDQUOT
273Disc quota exceeded.
274.It Bq Er ESTALE
275Stale NFS file handle.
276.It Bq Er EREMOTE
277Too many levels of remote in path.
278.It Bq Er EBADRPC
279RPC struct is bad.
280.It Bq Er ERPCMISMATCH
281RPC version wrong.
282.It Bq Er EPROGUNAVAIL
283RPC program not available.
284.It Bq Er EPROGMISMATCH
285Program version wrong.
286.It Bq Er EPROCUNAVAIL
287Bad procedure for program.
288.It Bq Er ENOLCK
289No locks available.
290.It Bq Er ENOSYS
291Function not implemented.
292.It Bq Er EFTYPE
293Inappropriate file type or format.
294.It Bq Er EAUTH
295Authentication error.
296.It Bq Er ENEEDAUTH
297Need authenticator.
124.El
125.Sh HISTORY
126The
127.Nm
128manual page example first appeared in
129.Fx 3.0 .
298.El
299.Sh HISTORY
300The
301.Nm
302manual page example first appeared in
303.Fx 3.0 .
304.Pp
305Some other common
306.Sx HISTORY
307section examples are:
308.Pp
309The
310.Nm
311manual page example first appeared in
312.Bx 4.4 .
313.Pp
314The
315.Nm
316manual page example first appeared in
317.At v6 .
130.Sh AUTHOR
131This
132manual page was written by Mike Pritchard
133.Aq mpp@FreeBSD.ORG .
134.Sh BUGS
135The actual code for this function is vaporware.
318.Sh AUTHOR
319This
320manual page was written by Mike Pritchard
321.Aq mpp@FreeBSD.ORG .
322.Sh BUGS
323The actual code for this function is vaporware.