From e5e2d17648a0d8f3c9ed3095634b552ed5409059 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 17 May 2005 12:41:45 +0000 Subject: * 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. --- cmdline/apt-cache.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmdline') 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; -- cgit v1.2.3