summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/mpfr.texi7
-rw-r--r--src/vasprintf.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/mpfr.texi b/doc/mpfr.texi
index 173d4a5f6..417435569 100644
--- a/doc/mpfr.texi
+++ b/doc/mpfr.texi
@@ -2322,10 +2322,11 @@ not be used with other types.
With conversion specification not involving @samp{P} and @samp{R} types,
@code{mpfr_printf} behaves exactly as @code{gmp_printf}.
-The @samp{P} type specifies that a following @samp{o}, @samp{u}, @samp{x}, or
-@samp{X} conversion specifier applies to a @code{mpfr_prec_t} argument.
+The @samp{P} type specifies that a following @samp{d}, @samp{i},
+@samp{o}, @samp{u}, @samp{x}, or @samp{X} conversion specifier applies
+to a @code{mpfr_prec_t} argument.
It is needed because the @code{mpfr_prec_t} type does not necessarily
-correspond to an @code{unsigned int} or any fixed standard type.
+correspond to an @code{int} or any fixed standard type.
The @samp{precision} field specifies the minimum number of digits to
appear. The default @samp{precision} is 1.
For example:
diff --git a/src/vasprintf.c b/src/vasprintf.c
index ba19bd3a8..77a6b9428 100644
--- a/src/vasprintf.c
+++ b/src/vasprintf.c
@@ -1979,7 +1979,7 @@ mpfr_vasprintf (char **ptr, const char *fmt, va_list ap)
va_copy (ap2, ap);
start = fmt;
- /* construct format string, like "%*.*hu" "%*.*u" or "%*.*lu" */
+ /* construct format string, like "%*.*hd" "%*.*d" or "%*.*ld" */
format[0] = '%';
format[1] = '*';
format[2] = '.';