[svn] GnuPG - r3895 - trunk/g10
svn author dshaw
cvs at cvs.gnupg.org
Tue Sep 20 05:34:34 CEST 2005
Author: dshaw
Date: 2005-09-20 05:34:32 +0200 (Tue, 20 Sep 2005)
New Revision: 3895
Modified:
trunk/g10/ChangeLog
trunk/g10/keylist.c
trunk/g10/plaintext.c
Log:
* keylist.c (reorder_keyblock, do_reorder_keyblock): Reorder attribute
IDs as well as regular text IDs.
* plaintext.c (ask_for_detached_datafile): Use make_filename() on
filename so tilde expansion works.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2005-09-16 12:49:53 UTC (rev 3894)
+++ trunk/g10/ChangeLog 2005-09-20 03:34:32 UTC (rev 3895)
@@ -1,3 +1,11 @@
+2005-09-19 David Shaw <dshaw at jabberwocky.com>
+
+ * keylist.c (reorder_keyblock, do_reorder_keyblock): Reorder
+ attribute IDs as well as regular text IDs.
+
+ * plaintext.c (ask_for_detached_datafile): Use make_filename() on
+ filename so tilde expansion works.
+
2005-09-14 David Shaw <dshaw at jabberwocky.com>
* main.h, misc.c (parse_options): Add the ability to have help
Modified: trunk/g10/keylist.c
===================================================================
--- trunk/g10/keylist.c 2005-09-16 12:49:53 UTC (rev 3894)
+++ trunk/g10/keylist.c 2005-09-20 03:34:32 UTC (rev 3895)
@@ -1379,15 +1379,16 @@
* Reorder the keyblock so that the primary user ID (and not attribute
* packet) comes first. Fixme: Replace this by a generic sort
* function. */
-void
-reorder_keyblock (KBNODE keyblock)
+static void
+do_reorder_keyblock (KBNODE keyblock,int attr)
{
KBNODE primary = NULL, primary0 = NULL, primary2 = NULL;
KBNODE last, node;
for (node=keyblock; node; primary0=node, node = node->next) {
if( node->pkt->pkttype == PKT_USER_ID &&
- !node->pkt->pkt.user_id->attrib_data &&
+ ((attr && node->pkt->pkt.user_id->attrib_data) ||
+ (!attr && !node->pkt->pkt.user_id->attrib_data)) &&
node->pkt->pkt.user_id->is_primary ) {
primary = primary2 = node;
for (node=node->next; node; primary2=node, node = node->next ) {
@@ -1419,6 +1420,13 @@
}
void
+reorder_keyblock (KBNODE keyblock)
+{
+ do_reorder_keyblock(keyblock,1);
+ do_reorder_keyblock(keyblock,0);
+}
+
+void
list_keyblock( KBNODE keyblock, int secret, int fpr, void *opaque )
{
reorder_keyblock (keyblock);
Modified: trunk/g10/plaintext.c
===================================================================
--- trunk/g10/plaintext.c 2005-09-16 12:49:53 UTC (rev 3894)
+++ trunk/g10/plaintext.c 2005-09-20 03:34:32 UTC (rev 3895)
@@ -446,12 +446,16 @@
int any=0;
tty_printf(_("Detached signature.\n"));
do {
+ char *name;
xfree(answer);
tty_enable_completion(NULL);
- answer = cpr_get("detached_signature.filename",
+ name = cpr_get("detached_signature.filename",
_("Please enter name of data file: "));
tty_disable_completion();
cpr_kill_prompt();
+ answer=make_filename(name,(void *)NULL);
+ xfree(name);
+
if( any && !*answer ) {
rc = G10ERR_READ_FILE;
goto leave;
More information about the Gnupg-commits
mailing list