Browse Source

Mention that stroul() et al *do* accept negative numbers, they

just (effectively) cast to unsigned.  ho@ OK
OPENBSD_3_4
millert 22 years ago
parent
commit
6bb800e788
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/lib/libc/stdlib/strtoul.3

+ 6
- 1
src/lib/libc/stdlib/strtoul.3 View File

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: strtoul.3,v 1.12 2003/03/06 18:19:26 kjell Exp $
.\" $OpenBSD: strtoul.3,v 1.13 2003/04/21 21:49:40 millert Exp $
.\" .\"
.Dd June 25, 1992 .Dd June 25, 1992
.Dt STRTOUL 3 .Dt STRTOUL 3
@ -83,6 +83,11 @@ The conversion is done according to the given
.Fa base , .Fa base ,
which must be a number between 2 and 36 inclusive which must be a number between 2 and 36 inclusive
or the special value 0. or the special value 0.
If the string in
.Fa nptr
represents a negative number, it will be converted to its unsigned equivalent.
This behavior is consistent with what happens when a signed integer type is
cast to its unsigned counterpart.
.Pp .Pp
The string may begin with an arbitrary amount of whitespace The string may begin with an arbitrary amount of whitespace
(as determined by (as determined by


Loading…
Cancel
Save