diff options
author | swallace <swallace@FreeBSD.org> | 1995-01-05 01:10:13 +0000 |
---|---|---|
committer | swallace <swallace@FreeBSD.org> | 1995-01-05 01:10:13 +0000 |
commit | fa156e55d6e6bc94f99e4f36730c1b6a2fcf6fd1 (patch) | |
tree | e07343f8fe828b93dd7380ca4301afc7c8b5818a /usr.sbin/pkg_install/info/perform.c | |
parent | 0bee6b5a11ccc4e0d6938dca1a93f1b64adb6564 (diff) | |
download | FreeBSD-src-fa156e55d6e6bc94f99e4f36730c1b6a2fcf6fd1.zip FreeBSD-src-fa156e55d6e6bc94f99e4f36730c1b6a2fcf6fd1.tar.gz |
Added new function show_index() which does a 'smart' display of the index file.
Index descriptions are limited to MAXINDEXSIZE (60) chars. Any description
beyond that is truncated. Also, only the first line is displayed as well.
This allows pkg_info -a -I to be formated in two columns with one line
per package for easy reading.
Reviewed by: jkh
Diffstat (limited to 'usr.sbin/pkg_install/info/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/info/perform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c index a28f2a0..bde7b2e 100644 --- a/usr.sbin/pkg_install/info/perform.c +++ b/usr.sbin/pkg_install/info/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: perform.c,v 1.9 1994/10/14 05:57:49 jkh Exp $"; +static const char *rcsid = "$Id: perform.c,v 1.10 1994/12/06 00:51:45 jkh Exp $"; #endif /* @@ -136,8 +136,8 @@ pkg_do(char *pkg) if (Flags & SHOW_INDEX) { char fname[FILENAME_MAX]; - sprintf(fname, "%s\t", pkg); - show_file(fname, COMMENT_FNAME); + sprintf(fname, "%-19s ", pkg); + show_index(fname, COMMENT_FNAME); } else { /* Start showing the package contents */ |