Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Restore the original formatting so that everything lines up nicely.
Matthew Seaman committed 12 years ago
commit e689e05fa2287437317f6528305d0dc78126524c
parent 6852b42
1 file changed +8 -2
modified src/version.c
@@ -71,6 +71,7 @@ print_version(struct pkg *pkg, const char *source, const char *ver,
{
	const char	*key;
	const char	*version;
+
	int		 cout;

	pkg_get(pkg, PKG_VERSION, &version);
	if (ver == NULL) {
@@ -103,8 +104,13 @@ print_version(struct pkg *pkg, const char *source, const char *ver,

	if (opt & VERSION_ORIGIN)
		pkg_printf("%-34o %S", pkg, key);
-
	else
-
		pkg_printf("%n-%v %S", pkg, pkg, key);
+
	else {
+
		cout = pkg_printf("%n-%v", pkg, pkg);
+
		cout = 35 - cout;
+
		if (cout < 1)
+
			cout = 1;
+
		printf("%*s%s", cout, " ", key);
+
	}

	if (opt & VERSION_VERBOSE) {
		switch (*key) {