Add mpz_inp_str to mini-gmp
tg at gmplib.org
Wed Jul 6 15:46:30 UTC 2016
Austyn Krutsinger <akrutsinger at gmail.com> writes:
Where does it make the most sense to check an input string coming from a
file stream? I think we just read in the stream into a buffer skipping
spaces and tabs then stop reading the string on the End Of File (for file
streams) or a newline '\n' (for stdin). This way the only duplicate code is
the isspace() check between mpz_set_str and mpz_inp_str.
I'm afraid I don't understand much of your message.
What do you mean with "check an input string". Which checks?
The behaviour of our I/O functions should not behave differently for
stdin than for othwer streams.
Please read my text about (embedded) space in my last reply.
More information about the gmp-devel