diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:22 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:22 +0000 |
commit | 727f18afe9c2eec15ee446cb667d9561644b5bf6 (patch) | |
tree | 7b8f7e3cd17bd725d4c47e22384400c002ca3982 /apt-pkg/contrib | |
parent | 140fd43fa632739af061834a6c1b7ee0f73a35b7 (diff) |
Daniel Jacobowitz's gcc 2.95 C++ patch
Author: jgg
Date: 1999-07-20 05:53:32 GMT
Daniel Jacobowitz's gcc 2.95 C++ patch
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 16 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 3 |
2 files changed, 17 insertions, 2 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 /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index e24f9cfb6..1186fb283 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.h,v 1.19 1999/07/11 22:42:32 jgg Exp $ +// $Id: fileutl.h,v 1.20 1999/07/20 05:53:33 jgg Exp $ /* ###################################################################### File Utilities @@ -42,6 +42,7 @@ class FileFd bool Read(void *To,unsigned long Size); bool Write(const void *From,unsigned long Size); bool Seek(unsigned long To); + bool Skip(unsigned long To); bool Truncate(unsigned long To); unsigned long Tell(); unsigned long Size(); |