mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* 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.
This commit is contained in:
parent
4afa18bcaa
commit
8e17d6437d
@ -1,3 +1,11 @@
|
|||||||
|
2005-09-19 David Shaw <dshaw@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@jabberwocky.com>
|
2005-09-14 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* main.h, misc.c (parse_options): Add the ability to have help
|
* main.h, misc.c (parse_options): Add the ability to have help
|
||||||
|
@ -1379,15 +1379,16 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
* Reorder the keyblock so that the primary user ID (and not attribute
|
* Reorder the keyblock so that the primary user ID (and not attribute
|
||||||
* packet) comes first. Fixme: Replace this by a generic sort
|
* packet) comes first. Fixme: Replace this by a generic sort
|
||||||
* function. */
|
* function. */
|
||||||
void
|
static void
|
||||||
reorder_keyblock (KBNODE keyblock)
|
do_reorder_keyblock (KBNODE keyblock,int attr)
|
||||||
{
|
{
|
||||||
KBNODE primary = NULL, primary0 = NULL, primary2 = NULL;
|
KBNODE primary = NULL, primary0 = NULL, primary2 = NULL;
|
||||||
KBNODE last, node;
|
KBNODE last, node;
|
||||||
|
|
||||||
for (node=keyblock; node; primary0=node, node = node->next) {
|
for (node=keyblock; node; primary0=node, node = node->next) {
|
||||||
if( node->pkt->pkttype == PKT_USER_ID &&
|
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 ) {
|
node->pkt->pkt.user_id->is_primary ) {
|
||||||
primary = primary2 = node;
|
primary = primary2 = node;
|
||||||
for (node=node->next; node; primary2=node, node = node->next ) {
|
for (node=node->next; node; primary2=node, node = node->next ) {
|
||||||
@ -1418,6 +1419,13 @@ reorder_keyblock (KBNODE keyblock)
|
|||||||
primary2->next = node;
|
primary2->next = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
reorder_keyblock (KBNODE keyblock)
|
||||||
|
{
|
||||||
|
do_reorder_keyblock(keyblock,1);
|
||||||
|
do_reorder_keyblock(keyblock,0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
list_keyblock( KBNODE keyblock, int secret, int fpr, void *opaque )
|
list_keyblock( KBNODE keyblock, int secret, int fpr, void *opaque )
|
||||||
{
|
{
|
||||||
|
@ -446,12 +446,16 @@ ask_for_detached_datafile( MD_HANDLE md, MD_HANDLE md2,
|
|||||||
int any=0;
|
int any=0;
|
||||||
tty_printf(_("Detached signature.\n"));
|
tty_printf(_("Detached signature.\n"));
|
||||||
do {
|
do {
|
||||||
|
char *name;
|
||||||
xfree(answer);
|
xfree(answer);
|
||||||
tty_enable_completion(NULL);
|
tty_enable_completion(NULL);
|
||||||
answer = cpr_get("detached_signature.filename",
|
name = cpr_get("detached_signature.filename",
|
||||||
_("Please enter name of data file: "));
|
_("Please enter name of data file: "));
|
||||||
tty_disable_completion();
|
tty_disable_completion();
|
||||||
cpr_kill_prompt();
|
cpr_kill_prompt();
|
||||||
|
answer=make_filename(name,(void *)NULL);
|
||||||
|
xfree(name);
|
||||||
|
|
||||||
if( any && !*answer ) {
|
if( any && !*answer ) {
|
||||||
rc = G10ERR_READ_FILE;
|
rc = G10ERR_READ_FILE;
|
||||||
goto leave;
|
goto leave;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user