summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-05-17 12:41:45 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-05-17 12:41:45 +0000
commite5e2d17648a0d8f3c9ed3095634b552ed5409059 (patch)
tree75ff8db1fb141872e059374df1c23f01e64fc4ef /cmdline/apt-cache.cc
parent11680bfd380d52c96feeb76600e50a145838b329 (diff)
* merged with otavoi
Patches applied: * otavio@debian.org--2005/apt--ddtp--0.6--patch-15 Merge changes did by Michael Vogt to solve some rebuilding mistakes. * otavio@debian.org--2005/apt--ddtp--0.6--patch-16 Does't show Description twice * otavio@debian.org--2005/apt--ddtp--0.6--patch-17 Merge last fixes did by Michael but preserve my version of apt-cache.cc fix.
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 9293a9858..e85492576 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1225,10 +1225,11 @@ bool DisplayRecord(pkgCache::VerIterator V)
return false;
}
- // Strip the Description
+ // Get a pointer to start of Description field
unsigned char *DescP = (unsigned char*)strstr((char*)Buffer, "Description:");
- *DescP='\0';
- if (write(STDOUT_FILENO,Buffer, strlen((char*)Buffer)+1) != strlen((char *)Buffer)+1)
+
+ // Write all but Description
+ if (fwrite(Buffer,1,DescP - Buffer,stdout) < (size_t)(DescP - Buffer))
{
delete [] Buffer;
return false;