diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-05-12 09:06:04 +0000 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-05-12 09:06:04 +0000 |
commit | 60a90ecdae7bf6d1a91dc5d1d7177e400b114e47 (patch) | |
tree | 9f7c19a897084607a9688be5414d0d4cd6391b54 /man3/strtoul.3 | |
parent | d92a60f2575c95cd532b822e4fb983c3a9e35641 (diff) |
Convert function formatting of the form "\fBname\fP()" to ".BR name ()".
Diffstat (limited to 'man3/strtoul.3')
-rw-r--r-- | man3/strtoul.3 | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/man3/strtoul.3 b/man3/strtoul.3 index 85b8bf87..dc3627e5 100644 --- a/man3/strtoul.3 +++ b/man3/strtoul.3 @@ -42,7 +42,9 @@ strtoul, strtoull, strtouq \- convert a string to an unsigned long integer .BI "strtoull(const char *" nptr ", char **" endptr ", int " base ); .fi .SH DESCRIPTION -The \fBstrtoul\fP() function converts the initial part of the string +The +.BR strtoul () +function converts the initial part of the string in \fInptr\fP to an unsigned long integer value according to the given \fIbase\fP, which must be between 2 and 36 inclusive, or be the special value 0. @@ -64,10 +66,14 @@ valid digit in the given base. either upper or lower case represents 10, `B' represents 11, and so forth, with `Z' representing 35.) .PP -If \fIendptr\fP is not NULL, \fBstrtoul\fP() stores the address of the +If \fIendptr\fP is not NULL, +.BR strtoul () +stores the address of the first invalid character in \fI*endptr\fP. If there were no digits at -all, \fBstrtoul\fP() stores the original value of \fInptr\fP in +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. @@ -78,11 +84,15 @@ function works just like the .BR strtoul () function but returns an unsigned long long integer value. .SH "RETURN VALUE" -The \fBstrtoul\fP() function returns either the result of the conversion +The +.BR strtoul () +function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion represented as an unsigned value, unless the original (non-negated) value would overflow; in -the latter case, \fBstrtoul\fP() returns ULONG_MAX and sets the global +the latter case, +.BR strtoul () +returns ULONG_MAX and sets the global variable \fIerrno\fP to ERANGE. Precisely the same holds for .BR strtoull () |