1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* keydb.h, pkclist.c (select_algo_from_prefs): Allow passing a suggested

algorithm which will be used if available.

* encode.c (encode_crypt, encrypt_filter), sign.c (sign_file): Use new
select_algo_from_prefs feature to check if forcing an algorithm would
violate the recipient preferences.

* photoid.c (get_default_photo_command, show_photos): Use different
default viewers on different platforms.  Currently we have Win 9x, Win NT
(2k, xp), Mac OSX, RISC OS, and "everybody else".  These are #ifdefs as
much as possible to avoid clutter.

* g10.c (strusage, build_list), keyedit.c (show_prefs), main.h, misc.c
(compress_algo_to_string, check_compress_algo), pkclist.c
(algo_available), keygen.c (keygen_set_std_prefs): New algo_to_string and
check functions for compress algorithms.
This commit is contained in:
David Shaw 2002-06-20 19:20:55 +00:00
parent e2b8455014
commit 0f1c325c1c
11 changed files with 181 additions and 73 deletions

View file

@ -198,11 +198,6 @@ set_one_pref (ulong val, int type, int (*cf)(int), byte *buf, int *nbuf)
return 0;
}
static int
check_zip_algo (int algo)
{
return algo < 0 || algo > 2;
}
/*
* Parse the supplied string and use it to set the standard preferences.
@ -252,7 +247,7 @@ keygen_set_std_prefs (const char *string,int personal)
}
else if ((*s=='z' || *s == 'Z') && isdigit(s[1]) ) {
val = strtoul (++s, (char**)&s2, 10);
if (set_one_pref (val, 'Z', check_zip_algo, zip, &nzip))
if (set_one_pref (val, 'Z', check_compress_algo, zip, &nzip))
rc = -1;
}
else if (ascii_strcasecmp(s,"mdc")==0) {