diff options
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 4374dd7d5..c24a216ef 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.cc,v 1.28 1999/07/11 22:42:32 jgg Exp $ +// $Id: fileutl.cc,v 1.29 1999/07/20 05:53:33 jgg Exp $ /* ###################################################################### File Utilities @@ -373,6 +373,20 @@ bool FileFd::Seek(unsigned long To) return true; } /*}}}*/ +// FileFd::Skip - Seek in the file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool FileFd::Skip(unsigned long Over) +{ + if (lseek(iFd,Over,SEEK_CUR) < 0) + { + Flags |= Fail; + return _error->Error("Unable to seek ahead %u",Over); + } + + return true; +} + /*}}}*/ // FileFd::Truncate - Truncate the file /*{{{*/ // --------------------------------------------------------------------- /* */ |