1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[mailcap] Fix in test. Refs #241

mailcap test failed on s390x arch.
Better fix would require much more elinks code included in this test.
For example call to register_options(...).
This commit is contained in:
Witold Filipczyk 2023-06-28 12:19:38 +02:00
parent 3ff58b17e4
commit c15dc0da66

View File

@ -122,6 +122,15 @@ static union option_info mailcap_options[] = {
NULL_OPTION_INFO, NULL_OPTION_INFO,
}; };
#ifdef TEST_MAILCAP
#define get_opt_mailcap(which) mailcap_options[(which)].init
#define get_mailcap(which) get_opt_mailcap(which)
#define get_mailcap_ask() get_mailcap(MAILCAP_ASK).value_long
#define get_mailcap_description() get_mailcap(MAILCAP_DESCRIPTION).value_long
#define get_mailcap_enable() get_mailcap(MAILCAP_ENABLE).value_long
#define get_mailcap_prioritize() get_mailcap(MAILCAP_PRIORITIZE).value_long
#define get_mailcap_path() get_mailcap(MAILCAP_PATH).value_dataptr
#else
#define get_opt_mailcap(which) mailcap_options[(which)].option #define get_opt_mailcap(which) mailcap_options[(which)].option
#define get_mailcap(which) get_opt_mailcap(which).value #define get_mailcap(which) get_opt_mailcap(which).value
#define get_mailcap_ask() get_mailcap(MAILCAP_ASK).number #define get_mailcap_ask() get_mailcap(MAILCAP_ASK).number
@ -129,6 +138,7 @@ static union option_info mailcap_options[] = {
#define get_mailcap_enable() get_mailcap(MAILCAP_ENABLE).number #define get_mailcap_enable() get_mailcap(MAILCAP_ENABLE).number
#define get_mailcap_prioritize() get_mailcap(MAILCAP_PRIORITIZE).number #define get_mailcap_prioritize() get_mailcap(MAILCAP_PRIORITIZE).number
#define get_mailcap_path() get_mailcap(MAILCAP_PATH).string #define get_mailcap_path() get_mailcap(MAILCAP_PATH).string
#endif
/* State variables */ /* State variables */
static struct hash *mailcap_map = NULL; static struct hash *mailcap_map = NULL;