diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-19 19:02:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-19 19:02:18 -0700 |
commit | 97476a28d8aa0c1403d4ba4815f8f07a7caa7b4e (patch) | |
tree | 18759e7871090ca10e44e2c7c0858ec547b439cd /txr.1 | |
parent | 3c95703b632f3ef4fb9327cb6a580a08629453a2 (diff) | |
download | txr-97476a28d8aa0c1403d4ba4815f8f07a7caa7b4e.tar.gz txr-97476a28d8aa0c1403d4ba4815f8f07a7caa7b4e.tar.bz2 txr-97476a28d8aa0c1403d4ba4815f8f07a7caa7b4e.zip |
Allow unlimited character pushback in unget-char.
Fixing read_until_match will require this feature.
* socket.c (dgram_get_char): Treat unget_c as a
cons-based stack; pop a character from it if
available.
(dgram_unget_char): Push the character onto unget_c
rather than storing the characer into unget_c.
* stream.c (stdio_get_char, stdio_unget_char): Closely
analogous changes to the ones in dgram_get_char
and dgram_unget_char, respectively.
* txr.1: Documentation improved and updated.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -34230,7 +34230,18 @@ and likewise for and .codn unget-byte . -Space is available for only one character or byte of pushback. +Streams may require a pushed back byte or character to match +the character which was previously read from that stream +position, and may not allow a byte or character to be pushed +back beyond the beginning of the stream. + +Space may be available for only one byte of pushback under the +.code unget-byte +operation. + +The number of characters that may be pushed back by +.code unget-char +is not limited. Pushing both a byte and a character, in either order, is also unsupported. Pushing a byte and then reading a character, or pushing a character and @@ -34240,6 +34251,10 @@ If the stream is binary, then pushing back a byte decrements its position, except if the position is already zero. At that point, the position becomes indeterminate. +The behavior of pushing back immediately after a +.code seek-stream +positioning operation is unspecified. + .coNP Functions @, put-string @, put-line @ put-char and @ put-byte .synb .mets (put-string < string <> [ stream ]) |