Subject: RE: Questions on reading a writing of text files....

From: Richard Whalen <[email-masked]>
Date: Mon, 7 Oct 2002 09:39:37 -0400

> When operating in text mode, should a read just return one line (with the
> appropriate end of line sequence), or should it fill the buffer,
separating
> each line with the end of line sequence.  What if a line has more
characters
> than are available in the buffer, should the portion that fits be returned
> and the remainder saved for the next read?
>
> There are fewer questions about writes, but what should be done with a
write
> that does not end in the end of line sequence?  Should it wait for another
> write that contains the sequence and the two be appended?

Good questions.  I was assuming the operating characteristics of read and
write would not change, which means partial lines could be both read and
written.  This is definitely the simplest way to go in terms of the amount
of verbiage needed for the draft.  (For example, line is too big for buffer
question just goes away.)

Is it too onerous to implement, do you think?

- Joseph

Partial reads are not difficult to implement.

Partial writes could be difficult to implement, depending upon VMS file
organization and whether or not the write is at the end of the file.

I think that a line stating "All end of line sequences are explicit when
operating on a file in text mode." would eliminate any confusion.

----------------------
Richard Whalen
Process Software

---

From: "Joseph Galbraith" <[email-masked]>
Date: Mon, 7 Oct 2002 07:41:29 -0600

> operating on a file in text mode." would eliminate any confusion.

I'm not sure where this text would go?  Is this more along the lines
of 'partial eol sequences should be ignored'?  I currently have some
text in there about that (added after posting draft-draft in response
to someones feedback.

Thanks,

- Joseph