diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-20 05:13:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-20 05:13:19 -0700 |
commit | 03213f2aa15930d7336f582238f8abfacf17584a (patch) | |
tree | b06c13268925e3d9f40a45f041b1f6a3d2bfeb6c /stream.h | |
parent | 04575dff348209315fb24e3c809a93343f39783b (diff) | |
download | txr-03213f2aa15930d7336f582238f8abfacf17584a.tar.gz txr-03213f2aa15930d7336f582238f8abfacf17584a.tar.bz2 txr-03213f2aa15930d7336f582238f8abfacf17584a.zip |
read-until-match can optionally keep matched text.
* regex.c (read_until_match): New argument, include_match.
Three times repeated termination code refactored into block
reached by forward goto.
(regex_init): Registration of read-until-match updated.
* regex.h (read_until_match): Declaration updated.
* stream.c (struct record_adapter_base): New member,
include_match.
(record_adapter_get_line): Pass match to read_until_match
as new argument.
(record_adapater): New argument, include_match.
(stream_init): Update registration of record-adapter.
* stream.h (record_adapter): Declaration updated.
* txr.1: Updated.
Diffstat (limited to 'stream.h')
-rw-r--r-- | stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -152,7 +152,7 @@ val get_string_from_stream(val); val make_strlist_output_stream(void); val get_list_from_stream(val); val make_dir_stream(DIR *); -val record_adapter(val regex, val stream); +val record_adapter(val regex, val stream, val include_match); val streamp(val obj); val real_time_stream_p(val obj); val stream_set_prop(val stream, val ind, val prop); |