diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-21 18:34:23 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-21 18:50:53 +0300 |
commit | 969dab4c1af666d381124fd481821bc936fc94ed (patch) | |
tree | b7bc4b2e75b8cc3f64e240162f3bedff23e9c58b /runcap.h | |
parent | 0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48 (diff) | |
download | runcap-969dab4c1af666d381124fd481821bc936fc94ed.tar.gz runcap-969dab4c1af666d381124fd481821bc936fc94ed.tar.bz2 |
Fix tell/seek operations
* Makefile (clean): descend into t as well.
* t/Makefile (clean): New goal.
* runcap.h (runcap_seek): Return off_t.
* seek.c (runcap_seek): Change return value. Fix operation.
* tell.c (runcap_tell): Bugfix.
* t/rt.c: New option -r for testing seek.
* t/08seek.t: New testcase.
* t/09seek.t: New testcase.
Diffstat (limited to 'runcap.h')
-rw-r--r-- | runcap.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -90,12 +90,12 @@ runcap_get_capture(struct runcap *rc, int stream) int runcap_getc(struct runcap *rc, int stream, char *cp); ssize_t runcap_getline(struct runcap *rc, int stream, char **pstr, size_t *psize); off_t runcap_tell(struct runcap *rc, int stream); -int runcap_seek(struct runcap *rc, int stream, off_t off, int whence); +off_t runcap_seek(struct runcap *rc, int stream, off_t off, int whence); static inline int runcap_rewind(struct runcap *rc, int stream) { - return runcap_seek(rc, stream, 0, 0); + return runcap_seek(rc, stream, 0, 0) != 0; } #endif |