[Oberon] Audit of Oberon.QuotedPrintable.Mod .

Jörg joerg.straube at iaeth.ch
Fri May 8 19:51:25 CEST 2020


R.eot becomes only TRUE, if you read BEYOND the last byte. Then "ch" is not undefined/not valid.
For the last byte in a file, R.eot is not TRUE
Jörg 

Am 08.05.20, 18:29 schrieb "oberon-bounces at lists.inf.ethz.ch im Auftrag von peter at easthope.ca" <oberon-bounces at lists.inf.ethz.ch im Auftrag von peter at easthope.ca>:

    With userid infsvn.anonymous and password anonymous, QuotedPrintable is visible here. 
    https://svn-dept.inf.ethz.ch/svn/lecturers/a2/trunk/source/QuotedPrintable.Mod
    Also here.
    https://en.wikibooks.org/wiki/Oberon/A2/Oberon.QuotedPrintable.Mod
    
    Local procedure ReadWrite has 
    Texts.Read(R, ch);
    IF ~R.eot & (R.lib IS Fonts.Font) THEN
      Files.Write(Ri, c)
    END
    
    Consequently, after the final Read, which produces R.eot, the last 
    character (c) isn't printed.  Ie. when decoding, the last character is 
    always omitted.
    
    ReadWrite is invoked only from inside WHILE ~R.eot ... .
    Therefore ~R.eot should not be in ReadWrite.  This is better.
    
    PROCEDURE ReadWrite(c: CHAR);
    BEGIN
      Texts.Read(R, ch);
      IF R.lib IS Fonts.Font THEN
        Files.Write(Ri, c)
      END
    END ReadWrite;
    
    Comments?
    
    Thanks,                             ... Lyall E.
    
    -- 
    https://en.wikibooks.org/wiki/Medical_Machines
    https://en.wikibooks.org/wiki/Oberon
    Tel: +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
    




More information about the Oberon mailing list