mirror of https://github.com/nirenjan/libx52.git
Make stringification function names similar to libx52io
parent
50906b0a92
commit
06b8d15dda
|
@ -32,7 +32,7 @@ void x52d_cfg_set_Clock_Enabled(bool enabled)
|
|||
void x52d_cfg_set_Clock_PrimaryIsLocal(bool param)
|
||||
{
|
||||
PINELOG_DEBUG(_("Setting %s clock timezone to %s"),
|
||||
libx52_str_clock_id(LIBX52_CLOCK_1),
|
||||
libx52_clock_id_to_str(LIBX52_CLOCK_1),
|
||||
param ? _("local") : _("UTC"));
|
||||
clock_primary_is_local = !!param;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ cleanup:
|
|||
static void set_clock_offset(libx52_clock_id id, const char *param)
|
||||
{
|
||||
PINELOG_DEBUG(_("Setting %s clock timezone to %s"),
|
||||
libx52_str_clock_id(id), param);
|
||||
libx52_clock_id_to_str(id), param);
|
||||
x52d_dev_set_clock_timezone(id, get_tz_offset(param));
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ void x52d_cfg_set_Clock_Tertiary(char* param)
|
|||
static void set_clock_format(libx52_clock_id id, libx52_clock_format fmt)
|
||||
{
|
||||
PINELOG_DEBUG(_("Setting %s clock format to %s"),
|
||||
libx52_str_clock_id(id), libx52_str_clock_format(fmt));
|
||||
libx52_clock_id_to_str(id), libx52_clock_format_to_str(fmt));
|
||||
x52d_dev_set_clock_format(id, fmt);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ void x52d_cfg_set_Clock_FormatTertiary(libx52_clock_format fmt)
|
|||
|
||||
void x52d_cfg_set_Clock_DateFormat(libx52_date_format fmt)
|
||||
{
|
||||
PINELOG_DEBUG(_("Setting date format to %s"), libx52_str_date_format(fmt));
|
||||
PINELOG_DEBUG(_("Setting date format to %s"), libx52_date_format_to_str(fmt));
|
||||
x52d_dev_set_date_format(fmt);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
#define SET_LED_STATE(led, state) \
|
||||
PINELOG_TRACE("Setting LED %s state to %s", \
|
||||
libx52_str_led_id(LIBX52_LED_ ## led), \
|
||||
libx52_str_led_state(state)); \
|
||||
libx52_led_id_to_str(LIBX52_LED_ ## led), \
|
||||
libx52_led_state_to_str(state)); \
|
||||
x52d_dev_set_led_state(LIBX52_LED_ ## led, state);
|
||||
|
||||
void x52d_cfg_set_LED_Fire(libx52_led_state state)
|
||||
|
|
|
@ -701,7 +701,7 @@ const char * libx52_strerror(libx52_error_code error);
|
|||
* @returns Pointer to a NULL terminated string describing the clock ID.
|
||||
* Returned pointer must not be freed.
|
||||
*/
|
||||
const char * libx52_str_clock_id(libx52_clock_id id);
|
||||
const char * libx52_clock_id_to_str(libx52_clock_id id);
|
||||
|
||||
/**
|
||||
* @brief Returns a string representation of the clock format
|
||||
|
@ -711,7 +711,7 @@ const char * libx52_str_clock_id(libx52_clock_id id);
|
|||
* @returns Pointer to a NULL terminated string describing the clock format.
|
||||
* Returned pointer must not be freed.
|
||||
*/
|
||||
const char * libx52_str_clock_format(libx52_clock_format format);
|
||||
const char * libx52_clock_format_to_str(libx52_clock_format format);
|
||||
|
||||
/**
|
||||
* @brief Returns a string representation of the date format
|
||||
|
@ -721,7 +721,7 @@ const char * libx52_str_clock_format(libx52_clock_format format);
|
|||
* @returns Pointer to a NULL terminated string describing the date format.
|
||||
* Returned pointer must not be freed.
|
||||
*/
|
||||
const char * libx52_str_date_format(libx52_date_format format);
|
||||
const char * libx52_date_format_to_str(libx52_date_format format);
|
||||
|
||||
/**
|
||||
* @brief Returns a string representation of the LED
|
||||
|
@ -731,7 +731,7 @@ const char * libx52_str_date_format(libx52_date_format format);
|
|||
* @returns Pointer to a NULL terminated string describing the LED.
|
||||
* Returned pointer must not be freed.
|
||||
*/
|
||||
const char * libx52_str_led_id(libx52_led_id id);
|
||||
const char * libx52_led_id_to_str(libx52_led_id id);
|
||||
|
||||
/**
|
||||
* @brief Returns a string representation of the LED state
|
||||
|
@ -741,7 +741,7 @@ const char * libx52_str_led_id(libx52_led_id id);
|
|||
* @returns Pointer to a NULL terminated string describing the LED state.
|
||||
* Returned pointer must not be freed.
|
||||
*/
|
||||
const char * libx52_str_led_state(libx52_led_state state);
|
||||
const char * libx52_led_state_to_str(libx52_led_state state);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#define _(str) dgettext(PACKAGE, str)
|
||||
|
||||
#define STRINGIFY(name, max_id, errstr, ...) \
|
||||
const char * libx52_str_ ## name (libx52_ ## name param) { \
|
||||
const char * libx52_ ## name ## _to_str (libx52_ ## name param) { \
|
||||
static char invalid[256]; \
|
||||
static const char *desc[] = { __VA_ARGS__ }; \
|
||||
if (param >= 0 && param <= max_id) { \
|
||||
|
@ -51,7 +51,7 @@ STRINGIFY(led_state, LIBX52_LED_STATE_GREEN, N_("Unknown LED state %d")
|
|||
N_("green"),
|
||||
)
|
||||
|
||||
const char * libx52_str_led_id(libx52_led_id id)
|
||||
const char * libx52_led_id_to_str(libx52_led_id id)
|
||||
{
|
||||
static char invalid[256];
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: x52pro-linux 0.2.1\n"
|
||||
"Project-Id-Version: x52pro-linux 0.2.2\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n"
|
||||
"POT-Creation-Date: 2021-07-27 02:07-0700\n"
|
||||
"POT-Creation-Date: 2021-07-27 09:34-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: x52pro-linux 0.2.1\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n"
|
||||
"POT-Creation-Date: 2021-07-27 02:07-0700\n"
|
||||
"POT-Creation-Date: 2021-07-27 09:34-0700\n"
|
||||
"PO-Revision-Date: 2021-07-27 02:08-0700\n"
|
||||
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
|
||||
"Language-Team: Dummy Language for testing i18n\n"
|
||||
|
|
Loading…
Reference in New Issue