diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-01-03 22:43:44 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-01-03 22:43:44 +0100 |
commit | d30b160fe3b595c071d37345c51b35fffb2ad30c (patch) | |
tree | 322f1664efe88d03b7d50b5aadbce06f3352af9b /sys/man | |
parent | 39f18c9d88f52a22373790dec5721fa3521d3f00 (diff) |
libmp: support for c-style base prefixes for strtomp(), octal support
Diffstat (limited to 'sys/man')
-rw-r--r-- | sys/man/2/mp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/man/2/mp b/sys/man/2/mp index c562ccab4..182bca7e2 100644 --- a/sys/man/2/mp +++ b/sys/man/2/mp @@ -337,13 +337,22 @@ convert between and .B mpint representations using the base indicated. -Only the bases 10, 16, 32, and 64 are -supported. Anything else defaults to 16. +Only the bases 2, 4, 8, 10, 16, 32, and 64 are +supported. Base 0 defaults to 16. .IR Strtomp skips any leading spaces or tabs. .IR Strtomp 's scan stops when encountering a digit not valid in the base. If +.I base +is zero then C-style prefixes are interpreted to +find the base: +.B 0x +for hexadecimal, +.B 0b +for binary and +.B 0 +for octal. Otherwise decimal is assumed. .I rptr is not zero, .I *rptr |