aboutsummaryrefslogtreecommitdiffstats
path: root/package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base
downloadtrunk-36060-master.tar.gz
trunk-36060-master.tar.bz2
trunk-36060-master.zip
Diffstat (limited to 'package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base')
-rw-r--r--package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base b/package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base
new file mode 100644
index 0000000..9540668
--- /dev/null
+++ b/package/opkg/patches/.svn/text-base/040-wrap-descriptions-only-on-ttys.patch.svn-base
@@ -0,0 +1,31 @@
+--- a/libopkg/pkg_parse.c
++++ b/libopkg/pkg_parse.c
+@@ -20,6 +20,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <unistd.h>
+
+ #include "pkg.h"
+ #include "opkg_utils.h"
+@@ -239,10 +240,16 @@ pkg_parse_line(void *ptr, const char *li
+
+ case ' ':
+ if ((mask & PFM_DESCRIPTION) && reading_description) {
+- pkg->description = xrealloc(pkg->description,
+- strlen(pkg->description)
+- + 1 + strlen(line) + 1);
+- strcat(pkg->description, "\n");
++ if (isatty(1)) {
++ pkg->description = xrealloc(pkg->description,
++ strlen(pkg->description)
++ + 1 + strlen(line) + 1);
++ strcat(pkg->description, "\n");
++ } else {
++ pkg->description = xrealloc(pkg->description,
++ strlen(pkg->description)
++ + 1 + strlen(line));
++ }
+ strcat(pkg->description, (line));
+ goto dont_reset_flags;
+ } else if ((mask & PFM_CONFFILES) && reading_conffiles) {