summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-01-14 07:16:30 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-01-14 07:16:30 -0800
commit39e8945ea0d268ddad1706423e62240fa56f767d (patch)
tree6c2bd380e02ab0443d6545afe582bc848691bc82
parent0b519285f0a3289efa1d7671f949171f47d53151 (diff)
downloadtxr-39e8945ea0d268ddad1706423e62240fa56f767d.tar.gz
txr-39e8945ea0d268ddad1706423e62240fa56f767d.tar.bz2
txr-39e8945ea0d268ddad1706423e62240fa56f767d.zip
Clarifications about unget-char and unget-byte.
-rw-r--r--txr.115
1 files changed, 15 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 888d4cbc..1e7e5bb5 100644
--- a/txr.1
+++ b/txr.1
@@ -10494,6 +10494,16 @@ Some streams do not support these operations; some support
only one of them. In general, if a stream supports get-char,
it supports unget-char, and likewise for get-byte and unget-byte.
+Space is available for only one character or byte of pushback.
+
+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
+reading a byte, are also unsupported mixtures of operations.
+
+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.
+
.SS Functions put-string, put-line, put-char and put-byte
.TP
@@ -10570,6 +10580,11 @@ seek-stream returns the current absolute position within the
stream, if it can successfully obtain it. Otherwise, it
returns t if it is successful.
+If a character has been successfully put back into a text stream with
+unget-char and is still pending, then the position value is unspecified. If a
+byte has been put back into a binary stream with unget-byte, and the previous
+position wasn't zero, then the position is decremented by one.
+
On failure, it throws an exception of type stream-error.
.SS Functions stream-get-prop and stream-set-prop