summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-28 13:14:28 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-28 13:14:28 -0700
commit42367d8856e5476245b218e1b2bbf416a0341327 (patch)
treef1da85ccabd1c670c44c916c744b63c4064dbef6 /txr.1
parent0c2ccd85a2a237c442f0706e420797af64a4398f (diff)
downloadtxr-42367d8856e5476245b218e1b2bbf416a0341327.tar.gz
txr-42367d8856e5476245b218e1b2bbf416a0341327.tar.bz2
txr-42367d8856e5476245b218e1b2bbf416a0341327.zip
Add a byte mode to stdio streams.
* stream.c (byte_oriented_k): New keyword symbol variable. (struct stdio_handle): New member, is_byte_oriented. (stdio_get_prop): Retrieve the value of is_byte_oriented when the :byte-oriented property is inquired. (stdio_set_prop): Map :byte-oriented to the is_byte_oriented flag. (stdio_get_char): Do not decode UTF-8 if is_byte_oriented is set; just read one character. (make_stdio_stream_common): Initialize is_byte_oriented to 0. (stream_init): Initialize byte_oriented_k. * txr.1: Document :byte-oriented property, along with some clean-up and clarification in the description of properties.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.136
1 files changed, 29 insertions, 7 deletions
diff --git a/txr.1 b/txr.1
index 51d6c1df..cc7390e4 100644
--- a/txr.1
+++ b/txr.1
@@ -34627,15 +34627,37 @@ value. If the stream does not understand a property, nil is returned, which is
also returned if the property exists, but its value happens to be
.codn nil .
-Properties are currently used for marking certain streams as "real-time" (see
-the
+The
+.code :name
+property is widely supported by streams of various types. It associates
+the stream with a name. This property is not always modifiable.
+
+File, process and stream socket I/O streams have a
+.code :fd
+property which can be accessed, but not modified. It retrieves
+the same value as the
+.code stream-fd
+function.
+
+The "real time"
+property supported by these streams, connected with the
.code real-time-stream-p
-function above), and also for setting the priority at
-which messages are reported to syslog by the
-.code *stdlog*
-stream (see
+function, also appears as the
+.code :real-time
+property.
+
+I/O streams also have a property called
+.code :byte-oriented
+which, if set, suppresses the decoding of UTF-8 on character input. Rather,
+each byte of the file corresponds directly to one character. Bytes
+in the range 1 to 255 correspond to the character code points U+0001
+to U+00FF. Byte value 0 is mapped to the code point U+DC00.
+
+The logging priority of the
.code *stdlog*
-in the Unix Syslog section).
+syslog stream is controlled by the
+.code :prio
+property.
If
.meta stream