mirror of https://github.com/mkerrisk/man-pages
s/\\'/\\(aq/
This commit is contained in:
parent
84c517a450
commit
f81fb4445b
|
@ -52,7 +52,7 @@ and only has the equivalent
|
|||
.BR \-\-version .
|
||||
.LP
|
||||
The libc5 version of this program will use the name of a library given
|
||||
on the command line as-is when it contains a \'/\'; otherwise it
|
||||
on the command line as-is when it contains a \(aq/\(aq; otherwise it
|
||||
searches for the library in the standard locations.
|
||||
To run it
|
||||
on a shared library in the current directory, prefix the name with "./".
|
||||
|
|
|
@ -117,7 +117,7 @@ is not a valid file descriptor.
|
|||
SVr4, 4.4BSD, POSIX.1-2001.
|
||||
.SH NOTES
|
||||
The current working directory is the starting point for interpreting
|
||||
relative pathnames (those not starting with \'/\').
|
||||
relative pathnames (those not starting with \(aq/\(aq).
|
||||
|
||||
A child process created via
|
||||
.BR fork (2)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" Hey Emacs! This file is -*- nroff -*- source.
|
||||
\(aq" Hey Emacs! This file is -*- nroff -*- source.
|
||||
.\"
|
||||
.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
|
||||
.\" and Copyright (c) 1998 Andries Brouwer (aeb@cwi.nl)
|
||||
|
@ -217,14 +217,14 @@ main(int argc, char *argv[])
|
|||
struct passwd *pwd;
|
||||
char *endptr;
|
||||
|
||||
if (argc != 3 || argv[1][0] == \'\\0\') {
|
||||
if (argc != 3 || argv[1][0] == \(aq\\0\(aq) {
|
||||
fprintf(stderr, "%s <owner> <file>\\n", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
uid = strtol(argv[1], &endptr, 10); /* Allow a numeric string */
|
||||
|
||||
if (*endptr != \'\\0\') { /* Was not pure numeric string */
|
||||
if (*endptr != \(aq\\0\(aq) { /* Was not pure numeric string */
|
||||
pwd = getpwnam(argv[1]); /* Try getting UID for username */
|
||||
if (pwd == NULL) {
|
||||
perror("getpwnam");
|
||||
|
|
|
@ -53,8 +53,8 @@ This call changes an ingredient in the pathname resolution process
|
|||
and does nothing else.
|
||||
|
||||
This call does not change the current working directory,
|
||||
so that after the call \'\fI.\fP\' can
|
||||
be outside the tree rooted at \'\fI/\fP\'.
|
||||
so that after the call \(aq\fI.\fP\(aq can
|
||||
be outside the tree rooted at \(aq\fI/\fP\(aq.
|
||||
In particular, the superuser can escape from a "chroot jail"
|
||||
by doing:
|
||||
.nf
|
||||
|
|
|
@ -70,9 +70,9 @@ one or more ASCII letters were used.
|
|||
For example,
|
||||
.B TCGETS
|
||||
has value
|
||||
0x00005401, with 0x54 = \'T\' indicating the terminal driver, and
|
||||
0x00005401, with 0x54 = \(aqT\(aq indicating the terminal driver, and
|
||||
.B CYGETTIMEOUT
|
||||
has value 0x00435906, with 0x43 0x59 = \'C\' \'Y\'
|
||||
has value 0x00435906, with 0x43 0x59 = \(aqC\(aq \(aqY\(aq
|
||||
indicating the cyclades driver.
|
||||
.LP
|
||||
Later (0.98p5) some more information was built into the number.
|
||||
|
|
|
@ -95,7 +95,7 @@ size of a buffer which is sufficiently large to hold the list of names.
|
|||
The
|
||||
.I list
|
||||
of names is returned as an unordered array of null-terminated character
|
||||
strings (attribute names are separated by null bytes (\'\\0\')), like this:
|
||||
strings (attribute names are separated by null bytes (\(aq\\0\(aq)), like this:
|
||||
.fam C
|
||||
.RS
|
||||
.nf
|
||||
|
|
|
@ -81,7 +81,7 @@ The
|
|||
function allows the file offset to be set beyond the end
|
||||
of the file (but this does not change the size of the file).
|
||||
If data is later written at this point, subsequent reads of the data
|
||||
in the gap (a "hole") return null bytes (\'\\0\') until
|
||||
in the gap (a "hole") return null bytes (\(aq\\0\(aq) until
|
||||
data is actually written into the gap.
|
||||
.SH "RETURN VALUE"
|
||||
Upon successful completion,
|
||||
|
|
|
@ -582,7 +582,7 @@ main(int argc, char *argv[])
|
|||
length = atoi(argv[3]);
|
||||
if (offset + length > sb.st_size)
|
||||
length = sb.st_size \- offset;
|
||||
/* Can\'t display bytes past end of file */
|
||||
/* Can\(aqt display bytes past end of file */
|
||||
|
||||
} else { /* No length arg ==> display to end of file */
|
||||
length = sb.st_size \- offset;
|
||||
|
|
|
@ -351,7 +351,7 @@ Or, a move
|
|||
.RB ( MS_MOVE )
|
||||
was attempted, but
|
||||
.I source
|
||||
was not a mount point, or was \'/\'.
|
||||
was not a mount point, or was \(aq/\(aq.
|
||||
Or, an unmount was attempted, but
|
||||
.I target
|
||||
was not a mount point.
|
||||
|
|
|
@ -208,7 +208,7 @@ main(int argc, char *argv[])
|
|||
handle_error("mprotect");
|
||||
|
||||
for (p = buffer ; ; )
|
||||
*(p++) = \'a\';
|
||||
*(p++) = \(aqa\(aq;
|
||||
|
||||
printf("Loop completed\\n"); /* Should never happen */
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
|
@ -368,7 +368,7 @@ main(int argc, char *argv[])
|
|||
sigaddset(&mask, SIGINT);
|
||||
sigaddset(&mask, SIGQUIT);
|
||||
|
||||
/* Block signals so that they aren\'t handled
|
||||
/* Block signals so that they aren\(aqt handled
|
||||
according to their default dispositions */
|
||||
|
||||
if (sigprocmask(SIG_BLOCK, &mask, NULL) == \-1)
|
||||
|
|
|
@ -224,7 +224,7 @@ int main(void)
|
|||
if (context == -1)
|
||||
handle_error("spu_create");
|
||||
|
||||
/* write a \'stop 0x1234\' instruction to the SPU\'s
|
||||
/* write a \(aqstop 0x1234\(aq instruction to the SPU\(aqs
|
||||
* local store memory
|
||||
*/
|
||||
instruction = 0x00001234;
|
||||
|
|
|
@ -74,7 +74,7 @@ bytes.
|
|||
.LP
|
||||
If the file previously was larger than this size, the extra data is lost.
|
||||
If the file previously was shorter, it is extended, and
|
||||
the extended part reads as null bytes (\'\\0\').
|
||||
the extended part reads as null bytes (\(aq\\0\(aq).
|
||||
.LP
|
||||
The file offset is not changed.
|
||||
.LP
|
||||
|
|
|
@ -55,7 +55,7 @@ struct utsname {
|
|||
.in
|
||||
The length of the arrays in a
|
||||
.I struct utsname
|
||||
is unspecified; the fields are terminated by a null byte (\'\\0\').
|
||||
is unspecified; the fields are terminated by a null byte (\(aq\\0\(aq).
|
||||
.SH "RETURN VALUE"
|
||||
On success, zero is returned.
|
||||
On error, \-1 is returned, and
|
||||
|
|
|
@ -62,7 +62,7 @@ The last two fields,
|
|||
and
|
||||
.IR f_fpack ,
|
||||
are not implemented and will
|
||||
always be filled with null bytes (\'\\0\').
|
||||
always be filled with null bytes (\(aq\\0\(aq).
|
||||
.SH "RETURN VALUE"
|
||||
On success, zero is returned and the
|
||||
.I ustat
|
||||
|
|
|
@ -41,8 +41,8 @@ The 64 digits in the base-64 system are:
|
|||
.RS
|
||||
.nf
|
||||
|
||||
\&\'.\' represents a 0
|
||||
\&\'/\' represents a 1
|
||||
\&\(aq.\(aq represents a 0
|
||||
\&\(aq/\(aq represents a 1
|
||||
0-9 represent 2-11
|
||||
A-Z represent 12-37
|
||||
a-z represent 38-63
|
||||
|
|
|
@ -55,7 +55,7 @@ These functions are glibc-specific.
|
|||
.LP
|
||||
An argz vector is a pointer to a character buffer together with a length.
|
||||
The intended interpretation of the character buffer is an array
|
||||
of strings, where the strings are separated by null bytes (\'\\0\').
|
||||
of strings, where the strings are separated by null bytes (\(aq\\0\(aq).
|
||||
If the length is non-zero, the last byte of the buffer must be a null byte.
|
||||
.LP
|
||||
These functions are for handling argz vectors.
|
||||
|
@ -83,7 +83,7 @@ is similar, but splits the string
|
|||
into substrings separated by the delimiter
|
||||
.IR delim .
|
||||
For example, one might use this on a Unix search path with
|
||||
delimiter \':\'.
|
||||
delimiter \(aq:\(aq.
|
||||
.LP
|
||||
.BR argz_append ()
|
||||
appends the argz vector
|
||||
|
@ -101,7 +101,7 @@ will be increased by
|
|||
.LP
|
||||
.BR argz_count ()
|
||||
counts the number of strings, that is,
|
||||
the number of null bytes (\'\\0\'), in
|
||||
the number of null bytes (\(aq\\0\(aq), in
|
||||
.RI ( argz ,\ argz_len ).
|
||||
.LP
|
||||
.BR argz_create ()
|
||||
|
@ -189,7 +189,7 @@ will be incremented by the number of replacements.
|
|||
is the opposite of
|
||||
.BR argz_create_sep ().
|
||||
It transforms the argz vector into a normal string by replacing
|
||||
all null bytes (\'\\0\') except the last by
|
||||
all null bytes (\(aq\\0\(aq) except the last by
|
||||
.IR sep .
|
||||
.SH "RETURN VALUE"
|
||||
All argz functions that do memory allocation have a return type of
|
||||
|
|
|
@ -210,7 +210,7 @@ myfunc3(void)
|
|||
free(strings);
|
||||
}
|
||||
|
||||
static void /* \'static\' means don\'t export the symbol... */
|
||||
static void /* "static" means don\(aqt export the symbol... */
|
||||
myfunc2(void)
|
||||
{
|
||||
myfunc3();
|
||||
|
|
|
@ -46,10 +46,10 @@ break a null-terminated pathname string into directory
|
|||
and filename components.
|
||||
In the usual case,
|
||||
.BR dirname ()
|
||||
returns the string up to, but not including, the final \'/\', and
|
||||
returns the string up to, but not including, the final \(aq/\(aq, and
|
||||
.BR basename ()
|
||||
returns the component following the final \'/\'.
|
||||
Trailing \'/\' characters are not counted as part of the pathname.
|
||||
returns the component following the final \(aq/\(aq.
|
||||
Trailing \(aq/\(aq characters are not counted as part of the pathname.
|
||||
.PP
|
||||
If
|
||||
.I path
|
||||
|
@ -154,7 +154,7 @@ they modify their argument, and segfault when called with a static string
|
|||
like "/usr/".
|
||||
Before glibc 2.2.1, the glibc version of
|
||||
.BR dirname ()
|
||||
did not correctly handle pathnames with trailing \'/\' characters,
|
||||
did not correctly handle pathnames with trailing \(aq/\(aq characters,
|
||||
and generated a segfault if given a NULL argument.
|
||||
.SH EXAMPLE
|
||||
.in +4n
|
||||
|
|
|
@ -105,7 +105,7 @@ main(int argc, char **argv)
|
|||
res = bsearch(&key, months, nr_of_months,
|
||||
sizeof(struct mi), compmi);
|
||||
if (res == NULL)
|
||||
printf("\'%s\': unknown month\en", argv[i]);
|
||||
printf("\(aq%s\(aq: unknown month\en", argv[i]);
|
||||
else
|
||||
printf("%s: month #%d\en", res\->name, res\->nr);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ function sets the first
|
|||
.I n
|
||||
bytes of the byte area starting at
|
||||
.I s
|
||||
to zero (bytes containing \'\\0\').
|
||||
to zero (bytes containing \(aq\\0\(aq).
|
||||
.SH "RETURN VALUE"
|
||||
None.
|
||||
.SH "CONFORMING TO"
|
||||
|
|
|
@ -50,7 +50,7 @@ The argument
|
|||
specifies the name of the message catalog to be opened.
|
||||
If
|
||||
.I name
|
||||
specifies and absolute path (i.e., contains a \'/\'),
|
||||
specifies and absolute path (i.e., contains a \(aq/\(aq),
|
||||
then
|
||||
.I name
|
||||
specifies a pathname for the message catalog.
|
||||
|
|
|
@ -76,7 +76,7 @@ copies the value of the string to
|
|||
.I buf
|
||||
truncated to
|
||||
.I len \- 1
|
||||
characters if necessary, with a null byte (\'\\0\') as terminator.
|
||||
characters if necessary, with a null byte (\(aq\\0\(aq) as terminator.
|
||||
This can be detected by comparing the return value of
|
||||
.BR confstr ()
|
||||
against
|
||||
|
|
|
@ -81,7 +81,7 @@ struct dl_phdr_info {
|
|||
const ElfW(Phdr) *dlpi_phdr; /* Pointer to array of
|
||||
ELF program headers
|
||||
for this object */
|
||||
ElfW(Half) dlpi_phnum; /* # of items in \'dlpi_phdr\' */
|
||||
ElfW(Half) dlpi_phnum; /* # of items in \fIdlpi_phdr\fP */
|
||||
};
|
||||
.fi
|
||||
.in
|
||||
|
|
|
@ -38,10 +38,10 @@ see
|
|||
.BR argz_add (3).
|
||||
An envz vector is a special argz vector, namely one where the strings
|
||||
have the form "name=value".
|
||||
Everything after the first \'=\' is considered
|
||||
Everything after the first \(aq=\(aq is considered
|
||||
to be the value.
|
||||
If there is no \'=\', the value is taken to be NULL.
|
||||
(While the value in case of a trailing \'=\' is the empty string "".)
|
||||
If there is no \(aq=\(aq, the value is taken to be NULL.
|
||||
(While the value in case of a trailing \(aq=\(aq is the empty string "".)
|
||||
.LP
|
||||
These functions are for handling envz vectors.
|
||||
.LP
|
||||
|
@ -80,7 +80,7 @@ and returns the value if found, or NULL if not.
|
|||
(Note that the value can also be NULL, namely when there is
|
||||
an entry for
|
||||
.I name
|
||||
without \'=\' sign.)
|
||||
without \(aq=\(aq sign.)
|
||||
.LP
|
||||
.BR envz_merge ()
|
||||
adds each entry in
|
||||
|
|
|
@ -91,7 +91,7 @@ The
|
|||
function parses a line in
|
||||
.I /etc/ethers
|
||||
format (ethernet address followed by whitespace followed by
|
||||
hostname; \'#\' introduces a comment) and returns an address
|
||||
hostname; \(aq#\(aq introduces a comment) and returns an address
|
||||
and hostname pair, or non-zero if it cannot be parsed.
|
||||
The buffer pointed to by
|
||||
.I hostname
|
||||
|
|
|
@ -29,7 +29,7 @@ of the
|
|||
.BR fgets (3)
|
||||
function.
|
||||
It reads a string of at most \fIn-1\fP wide characters into the
|
||||
wide-character array pointed to by \fIws\fP, and adds a terminating L\'\\0\'
|
||||
wide-character array pointed to by \fIws\fP, and adds a terminating L\(aq\\0\(aq
|
||||
character.
|
||||
It stops reading wide characters after it has encountered and
|
||||
stored a newline wide character.
|
||||
|
|
|
@ -33,7 +33,7 @@ is the same as for
|
|||
If
|
||||
.I mode
|
||||
specifies an append mode, then the initial file position is set to
|
||||
location of the first null byte (\'\\0\') in the buffer;
|
||||
location of the first null byte (\(aq\\0\(aq) in the buffer;
|
||||
otherwise the initial file position is set to the start of the buffer.
|
||||
.PP
|
||||
When a stream that has been opened for writing is flushed
|
||||
|
@ -67,7 +67,7 @@ of the buffer's size, using
|
|||
.\" http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
|
||||
.PP
|
||||
In a stream opened for reading,
|
||||
null bytes (\'\\0\') in the buffer do not cause read
|
||||
null bytes (\(aq\\0\(aq) in the buffer do not cause read
|
||||
operations to return an end-of-file indication.
|
||||
A read from the buffer will only indicate end-of-file
|
||||
when the file pointer advances
|
||||
|
|
|
@ -103,14 +103,14 @@ but output is always appended to the end of the file.
|
|||
.PP
|
||||
The
|
||||
.I mode
|
||||
string can also include the letter \'b\' either as a last character or as
|
||||
string can also include the letter \(aqb\(aq either as a last character or as
|
||||
a character between the characters in any of the two-character strings
|
||||
described above.
|
||||
This is strictly for compatibility with C89
|
||||
and has no effect; the \'b\' is ignored on all POSIX
|
||||
and has no effect; the \(aqb\(aq is ignored on all POSIX
|
||||
conforming systems, including Linux.
|
||||
(Other systems may treat text files and binary files differently,
|
||||
and adding the \'b\' may be a good idea if you do I/O to a binary
|
||||
and adding the \(aqb\(aq may be a good idea if you do I/O to a binary
|
||||
file and expect that your program may be ported to non-Unix
|
||||
environments.)
|
||||
.PP
|
||||
|
|
|
@ -28,7 +28,7 @@ the
|
|||
.BR fputs (3)
|
||||
function.
|
||||
It writes the wide-character string starting at \fIws\fP, up to but
|
||||
not including the terminating L\'\\0\' character, to \fIstream\fP.
|
||||
not including the terminating L\(aq\\0\(aq character, to \fIstream\fP.
|
||||
.PP
|
||||
For a non-locking counterpart, see
|
||||
.BR unlocked_stdio (3).
|
||||
|
|
|
@ -370,9 +370,9 @@ main(int argc, char *argv[])
|
|||
{
|
||||
int flags = 0;
|
||||
|
||||
if (argc > 2 && strchr(argv[2], \'d\') != NULL)
|
||||
if (argc > 2 && strchr(argv[2], \(aqd\(aq) != NULL)
|
||||
flags |= FTW_DEPTH;
|
||||
if (argc > 2 && strchr(argv[2], \'p\') != NULL)
|
||||
if (argc > 2 && strchr(argv[2], \(aqp\(aq) != NULL)
|
||||
flags |= FTW_PHYS;
|
||||
|
||||
if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags)
|
||||
|
|
|
@ -73,11 +73,11 @@ and
|
|||
are the argument count and array as passed to the
|
||||
.IR main ()
|
||||
function on program invocation.
|
||||
An element of \fIargv\fP that starts with \'\-\'
|
||||
An element of \fIargv\fP that starts with \(aq\-\(aq
|
||||
(and is not exactly "\-" or "\-\-")
|
||||
is an option element.
|
||||
The characters of this element
|
||||
(aside from the initial \'\-\') are option characters.
|
||||
(aside from the initial \(aq\-\(aq) are option characters.
|
||||
If
|
||||
.BR getopt ()
|
||||
is called repeatedly, it returns successively each of the option characters
|
||||
|
@ -132,11 +132,11 @@ permutes the contents of \fIargv\fP as it
|
|||
scans, so that eventually all the non-options are at the end.
|
||||
Two other modes are also implemented.
|
||||
If the first character of
|
||||
\fIoptstring\fP is \'+\' or the environment variable
|
||||
\fIoptstring\fP is \(aq+\(aq or the environment variable
|
||||
.B POSIXLY_CORRECT
|
||||
is set, then option processing stops as soon as a non-option argument is
|
||||
encountered.
|
||||
If the first character of \fIoptstring\fP is \'\-\', then
|
||||
If the first character of \fIoptstring\fP is \(aq\-\(aq, then
|
||||
each non-option \fIargv\fP-element is handled as if it were the argument of
|
||||
an option with character code 1. (This is used by programs that were
|
||||
written to expect options and other \fIargv\fP-elements in any order
|
||||
|
@ -148,7 +148,7 @@ If
|
|||
.BR getopt ()
|
||||
does not recognize an option character, it prints an
|
||||
error message to \fIstderr\fP, stores the character in \fIoptopt\fP, and
|
||||
returns \'?\'.
|
||||
returns \(aq?\(aq.
|
||||
The calling program may prevent the error message by
|
||||
setting \fIopterr\fP to 0.
|
||||
.PP
|
||||
|
@ -156,14 +156,14 @@ If
|
|||
.BR getopt ()
|
||||
finds an option character in \fIargv\fP that was not
|
||||
included in \fIoptstring\fP, or if it detects a missing option argument,
|
||||
it returns \'?\' and sets the external variable \fIoptopt\fP to the
|
||||
it returns \(aq?\(aq and sets the external variable \fIoptopt\fP to the
|
||||
actual option character.
|
||||
If the first character
|
||||
(following any optional \'+\' or \'\-\' described above)
|
||||
(following any optional \(aq+\(aq or \(aq\-\(aq described above)
|
||||
of \fIoptstring\fP
|
||||
is a colon (\':\'), then
|
||||
is a colon (\(aq:\(aq), then
|
||||
.BR getopt ()
|
||||
returns \':\' instead of \'?\' to
|
||||
returns \(aq:\(aq instead of \(aq?\(aq to
|
||||
indicate a missing option argument.
|
||||
If an error was detected, and
|
||||
the first character of \fIoptstring\fP is not a colon, and
|
||||
|
@ -243,9 +243,9 @@ points to a variable which is set to the index of the long option relative to
|
|||
.BR getopt_long_only ()
|
||||
is like
|
||||
.BR getopt_long (),
|
||||
but \'\-\' as well
|
||||
but \(aq\-\(aq as well
|
||||
as "\-\-" can indicate a long option.
|
||||
If an option that starts with \'\-\'
|
||||
If an option that starts with \(aq\-\(aq
|
||||
(not "\-\-") doesn't match a long option, but does match a short option,
|
||||
it is parsed as a short option instead.
|
||||
.SH "RETURN VALUE"
|
||||
|
@ -259,13 +259,13 @@ If
|
|||
.BR getopt ()
|
||||
encounters an option character that was not in
|
||||
.IR optstring ,
|
||||
then \'?\' is returned.
|
||||
then \(aq?\(aq is returned.
|
||||
If
|
||||
.BR getopt ()
|
||||
encounters an option with a missing argument,
|
||||
then the return value depends on the first character in
|
||||
.IR optstring :
|
||||
if it is \':\', then \':\' is returned; otherwise \'?\' is returned.
|
||||
if it is \(aq:\(aq, then \(aq:\(aq is returned; otherwise \(aq?\(aq is returned.
|
||||
.PP
|
||||
.BR getopt_long ()
|
||||
and
|
||||
|
@ -276,7 +276,7 @@ For a long option, they
|
|||
return \fIval\fP if \fIflag\fP is NULL, and 0 otherwise.
|
||||
Error and \-1 returns are the same as for
|
||||
.BR getopt (),
|
||||
plus \'?\' for an
|
||||
plus \(aq?\(aq for an
|
||||
ambiguous match or an extraneous parameter.
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
|
@ -349,14 +349,14 @@ main(int argc, char *argv[])
|
|||
flags = 0;
|
||||
while ((opt = getopt(argc, argv, "nt:")) != \-1) {
|
||||
switch (opt) {
|
||||
case \'n\':
|
||||
case \(aqn\(aq:
|
||||
flags = 1;
|
||||
break;
|
||||
case \'t\':
|
||||
case \(aqt\(aq:
|
||||
nsecs = atoi(optarg);
|
||||
tfnd = 1;
|
||||
break;
|
||||
default: /* \'?\' */
|
||||
default: /* \(aq?\(aq */
|
||||
fprintf(stderr, "Usage: %s [\-t nsecs] [\-n] name\\n",
|
||||
argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -401,7 +401,7 @@ main(int argc, char **argv)
|
|||
{"append", 0, 0, 0},
|
||||
{"delete", 1, 0, 0},
|
||||
{"verbose", 0, 0, 0},
|
||||
{"create", 1, 0, \'c\'},
|
||||
{"create", 1, 0, \(aqc\(aq},
|
||||
{"file", 1, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
@ -419,32 +419,32 @@ main(int argc, char **argv)
|
|||
printf("\\n");
|
||||
break;
|
||||
|
||||
case \'0\':
|
||||
case \'1\':
|
||||
case \'2\':
|
||||
case \(aq0\(aq:
|
||||
case \(aq1\(aq:
|
||||
case \(aq2\(aq:
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf("digits occur in two different argv\-elements.\\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf("option %c\\n", c);
|
||||
break;
|
||||
|
||||
case \'a\':
|
||||
case \(aqa\(aq:
|
||||
printf("option a\\n");
|
||||
break;
|
||||
|
||||
case \'b\':
|
||||
case \(aqb\(aq:
|
||||
printf("option b\\n");
|
||||
break;
|
||||
|
||||
case \'c\':
|
||||
printf("option c with value \'%s\'\\n", optarg);
|
||||
case \(aqc\(aq:
|
||||
printf("option c with value \(aq%s\(aq\\n", optarg);
|
||||
break;
|
||||
|
||||
case \'d\':
|
||||
printf("option d with value \'%s\'\\n", optarg);
|
||||
case \(aqd\(aq:
|
||||
printf("option d with value \(aq%s\(aq\\n", optarg);
|
||||
break;
|
||||
|
||||
case \'?\':
|
||||
case \(aq?\(aq:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -47,7 +47,7 @@ The function
|
|||
returns a pointer to a static buffer containing the (first
|
||||
.B PASS_MAX
|
||||
bytes of) the password without the trailing
|
||||
newline, terminated by a null byte (\'\\0\').
|
||||
newline, terminated by a null byte (\(aq\\0\(aq).
|
||||
This buffer may be overwritten by a following call.
|
||||
On error, the terminal state is restored,
|
||||
.I errno
|
||||
|
|
|
@ -72,7 +72,7 @@ into the buffer pointed to by
|
|||
until either a terminating newline or
|
||||
.BR EOF ,
|
||||
which it replaces with
|
||||
.BR \'\e0\' .
|
||||
.BR \(aq\e0\(aq .
|
||||
No check for buffer overrun is performed (see BUGS below).
|
||||
.PP
|
||||
.BR fgets ()
|
||||
|
@ -87,7 +87,7 @@ Reading stops after an
|
|||
or a newline.
|
||||
If a newline is read, it is stored into the buffer.
|
||||
A
|
||||
.B \'\e0\'
|
||||
.B \(aq\e0\(aq
|
||||
is stored after the last character in the buffer.
|
||||
.PP
|
||||
.BR ungetc ()
|
||||
|
|
|
@ -150,9 +150,9 @@ int main(int argc, char **argv)
|
|||
|
||||
while ((opt = getopt(argc, argv, "o:")) != \-1) {
|
||||
switch (opt) {
|
||||
case \'o\':
|
||||
case \(aqo\(aq:
|
||||
subopts = optarg;
|
||||
while (*subopts != \'\\0\' && !errfnd) {
|
||||
while (*subopts != \(aq\\0\(aq && !errfnd) {
|
||||
|
||||
switch (getsubopt(&subopts, token, &value)) {
|
||||
case RO_OPT:
|
||||
|
@ -166,7 +166,7 @@ int main(int argc, char **argv)
|
|||
case NAME_OPT:
|
||||
if (value == NULL) {
|
||||
fprintf(stderr, "Missing value for "
|
||||
"suboption \'%s\'\\n", token[NAME_OPT]);
|
||||
"suboption \(aq%s\(aq\\n", token[NAME_OPT]);
|
||||
errfnd = 1;
|
||||
continue;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
if (readwrite && readonly) {
|
||||
fprintf(stderr, "Only one of \'%s\' and \'%s\' can be "
|
||||
fprintf(stderr, "Only one of \(aq%s\(aq and \(aq%s\(aq can be "
|
||||
"specified\\n", token[RO_OPT], token[RW_OPT]);
|
||||
errfnd = 1;
|
||||
}
|
||||
|
@ -195,8 +195,8 @@ int main(int argc, char **argv)
|
|||
|
||||
if (errfnd || argc == 1) {
|
||||
fprintf(stderr, "\\nUsage: %s \-o <suboptstring>\\n", argv[0]);
|
||||
fprintf(stderr, "suboptions are \'ro\', \'rw\', "
|
||||
"and \'name=<value>\'\\n");
|
||||
fprintf(stderr, "suboptions are \(aqro\(aq, \(aqrw\(aq, "
|
||||
"and \(aqname=<value>\(aq\\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ Do not set this flag on the first invocation of
|
|||
.BR glob ().
|
||||
.TP
|
||||
.B GLOB_NOESCAPE
|
||||
Don't allow backslash (\'\\\') to be used as an escape
|
||||
Don't allow backslash (\(aq\\\(aq) to be used as an escape
|
||||
character.
|
||||
Normally, a backslash can be used to quote the following character,
|
||||
providing a mechanism to turn off the special meaning
|
||||
|
@ -176,8 +176,8 @@ even if there is no file with that name.
|
|||
.TP
|
||||
.B GLOB_TILDE
|
||||
Carry out tilde expansion.
|
||||
If a tilde (\'~\') is the only character in the pattern,
|
||||
or an initial tilde is followed immediately by a slash (\'/\'),
|
||||
If a tilde (\(aq~\(aq) is the only character in the pattern,
|
||||
or an initial tilde is followed immediately by a slash (\(aq/\(aq),
|
||||
then the home directory of the caller is substituted for
|
||||
the tilde.
|
||||
If an initial tilde is followed by a username (e.g., "~andrea/bin"),
|
||||
|
|
|
@ -132,15 +132,15 @@ In the
|
|||
and
|
||||
.B """POSIX"""
|
||||
locales, these are: space, form-feed
|
||||
.RB ( \'\ef\' ),
|
||||
.RB ( \(aq\ef\(aq ),
|
||||
newline
|
||||
.RB ( \'\en\' ),
|
||||
.RB ( \(aq\en\(aq ),
|
||||
carriage return
|
||||
.RB ( \'\er\' ),
|
||||
.RB ( \(aq\er\(aq ),
|
||||
horizontal tab
|
||||
.RB ( \'\et\' ),
|
||||
.RB ( \(aq\et\(aq ),
|
||||
and vertical tab
|
||||
.RB ( \'\ev\' ).
|
||||
.RB ( \(aq\ev\(aq ).
|
||||
.TP
|
||||
.BR isupper ()
|
||||
checks for an uppercase letter.
|
||||
|
|
|
@ -48,8 +48,8 @@ The wide-character class "alnum" is the union of the wide-character classes
|
|||
As such, it also contains the wide-character class
|
||||
"xdigit".
|
||||
.PP
|
||||
The wide-character class "alnum" always contains at least the letters \'A\'
|
||||
to \'Z\', \'a\' to \'z\' and the digits \'0\' to \'9\'.
|
||||
The wide-character class "alnum" always contains at least the letters \(aqA\(aq
|
||||
to \(aqZ\(aq, \(aqa\(aq to \(aqz\(aq and the digits \(aq0\(aq to \(aq9\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswalnum ()
|
||||
|
|
|
@ -52,8 +52,8 @@ The wide-character class "alpha" is disjoint from the wide-character class
|
|||
The wide-character class "alpha" contains the wide-character classes "upper"
|
||||
and "lower".
|
||||
.PP
|
||||
The wide-character class "alpha" always contains at least the letters \'A\'
|
||||
to \'Z\' and \'a\' to \'z\'.
|
||||
The wide-character class "alpha" always contains at least the
|
||||
letters \(aqA\(aq to \(aqZ\(aq and \(aqa\(aq to \(aqz\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswalpha ()
|
||||
|
|
|
@ -51,7 +51,7 @@ from its subclasses "alnum", "alpha", "upper", "lower", "digit",
|
|||
.PP
|
||||
The wide-character class "blank" always contains
|
||||
at least the space character
|
||||
and the control character \'\\t\'.
|
||||
and the control character \(aq\\t\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswblank ()
|
||||
|
|
|
@ -52,7 +52,7 @@ disjoint from the wide-character class
|
|||
"alpha" and therefore also disjoint from its subclasses "lower", "upper".
|
||||
.PP
|
||||
The wide-character class "digit" always
|
||||
contains exactly the digits \'0\' to \'9\'.
|
||||
contains exactly the digits \(aq0\(aq to \(aq9\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswdigit ()
|
||||
|
|
|
@ -56,7 +56,7 @@ which are equal to \fItowlower(wc)\fP and different
|
|||
from \fItowupper(wc)\fP.
|
||||
.PP
|
||||
The wide-character class "lower" always contains
|
||||
at least the letters \'a\' to \'z\'.
|
||||
at least the letters \(aqa\(aq to \(aqz\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswlower ()
|
||||
|
|
|
@ -39,7 +39,8 @@ The wide-character class "space" is disjoint from the wide-character class
|
|||
The wide-character class "space" contains the wide-character class "blank".
|
||||
.PP
|
||||
The wide-character class "space" always contains at least the space character
|
||||
and the control characters \'\\f\', \'\\n\', \'\\r\', \'\\t\', \'\\v\'.
|
||||
and the control
|
||||
characters \(aq\\f\(aq, \(aq\\n\(aq, \(aq\\r\(aq, \(aq\\t\(aq, \(aq\\v\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswspace ()
|
||||
|
|
|
@ -49,8 +49,8 @@ Being a subclass of the wide-character class "alpha", the wide-character class
|
|||
The wide-character class "upper" contains at least those characters \fIwc\fP
|
||||
which are equal to \fItowupper(wc)\fP and different from \fItowlower(wc)\fP.
|
||||
.PP
|
||||
The wide-character class "upper" always contains at least the letters \'A\'
|
||||
to \'Z\'.
|
||||
The wide-character class "upper" always contains at least the
|
||||
letters \(aqA\(aq to \(aqZ\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswupper ()
|
||||
|
|
|
@ -43,8 +43,9 @@ Being a subclass of the wide-character class "graph", the wide-character class
|
|||
Being a subclass of the wide-character class "alnum", the wide-character class
|
||||
"xdigit" is disjoint from the wide-character class "punct".
|
||||
.PP
|
||||
The wide-character class "xdigit" always contains at least the letters \'A\'
|
||||
to \'F\', \'a\' to \'f\' and the digits \'0\' to \'9\'.
|
||||
The wide-character class "xdigit" always contains at least the
|
||||
letters \(aqA\(aq to \(aqF\(aq, \(aqa\(aq to \(aqf\(aq
|
||||
and the digits \(aq0\(aq to \(aq9\(aq.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR iswxdigit ()
|
||||
|
|
|
@ -32,9 +32,9 @@ multibyte character, converts it to a wide character and stores it at
|
|||
\fI*pwc\fP.
|
||||
It updates the shift state \fI*ps\fP.
|
||||
If the converted wide
|
||||
character is not L\'\\0\', it returns the number of bytes that were consumed
|
||||
character is not L\(aq\\0\(aq, it returns the number of bytes that were consumed
|
||||
from \fIs\fP.
|
||||
If the converted wide character is L\'\\0\', it resets the shift
|
||||
If the converted wide character is L\(aq\\0\(aq, it resets the shift
|
||||
state \fI*ps\fP to the initial state and returns 0.
|
||||
.PP
|
||||
If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte
|
||||
|
@ -87,9 +87,9 @@ memset(&a, 0, sizeof(a));
|
|||
The
|
||||
.BR mbrtowc ()
|
||||
function returns the number of bytes parsed from the
|
||||
multibyte sequence starting at \fIs\fP, if a non-L\'\\0\' wide character
|
||||
multibyte sequence starting at \fIs\fP, if a non-L\(aq\\0\(aq wide character
|
||||
was recognized.
|
||||
It returns 0, if a L\'\\0\' wide character was recognized.
|
||||
It returns 0, if a L\(aq\\0\(aq wide character was recognized.
|
||||
It returns
|
||||
.I (size_t)\ \-1
|
||||
and sets \fIerrno\fP to \fBEILSEQ\fP, if an invalid multibyte sequence was
|
||||
|
|
|
@ -54,17 +54,20 @@ is left pointing to the invalid multibyte sequence,
|
|||
is returned,
|
||||
and \fIerrno\fP is set to \fBEILSEQ\fP.
|
||||
.IP 2.
|
||||
The \fInms\fP limit forces a stop, or \fIlen\fP non-L\'\\0\' wide characters
|
||||
The \fInms\fP limit forces a stop,
|
||||
or \fIlen\fP non-L\(aq\\0\(aq wide characters
|
||||
have been stored at \fIdest\fP.
|
||||
In this case \fI*src\fP is left pointing to the
|
||||
next multibyte sequence to be converted, and the number of wide characters
|
||||
written to \fIdest\fP is returned.
|
||||
.IP 3.
|
||||
The multibyte string has been completely converted, including the
|
||||
terminating \'\\0\' (which has the side effect of bringing back \fI*ps\fP to the
|
||||
terminating \(aq\\0\(aq
|
||||
(which has the side effect of bringing back \fI*ps\fP to the
|
||||
initial state).
|
||||
In this case \fI*src\fP is set to NULL, and the number of wide
|
||||
characters written to \fIdest\fP, excluding the terminating L\'\\0\' character,
|
||||
characters written to \fIdest\fP,
|
||||
excluding the terminating L\(aq\\0\(aq character,
|
||||
is returned.
|
||||
.PP
|
||||
If \fIdest\fP is NULL, \fIlen\fP is ignored, and the conversion proceeds as
|
||||
|
|
|
@ -44,19 +44,19 @@ is left pointing to the invalid multibyte sequence,
|
|||
is returned,
|
||||
and \fIerrno\fP is set to \fBEILSEQ\fP.
|
||||
.IP 2.
|
||||
\fIlen\fP non-L\'\\0\' wide characters have been stored at \fIdest\fP.
|
||||
\fIlen\fP non-L\(aq\\0\(aq wide characters have been stored at \fIdest\fP.
|
||||
In this
|
||||
case \fI*src\fP is left pointing to the next
|
||||
multibyte sequence to be converted,
|
||||
and the number of wide characters written to \fIdest\fP is returned.
|
||||
.IP 3.
|
||||
The multibyte string has been completely converted, including the
|
||||
terminating \'\\0\' (which has the side
|
||||
terminating \(aq\\0\(aq (which has the side
|
||||
effect of bringing back \fI*ps\fP to the
|
||||
initial state).
|
||||
In this case \fI*src\fP is set to NULL, and the number of wide
|
||||
characters written to \fIdest\fP,
|
||||
excluding the terminating L\'\\0\' character, is returned.
|
||||
excluding the terminating L\(aq\\0\(aq character, is returned.
|
||||
.PP
|
||||
If \fIdest\fP is NULL, \fIlen\fP is ignored,
|
||||
and the conversion proceeds as above,
|
||||
|
|
|
@ -36,15 +36,15 @@ In this case
|
|||
.I (size_t)\ \-1
|
||||
is returned.
|
||||
.IP 2.
|
||||
\fIn\fP non-L\'\\0\' wide characters have been stored at \fIdest\fP.
|
||||
\fIn\fP non-L\(aq\\0\(aq wide characters have been stored at \fIdest\fP.
|
||||
In this
|
||||
case the number of wide characters written to \fIdest\fP is returned, but the
|
||||
shift state at this point is lost.
|
||||
.IP 3.
|
||||
The multibyte string has been completely converted, including the
|
||||
terminating \'\\0\'.
|
||||
terminating \(aq\\0\(aq.
|
||||
In this case the number of wide characters written to
|
||||
\fIdest\fP, excluding the terminating L\'\\0\' character, is returned.
|
||||
\fIdest\fP, excluding the terminating L\(aq\\0\(aq character, is returned.
|
||||
.PP
|
||||
The programmer must ensure that there is room for at least \fIn\fP wide
|
||||
characters at \fIdest\fP.
|
||||
|
|
|
@ -32,7 +32,7 @@ multibyte character, converts it to a wide character and stores it at
|
|||
\fI*pwc\fP.
|
||||
It updates an internal shift state only known to the mbtowc
|
||||
function.
|
||||
If \fIs\fP does not point to a \'\\0\' byte, it returns the number
|
||||
If \fIs\fP does not point to a \(aq\\0\(aq byte, it returns the number
|
||||
of bytes that were consumed from \fIs\fP, otherwise it returns 0.
|
||||
.PP
|
||||
If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte
|
||||
|
|
|
@ -60,7 +60,7 @@ First (if
|
|||
.I s
|
||||
is not NULL and
|
||||
.I *s
|
||||
is not a null byte (\'\\0\')) the argument string
|
||||
is not a null byte (\(aq\\0\(aq)) the argument string
|
||||
.I s
|
||||
is printed, followed by a colon and a blank.
|
||||
Then the message and a new-line.
|
||||
|
|
|
@ -98,7 +98,7 @@ and
|
|||
.BR vsnprintf ()
|
||||
write at most
|
||||
.I size
|
||||
bytes (including the trailing null byte (\'\e0\')) to
|
||||
bytes (including the trailing null byte (\(aq\e0\(aq)) to
|
||||
.IR str .
|
||||
.PP
|
||||
The functions
|
||||
|
@ -133,7 +133,7 @@ the variable-length argument facilities of
|
|||
are converted for output.
|
||||
.SS "Return value"
|
||||
Upon successful return, these functions return the number of characters
|
||||
printed (not including the trailing \'\e0\' used to end output to strings).
|
||||
printed (not including the trailing \(aq\e0\(aq used to end output to strings).
|
||||
|
||||
The functions
|
||||
.BR snprintf ()
|
||||
|
@ -141,9 +141,9 @@ and
|
|||
.BR vsnprintf ()
|
||||
do not write more than
|
||||
.I size
|
||||
bytes (including the trailing \'\e0\').
|
||||
bytes (including the trailing \(aq\e0\(aq).
|
||||
If the output was truncated due to this limit then the return value
|
||||
is the number of characters (not including the trailing \'\e0\')
|
||||
is the number of characters (not including the trailing \(aq\e0\(aq)
|
||||
which would have been written to the final string if enough space
|
||||
had been available.
|
||||
Thus, a return value of
|
||||
|
|
|
@ -81,7 +81,7 @@ one in libc4, libc5 and glibc 2.0 is not, but the glibc 2.1 version is.
|
|||
.LP
|
||||
Description for libc4, libc5, glibc:
|
||||
If the argument \fIstring\fP is of the form \fIname\fP,
|
||||
and does not contain an \'=\' character, then the variable \fIname\fP
|
||||
and does not contain an \(aq=\(aq character, then the variable \fIname\fP
|
||||
is removed from the environment.
|
||||
If
|
||||
.BR putenv ()
|
||||
|
|
|
@ -53,7 +53,7 @@ writes the string
|
|||
to
|
||||
.IR stream ,
|
||||
without its trailing
|
||||
.BR \'\e0\' .
|
||||
.BR \(aq\e0\(aq .
|
||||
.PP
|
||||
.BR putc ()
|
||||
is equivalent to
|
||||
|
|
|
@ -46,7 +46,7 @@ _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
|
|||
expands all symbolic links and resolves references
|
||||
to
|
||||
.IR "/./" ", " "/../"
|
||||
and extra \'/\'
|
||||
and extra \(aq/\(aq
|
||||
characters in the null terminated string named by
|
||||
.I path
|
||||
and stores the canonicalized absolute pathname in the buffer of size
|
||||
|
|
|
@ -253,7 +253,7 @@ Invalid use of back reference operator.
|
|||
Invalid use of pattern operators such as group or list.
|
||||
.TP
|
||||
.B REG_BADRPT
|
||||
Invalid use of repetition operators such as using \'*\'
|
||||
Invalid use of repetition operators such as using \(aq*\(aq
|
||||
as the first character.
|
||||
.TP
|
||||
.B REG_EBRACE
|
||||
|
|
|
@ -95,7 +95,7 @@ set to indicate the cause of the error.
|
|||
.TP
|
||||
.B EINVAL
|
||||
.I name
|
||||
contained an \'=\' character.
|
||||
contained an \(aq=\(aq character.
|
||||
.SH "CONFORMING TO"
|
||||
4.3BSD, POSIX.1-2001.
|
||||
.SH "NOTES"
|
||||
|
@ -113,11 +113,11 @@ POSIX.1-2001-compliant prototype shown in the SYNOPSIS.
|
|||
.SH BUGS
|
||||
POSIX.1-2001 specifies that if
|
||||
.I name
|
||||
contains an \'=\' character, then
|
||||
contains an \(aq=\(aq character, then
|
||||
.BR setenv ()
|
||||
should fail with the error
|
||||
.BR EINVAL ;
|
||||
however, versions of glibc before 2.3.4 allowed an \'=\' sign in
|
||||
however, versions of glibc before 2.3.4 allowed an \(aq=\(aq sign in
|
||||
.IR name .
|
||||
.SH "SEE ALSO"
|
||||
.BR clearenv (3),
|
||||
|
|
|
@ -249,7 +249,7 @@ foo(va_alist)
|
|||
.in
|
||||
On some systems,
|
||||
.I va_end
|
||||
contains a closing \'}\' matching a \'{\' in
|
||||
contains a closing \(aq}\(aq matching a \(aq{\(aq in
|
||||
.IR va_start ,
|
||||
so that both macros must occur in the same function, and in a way
|
||||
that allows this.
|
||||
|
@ -289,15 +289,15 @@ foo(char *fmt, ...)
|
|||
va_start(ap, fmt);
|
||||
while (*fmt)
|
||||
switch (*fmt++) {
|
||||
case \'s\': /* string */
|
||||
case \(aqs\(aq: /* string */
|
||||
s = va_arg(ap, char *);
|
||||
printf("string %s\en", s);
|
||||
break;
|
||||
case \'d\': /* int */
|
||||
case \(aqd\(aq: /* int */
|
||||
d = va_arg(ap, int);
|
||||
printf("int %d\en", d);
|
||||
break;
|
||||
case \'c\': /* char */
|
||||
case \(aqc\(aq: /* char */
|
||||
/* need a cast here since va_arg only
|
||||
takes fully promoted types */
|
||||
c = (char) va_arg(ap, int);
|
||||
|
|
|
@ -37,7 +37,7 @@ stpcpy \- copy a string returning a pointer to its end
|
|||
The
|
||||
.BR stpcpy ()
|
||||
function copies the string pointed to by \fIsrc\fP
|
||||
(including the terminating \'\\0\' character) to the array pointed to by
|
||||
(including the terminating \(aq\\0\(aq character) to the array pointed to by
|
||||
\fIdest\fP.
|
||||
The strings may not overlap, and the destination string
|
||||
\fIdest\fP must be large enough to receive the copy.
|
||||
|
|
|
@ -24,15 +24,16 @@ stpncpy \- copy a fixed-size string, returning a pointer to its end
|
|||
The
|
||||
.BR stpncpy ()
|
||||
function copies at most \fIn\fP characters from the string
|
||||
pointed to by \fIsrc\fP, including the terminating \'\\0\' character, to the
|
||||
array pointed to by \fIdest\fP.
|
||||
pointed to by \fIsrc\fP, including the terminating \(aq\\0\(aq character,
|
||||
to the array pointed to by \fIdest\fP.
|
||||
Exactly \fIn\fP characters are written at
|
||||
\fIdest\fP.
|
||||
If the length \fIstrlen(src)\fP is smaller than \fIn\fP, the
|
||||
remaining characters in the array pointed to by \fIdest\fP are filled
|
||||
with \'\\0\' characters.
|
||||
with \(aq\\0\(aq characters.
|
||||
If the length \fIstrlen(src)\fP is greater or equal to
|
||||
\fIn\fP, the string pointed to by \fIdest\fP will not be \'\\0\' terminated.
|
||||
\fIn\fP, the string pointed to by \fIdest\fP will
|
||||
not be \(aq\\0\(aq terminated.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
.PP
|
||||
|
|
|
@ -42,7 +42,7 @@ strcat, strncat \- concatenate two strings
|
|||
The
|
||||
.BR strcat ()
|
||||
function appends the \fIsrc\fP string to the
|
||||
\fIdest\fP string, overwriting the null byte (\'\\0\') at the end of
|
||||
\fIdest\fP string, overwriting the null byte (\(aq\\0\(aq) at the end of
|
||||
\fIdest\fP, and then adds a terminating null byte.
|
||||
The strings may not overlap, and the \fIdest\fP string must have
|
||||
enough space for the result.
|
||||
|
@ -79,9 +79,9 @@ strncat(char *dest, const char *src, size_t n)
|
|||
size_t dest_len = strlen(dest);
|
||||
size_t i;
|
||||
|
||||
for (i = 0 ; i < n && src[i] != \'\\0\' ; i++)
|
||||
for (i = 0 ; i < n && src[i] != \(aq\\0\(aq ; i++)
|
||||
dest[dest_len + i] = src[i];
|
||||
dest[dest_len + i] = \'\\0\';
|
||||
dest[dest_len + i] = \(aq\\0\(aq;
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ strcpy, strncpy \- copy a string
|
|||
The
|
||||
.BR strcpy ()
|
||||
function copies the string pointed to by \fIsrc\fP,
|
||||
including the terminating null byte (\'\\0\'),
|
||||
including the terminating null byte (\(aq\\0\(aq),
|
||||
to the buffer pointed to by \fIdest\fP.
|
||||
The strings may not overlap, and the destination string
|
||||
\fIdest\fP must be large enough to receive the copy.
|
||||
|
@ -78,10 +78,10 @@ char*
|
|||
strncpy(char *dest, const char *src, size_t n){
|
||||
size_t i;
|
||||
|
||||
for (i = 0 ; i < n && src[i] != \'\\0\' ; i++)
|
||||
for (i = 0 ; i < n && src[i] != \(aq\\0\(aq ; i++)
|
||||
dest[i] = src[i];
|
||||
for ( ; i < n ; i++)
|
||||
dest[i] = \'\\0\';
|
||||
dest[i] = \(aq\\0\(aq;
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ as follows:
|
|||
|
||||
strncpy(buf, str, n);
|
||||
if (n > 0)
|
||||
buf[n - 1]= \'\\0\';
|
||||
buf[n - 1]= \(aq\\0\(aq;
|
||||
.fi
|
||||
.in
|
||||
.SH BUGS
|
||||
|
|
|
@ -70,7 +70,7 @@ The
|
|||
function is similar, but only copies at most
|
||||
\fIn\fP characters.
|
||||
If \fIs\fP is longer than \fIn\fP, only \fIn\fP
|
||||
characters are copied, and a terminating null byte (\'\\0\') is added.
|
||||
characters are copied, and a terminating null byte (\(aq\\0\(aq) is added.
|
||||
|
||||
.BR strdupa ()
|
||||
and
|
||||
|
|
|
@ -37,7 +37,7 @@ result in the character array \fIs\fP of size \fImax\fP.
|
|||
.PP
|
||||
Ordinary characters in \fIformat\fP are copied to \fIs\fP
|
||||
without conversion.
|
||||
Conversion specifiers are introduced by a \'%\'
|
||||
Conversion specifiers are introduced by a \(aq%\(aq
|
||||
character.
|
||||
Immediately following it there can be zero or more
|
||||
of the following flags:
|
||||
|
@ -102,7 +102,7 @@ The three conversion characters are
|
|||
.TP
|
||||
.B %
|
||||
(In this case the entire specification must be exactly "%%".)
|
||||
Put a \'%\' character in the result string.
|
||||
Put a \(aq%\(aq character in the result string.
|
||||
.TP
|
||||
.B i
|
||||
One argument of type
|
||||
|
|
|
@ -52,7 +52,7 @@ result in the character array \fIs\fP of size \fImax\fP.
|
|||
Ordinary characters placed in the format string are copied to \fIs\fP
|
||||
without conversion.
|
||||
.I "Conversion specifications"
|
||||
are introduced by a \'%\'
|
||||
are introduced by a \(aq%\(aq
|
||||
character, and terminated by a
|
||||
.IR "conversion specifier character" ,
|
||||
and are replaced in \fIs\fP as follows:
|
||||
|
@ -256,7 +256,7 @@ format. (TZ)
|
|||
(Not supported in glibc2.)
|
||||
.TP
|
||||
.B %%
|
||||
A literal \'%\' character.
|
||||
A literal \(aq%\(aq character.
|
||||
.PP
|
||||
Some conversion specifications can be modified by preceding the
|
||||
conversion specifier character by the
|
||||
|
@ -348,7 +348,7 @@ Glibc provides some extensions for conversion specifications.
|
|||
(These extensions are not specified in POSIX.1-2001, but a few other
|
||||
systems provide similar features.)
|
||||
.\" HP-UX and Tru64 also have features like this.
|
||||
Between the \'%\' character and the conversion specifier character,
|
||||
Between the \(aq%\(aq character and the conversion specifier character,
|
||||
an optional
|
||||
.I flag
|
||||
and field
|
||||
|
|
|
@ -38,7 +38,7 @@ strlen \- calculate the length of a string
|
|||
The
|
||||
.BR strlen ()
|
||||
function calculates the length of the string
|
||||
\fIs\fP, not including the terminating \'\\0\' character.
|
||||
\fIs\fP, not including the terminating \(aq\\0\(aq character.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR strlen ()
|
||||
|
|
|
@ -23,8 +23,8 @@ strnlen \- determine the length of a fixed-size string
|
|||
The
|
||||
.BR strnlen ()
|
||||
function returns the number of characters in the string
|
||||
pointed to by \fIs\fP, not including the terminating \'\\0\' character, but
|
||||
at most \fImaxlen\fP.
|
||||
pointed to by \fIs\fP, not including the terminating \(aq\\0\(aq character,
|
||||
but at most \fImaxlen\fP.
|
||||
In doing this,
|
||||
.BR strnlen ()
|
||||
looks only at the first
|
||||
|
@ -33,7 +33,8 @@ looks only at the first
|
|||
The
|
||||
.BR strnlen ()
|
||||
function returns \fIstrlen(s)\fP, if that is less than
|
||||
\fImaxlen\fP, or \fImaxlen\fP if there is no \'\\0\' character among the first
|
||||
\fImaxlen\fP, or \fImaxlen\fP
|
||||
if there is no \(aq\\0\(aq character among the first
|
||||
\fImaxlen\fP characters pointed to by \fIs\fP.
|
||||
.SH "CONFORMING TO"
|
||||
This function is a GNU extension.
|
||||
|
|
|
@ -307,11 +307,12 @@ or
|
|||
.B _GNU_SOURCE
|
||||
are defined.
|
||||
.PP
|
||||
Before libc 5.4.13 whitespace (and the \'n\' and \'t\' specifications)
|
||||
was not handled, no \'E\' and \'O\' locale modifier characters were accepted,
|
||||
and the \'C\' specification was a synonym for the \'c\' specification.
|
||||
Before libc 5.4.13 whitespace
|
||||
(and the \(aqn\(aq and \(aqt\(aq specifications) was not handled,
|
||||
no \(aqE\(aq and \(aqO\(aq locale modifier characters were accepted,
|
||||
and the \(aqC\(aq specification was a synonym for the \(aqc\(aq specification.
|
||||
.PP
|
||||
The \'y\' (year in century) specification is taken to specify a year
|
||||
The \(aqy\(aq (year in century) specification is taken to specify a year
|
||||
in the 20th century by libc4 and libc5.
|
||||
It is taken to be a year
|
||||
in the range 1950-2049 by glibc 2.0.
|
||||
|
|
|
@ -53,7 +53,7 @@ and does nothing else.
|
|||
Otherwise, this function finds the first token
|
||||
in the string \fI*stringp\fP, where tokens
|
||||
are delimited by symbols in the string \fIdelim\fP.
|
||||
This token is terminated with a \'\\0\' character
|
||||
This token is terminated with a \(aq\\0\(aq character
|
||||
(by overwriting the delimiter)
|
||||
and \fI*stringp\fP is updated to point past the token.
|
||||
In case no delimiter was found, the token is taken to be
|
||||
|
|
|
@ -48,7 +48,7 @@ The
|
|||
.BR strstr ()
|
||||
function finds the first occurrence of the substring
|
||||
\fIneedle\fP in the string \fIhaystack\fP.
|
||||
The terminating \'\\0\' characters are not compared.
|
||||
The terminating \(aq\\0\(aq characters are not compared.
|
||||
|
||||
The
|
||||
.BR strcasestr ()
|
||||
|
|
|
@ -79,7 +79,7 @@ representation, respectively.
|
|||
The expected form of the (initial portion of the) string is
|
||||
optional leading white space as recognized by
|
||||
.BR isspace (3),
|
||||
an optional plus (\'+\') or minus sign (\'\-\') and then either
|
||||
an optional plus (\(aq+\(aq) or minus sign (\(aq\-\(aq) and then either
|
||||
(i) a decimal number, or (ii) a hexadecimal number,
|
||||
or (iii) an infinity, or (iv) a NAN (not-a-number).
|
||||
.LP
|
||||
|
@ -87,8 +87,8 @@ A
|
|||
.I "decimal number"
|
||||
consists of a non-empty sequence of decimal digits
|
||||
possibly containing a radix character (decimal point, locale-dependent,
|
||||
usually \'.\'), optionally followed by a decimal exponent.
|
||||
A decimal exponent consists of an \'E\' or \'e\', followed by an
|
||||
usually \(aq.\(aq), optionally followed by a decimal exponent.
|
||||
A decimal exponent consists of an \(aqE\(aq or \(aqe\(aq, followed by an
|
||||
optional plus or minus sign, followed by a non-empty sequence of
|
||||
decimal digits, and indicates multiplication by a power of 10.
|
||||
.LP
|
||||
|
@ -98,7 +98,7 @@ consists of a "0x" or "0X" followed by a non-empty sequence of
|
|||
hexadecimal digits possibly containing a radix character,
|
||||
optionally followed by a binary exponent.
|
||||
A binary exponent
|
||||
consists of a \'P\' or \'p\', followed by an optional
|
||||
consists of a \(aqP\(aq or \(aqp\(aq, followed by an optional
|
||||
plus or minus sign, followed by a non-empty sequence of
|
||||
decimal digits, and indicates multiplication by a power of 2.
|
||||
At least one of radix character and binary exponent must be present.
|
||||
|
@ -109,8 +109,8 @@ is either "INF" or "INFINITY", disregarding case.
|
|||
.LP
|
||||
A
|
||||
.I NAN
|
||||
is "NAN" (disregarding case) optionally followed by \'(\',
|
||||
a sequence of characters, followed by \')\'.
|
||||
is "NAN" (disregarding case) optionally followed by \(aq(\(aq,
|
||||
a sequence of characters, followed by \(aq)\(aq.
|
||||
The character string specifies in an implementation-dependent
|
||||
way the type of NAN.
|
||||
.SH "RETURN VALUE"
|
||||
|
|
|
@ -181,7 +181,7 @@ main(int argc, char *argv[])
|
|||
An example of the output produced by this program is the following:
|
||||
.PP
|
||||
.nf
|
||||
$ ./a.out \'a/bbb///cc;xxx:yyy:\' \':;\' \'/\'
|
||||
$ ./a.out \(aqa/bbb///cc;xxx:yyy:\(aq \(aq:;\(aq \(aq/\(aq
|
||||
1: a/bbb///cc
|
||||
\-\-> a
|
||||
\-\-> bbb
|
||||
|
|
|
@ -59,20 +59,20 @@ which must be between 2 and 36 inclusive, or be the special value 0.
|
|||
The string may begin with an arbitrary amount of white space (as
|
||||
determined by
|
||||
.BR isspace (3))
|
||||
followed by a single optional \'+\' or \'\-\' sign.
|
||||
followed by a single optional \(aq+\(aq or \(aq\-\(aq sign.
|
||||
If \fIbase\fP is zero or 16, the string may then include a
|
||||
"0x" prefix, and the number will be read in base 16; otherwise, a
|
||||
zero \fIbase\fP is taken as 10 (decimal) unless the next character
|
||||
is \'0\', in which case it is taken as 8 (octal).
|
||||
is \(aq0\(aq, in which case it is taken as 8 (octal).
|
||||
.PP
|
||||
The remainder of the string is converted to a
|
||||
.I long int
|
||||
value
|
||||
in the obvious manner, stopping at the first character which is not a
|
||||
valid digit in the given base.
|
||||
(In bases above 10, the letter \'A\' in
|
||||
either upper or lower case represents 10, \'B\' represents 11, and so
|
||||
forth, with \'Z\' representing 35.)
|
||||
(In bases above 10, the letter \(aqA\(aq in
|
||||
either upper or lower case represents 10, \(aqB\(aq represents 11, and so
|
||||
forth, with \(aqZ\(aq representing 35.)
|
||||
.PP
|
||||
If \fIendptr\fP is not NULL,
|
||||
.BR strtol ()
|
||||
|
@ -83,8 +83,8 @@ all,
|
|||
.BR strtol ()
|
||||
stores the original value of \fInptr\fP in
|
||||
\fI*endptr\fP (and returns 0).
|
||||
In particular, if \fI*nptr\fP is not \'\\0\' but \fI**endptr\fP
|
||||
is \'\\0\' on return, the entire string is valid.
|
||||
In particular, if \fI*nptr\fP is not \(aq\\0\(aq but \fI**endptr\fP
|
||||
is \(aq\\0\(aq on return, the entire string is valid.
|
||||
.PP
|
||||
The
|
||||
.BR strtoll ()
|
||||
|
@ -190,14 +190,14 @@ Some examples of the results produced by this program are the following:
|
|||
|
||||
$ ./a.out 123
|
||||
strtol() returned 123
|
||||
$ ./a.out \' 123\'
|
||||
$ ./a.out \(aq 123\(aq
|
||||
strtol() returned 123
|
||||
$ ./a.out 123abc
|
||||
strtol() returned 123
|
||||
Further characters after number: abc
|
||||
$ ./a.out 123abc 55
|
||||
strtol: Invalid argument
|
||||
$ ./a.out \'\'
|
||||
$ ./a.out \(aq\(aq
|
||||
No digits were found
|
||||
$ ./a.out 4000000000
|
||||
strtol: Numerical result out of range
|
||||
|
@ -247,7 +247,7 @@ main(int argc, char *argv[])
|
|||
|
||||
printf("strtol() returned %ld\\n", val);
|
||||
|
||||
if (*endptr != \'\\0\') /* Not necessarily an error... */
|
||||
if (*endptr != \(aq\\0\(aq) /* Not necessarily an error... */
|
||||
printf("Further characters after number: %s\\n", endptr);
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
|
@ -65,21 +65,21 @@ the special value 0.
|
|||
The string may begin with an arbitrary amount of white space (as
|
||||
determined by
|
||||
.BR isspace (3))
|
||||
followed by a single optional \'+\' or \'\-\'
|
||||
followed by a single optional \(aq+\(aq or \(aq\-\(aq
|
||||
sign.
|
||||
If \fIbase\fP is zero or 16, the string may then include a
|
||||
"0x" prefix, and the number will be read in base 16; otherwise, a
|
||||
zero \fIbase\fP is taken as 10 (decimal) unless the next character
|
||||
is \'0\', in which case it is taken as 8 (octal).
|
||||
is \(aq0\(aq, in which case it is taken as 8 (octal).
|
||||
.PP
|
||||
The remainder of the string is converted to an
|
||||
.I "unsigned long int"
|
||||
value in the obvious manner,
|
||||
stopping at the first character which is not a
|
||||
valid digit in the given base.
|
||||
(In bases above 10, the letter \'A\' in
|
||||
either upper or lower case represents 10, \'B\' represents 11, and so
|
||||
forth, with \'Z\' representing 35.)
|
||||
(In bases above 10, the letter \(aqA\(aq in
|
||||
either upper or lower case represents 10, \(aqB\(aq represents 11, and so
|
||||
forth, with \(aqZ\(aq representing 35.)
|
||||
.PP
|
||||
If \fIendptr\fP is not NULL,
|
||||
.BR strtoul ()
|
||||
|
@ -90,8 +90,8 @@ all,
|
|||
.BR strtoul ()
|
||||
stores the original value of \fInptr\fP in
|
||||
\fI*endptr\fP (and returns 0).
|
||||
In particular, if \fI*nptr\fP is not \'\\0\' but \fI**endptr\fP
|
||||
is \'\\0\' on return, the entire string is valid.
|
||||
In particular, if \fI*nptr\fP is not \(aq\\0\(aq but \fI**endptr\fP
|
||||
is \(aq\\0\(aq on return, the entire string is valid.
|
||||
.PP
|
||||
The
|
||||
.BR strtoull ()
|
||||
|
|
|
@ -56,7 +56,7 @@ The
|
|||
.BR strxfrm ()
|
||||
function returns the number of bytes required to
|
||||
store the transformed string in \fIdest\fP excluding the
|
||||
terminating \'\\0\' character.
|
||||
terminating \(aq\\0\(aq character.
|
||||
If the value returned is \fIn\fP or more, the
|
||||
contents of \fIdest\fP are indeterminate.
|
||||
.SH "CONFORMING TO"
|
||||
|
|
|
@ -127,7 +127,7 @@ queues to be flushed, and if the terminal is the controlling
|
|||
terminal of a foreground process group, it will cause a
|
||||
\fBSIGINT\fP to be sent to this foreground process group.
|
||||
When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK
|
||||
reads as a null byte (\'\\0\'), except when \fBPARMRK\fP is set,
|
||||
reads as a null byte (\(aq\\0\(aq), except when \fBPARMRK\fP is set,
|
||||
in which case it reads as the sequence \\377 \\0 \\0.
|
||||
.TP
|
||||
.B IGNPAR
|
||||
|
@ -204,7 +204,7 @@ Send fill characters for a delay, rather than using a timed delay.
|
|||
.TP
|
||||
.B OFDEL
|
||||
(not in POSIX) Fill character is ASCII DEL (0177).
|
||||
If unset, fill character is ASCII NUL (\'\\0\').
|
||||
If unset, fill character is ASCII NUL (\(aq\\0\(aq).
|
||||
(Not implemented on Linux.)
|
||||
.TP
|
||||
.B NLDLY
|
||||
|
|
|
@ -56,21 +56,22 @@ in Unix V6, that was read by the
|
|||
.BR init (8)
|
||||
program to find out what to do with each terminal line.
|
||||
Each line consisted of three characters.
|
||||
The first character was either \'0\' or \'1\', where \'0\' meant "ignore".
|
||||
The second character denoted the terminal: \'8\' stood for "/dev/tty8".
|
||||
The first character was either \(aq0\(aq or \(aq1\(aq,
|
||||
where \(aq0\(aq meant "ignore".
|
||||
The second character denoted the terminal: \(aq8\(aq stood for "/dev/tty8".
|
||||
The third character was an argument to
|
||||
.BR getty (8)
|
||||
indicating the sequence of line speeds to try (\'\-\' was: start trying
|
||||
indicating the sequence of line speeds to try (\(aq\-\(aq was: start trying
|
||||
110 baud).
|
||||
Thus a typical line was "18\-".
|
||||
A hang on some line was solved by changing the \'1\' to a \'0\',
|
||||
A hang on some line was solved by changing the \(aq1\(aq to a \(aq0\(aq,
|
||||
signaling init, changing back again, and signaling init again.
|
||||
.LP
|
||||
In Unix V7 the format was changed: here the second character
|
||||
was the argument to
|
||||
.BR getty (8)
|
||||
indicating the sequence of line speeds to try (\'0\' was: cycle through
|
||||
300-1200-150-110 baud; \'4\' was for the on-line console DECwriter)
|
||||
indicating the sequence of line speeds to try (\(aq0\(aq was: cycle through
|
||||
300-1200-150-110 baud; \(aq4\(aq was for the on-line console DECwriter)
|
||||
while the rest of the line contained the name of the tty.
|
||||
Thus a typical line was "14console".
|
||||
.LP
|
||||
|
|
|
@ -177,7 +177,7 @@ format.
|
|||
If \fIfilespec\fP is given, it specifies another
|
||||
.BR tzfile (5)-format
|
||||
file to read the time zone information from.
|
||||
If \fIfilespec\fP does not begin with a \'/\', the file specification is
|
||||
If \fIfilespec\fP does not begin with a \(aq/\(aq, the file specification is
|
||||
relative to the system timezone directory.
|
||||
.PP
|
||||
Here's an example, once more for New Zealand:
|
||||
|
|
|
@ -28,17 +28,18 @@ function is the wide-character equivalent of the
|
|||
.BR stpcpy (3)
|
||||
function.
|
||||
It copies the wide-character string pointed to by \fIsrc\fP,
|
||||
including the terminating L\'\\0\' character, to the array pointed to by
|
||||
including the terminating L\(aq\\0\(aq character, to the array pointed to by
|
||||
\fIdest\fP.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
.PP
|
||||
The programmer must ensure that there is room for at least \fIwcslen(src)+1\fP
|
||||
The programmer must ensure that there
|
||||
is room for at least \fIwcslen(src)+1\fP
|
||||
wide characters at \fIdest\fP.
|
||||
.SH "RETURN VALUE"
|
||||
.BR wcpcpy ()
|
||||
returns a pointer to the end of the wide-character string
|
||||
\fIdest\fP, that is, a pointer to the terminating L\'\\0\' character.
|
||||
\fIdest\fP, that is, a pointer to the terminating L\(aq\\0\(aq character.
|
||||
.SH "CONFORMING TO"
|
||||
This function is a GNU extension.
|
||||
.SH "SEE ALSO"
|
||||
|
|
|
@ -30,16 +30,17 @@ of the
|
|||
.BR stpncpy (3)
|
||||
function.
|
||||
It copies at most \fIn\fP wide characters from the wide-character
|
||||
string pointed to by \fIsrc\fP, including the terminating L\'\\0\' character,
|
||||
string pointed to by \fIsrc\fP,
|
||||
including the terminating L\(aq\\0\(aq character,
|
||||
to the array pointed to by \fIdest\fP.
|
||||
Exactly \fIn\fP wide characters are
|
||||
written at \fIdest\fP.
|
||||
If the length \fIwcslen(src)\fP is smaller than \fIn\fP,
|
||||
the remaining wide characters in the array pointed to
|
||||
by \fIdest\fP are filled with L\'\\0\' characters.
|
||||
by \fIdest\fP are filled with L\(aq\\0\(aq characters.
|
||||
If the length \fIwcslen(src)\fP is greater or equal
|
||||
to \fIn\fP, the string pointed to by \fIdest\fP will
|
||||
not be L\'\\0\' terminated.
|
||||
not be L\(aq\\0\(aq terminated.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
.PP
|
||||
|
|
|
@ -23,7 +23,7 @@ wcrtomb \- convert a wide character to a multibyte sequence
|
|||
.SH DESCRIPTION
|
||||
The main case for this function is when \fIs\fP is
|
||||
not NULL and \fIwc\fP is not
|
||||
L\'\\0\'.
|
||||
L\(aq\\0\(aq.
|
||||
In this case, the
|
||||
.BR wcrtomb ()
|
||||
function
|
||||
|
@ -36,7 +36,7 @@ returns the length of said multibyte representation,
|
|||
that is, the number of bytes
|
||||
written at \fIs\fP.
|
||||
.PP
|
||||
A different case is when \fIs\fP is not NULL but \fIwc\fP is L\'\\0\'.
|
||||
A different case is when \fIs\fP is not NULL but \fIwc\fP is L\(aq\\0\(aq.
|
||||
In this
|
||||
case the
|
||||
.BR wcrtomb ()
|
||||
|
@ -44,7 +44,7 @@ function stores at
|
|||
the character array pointed to by
|
||||
\fIs\fP the shift sequence needed to
|
||||
bring \fI*ps\fP back to the initial state,
|
||||
followed by a \'\\0\' byte.
|
||||
followed by a \(aq\\0\(aq byte.
|
||||
It updates the shift state \fI*ps\fP (i.e., brings
|
||||
it into the initial state),
|
||||
and returns the length of the shift sequence plus
|
||||
|
@ -52,7 +52,7 @@ one, that is, the number of bytes written at \fIs\fP.
|
|||
.PP
|
||||
A third case is when \fIs\fP is NULL.
|
||||
In this case \fIwc\fP is ignored,
|
||||
and the function effectively returns wcrtomb(buf,L\'\\0\',\fIps\fP) where
|
||||
and the function effectively returns wcrtomb(buf,L\(aq\\0\(aq,\fIps\fP) where
|
||||
buf is an internal anonymous buffer.
|
||||
.PP
|
||||
In all of the above cases, if \fIps\fP is a NULL pointer, a static anonymous
|
||||
|
|
|
@ -28,8 +28,8 @@ of the
|
|||
.BR strcat (3)
|
||||
function.
|
||||
It copies the wide-character string pointed to by \fIsrc\fP,
|
||||
including the terminating L\'\\0\' character, to the end of the wide-character
|
||||
string pointed to by \fIdest\fP.
|
||||
including the terminating L\(aq\\0\(aq character,
|
||||
to the end of the wide-character string pointed to by \fIdest\fP.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
.PP
|
||||
|
|
|
@ -28,7 +28,7 @@ of the
|
|||
.BR strcpy (3)
|
||||
function.
|
||||
It copies the wide-character string pointed to by \fIsrc\fP,
|
||||
including the terminating L\'\\0\' character, to the array pointed to by
|
||||
including the terminating L\(aq\\0\(aq character, to the array pointed to by
|
||||
\fIdest\fP.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
|
|
|
@ -28,7 +28,7 @@ of the
|
|||
.BR strlen (3)
|
||||
function.
|
||||
It determines the length of the wide-character string pointed to
|
||||
by \fIs\fP, not including the terminating L\'\\0\' character.
|
||||
by \fIs\fP, not including the terminating L\(aq\\0\(aq character.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR wcslen ()
|
||||
|
|
|
@ -28,7 +28,7 @@ function is the wide-character equivalent of the
|
|||
function.
|
||||
It copies at most \fIn\fP wide characters from the wide-character
|
||||
string pointed to by \fIsrc\fP to the end of the wide-character string pointed
|
||||
to by \fIdest\fP, and adds a terminating L\'\\0\' character.
|
||||
to by \fIdest\fP, and adds a terminating L\(aq\\0\(aq character.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
.PP
|
||||
|
|
|
@ -30,7 +30,7 @@ It compares the wide-character string pointed to by \fIs1\fP and the
|
|||
wide-character string pointed to by \fIs2\fP, but at most \fIn\fP wide
|
||||
characters from each string.
|
||||
In each string, the comparison extends only up
|
||||
to the first occurrence of a L\'\\0\' character, if any.
|
||||
to the first occurrence of a L\(aq\\0\(aq character, if any.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR wcsncmp ()
|
||||
|
|
|
@ -27,17 +27,18 @@ function is the wide-character equivalent of the
|
|||
.BR strncpy (3)
|
||||
function.
|
||||
It copies at most \fIn\fP wide characters from the wide-character
|
||||
string pointed to by \fIsrc\fP, including the terminating L\'\\0\' character,
|
||||
string pointed to by \fIsrc\fP,
|
||||
including the terminating L\(aq\\0\(aq character,
|
||||
to the array pointed to by \fIdest\fP.
|
||||
Exactly \fIn\fP wide characters are
|
||||
written at \fIdest\fP.
|
||||
If the length \fIwcslen(src)\fP is smaller than \fIn\fP,
|
||||
the remaining wide characters in the array
|
||||
pointed to by \fIdest\fP are filled
|
||||
with L\'\\0\' characters.
|
||||
with L\(aq\\0\(aq characters.
|
||||
If the length \fIwcslen(src)\fP is greater or equal
|
||||
to \fIn\fP, the string pointed to by \fIdest\fP
|
||||
will not be L\'\\0\' terminated.
|
||||
will not be L\(aq\\0\(aq terminated.
|
||||
.PP
|
||||
The strings may not overlap.
|
||||
.PP
|
||||
|
|
|
@ -28,7 +28,7 @@ of the
|
|||
.BR strnlen (3)
|
||||
function.
|
||||
It returns the number of wide-characters in the string pointed to by
|
||||
\fIs\fP, not including the terminating L\'\\0\' character, but at most
|
||||
\fIs\fP, not including the terminating L\(aq\\0\(aq character, but at most
|
||||
\fImaxlen\fP.
|
||||
In doing this,
|
||||
.BR wcsnlen ()
|
||||
|
@ -38,7 +38,7 @@ wide-characters at \fIs\fP and never beyond \fIs+maxlen\fP.
|
|||
The
|
||||
.BR wcsnlen ()
|
||||
function returns \fIwcslen(s)\fP, if that is less than
|
||||
\fImaxlen\fP, or \fImaxlen\fP if there is no L\'\\0\' character among the
|
||||
\fImaxlen\fP, or \fImaxlen\fP if there is no L\(aq\\0\(aq character among the
|
||||
first \fImaxlen\fP wide characters pointed to by \fIs\fP.
|
||||
.SH "CONFORMING TO"
|
||||
This function is a GNU extension.
|
||||
|
|
|
@ -58,17 +58,17 @@ is returned,
|
|||
and \fIerrno\fP is set to \fBEILSEQ\fP.
|
||||
.PP
|
||||
2. \fInwc\fP wide characters have been
|
||||
converted without encountering a L\'\\0\',
|
||||
converted without encountering a L\(aq\\0\(aq,
|
||||
or the length limit forces a stop.
|
||||
In this case \fI*src\fP is left pointing
|
||||
to the next wide character to be converted, and the number of bytes written
|
||||
to \fIdest\fP is returned.
|
||||
.PP
|
||||
3. The wide-character string has been completely converted, including the
|
||||
terminating L\'\\0\' (which has the side effect of bringing back \fI*ps\fP
|
||||
terminating L\(aq\\0\(aq (which has the side effect of bringing back \fI*ps\fP
|
||||
to the initial state).
|
||||
In this case \fI*src\fP is set to NULL, and the number
|
||||
of bytes written to \fIdest\fP, excluding the terminating \'\\0\' byte, is
|
||||
of bytes written to \fIdest\fP, excluding the terminating \(aq\\0\(aq byte, is
|
||||
returned.
|
||||
.PP
|
||||
If \fIdest\fP is NULL, \fIlen\fP is ignored,
|
||||
|
|
|
@ -57,10 +57,10 @@ and the number of bytes written to
|
|||
\fIdest\fP is returned.
|
||||
.PP
|
||||
3. The wide-character string has been completely converted, including the
|
||||
terminating L\'\\0\' (which has the side effect of bringing back \fI*ps\fP
|
||||
terminating L\(aq\\0\(aq (which has the side effect of bringing back \fI*ps\fP
|
||||
to the initial state).
|
||||
In this case \fI*src\fP is set to NULL, and the number
|
||||
of bytes written to \fIdest\fP, excluding the terminating \'\\0\' byte, is
|
||||
of bytes written to \fIdest\fP, excluding the terminating \(aq\\0\(aq byte, is
|
||||
returned.
|
||||
.PP
|
||||
If \fIdest\fP is NULL, \fIlen\fP is ignored,
|
||||
|
|
|
@ -27,7 +27,7 @@ function is the wide-character equivalent of the
|
|||
.BR strstr (3)
|
||||
function.
|
||||
It searches for the first occurrence of the wide-character string
|
||||
\fIneedle\fP (without its terminating L\'\\0\' character) as a substring in
|
||||
\fIneedle\fP (without its terminating L\(aq\\0\(aq character) as a substring in
|
||||
the wide-character string \fIhaystack\fP.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
|
|
|
@ -48,7 +48,8 @@ Otherwise, the
|
|||
function recognizes the beginning of a token
|
||||
and returns a pointer to it, but before doing that, it zero-terminates the
|
||||
token by replacing the next wide-character which occurs in \fIdelim\fP with
|
||||
a L\'\\0\' character, and it updates \fI*ptr\fP so that subsequent calls will
|
||||
a L\(aq\\0\(aq character,
|
||||
and it updates \fI*ptr\fP so that subsequent calls will
|
||||
continue searching after the end of recognized token.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
|
|
|
@ -42,10 +42,10 @@ In this case the number of bytes written to
|
|||
\fIdest\fP is returned, but the shift state at this point is lost.
|
||||
.PP
|
||||
3. The wide-character string has been completely converted, including the
|
||||
terminating L\'\\0\'.
|
||||
terminating L\(aq\\0\(aq.
|
||||
In this case the conversion ends in the initial state.
|
||||
The number of bytes written to \fIdest\fP, excluding the terminating \'\\0\'
|
||||
byte, is returned.
|
||||
The number of bytes written to \fIdest\fP,
|
||||
excluding the terminating \(aq\\0\(aq byte, is returned.
|
||||
.PP
|
||||
The programmer must ensure that there is room for at least \fIn\fP bytes
|
||||
at \fIdest\fP.
|
||||
|
|
|
@ -27,7 +27,7 @@ function returns the number of columns
|
|||
needed to represent the wide character \fIc\fP.
|
||||
If \fIc\fP is a printable wide character, the value
|
||||
is at least 0.
|
||||
If \fIc\fP is L\'\\0\', the value is 0.
|
||||
If \fIc\fP is L\(aq\\0\(aq, the value is 0.
|
||||
Otherwise \-1 is returned.
|
||||
.SH "RETURN VALUE"
|
||||
The
|
||||
|
|
|
@ -306,8 +306,8 @@ where \fIx,y\fP is the cursor location.
|
|||
.\"
|
||||
These are not described in ECMA-48.
|
||||
We list the Set Mode sequences;
|
||||
the Reset Mode sequences are obtained by replacing the final \'h\'
|
||||
by \'l\'.
|
||||
the Reset Mode sequences are obtained by replacing the final \(aqh\(aq
|
||||
by \(aql\(aq.
|
||||
.TP
|
||||
ESC [ ? 1 h
|
||||
DECCKM (default off): When set, the cursor keys send an ESC O prefix,
|
||||
|
@ -418,7 +418,7 @@ daemon.
|
|||
The mouse tracking escape sequences generated by
|
||||
\fIxterm\fP encode numeric parameters in a single character as
|
||||
\fIvalue\fP+040.
|
||||
For example, \'!\' is 1.
|
||||
For example, \(aq!\(aq is 1.
|
||||
The screen coordinate system is 1-based.
|
||||
.PP
|
||||
The X10 compatibility mode sends an escape sequence on button press
|
||||
|
|
|
@ -84,7 +84,7 @@ Allowed values are in the range 1 to 4,
|
|||
and is the number of bytes that will be received at a time from the
|
||||
DSP56001.
|
||||
These data quantities will either truncated, or padded with
|
||||
a null byte (\'\\0\') to fit the native 24-bit data format of the DSP56001.
|
||||
a null byte (\(aq\\0\(aq) to fit the native 24-bit data format of the DSP56001.
|
||||
.IP \fBDSP56K_HOST_FLAGS\fP
|
||||
read and write the host flags.
|
||||
The host flags are four
|
||||
|
|
|
@ -47,9 +47,9 @@ This is the specification, in fact 9 V suffices with most mice.
|
|||
.PP
|
||||
The mouse driver can recognize a mouse by dropping RTS to low and raising
|
||||
it again.
|
||||
About 14 ms later the mouse will send 0x4D (\'M\') on the data line.
|
||||
About 14 ms later the mouse will send 0x4D (\(aqM\(aq) on the data line.
|
||||
After a further 63 ms, a Microsoft-compatible 3-button mouse will send
|
||||
0x33 (\'3\').
|
||||
0x33 (\(aq3\(aq).
|
||||
.PP
|
||||
The relative mouse movement is sent as \fIdx\fP (positive means right)
|
||||
and \fIdy\fP (positive means down).
|
||||
|
|
|
@ -292,7 +292,7 @@ otherwise).
|
|||
In packet mode, each subsequent
|
||||
.BR read (2)
|
||||
will return a packet that either contains a single non-zero control byte,
|
||||
or has a single byte containing zero (\'\0\') followed by data
|
||||
or has a single byte containing zero (\(aq\0\(aq) followed by data
|
||||
written on the slave side of the pty.
|
||||
If the first byte is not
|
||||
.B TIOCPKT_DATA
|
||||
|
@ -304,9 +304,9 @@ TIOCPKT_FLUSHREAD The read queue for the terminal is flushed.
|
|||
TIOCPKT_FLUSHWRITE The write queue for the terminal is flushed.
|
||||
TIOCPKT_STOP Output to the terminal is stopped.
|
||||
TIOCPKT_START Output to the terminal is restarted.
|
||||
TIOCPKT_DOSTOP t_stopc is \'^S\' and t_startc is \'^Q\'.
|
||||
TIOCPKT_DOSTOP t_stopc is \(aq^S\(aq and t_startc is \(aq^Q\(aq.
|
||||
TIOCPKT_NOSTOP The start and stop characters are not
|
||||
\'^S\'/\'^Q\'.
|
||||
\(aq^S\(aq/\(aq^Q\(aq.
|
||||
.fi
|
||||
|
||||
While this mode is in use, the presence
|
||||
|
@ -319,7 +319,8 @@ This mode is used by
|
|||
.BR rlogin (1)
|
||||
and
|
||||
.BR rlogind (8)
|
||||
to implement a remote-echoed, locally \`^S\'/\'^Q\' flow-controlled remote login.
|
||||
to implement a remote-echoed,
|
||||
locally \`^S\(aq/\(aq^Q\(aq flow-controlled remote login.
|
||||
|
||||
The BSD ioctls
|
||||
.BR TIOCSTOP ,
|
||||
|
|
|
@ -140,7 +140,7 @@ main(void)
|
|||
if (attrib & mask)
|
||||
ch |= 0x100;
|
||||
attrib = ((s & ~mask) >> 8);
|
||||
printf("ch=\'%c\' attrib=0x%02x\\n", ch, attrib);
|
||||
printf("ch=\(aq%c\(aq attrib=0x%02x\\n", ch, attrib);
|
||||
attrib ^= 0x10;
|
||||
(void) lseek(fd, \-1, 1);
|
||||
(void) write(fd, &attrib, 1);
|
||||
|
|
|
@ -111,7 +111,7 @@ core filename, as is the combination of a % followed by any
|
|||
character other than those listed above.
|
||||
All other characters in the template become a literal
|
||||
part of the core filename.
|
||||
The template may include \'/\' characters, which are interpreted
|
||||
The template may include \(aq/\(aq characters, which are interpreted
|
||||
as delimiters for directory names.
|
||||
The maximum size of the resulting core filename is 64 bytes.
|
||||
The default value in this file is "core".
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue