On Fri, 22 May 1998, Markus Isler wrote:
> I just read the implementation of the RAND_load_file function. I realized, 
> that the random file is opened with mode "r". This means:
> 
> If t or b is not given in mode, the default translation mode is defined by 
> the global variable _fmode. The default setting of _fmode is _O_TEXT, for 
> text-mode translation. Open in text (translated) mode. In this mode, CTRL+Z 
> is interpreted as an end-of-file character on input.
> 
> This means, whenever a CTRL+Z is found during the load process of the 
> random file the function returns. The amount of random bytes read is the 
> amount of characters before the occurring of CTRL+Z. That's certainly not 
> my understanding of how to use a random file.
> 
> Is there a reason, it was done like this ?

No, this would be called a bug.
I spent too much time in the sane world without binrary/text file modes.

eric

+-------------------------------------------------------------------------+
| Administrative requests should be sent to [EMAIL PROTECTED] |
| List service provided by Open Software Associates, http://www.osa.com/  |
+-------------------------------------------------------------------------+

Reply via email to