From e327bc964cc81e8da899b35cb4ab9f660066e918 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 16 Oct 2019 15:45:28 -0700 Subject: doc: read-until-match effect on stream position. * txr.1: Document athat the read-until-match, scan-until-match and count-until-match functions leave the stream position in an unspecified state, since the position returned by seek-stream doesn't take into account push-back characters. --- txr.1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/txr.1 b/txr.1 index bc23f8d4..49141465 100644 --- a/txr.1 +++ b/txr.1 @@ -43449,6 +43449,16 @@ removed from the stream. If .meta include-match is true, that matching text is included in the returned string. Otherwise, it is discarded. +The next available character in the stream is the first +non-matching character following the matched text. +However, the next available character, as well as some number of +subsequent characters, may originate from the stream's push-back buffer, +rather than from the underlying operating system object, +due to this function's internal use of the +.code unget-char +function. Therefore, the stream position, as would be reported by +.codn seek-stream , +is unspecified. .coNP Functions @ scan-until-match and @ count-until-match .synb @@ -43493,6 +43503,19 @@ and whose .code cdr holds a character string that comprises the text matched by .metn regex . +The text matched by +.meta regex +is as long as possible, and is removed from the stream. +The next available character in the stream is the first +non-matching character following the matched text. +However, the next available character, as well as some number of +subsequent characters, may originate from the stream's push-back buffer, +rather than from the underlying operating system object, +due to these functions' internal use of the +.code unget-char +function. Therefore, the stream position, as would be reported by +.codn seek-stream , +is unspecified. .coNP Functions @, m^$ @ m^ and @ m$ .synb -- cgit v1.2.3