summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-11-21 01:15:43 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-11-21 01:15:43 +0100
commit39a7be7ea3c952483cda6eedfbebe902d4d08b0e (patch)
tree512293caf11f5f264f3da7ee7aed440507f71130
parent8e50556f14d6fc1271c606dce05f1229bed7ae93 (diff)
downloadplan9front-39a7be7ea3c952483cda6eedfbebe902d4d08b0e.tar.xz
mp(2): clarify mptoa() and mpfmt() default base
-rw-r--r--sys/man/2/mp15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/man/2/mp b/sys/man/2/mp
index 7d10b2b1c..68769505e 100644
--- a/sys/man/2/mp
+++ b/sys/man/2/mp
@@ -372,7 +372,7 @@ and
.B mpint
representations using the base indicated.
Only the bases 2, 4, 8, 10, 16, 32, and 64 are
-supported. Base 0 defaults to 16.
+supported.
.IR Strtomp
skips any leading spaces or tabs.
.IR Strtomp 's
@@ -397,18 +397,25 @@ If the parse terminates before any digits are found,
return
.BR nil .
.I Mptoa
-returns a pointer to the filled buffer.
+returns a pointer to the
+.SM ASCII
+filled buffer.
If the parameter
.I buf
is
.BR nil ,
the buffer is allocated.
+Setting
+.I base
+to zero uses hexadecimal default.
.I Mpfmt
can be used with
.IR fmtinstall (2)
and
.IR print (2)
-to print hexadecimal representations of
+to print
+.SM ASCII
+representations of
.BR mpint s.
The conventional verb is
.LR B ,
@@ -416,6 +423,8 @@ for which
.I mp.h
provides a
.LR pragma .
+The precisition in the format string changes the base,
+defaulting to hexadecimal when omited.
.PP
.I Mptobe
and