Fix rig_idx2settings for 64-bit sprintf_list functions

pull/78/head
Michael Black 2018-12-31 15:39:49 -06:00
rodzic df4ec51909
commit 772b1ba2c1
3 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -2267,8 +2267,7 @@ rigerror HAMLIB_PARAMS((int errnum));
extern HAMLIB_EXPORT(int)
rig_setting2idx HAMLIB_PARAMS((setting_t s));
#define rig_idx2setting(i) (1ULL<<(i))
extern setting_t rig_idx2setting(int i);
/*
* Even if these functions are prefixed with "rig_", they are not rig specific
* Maybe "hamlib_" would have been better. Let me know. --SF

Wyświetl plik

@ -522,6 +522,14 @@ static struct
{ RIG_FUNC_NONE, "" },
};
/**
* utility function to convert index to bit value
*
*/
uint64_t rig_idx2setting(int i)
{
return 1ULL << i;
}
/**
* \brief Convert alpha string to enum RIG_FUNC_...

Wyświetl plik

@ -96,6 +96,7 @@ extern HAMLIB_EXPORT(int) rig_check_cache_timeout(const struct timeval *tv,
extern HAMLIB_EXPORT(void) rig_force_cache_timeout(struct timeval *tv);
extern HAMLIB_EXPORT(setting_t) rig_idx2setting(int i);
#ifdef PRId64
/** \brief printf(3) format to be used for long long (64bits) type */