summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-14 07:11:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-14 07:11:20 -0700
commitfdbd49a83ce4a567824c2830e202735d59b55a84 (patch)
tree8a72fe8ba353ce560458c0717b7f42fa43fd3f1d /txr.1
parent3d685d1985cd06cb0bcbb53cca66ab3239f4ea06 (diff)
downloadtxr-fdbd49a83ce4a567824c2830e202735d59b55a84.tar.gz
txr-fdbd49a83ce4a567824c2830e202735d59b55a84.tar.bz2
txr-fdbd49a83ce4a567824c2830e202735d59b55a84.zip
buffers: support negative indexing from end.
* buf.c (buf_check_index): Take struct buf p * parameter, to be able to displace negative values using the buffer length. (buf_put_bytes, buf_put_i8, puf_put_u8, but_put_char, buf_put_uchar, buf_get_bytes, buf_get_i8, buf_get_u8, buf_strm_get_byte_callback): Pass struct buf pointer to buf_check_index. In buf_put_bytes, we use the returned value instead of the original pos. (buf_strm_seek): Don't use buf_check_index for validating the position, since the negative indexing logic doesn't apply to stream seek operations.
Diffstat (limited to 'txr.1')
0 files changed, 0 insertions, 0 deletions