EXAMPLE(3)

NAME
example - example library function manual page

LIBRARY
libc

SYNOPSIS
#include <example.h>
int
example(char *ptr, int mode);

DESCRIPTION
This is an example library function manual page for the example() function. It is intended that this example can be used as a template when writing a new manual page.

The example() function takes two arguments: ptr and mode. The argument mode may have one of the following values:

EXAMPLE_ONE
    First example of a defined variable. EXAMPLE_ONE is described below.

EXAMPLE_TWO
    Second example.

The above values are defined in <example.h> as follows:

    #define EXAMPLE_ONE  1
    #define EXAMPLE_TWO  2

IMPLEMENTATION NOTES
The example() function is not actually implemented.

RETURN VALUES

ENVIRONMENT
The example() library function ignores the EXAMPLE environment variable.

FILES
/dev/null
    Example of a file in the FILES section.

DIAGNOSTICS
None.

COMPATIBILITY
The example() function has no known compatibility issues.

ERRORS
The example() function will fail if:

[EPERM]
    Operation not permitted.

[ENOENT]
    No such file or directory.

[ESRCH]
    No such process.

[EINTR]
    Interrupted system call.

[EIO]
    Input/output error.

[ENXIO]
    Device not configured.

[E2BIG]
    Argument list too long.

[ENOEXEC]
    Exec format error.

[EBADF]
    Bad file descriptor.

[ECHILD]
    No child processes.

[EDEADLK]
    Resource deadlock avoided.

[ENOMEM]
    Cannot allocate memory.

[EACCES]
    Permission denied.

[EFAULT]
    Bad address.

[ENOTBLK]
    Block device required.

[EBUSY]
    Device busy.

[EEXIST]
    File exists.

[EXDEV]
    Cross-device link.

[ENODEV]
    Operation not supported by device.

[ENOTDIR]
    Not a directory.

[EISDIR]
    Is a directory.

[EINVAL]
    Invalid argument.

[ENFILE]
    Too many open files in system.

[EMFILE]
    Too many open files.

[ENOTTY]
    Inappropriate ioctl for device.

[ETXTBSY]
    Text file busy.

[EFBIG]
    File too large.

[ENOSPC]
    No space left on device.

[ESPIPE]
    Illegal seek.

[EROFS]
    Read-only file system.

[EMLINK]
    Too many links.

[EPIPE]
    Broken pipe.

[EDOM]
    Numerical argument out of domain.

[ERANGE]
    Result too large.

[EAGAIN]
    Resource temporarily unavailable.

[EWOULDBLOCK]
    Operation would block.

[EINPROGRESS]
    Operation now in progress.

[EALREADY]
    Operation already in progress.

[ENOTSOCK]
    Socket operation on non-socket.

[EDESTADDRREQ]
    Destination address required.

[EMSGSIZE]
    Message too long.

[EPROTOTYPE]
    Protocol wrong type for socket.

[ENOPROTOOPT]
    Protocol not available.

[EPROTONOSUPPORT]
    Protocol not supported.

[ESOCKTNOSUPPORT]
    Socket type not supported.

[EOPNOTSUPP]
    Operation not supported.

[EPFNOSUPPORT]
    Protocol family not supported.

[EAFNOSUPPORT]
    Address family not supported by protocol family.

[EADDRINUSE]
    Address already in use.

[EADDRNOTAVAIL]
    Cannot assign requested address.

[ENETDOWN]
    Network is down.

[ENETUNREACH]
    Network is unreachable.

[ENETRESET]
    Network dropped connection on reset.

[ECONNABORTED]
    Software causes connection abort.

[ENOBUFS]
    No buffer space available.

[EISCONN]
    Socket is already connected.

[ENOTCONN]
    Socket is not connected.

[ESHUTDOWN]
    Cannot send after socket shutdown.

[ETOOMANYREFS]
    Too many references: cannot splice.

[ETIMEDOUT]
    Operation timed out.

[ECONNREFUSED]
    Connection refused.

[ELOOP]
    Too many levels of symbolic links.

[ENAMETOOLONG]
    File name too long.

[EHOSTDOWN]
    Host is down.

[EHOSTUNREACH]
    No route to host.

[ENOTEMPTY]
    Directory not empty.

[EPROCLIM]
    Too many processes.

[EUSERS]
    Too many users.

[EDQUOT]
    Disc quota exceeded.

[ESTALE]
    Stale NFS file handle.

[EREMOTE]
    Too many levels of remote in path.

[EBADRPC]
    RPC struct is bad.

[ERPCMISMATCH]
    RPC version wrong.

[EPROGUNAVAIL]
    RPC program not available.

[EPROGMISMATCH]
    Program version wrong.

[EPROCUNAVAIL]
    Bad procedure for program.

[ENOLCK]
    No locks available.

[ENOSYS]
    Function not implemented.

[EFTYPE]
    Inappropriate file type or format.

[EAUTH]
    Authentication error.

[ENEEDAUTH]
    Need authenticator.

[EIDRM]
    Identifier removed.

[ENOMSG]
    No message of desired type.

[EOVERFLOW]
    Value too large to be stored in data type.

[ECANCELED]
    Operation canceled.

[EILSEQ]
    Illegal byte sequence.

[ENOATTR]
    Attribute not found.

[EDOOFUS]
    Programming error.

SEE ALSO
example(1), example(4), mdoc(7), example(9) A. B. Author, Example RFC Title, RFC0000. A. B. Author, Example Book Title, ISBN-0-000-00000-0. A. B. Author, January 1997, Example Journal Name, Example Article Title.

STANDARDS
If the function conforms to some standard, such as p1003.1-2004 or isoC-99, it should be noted here.

HISTORY
The example manual page example first appeared in FreeBSD 2.2.

Some other common HISTORY section examples are:

The example manual page example first appeared in 4.4BSD.

The example manual page example first appeared in AT&T UNIX.

AUTHORS
This manual page was written by Mike Pritchard <mpp@FreeBSD.org>.

BUGS
The actual code for this function is vaporware.