diff options
author | Werner Koch <wk@gnupg.org> | 1998-02-13 21:58:50 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-02-13 21:58:50 +0100 |
commit | f477447d9af4097e8c5d4c15a3dd381237e93ee2 (patch) | |
tree | a655392c92fed02f06ebf503bf10b835b56e54e0 /util/iobuf.c | |
parent | added assembler stuff for hppa (diff) | |
download | gnupg2-f477447d9af4097e8c5d4c15a3dd381237e93ee2.tar.xz gnupg2-f477447d9af4097e8c5d4c15a3dd381237e93ee2.zip |
added option exportV0-2-6
Diffstat (limited to 'util/iobuf.c')
-rw-r--r-- | util/iobuf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/iobuf.c b/util/iobuf.c index 65efc0ef5..cc3288d7e 100644 --- a/util/iobuf.c +++ b/util/iobuf.c @@ -867,6 +867,11 @@ iobuf_tell( IOBUF a ) } + +/**************** + * This is a very limited implementation. It simply discards all internal + * buffering and remove all filters but the first one. + */ int iobuf_seek( IOBUF a, ulong newpos ) { @@ -885,6 +890,10 @@ iobuf_seek( IOBUF a, ulong newpos ) log_error("can't seek to %lu: %s\n", newpos, strerror(errno) ); return -1; } + a->d.len = 0; /* discard buffer */ + a->d.start = 0; + a->nbytes = 0; + a->nlimit = 0; a->ntotal = newpos; /* remove filters, but the last */ while( a->chain ) |