diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-08-03 08:12:50 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-08-03 08:12:50 +0000 |
commit | ab2ed89fa5fff1bb7968efcdfd970bc69d5e124f (patch) | |
tree | 66ff7e042f42b185f6b1017a39a0342886bc374f | |
parent | 66373e7feb0a0ab275c0e97e6f2c3de567fac920 (diff) | |
download | mpfr-ab2ed89fa5fff1bb7968efcdfd970bc69d5e124f.tar.gz |
[doc/mpfr.texi] Updated paragraph on the MPFR formatted output functions
and overflow on the return type int. Removed obsolete comments.
(merged changesets r11403,11614-11615 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11616 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | doc/mpfr.texi | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/doc/mpfr.texi b/doc/mpfr.texi index 76e08100e..0f45f5c27 100644 --- a/doc/mpfr.texi +++ b/doc/mpfr.texi @@ -2404,11 +2404,14 @@ specifiers @samp{f}, @samp{F}, @samp{g}, and @samp{G} is 6. @subsection Functions -For all the following functions, if the number of characters which ought to be -written appears to exceed the maximum limit for an @code{int}, nothing is +For all the following functions, if the number of characters that ought to be +written exceeds the maximum limit @code{INT_MAX} for an @code{int}, nothing is written in the stream (resp.@: to @code{stdout}, to @var{buf}, to @var{str}), -the function returns @minus{}1, sets the @emph{erange} flag, and (in -POSIX system only) @code{errno} is set to @code{EOVERFLOW}. +the function returns @minus{}1, sets the @emph{erange} flag, and @code{errno} +is set to @code{EOVERFLOW} if the @code{EOVERFLOW} macro is defined (such as +on POSIX systems). Note, however, that @code{errno} might be changed to +another value by some internal library call if another error occurs there +(currently, this would come from the unallocation function). @deftypefun int mpfr_fprintf (FILE *@var{stream}, const char *@var{template}, @dots{}) @deftypefunx int mpfr_vfprintf (FILE *@var{stream}, const char *@var{template}, va_list @var{ap}) @@ -2416,10 +2419,6 @@ Print to the stream @var{stream} the optional arguments under the control of the template string @var{template}. Return the number of characters written or a negative value if an error occurred. -@c If the number of characters which ought to be written appears -@c to exceed the maximum limit for an @code{int}, nothing is written in the -@c stream, the function returns @minus{}1, sets the @emph{erange} flag, and (in -@c POSIX system only) @code{errno} is set to @code{EOVERFLOW}. @end deftypefun @deftypefun int mpfr_printf (const char *@var{template}, @dots{}) @@ -2428,10 +2427,6 @@ Print to @code{stdout} the optional arguments under the control of the template string @var{template}. Return the number of characters written or a negative value if an error occurred. -@c If the number of characters which ought to be written appears -@c to exceed the maximum limit for an @code{int}, nothing is written in -@c @code{stdout}, the function returns @minus{}1, sets the @emph{erange} flag, -@c and (in POSIX system only) @code{errno} is set to @code{EOVERFLOW}. @end deftypefun @deftypefun int mpfr_sprintf (char *@var{buf}, const char *@var{template}, @dots{}) @@ -2443,10 +2438,6 @@ the control of the template string @var{template}, and print it in Return the number of characters written in the array @var{buf} @emph{not counting} the terminating null character or a negative value if an error occurred. -@c If the number of characters which ought to be written appears to exceed the -@c maximum limit for an @code{int}, nothing is written in @var{buf}, the function -@c returns @minus{}1, sets the @emph{erange} flag, and (in POSIX system only) -@c code{errno} is set to @code{EOVERFLOW}. @end deftypefun @deftypefun int mpfr_snprintf (char *@var{buf}, size_t @var{n}, const char *@var{template}, @dots{}) @@ -2459,11 +2450,6 @@ first characters are written in @var{buf} and the @var{n}-th is a null character Return the number of characters that would have been written had @var{n} been sufficiently large, @emph{not counting} the terminating null character, or a negative value if an error occurred. -@c If the number of characters produced by the -@c optional arguments under the control of the template string @var{template} -@c appears to exceed the maximum limit for an @code{int}, nothing is written in -@c @var{buf}, the function returns @minus{}1, sets the @emph{erange} flag, and -@c (in POSIX system only) @code{errno} is set to @code{EOVERFLOW}. @end deftypefun @deftypefun int mpfr_asprintf (char **@var{str}, const char *@var{template}, @dots{}) @@ -2474,12 +2460,6 @@ using the current allocation function. A pointer to the block is stored in The return value is the number of characters written in the string, excluding the null-terminator, or a negative value if an error occurred, in which case the contents of @var{str} are undefined. -@c If the number of -@c characters produced by the optional arguments under the control of the -@c template string @var{template} appears to exceed the maximum limit for an -@c @code{int}, @var{str} is a null pointer, the function returns @minus{}1, sets -@c the @emph{erange} flag, and (in POSIX system only) @code{errno} is set to -@c @code{EOVERFLOW}. @end deftypefun @node Integer Related Functions, Rounding Related Functions, Formatted Output Functions, MPFR Interface |