Sender: ml AT delorie DOT com Message-ID: <3427DFA0.6BD58E61@cdata.tvnet.hu> Date: Tue, 23 Sep 1997 17:26:24 +0200 From: Molnar Laszlo MIME-Version: 1.0 To: Eli Zaretskii CC: DJGPP workers Subject: Re: perl and stdio test References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > The reason is that we wanted both CRLF -> NL conversions *and* correct > byte counts from `fseek', without losing the buffering. So the buffer > maintained as part of the FILE structure holds the original contents of > the file on disk, with the CR characters; they are only stripped by the > functions that are used to read the file, like `getc', `fread', etc. > So Perl is right: if ``standard stdio'' means that the contents of the > buffer is the same as what's returned to the application, then DJGPP's > stdio is not very standard. Ok. It's clear now. > > $cat >try.c < > #include > > #define FILE_ptr(fp) (fp)->_ptr > > #define FILE_cnt(fp) (fp)->_cnt > > Am I to understand that Perl actually assumes that the FILE structure > includes members called `_ptr' and `_cnt'? If so, then it deserves to > fail here. Is there any law against calling these members by any other > name that I can fancy? These are internals of the implementation, and no > program should depend on such internal details. Sorry, I changed this for my mail (to make it simpler). Configure uses this: $cat >try.c < #define FILE_ptr(fp) $stdio_ptr #define FILE_cnt(fp) $stdio_cnt Laszlo