bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible I/O Error in GMP


From: Kevin Ryde
Subject: Re: Possible I/O Error in GMP
Date: Sat, 14 Sep 2002 08:08:11 +1000
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (i386-debian-linux-gnu)

Peter Kristolaitis <address@hidden> writes:
>
>               while ( !feof(fd) ) {
>                       mpz_inp_raw ( bigNum, fd );

I believe feof is only set after an input function attempts to read
beyond the end of the file.  The fourth mpz_inp_raw will read the last
byte in the file but doesn't cause feof to be set.

I think you need to check the return value from mpz_inp_raw to know
when eof is reached.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]