[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New TextRider & oo2c patch



I have uploaded a new patch at
http://home.t-online.de/home/mvacken/oo2c_32-1.3.7-1.3.7d.diff.gz

The patch fixes a buglet in 1.3.7c in connection with installing the
gc from its source directory.  It uses O_BINARY for systems that have
it defined.

The included TextRider module has been tested with the three possible
eol markers.  I also extended the "inconsistency" example for eol auto
detection:

PROCEDURE (r: Reader) SetEol* (marker: ARRAY OF CHAR; markerLen: INTEGER);
(* [...]
   Enabling auto detection introduces a (small) inconsistency: if the first 
   line of the channel ends with a <CR>, then skipping over the complete eol 
   marker of this line is not done at once iff the next character is a <LF>. 
   All reading procedures except for `ReadChar' will automatically skip the
   spurious <LF>.
   
   Example: 
     Input is "line1<CR><LF>line2".
     The first ReadLine leaves the reading position between <CR> and <LF>,
     and a second ReadLine skips automagically the <LF> and returns "line2".
     But if the second operation is a ReadChar, it will return <LF>, not
     "l".
     
   The reason for this is that ReadChar is the only operation that can look
   at parts of an multi-byte end-of-line marker, while such a marker is an 
   atomic entity for all other read operations if the channel is read 
   sequentially.
   
   pre: (r.Res() = done) & 
        ((markerLen = -1) OR (1 <= markerLen < LEN (marker))) &
        (markerLen < maxLengthEol) & (for all i: marker[i] < 20X) *)


-- mva