From: Jonathan McDowell <noodles@earth.li>
Date: Mon, 31 May 2004 23:48:17 +0000 (+0000)
Subject: cscvs to tla changeset 122
X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/6afb1be70692774239e25ff9fb1083bedc714031?ds=sidebyside

cscvs to tla changeset 122
Author: noodles
Date: 2004/05/26 17:48:02
Fix gpg --search support (it doesn't like uid/sub at the start of the index
lines).
---

diff --git a/keyindex.c b/keyindex.c
index b81ec61..1f13851 100644
--- a/keyindex.c
+++ b/keyindex.c
@@ -5,7 +5,7 @@
  *
  * Copyright 2002 Project Purple
  *
- * $Id: keyindex.c,v 1.13 2003/10/11 21:52:18 noodles Exp $
+ * $Id: keyindex.c,v 1.14 2004/05/26 17:48:02 noodles Exp $
  */
 
 #include <assert.h>
@@ -72,10 +72,10 @@ int list_uids(struct openpgp_signedpacket_list *uids, bool verbose, bool html)
 			snprintf(buf, 1023, "%.*s",
 				(int) uids->packet->length,
 				uids->packet->data);
-			printf("uid                             %s\n",
+			printf("                                %s\n",
 				(html) ? txt2html(buf) : buf);
 		} else if (uids->packet->tag == 17) {
-			printf("uid                             "
+			printf("                                "
 				"[photo id]\n");
 		}
 		if (verbose) {
@@ -248,7 +248,9 @@ int key_index(struct openpgp_publickey *keys, bool verbose, bool fingerprint,
 		}
 
 		list_uids(curuid, verbose, html);
-		list_subkeys(keys->subkeys, verbose, html);
+		if (verbose) {
+			list_subkeys(keys->subkeys, verbose, html);
+		}
 
 		keys = keys->next;
 	}