projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use some semantically more correct buffer operations
[apt.git]
/
apt-inst
/
deb
/
debfile.h
diff --git
a/apt-inst/deb/debfile.h
b/apt-inst/deb/debfile.h
index 6b9f8ffc84772a23c6d4276119a8904b36433626..02ebaae2e5481539270bc40bd96c31ffe503f5d6 100644
(file)
--- a/
apt-inst/deb/debfile.h
+++ b/
apt-inst/deb/debfile.h
@@
-25,9
+25,20
@@
#include <apt-pkg/arfile.h>
#include <apt-pkg/arfile.h>
-#include <apt-pkg/database.h>
#include <apt-pkg/dirstream.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/dirstream.h>
#include <apt-pkg/tagfile.h>
+#include <apt-pkg/macros.h>
+
+#include <string>
+
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/md5.h>
+#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/pkgcache.h>
+#endif
+
+class FileFd;
class debDebFile
{
class debDebFile
{
@@
-39,13
+50,11
@@
class debDebFile
bool CheckMember(const char *Name);
public:
bool CheckMember(const char *Name);
public:
-
class ControlExtract;
class MemControlExtract;
class ControlExtract;
class MemControlExtract;
-
- bool Extract
Control(pkgDataBase &DB
);
+
+ bool Extract
TarMember(pkgDirStream &Stream, const char *Name
);
bool ExtractArchive(pkgDirStream &Stream);
bool ExtractArchive(pkgDirStream &Stream);
- pkgCache::VerIterator MergeControl(pkgDataBase &DB);
const ARArchive::Member *GotoMember(const char *Name);
inline FileFd &GetFile() {return File;};
const ARArchive::Member *GotoMember(const char *Name);
inline FileFd &GetFile() {return File;};
@@
-56,7
+65,7
@@
class debDebFile::ControlExtract : public pkgDirStream
{
public:
{
public:
- virtual bool DoItem(Item &Itm,int &Fd);
+ virtual bool DoItem(Item &Itm,int &Fd)
APT_OVERRIDE
;
};
class debDebFile::MemControlExtract : public pkgDirStream
};
class debDebFile::MemControlExtract : public pkgDirStream
@@
-68,20
+77,19
@@
class debDebFile::MemControlExtract : public pkgDirStream
char *Control;
pkgTagSection Section;
unsigned long Length;
char *Control;
pkgTagSection Section;
unsigned long Length;
- string Member;
+ st
d::st
ring Member;
// Members from DirStream
// Members from DirStream
- virtual bool DoItem(Item &Itm,int &Fd);
+ virtual bool DoItem(Item &Itm,int &Fd)
APT_OVERRIDE
;
virtual bool Process(Item &Itm,const unsigned char *Data,
virtual bool Process(Item &Itm,const unsigned char *Data,
- unsigned long Size,unsigned long Pos);
-
+ unsigned long long Size,unsigned long long Pos) APT_OVERRIDE;
// Helpers
bool Read(debDebFile &Deb);
// Helpers
bool Read(debDebFile &Deb);
- bool TakeControl(const void *Data,unsigned long Size);
-
+ bool TakeControl(const void *Data,unsigned long
long
Size);
+
MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
- MemControlExtract(string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
+ MemControlExtract(st
d::st
ring Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
~MemControlExtract() {delete [] Control;};
};
/*}}}*/
~MemControlExtract() {delete [] Control;};
};
/*}}}*/