🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.mod2
Article #364

TDI Amiga Modula-2 bugfix

#364
From: Peter G. Trei
Date: Wed, 09 Apr 1986 15:28
29 lines
1568 bytes
There is simple fix to the STREAMS modulein the TDI/ Amiga
Modula-2 compiler if you have the sources. The sources are
provided as a part of the developers package (on disk #2 in
directory UtilSources). All you have to do is to change all
procedure declarations in STREAMS.DEF to take STREAM as a VAR
parameter. For example:

OLD:  PROCEDURE ReadChar (s:SREAM; VAR C:CHAR);

Should be: PROCEDURE ReadChar (VAR s:STREAM; VAR C:CHAR);

Change the implementation module in a corresponding manner.
Then just recompile STREAMs and InOut.MOD.
That should help. If you still have problems there is another
problem in InOut. They way EOF is detected is not quite correct.
The code for detecting EOF is :

OLD :  Done := In.Res = Streams.Donee;

SHOULD BE: Done := In.Res=Streams.Done AND NOT In.Eof;

Hope this helps.........


						
						Richard Bielak
					compuserve: 75716,352
					or c/o oc.trei@cu20b.arpa
-------
Technical Details
Message-ID: <12197467291.38.OC.TREI@CU20B.COLUMBIA.EDU>
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!ucbvax!cu20b.columbia.edu!OC.TREI

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!ucbvax!cu20b.columbia.edu!OC.TREI
From: OC.TREI@CU20B.COLUMBIA.EDU (Peter G. Trei)
Newsgroups: net.lang.mod2
Subject: TDI Amiga Modula-2 bugfix
Message-ID: <12197467291.38.OC.TREI@CU20B.COLUMBIA.EDU>
Date: Wed, 9-Apr-86 10:28:59 EST
Article-I.D.: CU20B.12197467291.38.OC.TREI
Posted: Wed Apr  9 10:28:59 1986
Date-Received: Fri, 11-Apr-86 07:31:51 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 29