summaryrefslogtreecommitdiff
path: root/src/enquiry.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2010-07-16 14:03:41 +0200
committerGuillem Jover <guillem@debian.org>2010-07-16 17:18:49 +0200
commitb4efb601b445580a3a46ce873eec3a80893dd08f (patch)
tree202617348bb74307311ab1d5a607b65f94042ac6 /src/enquiry.c
parentc5309f8009d14dc6ce05a783ab89acf0c5e2a3ed (diff)
downloaddpkg-b4efb601b445580a3a46ce873eec3a80893dd08f.tar.gz
Convert limiteddescription() to pkg_summary()
Move clamping of summary size to callers. This makes the function more generic so that it can be reused in other contexts.
Diffstat (limited to 'src/enquiry.c')
-rw-r--r--src/enquiry.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/enquiry.c b/src/enquiry.c
index d8e1a4fb8..69e702d63 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -118,7 +118,10 @@ static void describebriefly(struct pkginfo *pkg) {
maxl= 57;
l= strlen(pkg->name);
if (l>20) maxl -= (l-20);
- limiteddescription(pkg,maxl,&pdesc,&l);
+
+ pkg_summary(pkg, &pdesc, &l);
+ l = min(l, maxl);
+
printf(" %-20s %.*s\n",pkg->name,l,pdesc);
}