diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-12-13 22:35:31 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-12-13 22:35:31 -0800 |
commit | f8ffbad0cec3ff0be1376a6352fe63a3c5e5f361 (patch) | |
tree | f872eed68a69c5dd2cb921315da224f2c0bbe29f /syslog.c | |
parent | 097cf5fd7b8ea700b6012cd22cc56268695a5248 (diff) | |
download | txr-f8ffbad0cec3ff0be1376a6352fe63a3c5e5f361.tar.gz txr-f8ffbad0cec3ff0be1376a6352fe63a3c5e5f361.tar.bz2 txr-f8ffbad0cec3ff0be1376a6352fe63a3c5e5f361.zip |
New stream property: name. Some streams can report
their name: some kind of string.
* stream.c (name_k): New variable.
(null_get_prop): New static function.
(null_ops): Wire null_get_prop into ops structure.
(stdio_get_prop): Report h->descr as name.
(string_in_get_prop): New function.
(string_in_ops): Wire string_in_get_prop into ops structure.
(stream_init): Initialize name_k.
* stream.h (name_k): Declared.
* syslog.c (syslog_get_prop): Report "syslog" as
stream name.
Diffstat (limited to 'syslog.c')
-rw-r--r-- | syslog.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -191,6 +191,8 @@ static val syslog_get_prop(val stream, val ind) if (ind == prio_k) { val cell = (val) stream->co.handle; return car(cell); + } else if (ind == name_k) { + return lit("syslog"); } return nil; } |