mirror of https://github.com/mkerrisk/man-pages
wfix
This commit is contained in:
parent
3e2984b2dd
commit
9b33650560
|
@ -92,7 +92,7 @@ An empty buffer of
|
||||||
zero can be passed into these calls to return the current size of the
|
zero can be passed into these calls to return the current size of the
|
||||||
list of extended attribute names, which can be used to estimate the
|
list of extended attribute names, which can be used to estimate the
|
||||||
size of a buffer which is sufficiently large to hold the list of names.
|
size of a buffer which is sufficiently large to hold the list of names.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The
|
The
|
||||||
.I list
|
.I list
|
||||||
of names is returned as an unordered array of null-terminated character
|
of names is returned as an unordered array of null-terminated character
|
||||||
|
|
|
@ -117,7 +117,7 @@ is set to
|
||||||
If the value of
|
If the value of
|
||||||
.I name
|
.I name
|
||||||
is invalid.
|
is invalid.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The following code fragment determines the path where to find
|
The following code fragment determines the path where to find
|
||||||
the POSIX.2 system utilities:
|
the POSIX.2 system utilities:
|
||||||
.br
|
.br
|
||||||
|
|
|
@ -140,7 +140,7 @@ in virtual memory using the formula:
|
||||||
.nf
|
.nf
|
||||||
addr == info->dlpi_addr + info->dlpi_phdr[x].p_vaddr;
|
addr == info->dlpi_addr + info->dlpi_phdr[x].p_vaddr;
|
||||||
.fi
|
.fi
|
||||||
.SH EXAMPLE PROGRAM
|
.SH EXAMPLE
|
||||||
The following program displays a list of pathnames of the
|
The following program displays a list of pathnames of the
|
||||||
shared objects it has loaded.
|
shared objects it has loaded.
|
||||||
For each shared object, the program lists the virtual addresses
|
For each shared object, the program lists the virtual addresses
|
||||||
|
|
|
@ -153,7 +153,7 @@ The former is the constant MAXDNAME in recent versions of BIND's
|
||||||
.I <arpa/nameser.h>
|
.I <arpa/nameser.h>
|
||||||
header file. The latter is a guess based on the services listed
|
header file. The latter is a guess based on the services listed
|
||||||
in the current Assigned Numbers RFC.
|
in the current Assigned Numbers RFC.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The following code tries to get the numeric hostname and service name, for
|
The following code tries to get the numeric hostname and service name, for
|
||||||
a given socket address. Note that there is no hardcoded reference to
|
a given socket address. Note that there is no hardcoded reference to
|
||||||
a particular address family.
|
a particular address family.
|
||||||
|
|
|
@ -203,7 +203,7 @@ for a read error, and
|
||||||
.TP
|
.TP
|
||||||
.B GLOB_NOMATCH
|
.B GLOB_NOMATCH
|
||||||
for no found matches.
|
for no found matches.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
One example of use is the following code, which simulates typing
|
One example of use is the following code, which simulates typing
|
||||||
.nl
|
.nl
|
||||||
.B ls \-l *.c ../*.c
|
.B ls \-l *.c ../*.c
|
||||||
|
|
|
@ -702,7 +702,7 @@ indicated by the
|
||||||
A `%' is written. No argument is converted. The complete conversion
|
A `%' is written. No argument is converted. The complete conversion
|
||||||
specification is `%%'.
|
specification is `%%'.
|
||||||
.PP
|
.PP
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
.br
|
.br
|
||||||
.if \w'\*(Pi'=0 .ds Pi pi
|
.if \w'\*(Pi'=0 .ds Pi pi
|
||||||
To print \*(Pi to five decimal places:
|
To print \*(Pi to five decimal places:
|
||||||
|
|
|
@ -195,7 +195,7 @@ Some systems that do not supply
|
||||||
have
|
have
|
||||||
.B __va_copy
|
.B __va_copy
|
||||||
instead, since that was the name used in the draft proposal.
|
instead, since that was the name used in the draft proposal.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The function
|
The function
|
||||||
.I foo
|
.I foo
|
||||||
takes a string of format characters and prints out the argument associated
|
takes a string of format characters and prints out the argument associated
|
||||||
|
|
|
@ -81,7 +81,7 @@ In subsequent calls, \fIstr\fP should be NULL, and
|
||||||
Different strings may be parsed concurrently using sequences of calls to
|
Different strings may be parsed concurrently using sequences of calls to
|
||||||
.BR strtok_r ()
|
.BR strtok_r ()
|
||||||
that specify different \fIsaveptr\fP arguments.
|
that specify different \fIsaveptr\fP arguments.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The following program uses nested loops that employ
|
The following program uses nested loops that employ
|
||||||
.BR strtok_r ()
|
.BR strtok_r ()
|
||||||
to break a string into a two-level hierarchy of tokens.
|
to break a string into a two-level hierarchy of tokens.
|
||||||
|
|
60
man4/vcs.4
60
man4/vcs.4
|
@ -47,17 +47,17 @@ administrator can control access using file system permissions.
|
||||||
The devices for the first eight virtual consoles may be created by:
|
The devices for the first eight virtual consoles may be created by:
|
||||||
|
|
||||||
.nf
|
.nf
|
||||||
for x in 0 1 2 3 4 5 6 7 8; do
|
for x in 0 1 2 3 4 5 6 7 8; do
|
||||||
mknod \-m 644 /dev/vcs$x c 7 $x;
|
mknod \-m 644 /dev/vcs$x c 7 $x;
|
||||||
mknod \-m 644 /dev/vcsa$x c 7 $[$x+128];
|
mknod \-m 644 /dev/vcsa$x c 7 $[$x+128];
|
||||||
done
|
done
|
||||||
chown root:tty /dev/vcs*
|
chown root:tty /dev/vcs*
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
No
|
No
|
||||||
.BR ioctl ()
|
.BR ioctl ()
|
||||||
requests are supported.
|
requests are supported.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
You may do a screendump on vt3 by switching to vt1 and typing
|
You may do a screendump on vt3 by switching to vt1 and typing
|
||||||
\fIcat /dev/vcs3 >foo\fP. Note that the output does not contain
|
\fIcat /dev/vcs3 >foo\fP. Note that the output does not contain
|
||||||
newline characters, so some processing may be required, like
|
newline characters, so some processing may be required, like
|
||||||
|
@ -71,32 +71,32 @@ cursor of the second virtual console, then changes the background color
|
||||||
there:
|
there:
|
||||||
|
|
||||||
.nf
|
.nf
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
int fd;
|
int fd;
|
||||||
char *device = "/dev/vcsa2";
|
char *device = "/dev/vcsa2";
|
||||||
struct {unsigned char lines, cols, x, y;} scrn;
|
struct {unsigned char lines, cols, x, y;} scrn;
|
||||||
char ch, attrib;
|
char ch, attrib;
|
||||||
|
|
||||||
fd = open(device, O_RDWR);
|
fd = open(device, O_RDWR);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
perror(device);
|
perror(device);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
(void)read(fd, &scrn, 4);
|
(void) read(fd, &scrn, 4);
|
||||||
(void)lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0);
|
(void) lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0);
|
||||||
(void)read(fd, &ch, 1);
|
(void) read(fd, &ch, 1);
|
||||||
(void)read(fd, &attrib, 1);
|
(void) read(fd, &attrib, 1);
|
||||||
printf("ch='%c' attrib=0x%02x\\n", ch, attrib);
|
printf("ch='%c' attrib=0x%02x\\n", ch, attrib);
|
||||||
attrib ^= 0x10;
|
attrib ^= 0x10;
|
||||||
(void)lseek(fd, \-1, 1);
|
(void) lseek(fd, \-1, 1);
|
||||||
(void)write(fd, &attrib, 1);
|
(void) write(fd, &attrib, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
|
|
@ -36,7 +36,7 @@ and available to be queried by other programs.
|
||||||
Be aware that there are programs which consult this file to
|
Be aware that there are programs which consult this file to
|
||||||
find out if a user is a normal user. E.g.: ftp daemons traditionally
|
find out if a user is a normal user. E.g.: ftp daemons traditionally
|
||||||
disallow access to users with shells not included in this file.
|
disallow access to users with shells not included in this file.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
.I /etc/shells
|
.I /etc/shells
|
||||||
may contain the following paths:
|
may contain the following paths:
|
||||||
.sp
|
.sp
|
||||||
|
|
|
@ -339,7 +339,7 @@ capability may send or listen to a netlink multicast group.
|
||||||
Any replies to a message received for a multicast group should be
|
Any replies to a message received for a multicast group should be
|
||||||
sent back to the sending PID and the multicast group.
|
sent back to the sending PID and the multicast group.
|
||||||
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The following example creates a
|
The following example creates a
|
||||||
.B NETLINK_ROUTE
|
.B NETLINK_ROUTE
|
||||||
netlink socket which will listen to the
|
netlink socket which will listen to the
|
||||||
|
|
|
@ -164,7 +164,7 @@ code values 0xd800\(en0xdfff (UTF-16 surrogates) as well as 0xfffe and
|
||||||
0xffff (UCS non-characters) should not appear in conforming
|
0xffff (UCS non-characters) should not appear in conforming
|
||||||
.B UTF-8
|
.B UTF-8
|
||||||
streams.
|
streams.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLE
|
||||||
The
|
The
|
||||||
.B Unicode
|
.B Unicode
|
||||||
character 0xa9 = 1010 1001 (the copyright sign) is encoded
|
character 0xa9 = 1010 1001 (the copyright sign) is encoded
|
||||||
|
|
Loading…
Reference in New Issue