[comp.lang.modula2] TopSpeed M2 WrBin bug fix

SLovatt@massey.ac.nz (S.J. Lovatt) (07/09/90)

I've just sent off a bug report and correction to JPI as follows, and I
thought fellow TS M2 users on the net would be interested:

Bug Fix - JPI TopSpeed M2 Rel 1.04b

Symptom:

When using FIO.WrLn, I found that it was producing: CR CR LF
... rather than CR LF, as it should.

Solution:

The problem was traced to FIO.WrBin, where the procedure CLB.write was
called to do the actual writing. Elsewhere, this procedure was called as:

CLB._write     ... but here, it was called as:    CLB.write

... so I changed the reference to CLB.write to CLB._write, and re-made the
library by making RMT_M2A.LIB (I have been using the multi-thread model).
This resolved the problem, and probably a number of others, since all of
the WrXXXX routines call WrBin.

Disclaimer for the net: While I believe this solves the problem above, and
probably others, neither I nor anyone (or any organisation) associated
with me takes any responsibility for any unpleasant consequences of using
this fix.

- Simon

-- 
Simon Lovatt            | S.J.Lovatt@massey.ac.nz |
Dept of Biotechnology   |                         |
Massey University, N.Z. |                         |

toma@tekgvs.LABS.TEK.COM (Tom Almy) (07/10/90)

In article <831@massey.ac.nz> SLovatt@massey.ac.nz (S.J. Lovatt) writes:
>Bug Fix - JPI TopSpeed M2 Rel 1.04b
>Symptom:
>When using FIO.WrLn, I found that it was producing: CR CR LF
>... rather than CR LF, as it should.
>Solution:
>The problem was traced to FIO.WrBin, where the procedure CLB.write was
>called to do the actual writing. Elsewhere, this procedure was called as:
>CLB._write     ... but here, it was called as:    CLB.write

This message has me baffled because I recompiled (from older TS M2) an
application that wrote binary files and didn't see this problem.

But my release is "1.04" with no letter suffix. In the sources CLB.write
is called *everywhere* except FIO.Truncate().

The CLB.write() routine checks a text mode bit before converting LF to CR LF.
All of the M2 file opening routines open the file in binary (not text) mode
so this reported problem shouldn't occur. (BTW, that the text mode code
exists in the executable file points out part of the inefficiencies of the
new TS M2. I am impressed that the new M2 runs faster, because I certainly
didn't expect it.)

So this brings up a new question, are there different versions for different
countries? Did they introduce new errors in some revision from 1.04 to 1.04b?
Enquiring minds want to know.

Tom Almy
toma@tekgvs.labs.tek.com
Standard Disclaimers Apply

Pat.Terry@p101.f4.n494.z5.fidonet.org (Pat Terry) (07/11/90)

In <831@massey.ac.nz> you write

 > I've just sent off a bug report and correction to JPI as follows, and I
 > thought fellow TS M2 users on the net would be interested:
 > 
 > Bug Fix - JPI TopSpeed M2 Rel 1.04b

Thanks.  My they move them releases fast.  My copy was picked up in the UK
after the ISO meeting in mid june, and announces itself as 1.04.  How does  
1.04b announce itself, and how long did 1.04a last?

But it appears from another posting in this group that the bugs abound.
Please pass on any more fixes you find.

Pat
 




--  
uucp: uunet!m2xenix!puddle!5!494!4.101!Pat.Terry
Internet: Pat.Terry@p101.f4.n494.z5.fidonet.org