summaryrefslogtreecommitdiff
path: root/data/_apt7/finddesc.diff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2009-04-27 10:05:44 +0000
committerJay Freeman <saurik@saurik.com>2009-04-27 10:05:44 +0000
commit0ab69dd9f7b48237939e03b775fb7b41d3b2438d (patch)
tree4ff087aaff14b346d8446b6d0ef53c986454c0f8 /data/_apt7/finddesc.diff
parenta3d69f9e957d210a1b7415ed3d2621d34be48c92 (diff)
Starting factor of apt7.
git-svn-id: http://svn.telesphoreo.org/trunk@606 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/_apt7/finddesc.diff')
-rw-r--r--data/_apt7/finddesc.diff59
1 files changed, 59 insertions, 0 deletions
diff --git a/data/_apt7/finddesc.diff b/data/_apt7/finddesc.diff
new file mode 100644
index 000000000..15bba37e2
--- /dev/null
+++ b/data/_apt7/finddesc.diff
@@ -0,0 +1,59 @@
+diff -ru apt-0.7.20.2/apt-pkg/deb/debrecords.cc apt-0.7.20.2+iPhone/apt-pkg/deb/debrecords.cc
+--- apt-0.7.20.2/apt-pkg/deb/debrecords.cc 2009-04-20 08:54:09.000000000 +0000
++++ apt-0.7.20.2+iPhone/apt-pkg/deb/debrecords.cc 2009-04-20 17:26:22.000000000 +0000
+@@ -124,6 +134,29 @@
+ return orig;
+ }
+ /*}}}*/
++// RecordParser::ShortDesc - Return a 1 line description /*{{{*/
++// ---------------------------------------------------------------------
++/* */
++bool debRecordParser::ShortDesc(const char *&Start,const char *&End)
++{
++ if (!LongDesc(Start,End))
++ return false;
++ const char *Line = (const char *) memchr(Start, '\n', End - Start);
++ if (Line != NULL)
++ End = Line;
++ return true;
++}
++ /*}}}*/
++// RecordParser::LongDesc - Return a longer description /*{{{*/
++// ---------------------------------------------------------------------
++/* */
++bool debRecordParser::LongDesc(const char *&Start,const char *&End)
++{
++ if (!Section.Find("Description",Start,End))
++ return Section.Find(("Description-" + pkgIndexFile::LanguageCode()).c_str(),Start,End);
++ return true;
++}
++ /*}}}*/
+
+ static const char *SourceVerSeparators = " ()";
+
+diff -ru apt-0.7.20.2/apt-pkg/deb/debrecords.h apt-0.7.20.2+iPhone/apt-pkg/deb/debrecords.h
+--- apt-0.7.20.2/apt-pkg/deb/debrecords.h 2009-04-20 08:54:09.000000000 +0000
++++ apt-0.7.20.2+iPhone/apt-pkg/deb/debrecords.h 2009-04-20 17:20:31.000000000 +0000
+@@ -39,6 +39,9 @@
+ virtual string SourcePkg();
+ virtual string SourceVer();
+
++ virtual bool ShortDesc(const char *&Start,const char *&End);
++ virtual bool LongDesc(const char *&Start,const char *&End);
++
+ // These are some general stats about the package
+ virtual string Maintainer();
+ virtual string ShortDesc();
+diff -ru apt-0.7.20.2/apt-pkg/pkgrecords.h apt-0.7.20.2+iPhone/apt-pkg/pkgrecords.h
+--- apt-0.7.20.2/apt-pkg/pkgrecords.h 2009-04-20 19:56:46.000000000 +0000
++++ apt-0.7.20.2+iPhone/apt-pkg/pkgrecords.h 2009-04-20 19:55:58.000000000 +0000
+@@ -61,6 +61,9 @@
+ virtual string SourcePkg() {return string();};
+ virtual string SourceVer() {return string();};
+
++ virtual bool ShortDesc(const char *&Start,const char *&End) {return false;}
++ virtual bool LongDesc(const char *&Start,const char *&End) {return false;}
++
+ // These are some general stats about the package
+ virtual string Maintainer() {return string();};
+ virtual string ShortDesc() {return string();};