summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mpfr.texi3
-rw-r--r--print_rnd_mode.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/mpfr.texi b/mpfr.texi
index 32cc2c8db..271d958a1 100644
--- a/mpfr.texi
+++ b/mpfr.texi
@@ -573,7 +573,8 @@ The precision @var{prec} can be any integer between @code{MPFR_PREC_MIN} and
@deftypefun {char *} mpfr_print_rnd_mode (mp_rnd_t @var{rnd})
Returns the input string (GMP_RNDD, GMP_RNDU, GMP_RNDN, GMP_RNDZ)
-corresponding to the rounding mode @var{rnd}.
+corresponding to the rounding mode @var{rnd} or a null pointer if
+@var{rnd} is an invalid rounding mode.
@end deftypefun
@node Exceptions, Initializing Floats, Rounding Modes, Floating-point Functions
diff --git a/print_rnd_mode.c b/print_rnd_mode.c
index 3be6b9691..199e8780c 100644
--- a/print_rnd_mode.c
+++ b/print_rnd_mode.c
@@ -1,6 +1,6 @@
/* mpfr_print_rnd_mode -- convert a given rounding mode to a string
-Copyright 1999, 2001 Free Software Foundation.
+Copyright 1999, 2001, 2002 Free Software Foundation.
This file is part of the MPFR Library.
@@ -19,7 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#include <stdio.h>
#include <stdlib.h>
#include "gmp.h"
#include "gmp-impl.h"
@@ -38,9 +37,6 @@ mpfr_print_rnd_mode (mp_rnd_t rnd_mode)
return ("GMP_RNDN");
case GMP_RNDZ:
return ("GMP_RNDZ");
- default:
- fprintf (stderr, "unknown rounding mode\n");
- exit (1);
}
return NULL;