aboutsummaryrefslogtreecommitdiff
path: root/runcap.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-07-21 18:34:23 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2017-07-21 18:50:53 +0300
commit969dab4c1af666d381124fd481821bc936fc94ed (patch)
treeb7bc4b2e75b8cc3f64e240162f3bedff23e9c58b /runcap.h
parent0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48 (diff)
downloadruncap-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runcap.h b/runcap.h
index 3ed907d..0ece8e7 100644
--- a/runcap.h
+++ b/runcap.h
@@ -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

Return to:

Send suggestions and report system problems to the System administrator.