summaryrefslogtreecommitdiff
path: root/man3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-12-19 06:57:44 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-12-19 06:57:44 +0000
commit088a639be38030f6b6bfd344fb30636a85b207a4 (patch)
treefeabf70c32c723e8a8abbaa37cebedeb93003c28 /man3
parentcfadad462c81964b85b0c5c3eac79bbe50aa364e (diff)
Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
Diffstat (limited to 'man3')
-rw-r--r--man3/backtrace.32
-rw-r--r--man3/btree.32
-rw-r--r--man3/cfree.32
-rw-r--r--man3/confstr.33
-rw-r--r--man3/dbopen.34
-rw-r--r--man3/dl_iterate_phdr.34
-rw-r--r--man3/dlopen.32
-rw-r--r--man3/err.36
-rw-r--r--man3/frexp.32
-rw-r--r--man3/fts.32
-rw-r--r--man3/ftw.32
-rw-r--r--man3/gamma.32
-rw-r--r--man3/getfsent.32
-rw-r--r--man3/getgrent_r.34
-rw-r--r--man3/getnameinfo.36
-rw-r--r--man3/getopt.32
-rw-r--r--man3/getpwent_r.34
-rw-r--r--man3/getttyent.32
-rw-r--r--man3/glob.34
-rw-r--r--man3/hash.32
-rw-r--r--man3/lseek64.330
-rw-r--r--man3/malloc.32
-rw-r--r--man3/memmem.35
-rw-r--r--man3/qsort.34
-rw-r--r--man3/queue.313
-rw-r--r--man3/recno.32
-rw-r--r--man3/setaliasent.33
-rw-r--r--man3/setnetgrent.320
-rw-r--r--man3/significand.34
-rw-r--r--man3/sigvec.32
-rw-r--r--man3/stdarg.32
-rw-r--r--man3/stpcpy.32
-rw-r--r--man3/strcat.32
-rw-r--r--man3/strcpy.34
-rw-r--r--man3/timeradd.33
-rw-r--r--man3/tmpnam.32
36 files changed, 79 insertions, 80 deletions
diff --git a/man3/backtrace.3 b/man3/backtrace.3
index 9704b259..8adb9083 100644
--- a/man3/backtrace.3
+++ b/man3/backtrace.3
@@ -163,7 +163,7 @@ and
The following shell session shows what we might see when running the
program:
.nf
-.in +0.25i
+.in +4n
$ cc \-rdynamic prog.c \-o prog
$ ./prog 3
diff --git a/man3/btree.3 b/man3/btree.3
index 0d566f5a..020cd160 100644
--- a/man3/btree.3
+++ b/man3/btree.3
@@ -59,7 +59,7 @@ The btree access method specific data structure provided to
is defined in the
.I <db.h>
include file as follows:
-.in +0.5i
+.in +4n
.nf
typedef struct {
diff --git a/man3/cfree.3 b/man3/cfree.3
index 9c6fe624..4c843c5b 100644
--- a/man3/cfree.3
+++ b/man3/cfree.3
@@ -73,7 +73,7 @@ apparently as an analog to
.LP
If you need it while porting something, add
.sp
-.in +5
+.in +4n
#define cfree(p, n, s) free((p))
.in
.sp
diff --git a/man3/confstr.3 b/man3/confstr.3
index 46966259..788556ee 100644
--- a/man3/confstr.3
+++ b/man3/confstr.3
@@ -129,7 +129,7 @@ The following code fragment determines the path where to find
the POSIX.2 system utilities:
.br
.nf
-.in 10
+.in +4n
char *pathbuf;
size_t n;
@@ -139,6 +139,7 @@ pathbuf = malloc(n);
if (pathbuf == NULL)
abort();
confstr(_CS_PATH, pathbuf, n);
+.in
.SH "SEE ALSO"
.BR sh (1),
.BR exec (3),
diff --git a/man3/dbopen.3 b/man3/dbopen.3
index fbc504d0..8529153a 100644
--- a/man3/dbopen.3
+++ b/man3/dbopen.3
@@ -141,7 +141,7 @@ structure is defined in the
include file, and contains at
least the following fields:
.sp
-.in +0.5i
+.in +4n
.nf
typedef struct {
DBTYPE type;
@@ -440,7 +440,7 @@ and 0 on success.
.SS "Key/Data Pairs"
Access to all file types is based on key/data pairs.
Both keys and data are represented by the following data structure:
-.in +0.5i
+.in +4n
.nf
typedef struct {
diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3
index ef2cc7a4..01ed784c 100644
--- a/man3/dl_iterate_phdr.3
+++ b/man3/dl_iterate_phdr.3
@@ -69,7 +69,7 @@ The
.I info
argument is a structure of the following type:
-.in +0.25i
+.in +4n
.nf
struct dl_phdr_info {
ElfW(Addr) dlpi_addr; /* Base address of object */
@@ -120,7 +120,7 @@ The
field indicates the size of this array.
These program headers are structures of the following form:
-.in +0.25i
+.in +4n
.nf
typedef struct {
diff --git a/man3/dlopen.3 b/man3/dlopen.3
index f69fc7fb..68f55dcc 100644
--- a/man3/dlopen.3
+++ b/man3/dlopen.3
@@ -345,7 +345,7 @@ Information is stored in the
.I Dl_info
structure:
.sp
-.in +0.5i
+.in +4n
.nf
typedef struct {
const char *dli_fname; /* Filename of defining object */
diff --git a/man3/err.3 b/man3/err.3
index 53f5d045..fc1394a3 100644
--- a/man3/err.3
+++ b/man3/err.3
@@ -116,7 +116,7 @@ functions do not return, but exit with the value of the argument
.IR eval .
.SH EXAMPLES
Display the current errno information string and exit:
-.in +0.5i
+.in +4n
.nf
if ((p = malloc(size)) == NULL)
@@ -127,7 +127,7 @@ if ((fd = open(file_name, O_RDONLY, 0)) == \-1)
.in
.sp
Display an error message and exit:
-.in +0.5i
+.in +4n
.nf
if (tm.tm_hour < START_TIME)
@@ -136,7 +136,7 @@ if (tm.tm_hour < START_TIME)
.in
.sp
Warn of an error:
-.in +0.5i
+.in +4n
.nf
if ((fd = open(raw_device, O_RDONLY, 0)) == \-1)
diff --git a/man3/frexp.3 b/man3/frexp.3
index 538b66fa..5f7f3920 100644
--- a/man3/frexp.3
+++ b/man3/frexp.3
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
.sp
This program produces results such as the following:
.sp
-.in +5
+.in +4n
$ ./a.out 2560
frexp(2560, &e) = 0.625: 0.625 * 2^12 = 2560
$ ./a.out \-4
diff --git a/man3/fts.3 b/man3/fts.3
index 1694cb58..52a8d0a6 100644
--- a/man3/fts.3
+++ b/man3/fts.3
@@ -101,7 +101,7 @@ The
.I FTSENT
structure contains at least the following fields, which are
described in greater detail below:
-.in +0.5i
+.in +4n
.nf
typedef struct _ftsent {
diff --git a/man3/ftw.3 b/man3/ftw.3
index 946c1c87..588200de 100644
--- a/man3/ftw.3
+++ b/man3/ftw.3
@@ -267,7 +267,7 @@ The fourth argument that
supplies when calling
\fIfn\fP()
is a structure of type \fIFTW\fP:
-.in +0.5i
+.in +4n
.nf
struct FTW {
diff --git a/man3/gamma.3 b/man3/gamma.3
index d311482c..a737176e 100644
--- a/man3/gamma.3
+++ b/man3/gamma.3
@@ -60,7 +60,7 @@ In 4.3BSD the name was changed to
.BR lgamma (),
and the man page promises
.sp
-.in +3
+.in +4n
"At some time in the future the name gamma will be rehabilitated
and used for the Gamma function"
.in
diff --git a/man3/getfsent.3 b/man3/getfsent.3
index 69b7e77d..99d9636e 100644
--- a/man3/getfsent.3
+++ b/man3/getfsent.3
@@ -42,7 +42,7 @@ These functions read from the file
.IR /etc/fstab .
The \fIstruct fstab\fP is defined by:
.LP
-.in +0.5i
+.in +4n
.nf
struct fstab {
char *fs_spec; /* block device name */
diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3
index 3de34e32..250894b0 100644
--- a/man3/getgrent_r.3
+++ b/man3/getgrent_r.3
@@ -118,7 +118,7 @@ the POSIX version of functions like
Other systems use prototype
.sp
.nf
-.in +4
+.in +4n
struct group *
getgrent_r(struct group *grp, char *buf, int buflen);
.in
@@ -127,7 +127,7 @@ getgrent_r(struct group *grp, char *buf, int buflen);
or, better,
.sp
.nf
-.in +4
+.in +4n
int
getgrent_r(struct group *grp, char *buf, int buflen,
FILE **gr_fp);
diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3
index 7d406836..eb1c262d 100644
--- a/man3/getnameinfo.3
+++ b/man3/getnameinfo.3
@@ -182,7 +182,7 @@ In order to assist the programmer in choosing reasonable sizes
for the supplied buffers,
.I <netdb.h>
defines the constants
-.in +0.5i
+.in +4n
.nf
#define NI_MAXHOST 1025
@@ -203,7 +203,7 @@ for a given socket address.
Note that there is no hardcoded reference to
a particular address family.
-.in +0.5i
+.in +4n
.nf
struct sockaddr *sa; /* input */
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
@@ -217,7 +217,7 @@ if (getnameinfo(sa, sa\->sa_len, hbuf, sizeof(hbuf), sbuf,
The following version checks if the socket address has a
reverse address mapping.
-.in +0.5i
+.in +4n
.nf
struct sockaddr *sa; /* input */
char hbuf[NI_MAXHOST];
diff --git a/man3/getopt.3 b/man3/getopt.3
index 79c7f64b..85c776c0 100644
--- a/man3/getopt.3
+++ b/man3/getopt.3
@@ -192,7 +192,7 @@ is a pointer to the first element of an array of
declared in
.I <getopt.h>
as
-.in +0.5i
+.in +4n
.nf
.sp
struct option {
diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3
index 862b7c51..83f7ce93 100644
--- a/man3/getpwent_r.3
+++ b/man3/getpwent_r.3
@@ -119,7 +119,7 @@ the POSIX version of functions like
Other systems use prototype
.sp
.nf
-.in +4
+.in +4n
struct passwd *
getpwent_r(struct passwd *pwd, char *buf, int buflen);
.in
@@ -128,7 +128,7 @@ getpwent_r(struct passwd *pwd, char *buf, int buflen);
or, better,
.sp
.nf
-.in +4
+.in +4n
int
getpwent_r(struct passwd *pwd, char *buf, int buflen,
FILE **pw_fp);
diff --git a/man3/getttyent.3 b/man3/getttyent.3
index 7342f95f..f0a633f2 100644
--- a/man3/getttyent.3
+++ b/man3/getttyent.3
@@ -44,7 +44,7 @@ If the file is already open, the next entry.
The
.I ttyent
structure has the form:
-.in +0.5i
+.in +4n
.nf
struct ttyent {
diff --git a/man3/glob.3 b/man3/glob.3
index e64be283..9e9ace3b 100644
--- a/man3/glob.3
+++ b/man3/glob.3
@@ -73,14 +73,15 @@ and includes the following elements defined by POSIX.2 (more may be
present as an extension):
.PP
.br
+.in +4n
.nf
-.in 10
typedef struct {
size_t gl_pathc; /* Count of paths matched so far */
char **gl_pathv; /* List of matched pathnames. */
size_t gl_offs; /* Slots to reserve in \fIgl_pathv\fP. */
} glob_t;
.fi
+.in
.PP
Results are stored in dynamically allocated storage.
.PP
@@ -308,6 +309,7 @@ glob("../*.c", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);
globbuf.gl_pathv[0] = "ls";
globbuf.gl_pathv[1] = "\-l";
execvp("ls", &globbuf.gl_pathv[0]);
+.in
.fi
.SH "SEE ALSO"
.BR ls (1),
diff --git a/man3/hash.3 b/man3/hash.3
index f91b0a58..2d8a42b5 100644
--- a/man3/hash.3
+++ b/man3/hash.3
@@ -58,7 +58,7 @@ The access method specific data structure provided to
is defined in the
.I <db.h>
include file as follows:
-.in +0.5i
+.in +4n
.nf
typedef struct {
diff --git a/man3/lseek64.3 b/man3/lseek64.3
index 71dea6f2..2c989350 100644
--- a/man3/lseek64.3
+++ b/man3/lseek64.3
@@ -62,9 +62,9 @@ and the raw system call
Prototype:
.nf
.sp
-.in +5n
+.in +4n
.BI "off_t lseek(int " fd ", off_t " offset ", int " whence );
-.in -5n
+.in
.fi
.sp
.BR lseek (2)
@@ -74,9 +74,9 @@ This is a 32-bit signed type on 32-bit architectures, unless one
compiles with
.nf
.sp
-.in +5n
+.in +4n
#define _FILE_OFFSET_BITS 64
-.in -5n
+.in
.sp
.fi
in which case it is a 64-bit signed type.
@@ -84,9 +84,9 @@ in which case it is a 64-bit signed type.
Prototype:
.nf
.sp
-.in +5n
+.in +4n
.BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence );
-.in -5n
+.in
.fi
.sp
The library routine
@@ -99,9 +99,9 @@ Its prototype (and the type
is available only when one compiles with
.nf
.sp
-.in +5n
+.in +4n
#define _LARGEFILE64_SOURCE
-.in -5n
+.in
.sp
.fi
The function
@@ -113,9 +113,9 @@ is available since glibc 2.1, and is defined to be an alias for
Prototype:
.nf
.sp
-.in +5n
+.in +4n
.BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence );
-.in -5n
+.in
.fi
.sp
The type
@@ -135,9 +135,9 @@ When users complained about data loss caused by a miscompilation of
.BR e2fsck (8),
glibc 2.1.3 added the link-time warning
.sp
-.in +5n
+.in +4n
"the \`llseek\' function may be dangerous; use \`lseek64\' instead."
-.in -5b
+.in
.sp
This makes this function unusable if one desires a warning-free
compilation.
@@ -146,10 +146,10 @@ All the above functions are implemented in terms of this system call.
The prototype is:
.nf
.sp
-.in +5n
+.in +4n
.BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo ,
-.BI "loff_t *" result ", int " whence );
-.in -5n
+.BI " loff_t *" result ", int " whence );
+.in
.fi
.sp
For more details, see
diff --git a/man3/malloc.3 b/man3/malloc.3
index 684a504d..3bb11fcb 100644
--- a/man3/malloc.3
+++ b/man3/malloc.3
@@ -232,7 +232,7 @@ In case Linux is employed under circumstances where it would be
less desirable to suddenly lose some randomly picked processes,
and moreover the kernel version is sufficiently recent,
one can switch off this overcommitting behavior using a command like:
-.in +0.5i
+.in +4n
.nf
# echo 2 > /proc/sys/vm/overcommit_memory
diff --git a/man3/memmem.3 b/man3/memmem.3
index b755133a..5f4efb84 100644
--- a/man3/memmem.3
+++ b/man3/memmem.3
@@ -31,13 +31,10 @@ memmem \- locate a substring
.SH SYNOPSIS
.nf
.B #define _GNU_SOURCE
-.br
.B #include <string.h>
.sp
.BI "void *memmem(const void *" haystack ", size_t " haystacklen ,
-.in +\w'void *memmem('u
-.BI "const void *" needle ", size_t " needlelen );
-.in
+.BI " const void *" needle ", size_t " needlelen );
.fi
.SH DESCRIPTION
The
diff --git a/man3/qsort.3 b/man3/qsort.3
index 1c699374..360abd85 100644
--- a/man3/qsort.3
+++ b/man3/qsort.3
@@ -37,9 +37,7 @@ qsort \- sorts an array
.B #include <stdlib.h>
.sp
.BI "void qsort(void *" base ", size_t " nmemb ", size_t " size ,
-.in +\w'void qsort('u
-.BI "int(*" compar ")(const void *, const void *));"
-.in
+.BI " int(*" compar ")(const void *, const void *));"
.fi
.SH DESCRIPTION
The
diff --git a/man3/queue.3 b/man3/queue.3
index db765607..043c19bd 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -171,7 +171,7 @@ at the head of the list.
A
.I LIST_HEAD
structure is declared as follows:
-.in +0.5i
+.in +4n
.nf
LIST_HEAD(HEADNAME, TYPE) head;
@@ -184,7 +184,7 @@ is the name of the structure to be defined, and
.I TYPE
is the type of the elements to be linked into the list.
A pointer to the head of the list can later be declared as:
-.in +0.5i
+.in +4n
.nf
struct HEADNAME *headp;
@@ -262,11 +262,12 @@ at the head of the tail queue, or at the end of the tail queue.
A
.I TAILQ_HEAD
structure is declared as follows:
-.in +0.5i
+.in +4n
.nf
TAILQ_HEAD(HEADNAME, TYPE) head;
.fi
+.in
.PP
where
.IR "HEADNAME"
@@ -274,7 +275,7 @@ is the name of the structure to be defined, and
.IR "TYPE"
is the type of the elements to be linked into the tail queue.
A pointer to the head of the tail queue can later be declared as:
-.in +0.5i
+.in +4n
.nf
struct HEADNAME *headp;
@@ -362,7 +363,7 @@ of the queue.
A
.I CIRCLEQ_HEAD
structure is declared as follows:
-.in +0.5i
+.in +4n
.nf
CIRCLEQ_HEAD(HEADNAME, TYPE) head;
@@ -375,7 +376,7 @@ is the name of the structure to be defined, and
.IR "TYPE"
is the type of the elements to be linked into the circular queue.
A pointer to the head of the circular queue can later be declared as:
-.in +0.5i
+.in +4n
.nf
struct HEADNAME *headp;
diff --git a/man3/recno.3 b/man3/recno.3
index f91e8b15..0b63049e 100644
--- a/man3/recno.3
+++ b/man3/recno.3
@@ -66,7 +66,7 @@ is defined in the
.I <db.h>
include file as follows:
.PP
-.in +0.5i
+.in +4n
.nf
typedef struct {
u_long flags;
diff --git a/man3/setaliasent.3 b/man3/setaliasent.3
index bd5bf4ef..21186362 100644
--- a/man3/setaliasent.3
+++ b/man3/setaliasent.3
@@ -71,7 +71,7 @@ The
.I "struct aliasent"
is defined in
.IR <aliases.h> :
-.in +0.5i
+.in +4n
.nf
struct aliasent {
@@ -81,6 +81,7 @@ struct aliasent {
int alias_local;
};
.fi
+.in
.SH "RETURN VALUE"
The functions
.BR getaliasent_r ()
diff --git a/man3/setnetgrent.3 b/man3/setnetgrent.3
index caad2e7a..306d7ec7 100644
--- a/man3/setnetgrent.3
+++ b/man3/setnetgrent.3
@@ -7,23 +7,21 @@
setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \-
handle network group entries
.SH SYNOPSIS
+.nf
.B #include <netdb.h>
-.sp
+
.BI "int setnetgrent(const char *" netgroup );
-.br
+
.B "void endnetgrent(void);"
-.br
+
.BI "int getnetgrent(char **" host ", char **" user ", char **" domain );
-.sp
+
.BI "int getnetgrent_r(char **" host ", char **" user ","
-.in +18
-.BI "char **" domain ", char *" buf ", int " buflen );
-.in -18
-.sp
+.BI " char **" domain ", char *" buf ", int " buflen );
+
.BI "int innetgr(const char *" netgroup ", const char *" host ","
-.in +12
-.BI "const char *" user ", const char *" domain );
-.in -12
+.BI " const char *" user ", const char *" domain );
+.fi
.sp
.in -4n
Feature Test Macro Requirements for glibc (see
diff --git a/man3/significand.3 b/man3/significand.3
index 94b41e60..e192b4a5 100644
--- a/man3/significand.3
+++ b/man3/significand.3
@@ -35,9 +35,9 @@ function returns the mantissa of
scaled to the range [1,2).
It is equivalent to
.sp
-.in +8
+.in +4n
scalb(x, (double) \-ilogb(x))
-.in -8
+.in
.PP
This function exists mainly for use in certain standardized tests
for IEEE 754 conformance.
diff --git a/man3/sigvec.3 b/man3/sigvec.3
index 94e1da02..ba89c7b6 100644
--- a/man3/sigvec.3
+++ b/man3/sigvec.3
@@ -84,7 +84,7 @@ cannot be changed.
The
.I sigvec
structure has the following form:
-.in +0.5i
+.in +4n
.nf
struct sigvec {
diff --git a/man3/stdarg.3 b/man3/stdarg.3
index 6e6b3c46..fd9e32a5 100644
--- a/man3/stdarg.3
+++ b/man3/stdarg.3
@@ -225,7 +225,7 @@ A backward compatible version can be found in the include file
.IR <varargs.h> .
.PP
The historic setup is:
-.in +0.5i
+.in +4n
.nf
#include <varargs.h>
diff --git a/man3/stpcpy.3 b/man3/stpcpy.3
index 70e9e21e..4c9c9419 100644
--- a/man3/stpcpy.3
+++ b/man3/stpcpy.3
@@ -55,7 +55,7 @@ For example, this program uses
.BR stpcpy ()
to concatenate \fBfoo\fP and
\fBbar\fP to produce \fBfoobar\fP, which it then prints.
-.in +0.5i
+.in +4n
.nf
#include <string.h>
diff --git a/man3/strcat.3 b/man3/strcat.3
index bb905ed7..2ac72713 100644
--- a/man3/strcat.3
+++ b/man3/strcat.3
@@ -70,7 +70,7 @@ Therefore, the size of \fIdest\fP must be at least
A simple implementation of
.BR strncat ()
might be:
-.in +0.25i
+.in +4n
.nf
char*
diff --git a/man3/strcpy.3 b/man3/strcpy.3
index f2d18fe9..f2090fc0 100644
--- a/man3/strcpy.3
+++ b/man3/strcpy.3
@@ -71,7 +71,7 @@ with null bytes.
A simple implementation of
.BR strncpy ()
might be:
-.in +0.25i
+.in +4n
.nf
char*
@@ -112,7 +112,7 @@ characters of \fIsrc\fP,
produces an unterminated string in \fIdest\fP.
Programmers often prevent this mistake by forcing termination
as follows:
-.in +0.25i
+.in +4n
.nf
strncpy(buf, str, n);
diff --git a/man3/timeradd.3 b/man3/timeradd.3
index 1b43026d..414e0121 100644
--- a/man3/timeradd.3
+++ b/man3/timeradd.3
@@ -53,13 +53,14 @@ structures, defined in
.I <sys/time.h>
as:
.sp
-.in +0.5i
+.in +4n
.nf
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
.fi
+.in
.PP
.BR timeradd ()
adds the time values in
diff --git a/man3/tmpnam.3 b/man3/tmpnam.3
index febcb11d..9de607b8 100644
--- a/man3/tmpnam.3
+++ b/man3/tmpnam.3
@@ -118,7 +118,7 @@ A POSIX draft proposed to use a function
defined by
.sp
.nf
-.in +5
+.in +4n
char *
tmpnam_r(char *s)
{