diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2006-06-06 01:07:10 +0000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2006-06-06 01:07:10 +0000 |
| commit | 190c7abe49265d77b25470a9e69da4ee54522107 (patch) | |
| tree | bbcd69c560242061e63042b9c375bf5aff8efc2a /man3 | |
| parent | ed7b0235b07df12e4eed8147df6da62edda25b37 (diff) | |
| download | man-pages-190c7abe49265d77b25470a9e69da4ee54522107.tar.gz | |
Add text clarifying treatment of strings starting with minus sign.
Diffstat (limited to 'man3')
| -rw-r--r-- | man3/strtoul.3 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/man3/strtoul.3 b/man3/strtoul.3 index f0d6cb5c15..cf2e3e091d 100644 --- a/man3/strtoul.3 +++ b/man3/strtoul.3 @@ -77,7 +77,8 @@ function but returns an unsigned long long integer value. .SH "RETURN VALUE" The \fBstrtoul\fP() function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the -conversion, unless the original (non-negated) value would overflow; in +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 variable \fIerrno\fP to ERANGE. Precisely the same holds for @@ -108,7 +109,7 @@ and then determine if an error occurred by checking whether .I errno has a non-zero value after the call. -In locales other than the "C" locale, also other strings may be accepted. +In locales other than the "C" locale, other strings may be accepted. (For example, the thousands separator of the current locale may be supported.) .LP @@ -127,6 +128,9 @@ may be equivalent to .BR strtoull () or to .BR strtoul (). + +Negative values are considered valid input and are +silently converted to the equivalent unsigned long value. .SH "CONFORMING TO" .BR strtoul () conforms to SVID 3, 4.3BSD, ISO 9899 (C99) and POSIX, and |
