summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-04-26 15:33:52 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-04-26 15:33:52 +0000
commit6f0a5a9b1512d3de9f48c30c5dcde5c565e1a895 (patch)
treeb74fa7fab3ddb854eef76870c790e9e41ae5d620
parentf329fe20abb1cbfda97ce2ac9208e517c9ba97c1 (diff)
downloadmpfr-6f0a5a9b1512d3de9f48c30c5dcde5c565e1a895.tar.gz
[src/{inp_str.c,out_str.c}] For mpfr_inp_str and mpfr_out_str, when
the stream was a null pointer, it was replaced by stdin and stdout, respectively. No longer do that, since: * This behavior was useless, not documented, and not consistent with other I/O functions. * Just in case a null pointer for the stream has a special meaning with some C implementation, MPFR was not behaving as documented. (merged changesets r12520-12521 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12680 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--src/inp_str.c3
-rw-r--r--src/out_str.c4
2 files changed, 0 insertions, 7 deletions
diff --git a/src/inp_str.c b/src/inp_str.c
index 1f1ed0a9e..8f5392fca 100644
--- a/src/inp_str.c
+++ b/src/inp_str.c
@@ -37,9 +37,6 @@ mpfr_inp_str (mpfr_ptr rop, FILE *stream, int base, mpfr_rnd_t rnd_mode)
int retval;
size_t nread;
- if (stream == NULL)
- stream = stdin;
-
alloc_size = 100;
str = (unsigned char *) mpfr_allocate_func (alloc_size);
str_size = 0;
diff --git a/src/out_str.c b/src/out_str.c
index c78a7dbaa..6e303a1e4 100644
--- a/src/out_str.c
+++ b/src/out_str.c
@@ -43,10 +43,6 @@ mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op,
MPFR_ASSERTN (base >= 2 && base <= 62);
- /* when stream=NULL, output to stdout */
- if (stream == NULL)
- stream = stdout;
-
if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op)))
{
if (MPFR_IS_NAN (op))