diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-12-10 08:07:33 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-12-10 08:07:33 -0800 |
commit | b698bb706067d911c62385b477684efea6aa983a (patch) | |
tree | 09596eeefba83198a549c01d22497a07bc8d97d3 /stream.h | |
parent | 434ea4f4ce65a553205f4030a6b98268ff938f0f (diff) | |
download | txr-b698bb706067d911c62385b477684efea6aa983a.tar.gz txr-b698bb706067d911c62385b477684efea6aa983a.tar.bz2 txr-b698bb706067d911c62385b477684efea6aa983a.zip |
syslog support; bitwise logior and logand functions become variadic.
* Makefile: Use -iquote to restrict our #include search paths from
being processed for #include <...>. Add syslog.o to OBJS-y if
have_syslog is y.
* configure (have_syslog): New variable, set by detecting syslog API.
* eval.c (eval_init): logand and logior registrations changed to
go to variadic versions. New syslog variables and functions registered.
* lib.c (logandv, logiorv): New functions.
* lib.h (logandv, logiorv): Declared.
* txr.c (main): Call syslog_init.
* syslog.c: New file.
* syslog.h: New file.
* txr.1: Updated.
* txr.vim: Regenerated.
Diffstat (limited to 'stream.h')
-rw-r--r-- | stream.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -24,6 +24,27 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +enum strm_whence { + strm_start = SEEK_SET, + strm_cur = SEEK_CUR, + strm_end = SEEK_SET +}; + +struct strm_ops { + struct cobj_ops cobj_ops; + val (*put_string)(val, val); + val (*put_char)(val, val); + val (*put_byte)(val, int); + val (*get_line)(val); + val (*get_char)(val); + val (*get_byte)(val); + val (*close)(val, val); + val (*flush)(val); + val (*seek)(val, cnum, enum strm_whence); + val (*get_prop)(val, val ind); + val (*set_prop)(val, val ind, val); +}; + extern val std_input, std_output, std_debug, std_error, std_null; extern val output_produced; |