summaryrefslogtreecommitdiff
path: root/data/_apt7/hashtable.diff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-08-15 10:49:31 -1000
committerSam Bingner <sam@bingner.com>2018-08-15 10:49:31 -1000
commit2f8f0c32e83897a3644f0d94bfaf437743e2741b (patch)
tree87038c9a8a49f33db1e3c1a5f4cc38109f4e0de2 /data/_apt7/hashtable.diff
parentaf3c4ce5f8f1a128eaf24d22749df3b7e744e41b (diff)
Update apt7 to 1.4.8 based on nitotv fork and add xz support
Diffstat (limited to 'data/_apt7/hashtable.diff')
-rw-r--r--data/_apt7/hashtable.diff61
1 files changed, 0 insertions, 61 deletions
diff --git a/data/_apt7/hashtable.diff b/data/_apt7/hashtable.diff
deleted file mode 100644
index fe5c046c8..000000000
--- a/data/_apt7/hashtable.diff
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -ru apt-0.7.20.2/apt-pkg/tagfile.cc apt-0.7.20.2+iPhone/apt-pkg/tagfile.cc
---- apt-0.7.20.2/apt-pkg/tagfile.cc 2009-02-07 15:09:35.000000000 +0000
-+++ apt-0.7.20.2+iPhone/apt-pkg/tagfile.cc 2009-04-19 02:42:49.000000000 +0000
-@@ -220,7 +220,10 @@
- if (isspace(Stop[0]) == 0)
- {
- Indexes[TagCount++] = Stop - Section;
-- AlphaIndexes[AlphaHash(Stop,End)] = TagCount;
-+ unsigned long hash(AlphaHash(Stop, End));
-+ while (AlphaIndexes[hash] != 0)
-+ hash = (hash + 1) % (sizeof(AlphaIndexes) / sizeof(AlphaIndexes[0]));
-+ AlphaIndexes[hash] = TagCount;
- }
-
- Stop = (const char *)memchr(Stop,'\n',End - Stop);
-@@ -258,14 +261,16 @@
- bool pkgTagSection::Find(const char *Tag,unsigned &Pos) const
- {
- unsigned int Length = strlen(Tag);
-- unsigned int I = AlphaIndexes[AlphaHash(Tag)];
-- if (I == 0)
-- return false;
-- I--;
-+ unsigned int J = AlphaHash(Tag);
-
-- for (unsigned int Counter = 0; Counter != TagCount; Counter++,
-- I = (I+1)%TagCount)
-+ for (unsigned int Counter = 0; Counter != TagCount; Counter++,
-+ J = (J+1)%(sizeof(AlphaIndexes)/sizeof(AlphaIndexes[0])))
- {
-+ unsigned int I = AlphaIndexes[J];
-+ if (I == 0)
-+ return false;
-+ I--;
-+
- const char *St;
- St = Section + Indexes[I];
- if (strncasecmp(Tag,St,Length) != 0)
-@@ -291,14 +296,16 @@
- const char *&End) const
- {
- unsigned int Length = strlen(Tag);
-- unsigned int I = AlphaIndexes[AlphaHash(Tag)];
-- if (I == 0)
-- return false;
-- I--;
-+ unsigned int J = AlphaHash(Tag);
-
-- for (unsigned int Counter = 0; Counter != TagCount; Counter++,
-- I = (I+1)%TagCount)
-+ for (unsigned int Counter = 0; Counter != TagCount; Counter++,
-+ J = (J+1)%(sizeof(AlphaIndexes)/sizeof(AlphaIndexes[0])))
- {
-+ unsigned int I = AlphaIndexes[J];
-+ if (I == 0)
-+ return false;
-+ I--;
-+
- const char *St;
- St = Section + Indexes[I];
- if (strncasecmp(Tag,St,Length) != 0)