Replaced tabs with spaces

This commit is contained in:
Michael Kerrisk 2007-04-05 13:29:41 +00:00
parent 1bef0ec265
commit 7295b7eda0
31 changed files with 250 additions and 250 deletions

View File

@ -33,6 +33,10 @@ bdflush.2
mtk
Add <sys/kdaemon.h> header file to SYNOPSIS.
sched_rr_get_interval.2
mtk
Moved timespec definition from SYNOPSIS into description.
select_tut.2
mtk
Make SYNOPSIS match select.2.

View File

@ -64,21 +64,16 @@ The
.I msgp
argument is a pointer to caller-defined structure
of the following general form:
.sp
.B
struct msgbuf {
.br
.B
long mtype;
/* message type, must be > 0 */
.br
.B
char mtext[1];
/* message data */
.br
.B
};
.sp
.in +0.5i
.nf
struct msgbuf {
long mtype; /* message type, must be > 0 */
char mtext[1]; /* message data */
};
.fi
.in -0.5i
.PP
The
.I mtext
field is an array (or other structure) whose size is specified by

View File

@ -205,7 +205,6 @@ is a struct with the following elements
.sp
.RS
.nf
.ta 4 13 24
siginfo_t {
int si_signo; /* Signal number */
int si_errno; /* An errno value */
@ -217,8 +216,8 @@ siginfo_t {
clock_t si_stime; /* System time consumed */
sigval_t si_value; /* Signal value */
int si_int; /* POSIX.1b signal */
void * si_ptr; /* POSIX.1b signal */
void * si_addr; /* Memory location which caused fault */
void *si_ptr; /* POSIX.1b signal */
void *si_addr; /* Memory location which caused fault */
int si_band; /* Band event */
int si_fd; /* File descriptor */
}

View File

@ -48,9 +48,8 @@ entries. The file \fIstream\fP must have the same format as
.PP
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
.sp
.RS
.in +0.5i
.nf
.ta 8n 16n 32n
struct passwd {
char *pw_name; /* user name */
char *pw_passwd; /* user password */
@ -60,9 +59,8 @@ struct passwd {
char *pw_dir; /* home directory */
char *pw_shell; /* shell program */
};
.ta
.fi
.RE
.in -0.5i
.SH "RETURN VALUE"
The \fBfgetpwent\fP() function returns the passwd structure, or NULL if
there are no more entries or an error occurs.

View File

@ -93,10 +93,8 @@ of size
.PP
The \fImntent\fP structure is defined in \fI<mntent.h>\fP as follows:
.sp
.RS
.in +0.5i
.nf
.ne 8
.ta 8n 16n 32n
struct mntent {
char *mnt_fsname; /* name of mounted file system */
char *mnt_dir; /* file system path prefix */
@ -105,9 +103,8 @@ struct mntent {
int mnt_freq; /* dump frequency in days */
int mnt_passno; /* pass number on parallel fsck */
};
.ta
.fi
.RE
.in -0.5i
Since fields in the mtab and fstab files are separated by whitespace,
octal escapes are used to represent the four characters space (\e040),

View File

@ -66,19 +66,16 @@ The \fBendnetent\fP() function closes \fI/etc/networks\fP.
.PP
The \fInetent\fP structure is defined in \fI<netdb.h>\fP as follows:
.sp
.RS
.in +0.5i
.nf
.ne 6
.ta 8n 16n 34n
struct netent {
char *n_name; /* official network name */
char **n_aliases; /* alias list */
int n_addrtype; /* net address type */
unsigned long int n_net; /* network number */
unsigned long n_net; /* network number */
}
.ta
.fi
.RE
.in -0.5i
.PP
The members of the \fInetent\fP structure are:
.TP

View File

@ -65,18 +65,15 @@ The \fBendprotoent\fP() function closes \fI/etc/protocols\fP.
.PP
The \fIprotoent\fP structure is defined in \fI<netdb.h>\fP as follows:
.sp
.RS
.in +0.5i
.nf
.ne 5
.ta 8n 16n 32n
struct protoent {
char *p_name; /* official protocol name */
char **p_aliases; /* alias list */
int p_proto; /* protocol number */
}
.ta
.fi
.RE
.in -0.5i
.PP
The members of the \fIprotoent\fP structure are:
.TP

View File

@ -50,7 +50,6 @@ The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
.sp
.RS
.nf
.ta 8n 16n 32n
struct passwd {
char *pw_name; /* user name */
char *pw_passwd; /* user password */
@ -60,7 +59,6 @@ struct passwd {
char *pw_dir; /* home directory */
char *pw_shell; /* shell program */
};
.ta
.fi
.RE
.SH "RETURN VALUE"

View File

@ -74,15 +74,12 @@ The \fIservent\fP structure is defined in \fI<netdb.h>\fP as follows:
.sp
.RS
.nf
.ne 6
.ta 8n 16n 32n
struct servent {
char *s_name; /* official service name */
char **s_aliases; /* alias list */
int s_port; /* port number */
char *s_proto; /* protocol to use */
}
.ta
.fi
.RE
.PP

View File

@ -71,12 +71,14 @@ the hash table so that a new table can be constructed.
.PP
The argument \fIitem\fP is of type \fBENTRY\fP, which is a typedef defined in
\fI<search.h>\fP and includes these elements:
.RS
.sp
.nf
typedef struct entry {
typedef struct entry {
char *\fIkey\fP;
void *\fIdata\fP;
} ENTRY;
} ENTRY;
.RE
.fi
.sp
The field \fIkey\fP points to the null-terminated string which is the

View File

@ -96,7 +96,7 @@ then two additional arguments must be supplied.
The
.I mode
argument specifies the permissions to be placed on the new queue,
as for
as for
.BR open (2).
The permissions settings are masked against the process umask.
The

View File

@ -155,13 +155,17 @@ the position in the argument list of the desired argument, indexed starting
from 1. Thus,
.RS
.nf
printf("%*d", width, num);
.fi
.RE
and
.RS
.nf
printf("%2$*1$d", width, num);
.fi
.RE
are equivalent. The second style allows repeated references to the
@ -711,6 +715,7 @@ specification is `%%'.
To print \*(Pi to five decimal places:
.RS
.nf
#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0));
@ -725,6 +730,7 @@ and
are pointers to strings:
.RS
.nf
#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d\en",
weekday, month, day, hour, min);
@ -736,9 +742,11 @@ Hence, an internationalized version must be able to print
the arguments in an order specified by the format:
.RS
.nf
#include <stdio.h>
fprintf(stdout, format,
weekday, month, day, hour, min);
.fi
.RE
where
@ -755,12 +763,14 @@ To allocate a sufficiently large string and print into it
(code correct for both glibc 2.0 and glibc 2.1):
.RS
.nf
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...) {
make_message(const char *fmt, ...)
{
/* Guess we need no more than 100 bytes. */
int n, size = 100;
char *p, *np;

View File

@ -205,7 +205,9 @@ with each format character based on the type.
#include <stdio.h>
#include <stdarg.h>
void foo(char *fmt, ...) {
void
foo(char *fmt, ...)
{
va_list ap;
int d;
char c, *s;
@ -254,7 +256,10 @@ The historic setup is:
.nf
#include <varargs.h>
void foo(va_alist) va_dcl {
void
foo(va_alist)
va_dcl
{
va_list ap;
va_start(ap);

View File

@ -310,14 +310,17 @@ Of course programmers are encouraged to use %c, it gives the preferred
date and time representation. One meets all kinds of strange obfuscations
to circumvent this gcc problem. A relatively clean one is to add an
intermediate function
.RS
size_t my_strftime(char *s, size_t max, const char *fmt,
const struct tm *tm) {
.br
.in +0.5i
.nf
size_t
my_strftime(char *s, size_t max, const char *fmt,
const struct tm *tm)
{
return strftime(s, max, fmt, tm);
.br
}
.RE
.fi
.in -0.5i
.SH EXAMPLE
The program below can be used to experiment with
.BR strftime ().

View File

@ -226,7 +226,9 @@ For example, the following shell command line would change
the normal root device to
.IR /dev/hdb1 :
.nf
echo 0x365 >/proc/sys/kernel/real-root-dev
.fi
For a NFS example, the following shell command lines would change the
normal root device to the NFS directory
@ -234,6 +236,7 @@ normal root device to the NFS directory
on a local networked NFS server with IP number 193.8.232.7 for a system with
IP number 193.8.232.7 and named 'idefix':
.nf
echo /var/nfsroot >/proc/sys/kernel/nfs-root-name
echo 193.8.232.2:193.8.232.7::255.255.255.0:idefix \\
>/proc/sys/kernel/nfs-root-addrs

View File

@ -76,11 +76,11 @@ network is not connected to the Internet, DNS offers little
advantage.
.SH EXAMPLE
.nf
127.0.0.1 localhost
192.168.1.10 foo.mydomain.org foo
192.168.1.13 bar.mydomain.org bar
146.82.138.7 master.debian.org master
209.237.226.90 www.opensource.org
127.0.0.1 localhost
192.168.1.10 foo.mydomain.org foo
192.168.1.13 bar.mydomain.org bar
146.82.138.7 master.debian.org master
209.237.226.90 www.opensource.org
.fi
.SH "NOTE"
Modifications to this file normally take effect immediately,

View File

@ -63,7 +63,6 @@ these structures are defined as follows:
.in +.5i
.sp
.nf
.ta .5i +\w'unsigned int\0\0'u
struct ttinfo {
long tt_gmtoff;
int tt_isdst;

View File

@ -67,7 +67,6 @@ They take a pointer to a
as their parameter.
.nf
.ta 4 20 33
struct arpreq {
struct sockaddr arp_pa; /* protocol address */
struct sockaddr arp_ha; /* hardware address */

View File

@ -58,7 +58,6 @@ a node number, and a port number.
.PP
.RS
.nf
.ta 4n 20n 32n
struct at_addr {
u_short s_net;
u_char s_node;

View File

@ -44,12 +44,10 @@ recommendation X.121.
.PP
.RS
.nf
.ta 4n 18n 32n
struct sockaddr_x25 {
sa_family_t sx25_family; /* must be AF_X25 */
x25_address sx25_addr; /* X.121 Address */
};
.ta
.fi
.RE
.PP