diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2011-03-09 17:46:08 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2011-03-09 17:46:08 +0100 |
commit | ae714d3d34a5c0b20ea36e64bb132540975022b1 (patch) | |
tree | 4e130fe20ed676856516a23af8e2eeca47e6a21b /cxx | |
parent | ce96852eb7cb64ed639e1e2d0e9f23df9bf2a83d (diff) | |
download | gmp-ae714d3d34a5c0b20ea36e64bb132540975022b1.tar.gz |
Keep eofbit after istream read to the end.
Diffstat (limited to 'cxx')
-rw-r--r-- | cxx/ismpf.cc | 2 | ||||
-rw-r--r-- | cxx/ismpq.cc | 2 | ||||
-rw-r--r-- | cxx/ismpznw.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cxx/ismpf.cc b/cxx/ismpf.cc index bfe4dc8b9..520d4c3e2 100644 --- a/cxx/ismpf.cc +++ b/cxx/ismpf.cc @@ -120,7 +120,7 @@ operator>> (istream &i, mpf_ptr f) if (i.good()) // last character read was non-numeric i.putback(c); else if (i.eof() && ok) // stopped just before eof - i.clear(); + i.clear(ios::eofbit); if (ok) ASSERT_NOCARRY (mpf_set_str(f, s.c_str(), base)); // extract the number diff --git a/cxx/ismpq.cc b/cxx/ismpq.cc index 23eec7657..5cf8c4f94 100644 --- a/cxx/ismpq.cc +++ b/cxx/ismpq.cc @@ -49,7 +49,7 @@ operator>> (istream &i, mpq_ptr q) if (i.good()) i.putback(c); else if (i.eof()) - i.clear(); + i.clear(ios::eofbit); } return i; diff --git a/cxx/ismpznw.cc b/cxx/ismpznw.cc index 387d092ac..4111575d0 100644 --- a/cxx/ismpznw.cc +++ b/cxx/ismpznw.cc @@ -49,7 +49,7 @@ __gmpz_operator_in_nowhite (istream &i, mpz_ptr z, char c) if (i.good()) // last character read was non-numeric i.putback(c); else if (i.eof() && (ok || zero)) // stopped just before eof - i.clear(); + i.clear(ios::eofbit); if (ok) ASSERT_NOCARRY (mpz_set_str (z, s.c_str(), base)); // extract the number |