]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strfry...
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 7 Jun 2013 17:02:51 +0000 (19:02 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 12 Jun 2013 13:00:52 +0000 (15:00 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
20 files changed:
man3/strcasecmp.3
man3/strcat.3
man3/strchr.3
man3/strcmp.3
man3/strcoll.3
man3/strcpy.3
man3/strdup.3
man3/strfry.3
man3/strftime.3
man3/strlen.3
man3/strnlen.3
man3/strpbrk.3
man3/strsep.3
man3/strsignal.3
man3/strspn.3
man3/strstr.3
man3/strtok.3
man3/strtol.3
man3/strtoul.3
man3/strxfrm.3

index 802981f8e2bdb20ceca9d782dee4def179771167..dcd5d5a92598d6d5b721a7aa157cdfcee344fbb6 100644 (file)
@@ -41,25 +41,38 @@ strcasecmp, strncasecmp \- compare two strings ignoring case
 .SH DESCRIPTION
 The
 .BR strcasecmp ()
-function compares the two strings \fIs1\fP and
-\fIs2\fP, ignoring the case of the characters.
+function compares the two strings
+.I s1
+and
+.IR s2 ,
+ignoring the case of the characters.
 It returns an integer
-less than, equal to, or greater than zero if \fIs1\fP is found,
-respectively, to be less than, to match, or be greater than \fIs2\fP.
+less than, equal to, or greater than zero if
+.I s1
+is found,
+respectively, to be less than, to match, or be greater than
+.IR s2 .
 .PP
 The
 .BR strncasecmp ()
 function is similar, except it compares
-the only first \fIn\fP bytes of \fIs1\fP.
+the only first
+.I n
+bytes of
+.IR s1 .
 .SH RETURN VALUE
 The
 .BR strcasecmp ()
 and
 .BR strncasecmp ()
 functions return
-an integer less than, equal to, or greater than zero if \fIs1\fP
-(or the first \fIn\fP bytes thereof) is found, respectively, to be
-less than, to match, or be greater than \fIs2\fP.
+an integer less than, equal to, or greater than zero if
+.I s1
+(or the first
+.I n
+bytes thereof) is found, respectively, to be
+less than, to match, or be greater than
+.IR s2 .
 .SH CONFORMING TO
 4.4BSD, POSIX.1-2001.
 .SH SEE ALSO
index 8a2c9fdb6f206b7f6d8f08f54cd97557be85ff1d..f9ca42a329f28796f6875cf1e129b30e59d8e9cc 100644 (file)
@@ -43,11 +43,17 @@ strcat, strncat \- concatenate two strings
 .SH DESCRIPTION
 The
 .BR strcat ()
-function appends the \fIsrc\fP string to the
-\fIdest\fP string,
+function appends the
+.I src
+string to the
+.I dest
+string,
 overwriting the terminating 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
+.IR dest ,
+and then adds a terminating null byte.
+The strings may not overlap, and the
+.I dest
+string must have
 enough space for the result.
 If
 .I dest
@@ -58,21 +64,41 @@ The
 .BR strncat ()
 function is similar, except that
 .IP * 3
-it will use at most \fIn\fP bytes from \fIsrc\fP; and
+it will use at most
+.I n
+bytes from
+.IR src ;
+and
 .IP *
-\fIsrc\fP does not need to be null-terminated if it contains
-\fIn\fP or more bytes.
+.I src
+does not need to be null-terminated if it contains
+.I n
+or more bytes.
 .PP
 As with
 .BR strcat (),
-the resulting string in \fIdest\fP is always null-terminated.
+the resulting string in
+.I dest
+is always null-terminated.
 .PP
-If \fIsrc\fP contains \fIn\fP or more bytes,
+If
+.IR src 
+contains
+.I n
+or more bytes,
 .BR strncat ()
-writes \fIn+1\fP bytes to \fIdest\fP (\fIn\fP
-from \fIsrc\fP plus the terminating null byte).
-Therefore, the size of \fIdest\fP must be at least
-\fIstrlen(dest)+n+1\fP.
+writes 
+.I n+1
+bytes to
+.I dest
+.RI ( n
+from
+.I src
+plus the terminating null byte).
+Therefore, the size of
+.I dest
+must be at least
+.IR "strlen(dest)+n+1" .
 
 A simple implementation of
 .BR strncat ()
@@ -99,7 +125,8 @@ The
 .BR strcat ()
 and
 .BR strncat ()
-functions return a pointer to the resulting string \fIdest\fP.
+functions return a pointer to the resulting string
+.IR dest .
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH NOTES
index b563d123aa1f34c6c5935a2a0b5efec88497782d..2073cba0580a763f68fa072b747ec484026ea1e9 100644 (file)
@@ -96,7 +96,10 @@ The
 function returns a pointer to
 the matched character,
 or a pointer to the null
-byte at the end of \fIs\fP (i.e., \fIs+strlen(s)\fP)
+byte at the end of
+.I s
+(i.e., 
+.IR "s+strlen(s)" )
 if the character is not found.
 .SH VERSIONS
 .BR strchrnul ()
index 24b22c4615d6caab1790465fd4a168c9db86b9ba..d5b88fabd5fe0117355ab7731de66d378b747c2b 100644 (file)
@@ -43,25 +43,39 @@ strcmp, strncmp \- compare two strings
 .SH DESCRIPTION
 The
 .BR strcmp ()
-function compares the two strings \fIs1\fP and
-\fIs2\fP.
+function compares the two strings
+.I s1
+and
+.IR s2 .
 It returns an integer less than, equal to, or greater
-than zero if \fIs1\fP is found, respectively, to be less than,
-to match, or be greater than \fIs2\fP.
+than zero if
+.I s1
+is found, respectively, to be less than,
+to match, or be greater than
+.IR s2 .
 .PP
 The
 .BR strncmp ()
 function is similar, except it compares
-the only first (at most) \fIn\fP bytes of \fIs1\fP and \fIs2\fP.
+the only first (at most)
+.IR n 
+bytes of
+.I s1
+and
+.IR s2 .
 .SH RETURN VALUE
 The
 .BR strcmp ()
 and
 .BR strncmp ()
 functions return an integer
-less than, equal to, or greater than zero if \fIs1\fP (or the first
-\fIn\fP bytes thereof) is found, respectively, to be less than, to
-match, or be greater than \fIs2\fP.
+less than, equal to, or greater than zero if
+.I s1
+(or the first
+.I n
+bytes thereof) is found, respectively, to be less than, to
+match, or be greater than
+.IR s2 .
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH SEE ALSO
index e2cf33ae3ab24157c41732b78b526087a50df685..faffab1f7d41fd851358bb7ded288cf40b152805 100644 (file)
@@ -39,27 +39,41 @@ strcoll \- compare two strings using the current locale
 .SH DESCRIPTION
 The
 .BR strcoll ()
-function compares the two strings \fIs1\fP and
-\fIs2\fP.
+function compares the two strings
+.I s1
+and
+.IR s2 .
 It returns an integer less than, equal to, or greater
-than zero if \fIs1\fP is found, respectively, to be less than,
-to match, or be greater than \fIs2\fP.
+than zero if
+.I s1
+is found, respectively, to be less than,
+to match, or be greater than
+.IR s2 .
 The comparison is based on
 strings interpreted as appropriate for the program's current locale
-for category \fBLC_COLLATE\fP.
+for category
+.BR LC_COLLATE .
 (See
 .BR setlocale (3).)
 .SH RETURN VALUE
 The
 .BR strcoll ()
 function returns an integer less than, equal to,
-or greater than zero if \fIs1\fP is found, respectively, to be less
-than, to match, or be greater than \fIs2\fP, when both are interpreted
+or greater than zero if
+.I s1
+is found, respectively, to be less
+than, to match, or be greater than
+.IR s2 ,
+when both are interpreted
 as appropriate for the current locale.
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH NOTES
-In the \fI"POSIX"\fP or \fI"C"\fP locales
+In the 
+.I "POSIX"
+or
+.I ""C"
+locales
 .BR strcoll ()
 is equivalent to
 .BR strcmp (3).
index 909dec033e21586c93b09befd199f2e8a5d5bc3d..675b72e52cab7abb5271e0b8e962630ac7358dfe 100644 (file)
@@ -46,22 +46,33 @@ strcpy, strncpy \- copy a string
 .SH DESCRIPTION
 The
 .BR strcpy ()
-function copies the string pointed to by \fIsrc\fP,
+function copies the string pointed to by
+.IR src ,
 including the terminating null byte (\(aq\\0\(aq),
-to the buffer pointed to by \fIdest\fP.
+to the buffer pointed to by
+.IR dest .
 The strings may not overlap, and the destination string
-\fIdest\fP must be large enough to receive the copy.
+.I dest
+must be large enough to receive the copy.
 .IR "Beware of buffer overruns!"
 (See BUGS.)
 .PP
 The
 .BR strncpy ()
 function is similar, except that at most
-\fIn\fP bytes of \fIsrc\fP are copied.
+.I n
+bytes of
+.I src
+are copied.
 .BR Warning :
 If there is no null byte
-among the first \fIn\fP bytes of \fIsrc\fP,
-the string placed in \fIdest\fP will not be null-terminated.
+among the first
+.I n
+bytes of
+.IR src ,
+the string placed in
+.I dest
+will not be null-terminated.
 .PP
 If the length of
 .I src
@@ -100,7 +111,8 @@ The
 and
 .BR strncpy ()
 functions return a pointer to
-the destination string \fIdest\fP.
+the destination string
+.IR dest .
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH NOTES
@@ -108,8 +120,12 @@ Some programmers consider
 .BR strncpy ()
 to be inefficient and error prone.
 If the programmer knows (i.e., includes code to test!)
-that the size of \fIdest\fP is greater than
-the length of \fIsrc\fP, then
+that the size of
+.I dest
+is greater than
+the length of
+.IR src ,
+then
 .BR strcpy ()
 can be used.
 
@@ -122,10 +138,13 @@ and that unused bytes in the target buffer are zeroed out
 written to media or transmitted to another process via an
 interprocess communication technique).
 
-If there is no terminating null byte in the first \fIn\fP
-bytes of \fIsrc\fP,
+If there is no terminating null byte in the first
+.I n
+bytes of
+.IR src ,
 .BR strncpy ()
-produces an unterminated string in \fIdest\fP.
+produces an unterminated string in
+.IR dest .
 You can force termination using something like the following:
 .in +4n
 .nf
index 9b3a4c0f5bea3d5903b031e582286ad7d91dfb1b..ca58c9226a8043c7ae8fc9422e443f6b43dd2f2b 100644 (file)
@@ -78,7 +78,8 @@ _GNU_SOURCE
 The
 .BR strdup ()
 function returns a pointer to a new string which
-is a duplicate of the string \fIs\fP.
+is a duplicate of the string
+.IR s .
 Memory for the new string is
 obtained with
 .BR malloc (3),
@@ -88,8 +89,14 @@ and can be freed with
 The
 .BR strndup ()
 function is similar, but copies at most
-\fIn\fP bytes.
-If \fIs\fP is longer than \fIn\fP, only \fIn\fP
+.I n
+bytes.
+If
+.I s
+is longer than
+.IR n ,
+only
+.I n
 bytes are copied, and a terminating null byte (\(aq\\0\(aq) is added.
 
 .BR strdupa ()
index 98235ce4e1cde8a64352e8d4f66acbd0d559d26f..2d69563a7b89f351e5bd209ae69368e97e129066 100644 (file)
@@ -41,11 +41,14 @@ strfry \- randomize a string
 .SH DESCRIPTION
 The
 .BR strfry ()
-function randomizes the contents of \fIstring\fP by
+function randomizes the contents of
+.I string
+by
 using
 .BR rand (3)
 to randomly swap characters in the string.
-The result is an anagram of \fIstring\fP.
+The result is an anagram of
+.IR string .
 .SH RETURN VALUE
 The
 .BR strfry ()
index fde487d820490121d7932cf722068ebd5207b8b7..576826f0887a11f8c711183f783a209cc3311002 100644 (file)
@@ -47,9 +47,15 @@ strftime \- format date and time
 .SH DESCRIPTION
 The
 .BR strftime ()
-function formats the broken-down time \fItm\fP
-according to the format specification \fIformat\fP and places the
-result in the character array \fIs\fP of size \fImax\fP.
+function formats the broken-down time
+.I tm
+according to the format specification
+.I format
+and places the
+result in the character array
+.I s
+of size
+.IR max .
 .\" FIXME POSIX says: Local timezone information is used as though
 .\" strftime() called tzset().  But this doesn't appear to be the case
 .PP
@@ -63,7 +69,10 @@ All other character sequences are
 .IR "ordinary character sequences".
 .PP
 The characters of ordinary character sequences (including the null byte)
-are copied verbatim from \fIformat\fP to \fIs\fP.
+are copied verbatim from
+.I format
+to
+.IR s .
 However, the characters
 of conversion specifications are replaced as follows:
 .TP
@@ -184,7 +193,9 @@ In the POSIX locale this is equivalent to
 (SU)
 .TP
 .B %R
-The time in 24-hour notation (\fB%H:%M\fP). (SU)
+The time in 24-hour notation
+.RB ( %H:%M ).
+(SU)
 For a version including the seconds, see
 .B %T
 below.
@@ -200,7 +211,9 @@ The second as a decimal number (range 00 to 60).
 A tab character. (SU)
 .TP
 .B %T
-The time in 24-hour notation (\fB%H:%M:%S\fP). (SU)
+The time in 24-hour notation
+.RB ( %H:%M:%S ).
+(SU)
 .TP
 .B %u
 The day of the week as a decimal, range 1 to 7, Monday being 1.
@@ -305,19 +318,26 @@ modifier is to use
 alternative numeric symbols (say, roman numerals), and that of the
 E modifier is to use a locale-dependent alternative representation.
 .PP
-The broken-down time structure \fItm\fP is defined in \fI<time.h>\fP.
+The broken-down time structure
+.I tm
+is defined in
+.IR <time.h> .
 See also
 .BR ctime (3).
 .SH RETURN VALUE
 The
 .BR strftime ()
 function returns the number of bytes placed
-in the array \fIs\fP, not including the terminating null byte,
+in the array
+.IR s ,
+not including the terminating null byte,
 provided the string, including the terminating null byte, fits.
 Otherwise, it returns 0, and the contents of the array is undefined.
 (This behavior applies since at least libc 4.4.4;
 very old versions of libc, such as libc 4.4.1,
-would return \fImax\fP if the array was too small.)
+would return
+.I max
+if the array was too small.)
 .LP
 Note that the return value 0 does not necessarily indicate an error;
 for example, in many locales
@@ -374,7 +394,10 @@ of the preceding year.
 For example, 1 January 2010 is a Friday,
 meaning that just three days of that calendar week fall in 2010.
 Thus, the ISO\ 8601 week-based system considers these days to be part of
-week 53 (\fB%V\fP) of the year 2009 (\fB%G\fP) ;
+week 53
+.RB ( %V )
+of the year 2009
+.RB ( %G );
 week 01 of ISO\ 8601 year 2010 starts on Monday, 4 January 2010.
 .SS Glibc notes
 Glibc provides some extensions for conversion specifications.
@@ -448,7 +471,9 @@ my_strftime(char *s, size_t max, const char *fmt,
 
 Nowadays,
 .BR gcc (1)
-provides the \fI\-Wno\-format\-y2k\fP option to prevent the warning,
+provides the
+.IR \-Wno\-format\-y2k
+option to prevent the warning,
 so that the above workaround is no longer required.
 .SH EXAMPLE
 .BR "RFC\ 2822-compliant date format"
index 77b300a08f183cd1ae5135c431dd814b882a7a60..ed058e0641f86db95afe36e061a9be334cc94c52 100644 (file)
@@ -40,11 +40,13 @@ strlen \- calculate the length of a string
 The
 .BR strlen ()
 function calculates the length of the string
-\fIs\fP, excluding the terminating null byte (\(aq\\0\(aq).
+.IR s ,
+excluding the terminating null byte (\(aq\\0\(aq).
 .SH RETURN VALUE
 The
 .BR strlen ()
-function returns the number of bytes in the string \fIs\fP.
+function returns the number of bytes in the string
+.IR s .
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH SEE ALSO
index 957bc75d9ff326f43405a76576c35a2c28c8cefe..7548f592818362d741a480cc2693b0789ef772de 100644 (file)
@@ -42,19 +42,32 @@ _GNU_SOURCE
 The
 .BR strnlen ()
 function returns the number of bytes in the string
-pointed to by \fIs\fP, excluding the terminating null byte (\(aq\\0\(aq),
-but at most \fImaxlen\fP.
+pointed to by
+.IR s ,
+excluding the terminating null byte (\(aq\\0\(aq),
+but at most
+.IR maxlen .
 In doing this,
 .BR strnlen ()
 looks only at the first
-\fImaxlen\fP bytes at \fIs\fP and never beyond \fIs+maxlen\fP.
+.I maxlen
+bytes at
+.I s
+and never beyond
+.IR s+maxlen .
 .SH RETURN VALUE
 The
 .BR strnlen ()
-function returns \fIstrlen(s)\fP, if that is less than
-\fImaxlen\fP, or \fImaxlen\fP
+function returns
+.IR strlen(s) ,
+if that is less than
+.IR maxlen ,
+or
+.I maxlen
 if there is no null byte (\(aq\\0\(aq) among the first
-\fImaxlen\fP bytes pointed to by \fIs\fP.
+.I maxlen
+bytes pointed to by
+.IR s .
 .SH CONFORMING TO
 POSIX.1-2008.
 .SH SEE ALSO
index bc1cd07e6ca4e158baabd9db44ddf0130d50a349..7e3519de6258c0138ccbfbca0c63c7981c2fd3c4 100644 (file)
@@ -40,12 +40,18 @@ strpbrk \- search a string for any of a set of bytes
 The
 .BR strpbrk ()
 function locates the first occurrence in the
-string \fIs\fP of any of the bytes in the string \fIaccept\fP.
+string
+.I s
+of any of the bytes in the string
+.IR accept .
 .SH RETURN VALUE
 The
 .BR strpbrk ()
 function returns a pointer to the byte in
-\fIs\fP that matches one of the bytes in \fIaccept\fP, or NULL
+.I s
+that matches one of the bytes in
+.IR accept ,
+or NULL
 if no such byte is found.
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
index c64ea80c57d174a0f7fa1721ff5f77cdc9803934..549857b8db45f7d703677f86eff52532629cef34 100644 (file)
@@ -48,23 +48,35 @@ Feature Test Macro Requirements for glibc (see
 .BR strsep ():
 _BSD_SOURCE
 .SH DESCRIPTION
-If \fI*stringp\fP is NULL, the
+If
+.I *stringp
+is NULL, the
 .BR strsep ()
 function returns NULL
 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.
+in the string
+.IR *stringp ,
+where tokens
+are delimited by symbols in the string
+.IR delim .
 This token is terminated by overwriting the delimiter
 with a null byte (\(aq\\0\(aq)
-and \fI*stringp\fP is updated to point past the token.
+and
+.I *stringp
+is updated to point past the token.
 In case no delimiter was found, the token is taken to be
-the entire string \fI*stringp\fP, and \fI*stringp\fP is made NULL.
+the entire string
+.IR *stringp ,
+and
+.I *stringp
+is made NULL.
 .SH RETURN VALUE
 The
 .BR strsep ()
 function returns a pointer to the token,
-that is, it returns the original value of \fI*stringp\fP.
+that is, it returns the original value of
+.IR *stringp .
 .SH CONFORMING TO
 4.4BSD.
 .SH NOTES
index 89c0b5a926656b8a406cc8821ec43a146f7324c5..3d4aeef06cdb26b44d292e4ba4a09c1ab7d7fb3e 100644 (file)
@@ -61,11 +61,14 @@ _GNU_SOURCE
 The
 .BR strsignal ()
 function returns a string describing the signal
-number passed in the argument \fIsig\fP.
+number passed in the argument
+.IR sig .
 The string can be used only until the next call to
 .BR strsignal ().
 .PP
-The array \fIsys_siglist\fP holds the signal description strings
+The array
+.I sys_siglist
+holds the signal description strings
 indexed by signal number.
 The
 .BR strsignal ()
index c043ecc0861d3c8db56900388576fc562234a5fd..f8a0b59c508038ce114c6957bd28a0bc0f2fc338 100644 (file)
@@ -42,26 +42,35 @@ strspn, strcspn \- search a string for a set of bytes
 The
 .BR strspn ()
 function calculates the length (in bytes) of the initial
-segment of \fIs\fP which consists entirely of bytes in
-\fIaccept\fP.
+segment of
+.I s
+which consists entirely of bytes in
+.IR accept .
 .PP
 The
 .BR strcspn ()
 function calculates the length of the initial
-segment of \fIs\fP which consists entirely of bytes not in
-\fIreject\fP.
+segment of
+.I s
+which consists entirely of bytes not in
+.IR reject .
 .SH RETURN VALUE
 The
 .BR strspn ()
 function returns the number of bytes in
-the initial segment of \fIs\fP which consist only of bytes
-from \fIaccept\fP.
+the initial segment of
+.I s
+which consist only of bytes
+from
+.IR accept .
 .PP
 The
 .BR strcspn ()
 function returns the number of bytes in
-the initial segment of \fIs\fP which are not in the string
-\fIreject\fP.
+the initial segment of
+.I s
+which are not in the string
+.IR reject .
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH SEE ALSO
index c81183ac29897420fa9ff0918e0a17ad1f658989..475ea9ebde3cb10e815c153621d809ad363e24d9 100644 (file)
@@ -49,7 +49,9 @@ strstr, strcasestr \- locate a substring
 The
 .BR strstr ()
 function finds the first occurrence of the substring
-\fIneedle\fP in the string \fIhaystack\fP.
+.I needle
+in the string
+.IR haystack .
 The terminating null bytes (\(aq\\0\(aq) are not compared.
 
 The
@@ -69,10 +71,16 @@ The
 function is a nonstandard extension.
 .SH BUGS
 Early versions of Linux libc (like 4.5.26) would not allow
-an empty \fIneedle\fP argument for
+an empty
+.I needle
+argument for
 .BR strstr ().
 Later versions (like 4.6.27) work correctly,
-and return \fIhaystack\fP when \fIneedle\fP is empty.
+and return
+.IR haystack 
+when
+.I needle
+is empty.
 .SH SEE ALSO
 .BR index (3),
 .BR memchr (3),
index 546e405a60c71769f1f5a6fc81843a90de08c924..c1cd2a26b4814c312848e8fd42f40837304d8f69 100644 (file)
@@ -58,13 +58,19 @@ function breaks a string into a sequence of zero or more nonempty tokens.
 On the first call to
 .BR strtok ()
 the string to be parsed should be
-specified in \fIstr\fP.
+specified in
+.IR str .
 In each subsequent call that should parse the same string,
-\fIstr\fP must be NULL.
+.I str
+must be NULL.
 
-The \fIdelim\fP argument specifies a set of bytes that
+The
+.I delim
+argument specifies a set of bytes that
 delimit the tokens in the parsed string.
-The caller may specify different strings in \fIdelim\fP in successive
+The caller may specify different strings in
+.I delim
+in successive
 calls that parse the same string.
 
 Each call to
@@ -127,8 +133,11 @@ The
 .BR strtok_r ()
 function is a reentrant version
 .BR strtok ().
-The \fIsaveptr\fP argument is a pointer to a
-\fIchar *\fP variable that is used internally by
+The
+.I saveptr
+argument is a pointer to a
+.IR "char\ *"
+variable that is used internally by
 .BR strtok_r ()
 in order to maintain context between successive calls that parse the
 same string.
@@ -139,12 +148,17 @@ On the first call to
 should point to the string to be parsed, and the value of
 .I saveptr
 is ignored.
-In subsequent calls, \fIstr\fP should be NULL, and
-\fIsaveptr\fP should be unchanged since the previous call.
+In subsequent calls,
+.I str
+should be NULL, and
+.I saveptr
+should be unchanged since the previous call.
 
 Different strings may be parsed concurrently using sequences of calls to
 .BR strtok_r ()
-that specify different \fIsaveptr\fP arguments.
+that specify different
+.I saveptr
+arguments.
 .SH RETURN VALUE
 The
 .BR strtok ()
index 0d61a853d0de6ddb7fc1f3e1a519bbeb38563020..85314a360a2466a5dafc234ef60567bd5efe6eec 100644 (file)
@@ -60,16 +60,23 @@ or
 The
 .BR strtol ()
 function converts the initial part of the string
-in \fInptr\fP to a long integer value according to the given \fIbase\fP,
+in
+.I nptr
+to a long integer value according to the given
+.IR base ,
 which must be between 2 and 36 inclusive, or be the special value 0.
 .PP
 The string may begin with an arbitrary amount of white space (as
 determined by
 .BR isspace (3))
 followed by a single optional \(aq+\(aq or \(aq\-\(aq sign.
-If \fIbase\fP is zero or 16, the string may then include a
+If
+.I base
+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
+zero
+.I base
+is taken as 10 (decimal) unless the next character
 is \(aq0\(aq, in which case it is taken as 8 (octal).
 .PP
 The remainder of the string is converted to a
@@ -81,16 +88,25 @@ valid digit in the given base.
 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,
+If
+.I endptr
+is not NULL,
 .BR strtol ()
 stores the address of the
-first invalid character in \fI*endptr\fP.
+first invalid character in
+.IR *endptr .
 If there were no digits at
 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 \(aq\\0\(aq but \fI**endptr\fP
+stores the original value of
+.I nptr
+in
+.I *endptr
+(and returns 0).
+In particular, if
+.I *nptr
+is not \(aq\\0\(aq but
+.I **endptr
 is \(aq\\0\(aq on return, the entire string is valid.
 .PP
 The
@@ -111,7 +127,9 @@ If an overflow occurs,
 .BR strtol ()
 returns
 .BR LONG_MAX .
-In both cases, \fIerrno\fP is set to
+In both cases,
+.I errno
+is set to
 .BR ERANGE .
 Precisely the same holds for
 .BR strtoll ()
@@ -134,7 +152,11 @@ contains an unsupported value.
 .B ERANGE
 The resulting value was out of range.
 .LP
-The implementation may also set \fIerrno\fP to \fBEINVAL\fP in case
+The implementation may also set
+.IR errno 
+to
+.B EINVAL
+in case
 no conversion was performed (no digits seen, and 0 returned).
 .SH CONFORMING TO
 .BR strtol ()
index 8f4ff6202e192a58b6b846466c5b3e14028e5f2f..42ac8b357c522726c5b49a5f056fcc3585d3d5cc 100644 (file)
@@ -63,10 +63,14 @@ or
 The
 .BR strtoul ()
 function converts the initial part of the string
-in \fInptr\fP to an
+in
+.I nptr
+to an
 .I "unsigned long int"
 value according to the
-given \fIbase\fP, which must be between 2 and 36 inclusive, or be
+given
+.IR base ,
+which must be between 2 and 36 inclusive, or be
 the special value 0.
 .PP
 The string may begin with an arbitrary amount of white space (as
@@ -74,9 +78,13 @@ determined by
 .BR isspace (3))
 followed by a single optional \(aq+\(aq or \(aq\-\(aq
 sign.
-If \fIbase\fP is zero or 16, the string may then include a
+If
+.I base
+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
+zero
+.I base
+is taken as 10 (decimal) unless the next character
 is \(aq0\(aq, in which case it is taken as 8 (octal).
 .PP
 The remainder of the string is converted to an
@@ -88,16 +96,25 @@ valid digit in the given base.
 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,
+If
+.I endptr
+is not NULL,
 .BR strtoul ()
 stores the address of the
-first invalid character in \fI*endptr\fP.
+first invalid character in
+.IR *endptr .
 If there were no digits at
 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 \(aq\\0\(aq but \fI**endptr\fP
+stores the original value of
+.I nptr
+in
+.I *endptr
+(and returns 0).
+In particular, if
+.I *nptr
+is not \(aq\\0\(aq but
+.I **endptr
 is \(aq\\0\(aq on return, the entire string is valid.
 .PP
 The
@@ -118,7 +135,9 @@ the latter case,
 .BR strtoul ()
 returns
 .B ULONG_MAX
-and sets \fIerrno\fP to
+and sets
+.I errno
+to
 .BR ERANGE .
 Precisely the same holds for
 .BR strtoull ()
@@ -137,7 +156,11 @@ contains an unsupported value.
 .B ERANGE
 The resulting value was out of range.
 .LP
-The implementation may also set \fIerrno\fP to \fBEINVAL\fP in case
+The implementation may also set
+.IR errno 
+to
+.B EINVAL
+in case
 no conversion was performed (no digits seen, and 0 returned).
 .SH CONFORMING TO
 .BR strtoul ()
index 56a42c68466e8566b1e2a07f24bea3449c7d8bdf..cfc5a458e7b516e4e1e6fb027ed9b200bc2db952 100644 (file)
@@ -39,7 +39,9 @@ strxfrm \- string transformation
 .SH DESCRIPTION
 The
 .BR strxfrm ()
-function transforms the \fIsrc\fP string into a
+function transforms the
+.I src
+string into a
 form such that the result of
 .BR strcmp (3)
 on two strings that have
@@ -48,24 +50,37 @@ been transformed with
 is the same as the result of
 .BR strcoll (3)
 on the two strings before their transformation.
-The first \fIn\fP bytes of the transformed string are placed in
-\fIdest\fP.
+The first
+.I n
+bytes of the transformed string are placed in
+.IR dest .
 The transformation is based on the program's current
-locale for category \fBLC_COLLATE\fP.
+locale for category
+.BR LC_COLLATE .
 (See
 .BR setlocale (3)).
 .SH RETURN VALUE
 The
 .BR strxfrm ()
 function returns the number of bytes required to
-store the transformed string in \fIdest\fP excluding the
+store the transformed string in
+.I dest
+excluding the
 terminating null byte (\(aq\\0\(aq).
-If the value returned is \fIn\fP or more, the
-contents of \fIdest\fP are indeterminate.
+If the value returned is
+.I n
+or more, the
+contents of
+.I dest
+are indeterminate.
 .SH CONFORMING TO
 SVr4, 4.3BSD, C89, C99.
 .SH NOTES
-In the \fI"POSIX"\fP or \fI"C"\fP locales
+In the 
+.IR POSIX
+or
+.IR C
+locales
 .BR strxfrm ()
 is equivalent to
 copying the string with