[Oberon] *****SPAM***** Resetting a file rider without creating a new stream.

strohm at airmail.net strohm at airmail.net
Sat Apr 24 06:52:13 CEST 2021


	


Assuming you're talking about Ulm's Streams module, described at http://www.mathematik.uni-ulm.de/oberon/0.5/lib/man/Streams.html, it looks like you want the third line to be something along the lines of:

    Streams.Seek(strm, msgs[no].pos, Streams.fromStart);

On Fri, 23 Apr 2021 19:12:27 -0700, peter at easthope.ca wrote:

Hi,

I'm interested to add this procedure to the Oberon Mail module.

PROCEDURE WriteMsgLine(CONST no: SIGNED32);
VAR
    len, pos: SIGNED32;
    h: MIME.Header;
    cont: MIME.Content;
    str: ARRAY BufLen OF CHAR;
    strm: Streams.Stream;
BEGIN
    Texts.WriteString(W, "Mail.Show "); Texts.WriteInt(W, no, msgNoWidth); Texts.Write(W, " ");
    strm := Streams.OpenFileReader(msgsF, msgs[0].pos); strm.mode := Streams.binary;
    Files.Set(strm.R, msgsF, msgs[no].pos);
...
END WriteMsgLine;

No problem with the two lines following BEGIN. The third line is
meant to reposition the rider on msgsF but it fails to compile.

A FileStream extends a Stream and has rider R. A Stream does not have
a rider and consequently strm.R is meaningless. A new stream with new
rider can be created but changing the rider in the existing stream
would be more efficient.

Is there a way change the rider without creating a new stream.

Thx, ... P.L.

--
VoIP: +1 604 670 0140 Bcc: peter at easthope. ca

--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon
 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20210424/110353ad/attachment.html>


More information about the Oberon mailing list