1.\" 2.\" Copyright (c) [year] [your name] 3.\" 4.\" SPDX-License-Identifier: BSD-2-Clause 5.\" 6.\" Note: The date here should be updated whenever a non-trivial 7.\" change is made to the manual page. 8.Dd July 30, 2004 9.Dt EXAMPLE 3 10.Os 11.Sh NAME 12.Nm example 13.Nd "example library function manual page" 14.Sh LIBRARY 15.\" Note: list of available libraries is available in mdoc(7) 16.Lb libc 17.Sh SYNOPSIS 18.In example.h 19.Ft int 20.Fn example "char *ptr" "int mode" 21.Sh DESCRIPTION 22This is an example library function manual page for the 23.Fn example 24function. 25It is intended that this example can be used as a template 26when writing a new manual page. 27.Pp 28The 29.Fn example 30function takes two arguments: 31.Fa ptr 32and 33.Fa mode . 34The argument 35.Fa mode 36may have one of the following values: 37.Bl -tag -width "EXAMPLE_ONE" 38.It Dv EXAMPLE_ONE 39First example of a defined variable. 40.Dv EXAMPLE_ONE 41is described below. 42.It Dv EXAMPLE_TWO 43Second example. 44.El 45.Pp 46The above values are defined in 47.In example.h 48as follows: 49.Bd -literal 50#define EXAMPLE_ONE 1 51#define EXAMPLE_TWO 2 52.Ed 53.Sh IMPLEMENTATION NOTES 54The 55.Fn example 56function is not actually implemented. 57.Sh RETURN VALUES 58.Rv -std example 59.Sh ENVIRONMENT 60The 61.Fn example 62library function ignores the 63.Ev EXAMPLE 64environment variable. 65.Sh FILES 66.Bl -tag -width "/dev/null" -compact 67.It Pa /dev/null 68Example of a file in the 69.Sx FILES 70section. 71.El 72.Sh DIAGNOSTICS 73None. 74.Sh COMPATIBILITY 75The 76.Fn example 77function has no known compatibility issues. 78.Sh ERRORS 79.\" Delete any errno's that are not returned by your 80.\" function or system call and then tailor the 81.\" remaining text as needed. 82The 83.Fn example 84function will fail if: 85.Bl -tag -width Er 86.It Bq Er EPERM 87Operation not permitted. 88.It Bq Er ENOENT 89No such file or directory. 90.It Bq Er ESRCH 91No such process. 92.It Bq Er EINTR 93Interrupted system call. 94.It Bq Er EIO 95Input/output error. 96.It Bq Er ENXIO 97Device not configured. 98.It Bq Er E2BIG 99Argument list too long. 100.It Bq Er ENOEXEC 101Exec format error. 102.It Bq Er EBADF 103Bad file descriptor. 104.It Bq Er ECHILD 105No child processes. 106.It Bq Er EDEADLK 107Resource deadlock avoided. 108.It Bq Er ENOMEM 109Cannot allocate memory. 110.It Bq Er EACCES 111Permission denied. 112.It Bq Er EFAULT 113Bad address. 114.It Bq Er ENOTBLK 115Block device required. 116.It Bq Er EBUSY 117Device busy. 118.It Bq Er EEXIST 119File exists. 120.It Bq Er EXDEV 121Cross-device link. 122.It Bq Er ENODEV 123Operation not supported by device. 124.It Bq Er ENOTDIR 125Not a directory. 126.It Bq Er EISDIR 127Is a directory. 128.It Bq Er EINVAL 129Invalid argument. 130.It Bq Er ENFILE 131Too many open files in system. 132.It Bq Er EMFILE 133Too many open files. 134.It Bq Er ENOTTY 135Inappropriate ioctl for device. 136.It Bq Er ETXTBSY 137Text file busy. 138.It Bq Er EFBIG 139File too large. 140.It Bq Er ENOSPC 141No space left on device. 142.It Bq Er ESPIPE 143Illegal seek. 144.It Bq Er EROFS 145Read-only file system. 146.It Bq Er EMLINK 147Too many links. 148.It Bq Er EPIPE 149Broken pipe. 150.It Bq Er EDOM 151Numerical argument out of domain. 152.It Bq Er ERANGE 153Result too large. 154.It Bq Er EAGAIN 155Resource temporarily unavailable. 156.It Bq Er EWOULDBLOCK 157Operation would block. 158.It Bq Er EINPROGRESS 159Operation now in progress. 160.It Bq Er EALREADY 161Operation already in progress. 162.It Bq Er ENOTSOCK 163Socket operation on non-socket. 164.It Bq Er EDESTADDRREQ 165Destination address required. 166.It Bq Er EMSGSIZE 167Message too long. 168.It Bq Er EPROTOTYPE 169Protocol wrong type for socket. 170.It Bq Er ENOPROTOOPT 171Protocol not available. 172.It Bq Er EPROTONOSUPPORT 173Protocol not supported. 174.It Bq Er ESOCKTNOSUPPORT 175Socket type not supported. 176.It Bq Er EOPNOTSUPP 177Operation not supported. 178.It Bq Er EPFNOSUPPORT 179Protocol family not supported. 180.It Bq Er EAFNOSUPPORT 181Address family not supported by protocol family. 182.It Bq Er EADDRINUSE 183Address already in use. 184.It Bq Er EADDRNOTAVAIL 185Cannot assign requested address. 186.It Bq Er ENETDOWN 187Network is down. 188.It Bq Er ENETUNREACH 189Network is unreachable. 190.It Bq Er ENETRESET 191Network dropped connection on reset. 192.It Bq Er ECONNABORTED 193Software causes connection abort. 194.It Bq Er ENOBUFS 195No buffer space available. 196.It Bq Er EISCONN 197Socket is already connected. 198.It Bq Er ENOTCONN 199Socket is not connected. 200.It Bq Er ESHUTDOWN 201Cannot send after socket shutdown. 202.It Bq Er ETOOMANYREFS 203Too many references: cannot splice. 204.It Bq Er ETIMEDOUT 205Operation timed out. 206.It Bq Er ECONNREFUSED 207Connection refused. 208.It Bq Er ELOOP 209Too many levels of symbolic links. 210.It Bq Er ENAMETOOLONG 211File name too long. 212.It Bq Er EHOSTDOWN 213Host is down. 214.It Bq Er EHOSTUNREACH 215No route to host. 216.It Bq Er ENOTEMPTY 217Directory not empty. 218.It Bq Er EPROCLIM 219Too many processes. 220.It Bq Er EUSERS 221Too many users. 222.It Bq Er EDQUOT 223Disc quota exceeded. 224.It Bq Er ESTALE 225Stale NFS file handle. 226.It Bq Er EREMOTE 227Too many levels of remote in path. 228.It Bq Er EBADRPC 229RPC struct is bad. 230.It Bq Er ERPCMISMATCH 231RPC version wrong. 232.It Bq Er EPROGUNAVAIL 233RPC program not available. 234.It Bq Er EPROGMISMATCH 235Program version wrong. 236.It Bq Er EPROCUNAVAIL 237Bad procedure for program. 238.It Bq Er ENOLCK 239No locks available. 240.It Bq Er ENOSYS 241Function not implemented. 242.It Bq Er EFTYPE 243Inappropriate file type or format. 244.It Bq Er EAUTH 245Authentication error. 246.It Bq Er ENEEDAUTH 247Need authenticator. 248.It Bq Er EIDRM 249Identifier removed. 250.It Bq Er ENOMSG 251No message of desired type. 252.It Bq Er EOVERFLOW 253Value too large to be stored in data type. 254.It Bq Er ECANCELED 255Operation canceled. 256.It Bq Er EILSEQ 257Illegal byte sequence. 258.It Bq Er ENOATTR 259Attribute not found. 260.It Bq Er EDOOFUS 261Programming error. 262.El 263.Sh SEE ALSO 264.Xr example 1 , 265.Xr example 4 , 266.Xr mdoc 7 , 267.Xr example 9 268.Rs 269.%A "A. B. Author" 270.%T "Example RFC Title" 271.%O RFC0000 272.Re 273.Rs 274.%A "A. B. Author" 275.%B "Example Book Title" 276.%O ISBN-0-000-00000-0 277.Re 278.Rs 279.%A "A. B. Author" 280.%D "January 1997" 281.%J "Example Journal Name" 282.%T "Example Article Title" 283.Re 284.Sh STANDARDS 285If the function conforms to some standard, such as 286.St -p1003.1-2004 287or 288.St -isoC-99 , 289it should be noted here. 290.Sh HISTORY 291The 292.Nm 293manual page example first appeared in 294.Fx 2.2 . 295.Pp 296Some other common 297.Sx HISTORY 298section examples are: 299.Pp 300The 301.Nm 302manual page example first appeared in 303.Bx 4.4 . 304.Pp 305The 306.Nm 307manual page example first appeared in 308.At v6 . 309.Sh AUTHORS 310This 311manual page was written by 312.An Mike Pritchard Aq Mt mpp@FreeBSD.org . 313.Sh BUGS 314The actual code for this function is vaporware. 315