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(...).

(cherry picked from commit c15dc0da66)
This commit is contained in:
Witold Filipczyk 2023-06-28 12:19:38 +02:00
parent dac1927f1b
commit a91b47ee7a

View File

@ -122,6 +122,15 @@ static union option_info mailcap_options[] = {
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_mailcap(which) get_opt_mailcap(which).value
#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_prioritize() get_mailcap(MAILCAP_PRIORITIZE).number
#define get_mailcap_path() get_mailcap(MAILCAP_PATH).string
#endif
/* State variables */
static struct hash *mailcap_map = NULL;