Merge branch 'master' into virtual-keyboard-mouse

virtual-keyboard-mouse
nirenjan 2026-03-19 18:26:14 -07:00
commit facbd79a3b
26 changed files with 771 additions and 436 deletions

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ devinfo_cleanup:
libx52io_exit(ctx);
}
int main(int argc, char **argv)
int main(void)
{
const struct libusb_version *libusb;

View File

@ -26,22 +26,26 @@ int libx52_init(libx52_device **dev)
int libx52_connect(libx52_device *dev)
{
(void)dev;
function_called();
return mock();
}
int libx52_update(libx52_device *dev)
{
(void)dev;
return LIBX52_SUCCESS;
}
void libx52_exit(libx52_device *dev)
{
(void)dev;
return;
}
const char *libx52_strerror(libx52_error_code rc)
{
(void)rc;
function_called();
return "";
}
@ -172,7 +176,7 @@ const struct CMUnitTest tests[] = {
#include "test_x52_cli_tests.c"
};
int main(int argc, char **argv)
int main(void)
{
cmocka_set_message_output(CM_OUTPUT_TAP);
cmocka_run_group_tests(tests, NULL, NULL);

View File

@ -8,7 +8,7 @@
#ifndef TEST_LIST
// Setup the test case function
#define TEST_CASE(tc) static void tc(void **state)
#define TEST_CASE(tc) static void tc(void **state __attribute__((unused)))
#define TEST_DEF(x) x
// Function header, this calls the corresponding libx52 function, and expects
// a certain number of calls to that function

View File

@ -169,6 +169,7 @@ static pthread_t clock_thr;
static void * x52_clock_thr(void *param)
{
int rc;
(void)param;
PINELOG_INFO(_("Starting X52 clock manager thread"));
for (;;) {

View File

@ -409,6 +409,7 @@ int x52d_command_loop(int sock_fd)
static void * x52d_command_thread(void *param)
{
(void)param;
for (;;) {
if (x52d_command_loop(command_sock_fd) < 0) {
PINELOG_FATAL(_("Error %d during command loop: %s"),

View File

@ -29,6 +29,7 @@ static volatile bool device_update_needed;
static void *x52_dev_thr(void *param)
{
int rc;
(void)param;
#define DEV_ACQ_DELAY 5 // seconds
#define DEV_UPD_DELAY 50000 // microseconds

View File

@ -36,6 +36,7 @@ static void *x52_io_thr(void *param)
int rc;
libx52io_report report;
libx52io_report prev_report;
(void)param;
#define IO_READ_TIMEOUT 50 /* milliseconds */
#define IO_ACQ_TIMEOUT 5 /* seconds */

View File

@ -13,6 +13,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <inttypes.h>
#include <unistd.h>
#include <errno.h>
@ -38,12 +39,14 @@ static void termination_handler(int signum)
static volatile bool flag_reload;
static void reload_handler(int signum)
{
(void)signum;
flag_reload = true;
}
static volatile bool flag_save_cfg;
static void save_config_handler(int signum)
{
(void)signum;
flag_save_cfg = true;
}
@ -111,14 +114,16 @@ static void start_daemon(bool foreground, const char *pid_file)
pid_fd = fopen(pid_file, "r");
if (pid_fd != NULL) {
int rc;
intmax_t tmp_pid;
/* File exists, read the PID and check if it exists */
rc = fscanf(pid_fd, "%u", &pid);
rc = fscanf(pid_fd, "%" SCNdMAX, &tmp_pid);
fclose(pid_fd);
if (rc != 1) {
perror("fscanf");
} else {
pid = (pid_t)tmp_pid;
rc = kill(pid, 0);
if (rc == 0 || (rc < 0 && errno == EPERM)) {
PINELOG_FATAL(_("Daemon is already running as PID %u"), pid);

View File

@ -130,6 +130,7 @@ static void reset_reports(void)
static void * x52_mouse_thr(void *param)
{
bool state_changed;
(void)param;
PINELOG_INFO(_("Starting X52 virtual mouse driver thread"));
for (;;) {

View File

@ -30,6 +30,7 @@ void x52d_mouse_evdev_thread_control(bool enabled)
static void test_mouse_thread_enabled(void **state)
{
(void)state;
#if defined HAVE_EVDEV
expect_function_calls(x52d_mouse_evdev_thread_control, 1);
expect_value(x52d_mouse_evdev_thread_control, enabled, true);
@ -40,6 +41,7 @@ static void test_mouse_thread_enabled(void **state)
static void test_mouse_thread_disabled(void **state)
{
(void)state;
#if defined HAVE_EVDEV
expect_function_calls(x52d_mouse_evdev_thread_control, 1);
expect_value(x52d_mouse_evdev_thread_control, enabled, false);
@ -50,6 +52,7 @@ static void test_mouse_thread_disabled(void **state)
static void test_mouse_speed_negative(void **state)
{
(void)state;
int orig_mouse_delay = mouse_delay;
int orig_mouse_mult = mouse_mult;
@ -61,6 +64,7 @@ static void test_mouse_speed_negative(void **state)
/* The following tests are dependent on the values in x52d_mouse.c */
static void test_mouse_speed_0(void **state)
{
(void)state;
x52d_cfg_set_Mouse_Speed(0);
assert_int_equal(mouse_delay, 70000);
assert_int_equal(mouse_mult, 4);
@ -68,6 +72,7 @@ static void test_mouse_speed_0(void **state)
static void test_mouse_speed_mid_base(void **state)
{
(void)state;
x52d_cfg_set_Mouse_Speed(6);
assert_int_equal(mouse_delay, 40000);
assert_int_equal(mouse_mult, 4);
@ -75,6 +80,7 @@ static void test_mouse_speed_mid_base(void **state)
static void test_mouse_speed_max_base(void **state)
{
(void)state;
x52d_cfg_set_Mouse_Speed(12);
assert_int_equal(mouse_delay, 10000);
assert_int_equal(mouse_mult, 4);
@ -82,6 +88,7 @@ static void test_mouse_speed_max_base(void **state)
static void test_mouse_speed_min_hyper(void **state)
{
(void)state;
x52d_cfg_set_Mouse_Speed(13);
assert_int_equal(mouse_delay, 10000);
assert_int_equal(mouse_mult, 5);
@ -89,6 +96,7 @@ static void test_mouse_speed_min_hyper(void **state)
static void test_mouse_speed_mid_hyper(void **state)
{
(void)state;
x52d_cfg_set_Mouse_Speed(22);
assert_int_equal(mouse_delay, 10000);
assert_int_equal(mouse_mult, 14);
@ -96,6 +104,7 @@ static void test_mouse_speed_mid_hyper(void **state)
static void test_mouse_speed_max_hyper(void **state)
{
(void)state;
x52d_cfg_set_Mouse_Speed(32);
assert_int_equal(mouse_delay, 10000);
assert_int_equal(mouse_mult, 24);
@ -105,6 +114,7 @@ static void test_mouse_speed_above_max(void **state)
{
int orig_mouse_delay = mouse_delay;
int orig_mouse_mult = mouse_mult;
(void)state;
x52d_cfg_set_Mouse_Speed(33);
assert_int_equal(mouse_delay, orig_mouse_delay);
@ -113,12 +123,14 @@ static void test_mouse_speed_above_max(void **state)
static void test_mouse_reverse_scroll_enabled(void **state)
{
(void)state;
x52d_cfg_set_Mouse_ReverseScroll(true);
assert_int_equal(mouse_scroll_dir, -1);
}
static void test_mouse_reverse_scroll_disabled(void **state)
{
(void)state;
x52d_cfg_set_Mouse_ReverseScroll(false);
assert_int_equal(mouse_scroll_dir, 1);
}

View File

@ -71,6 +71,7 @@ static void * x52_notify_thr(void * param)
char buffer[X52D_BUFSZ];
uint16_t bufsiz;
int rc;
(void)param;
for (;;) {
do {
@ -146,6 +147,7 @@ static void * x52_notify_loop(void * param)
{
struct pollfd pfd[MAX_CONN];
int rc;
(void)param;
for (;;) {
rc = x52d_client_poll(client_fd, pfd, notify_sock);

View File

@ -44,6 +44,7 @@ static bool exit_loop = false;
static void signal_handler(int sig)
{
(void)sig;
exit_loop = true;
}
@ -52,7 +53,7 @@ static bool denoise = true;
/* For i18n */
#define _(x) gettext(x)
int main(int argc, char **argv)
int main(void)
{
libx52io_context *ctx;
libx52io_report last, curr;

View File

@ -17,7 +17,7 @@
#define TEST_STRINGIFY(name) do { \
char expected[256]; \
for (int i=-1; i < sizeof(name ## _map) / sizeof(name ## _map[0]); i++) { \
for (int i=-1; i < (int)(sizeof(name ## _map) / sizeof(name ## _map[0])); i++) { \
if (i < 0) { \
snprintf(expected, sizeof(expected), unknown_fmt, i); \
} else if (name ## _map[i] != NULL) { \
@ -31,6 +31,8 @@
static void test_led_id_names(void **state)
{
(void)state; // Suppress unused parameter warning
static const char * led_id_map[21] = {
[LIBX52_LED_FIRE] = "Fire",
[LIBX52_LED_A] = "A",
@ -52,6 +54,8 @@ static void test_led_id_names(void **state)
static void test_led_state_names(void **state)
{
(void)state; // Suppress unused parameter warning
static const char * led_state_map[6] = {
[LIBX52_LED_STATE_OFF] = "off",
[LIBX52_LED_STATE_ON] = "on",
@ -66,6 +70,8 @@ static void test_led_state_names(void **state)
}
static void test_clock_id_names(void **state) {
(void)state; // Suppress unused parameter warning
static const char * clock_id_map[4] = {
[LIBX52_CLOCK_1] = "primary",
[LIBX52_CLOCK_2] = "secondary",
@ -78,6 +84,8 @@ static void test_clock_id_names(void **state) {
}
static void test_clock_format_names(void **state) {
(void)state; // Suppress unused parameter warning
static const char * clock_format_map[3] = {
[LIBX52_CLOCK_FORMAT_12HR] = "12 hour",
[LIBX52_CLOCK_FORMAT_24HR] = "24 hour",
@ -89,6 +97,8 @@ static void test_clock_format_names(void **state) {
}
static void test_date_format_names(void **state) {
(void)state; // Suppress unused parameter warning
static const char * date_format_map[4] = {
[LIBX52_DATE_FORMAT_DDMMYY] = "DD-MM-YY",
[LIBX52_DATE_FORMAT_MMDDYY] = "MM-DD-YY",
@ -103,6 +113,8 @@ static void test_date_format_names(void **state) {
#define libx52_error_to_str libx52_strerror
static void test_strerror(void **state) {
(void)state; // Suppress unused parameter warning
static const char *error_map[18] = {
[LIBX52_SUCCESS] = "Success",
[LIBX52_ERROR_INIT_FAILURE] = "Initialization failure",

View File

@ -103,6 +103,8 @@ int libx52_vendor_command(libx52_device *x52, uint16_t index, uint16_t value)
static int _x52_write_shift(libx52_device *x52, uint32_t bit)
{
uint16_t value;
(void)bit;
value = tst_bit(&x52->led_mask, X52_BIT_SHIFT) ? X52_SHIFT_ON : X52_SHIFT_OFF;
return libx52_vendor_command(x52, X52_SHIFT_INDICATOR, value);
}
@ -152,6 +154,7 @@ static int _x52_write_line(libx52_device *x52, uint32_t bit)
static int _x52_write_pov_blink(libx52_device *x52, uint32_t bit)
{
uint16_t value;
(void)bit;
value = tst_bit(&x52->led_mask, X52_BIT_POV_BLINK) ? X52_BLINK_ON : X52_BLINK_OFF;
return libx52_vendor_command(x52, X52_BLINK_INDICATOR, value);
}
@ -177,6 +180,7 @@ static int _x52_write_date(libx52_device *x52, uint32_t bit)
uint16_t value1; //dd-mm
uint16_t value2; //yy
int rc;
(void)bit;
switch (x52->date_format) {
case LIBX52_DATE_FORMAT_YYMMDD:
@ -288,7 +292,7 @@ static int _x52_write_time(libx52_device *x52, uint32_t bit)
typedef int (*x52_handler)(libx52_device *, uint32_t);
const x52_handler _x52_handlers[32] = {
static const x52_handler _x52_handlers[32] = {
[X52_BIT_SHIFT] = _x52_write_shift,
[X52_BIT_LED_FIRE] = _x52_write_led,
[X52_BIT_LED_A_RED] = _x52_write_led,

View File

@ -48,6 +48,8 @@ static int _x52_hotplug_callback(libusb_context *ctx,
{
libx52_device *dev = user_data;
(void)device; // Suppress unused parameter warning
if (dev == NULL) {
return 0;
}

View File

@ -73,6 +73,7 @@ int __wrap_libusb_control_transfer(libusb_device_handle *dev_handle,
uint16_t wLength,
unsigned int timeout)
{
(void)dev_handle;
function_called();
check_expected(wIndex);
check_expected(wValue);

View File

@ -38,9 +38,9 @@ static int group_setup(void **state)
return 0; \
}
TEST_SETUP_FUNCTION(_1);
TEST_SETUP_FUNCTION(_2);
TEST_SETUP_FUNCTION(PRO);
TEST_SETUP_FUNCTION(_1)
TEST_SETUP_FUNCTION(_2)
TEST_SETUP_FUNCTION(PRO)
#undef TEST_SETUP_FUNCTION

View File

@ -139,7 +139,7 @@ int main(int argc, char *argv[])
page_ok = false;
printf("# Output mismatch @ %04X:\n", cp);
printf("# exp/got:");
for (int i = 0; i < len; i++) {
for (size_t i = 0; i < len; i++) {
printf("%02X/%02X ", rec[i+1], output[i]);
}
puts("");
@ -194,7 +194,7 @@ int main(int argc, char *argv[])
smp_pages_ok = false;
printf("# Output mismatch @ %08X:\n", cp);
printf("# exp/got:");
for (int i = 0; i < len; i++) {
for (size_t i = 0; i < len; i++) {
printf("%02X/%02X ", rec[i+1], output[i]);
}
puts("");

View File

@ -86,6 +86,8 @@ if not get_option('nls').disabled()
subdir('po')
endif
add_project_arguments('-isystem', meson.current_source_dir() / 'sys', language: 'C')
#######################################################################
# Internal dependencies
#######################################################################

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libx52 0.3.3\n"
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
"POT-Creation-Date: 2026-03-16 23:07-0700\n"
"POT-Creation-Date: 2026-03-19 00:09-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"
@ -233,26 +233,26 @@ msgstr ""
msgid "Read timeout"
msgstr ""
#: evtest/ev_test.c:109
#: evtest/ev_test.c:110
#, c-format
msgid "Device ID: vendor 0x%04x product 0x%04x version 0x%04x\n"
msgstr ""
#: evtest/ev_test.c:113
#: evtest/ev_test.c:114
#, c-format
msgid "Device name: \"%s %s\"\n"
msgstr ""
#: evtest/ev_test.c:116
#: evtest/ev_test.c:117
#, c-format
msgid "Serial number: \"%s\"\n"
msgstr ""
#: evtest/ev_test.c:117
#: evtest/ev_test.c:118
msgid "Testing (interrupt to exit)\n"
msgstr ""
#: evtest/ev_test.c:157 evtest/ev_test.c:165
#: evtest/ev_test.c:158 evtest/ev_test.c:166
#, c-format
msgid "Event @ %ld.%06ld: %s, value %d\n"
msgstr ""
@ -493,17 +493,17 @@ msgstr ""
msgid "OK"
msgstr ""
#: daemon/x52d_main.c:64
#: daemon/x52d_main.c:67
#, c-format
msgid "Error %d setting log file: %s\n"
msgstr ""
#: daemon/x52d_main.c:80
#: daemon/x52d_main.c:83
#, c-format
msgid "Error %d installing handler for signal %d: %s"
msgstr ""
#: daemon/x52d_main.c:91
#: daemon/x52d_main.c:94
#, c-format
msgid ""
"Usage: %s [-f] [-v] [-q]\n"
@ -513,88 +513,88 @@ msgid ""
"\t[-b notify-socket-path]\n"
msgstr ""
#: daemon/x52d_main.c:124
#: daemon/x52d_main.c:129
#, c-format
msgid "Daemon is already running as PID %u"
msgstr ""
#: daemon/x52d_main.c:266
#: daemon/x52d_main.c:271
#, c-format
msgid "Unable to parse configuration override '%s'\n"
msgstr ""
#: daemon/x52d_main.c:298
#: daemon/x52d_main.c:303
#, c-format
msgid "Foreground = %s"
msgstr ""
#: daemon/x52d_main.c:298 daemon/x52d_main.c:299
#: daemon/x52d_main.c:303 daemon/x52d_main.c:304
msgid "true"
msgstr ""
#: daemon/x52d_main.c:298 daemon/x52d_main.c:299
#: daemon/x52d_main.c:303 daemon/x52d_main.c:304
msgid "false"
msgstr ""
#: daemon/x52d_main.c:299
#, c-format
msgid "Quiet = %s"
msgstr ""
#: daemon/x52d_main.c:300
#, c-format
msgid "Verbosity = %d"
msgstr ""
#: daemon/x52d_main.c:301
#, c-format
msgid "Log file = %s"
msgstr ""
#: daemon/x52d_main.c:302
#, c-format
msgid "Config file = %s"
msgstr ""
#: daemon/x52d_main.c:303
#, c-format
msgid "PID file = %s"
msgstr ""
#: daemon/x52d_main.c:304
#, c-format
msgid "Command socket = %s"
msgid "Quiet = %s"
msgstr ""
#: daemon/x52d_main.c:305
#, c-format
msgid "Verbosity = %d"
msgstr ""
#: daemon/x52d_main.c:306
#, c-format
msgid "Log file = %s"
msgstr ""
#: daemon/x52d_main.c:307
#, c-format
msgid "Config file = %s"
msgstr ""
#: daemon/x52d_main.c:308
#, c-format
msgid "PID file = %s"
msgstr ""
#: daemon/x52d_main.c:309
#, c-format
msgid "Command socket = %s"
msgstr ""
#: daemon/x52d_main.c:310
#, c-format
msgid "Notify socket = %s"
msgstr ""
#: daemon/x52d_main.c:316
#: daemon/x52d_main.c:321
#, c-format
msgid "Error %d blocking signals on child threads: %s"
msgstr ""
#: daemon/x52d_main.c:335
#: daemon/x52d_main.c:340
#, c-format
msgid "Error %d unblocking signals on child threads: %s"
msgstr ""
#: daemon/x52d_main.c:348
#: daemon/x52d_main.c:353
msgid "Reloading X52 configuration"
msgstr ""
#: daemon/x52d_main.c:355
#: daemon/x52d_main.c:360
msgid "Saving X52 configuration to disk"
msgstr ""
#: daemon/x52d_main.c:361
#: daemon/x52d_main.c:366
#, c-format
msgid "Received termination signal %s"
msgstr ""
#: daemon/x52d_main.c:378
#: daemon/x52d_main.c:383
msgid "Shutting down X52 daemon"
msgstr ""
@ -658,21 +658,21 @@ msgstr ""
msgid "Setting date format to %s"
msgstr ""
#: daemon/x52d_clock.c:173
#: daemon/x52d_clock.c:174
msgid "Starting X52 clock manager thread"
msgstr ""
#: daemon/x52d_clock.c:184
#: daemon/x52d_clock.c:185
#, c-format
msgid "Error %d retrieving current time: %s"
msgstr ""
#: daemon/x52d_clock.c:205
#: daemon/x52d_clock.c:206
#, c-format
msgid "Error %d initializing clock thread: %s"
msgstr ""
#: daemon/x52d_clock.c:212
#: daemon/x52d_clock.c:213
msgid "Shutting down X52 clock manager thread"
msgstr ""
@ -686,31 +686,31 @@ msgstr ""
msgid "Short write to client %d; expected %d bytes, wrote %d bytes"
msgstr ""
#: daemon/x52d_command.c:414
#: daemon/x52d_command.c:415
#, c-format
msgid "Error %d during command loop: %s"
msgstr ""
#: daemon/x52d_command.c:441
#: daemon/x52d_command.c:442
#, c-format
msgid "Error creating command socket: %s"
msgstr ""
#: daemon/x52d_command.c:449
#: daemon/x52d_command.c:450
#, c-format
msgid "Error marking command socket as nonblocking: %s"
msgstr ""
#: daemon/x52d_command.c:455
#: daemon/x52d_command.c:456
#, c-format
msgid "Error listening on command socket: %s"
msgstr ""
#: daemon/x52d_command.c:459
#: daemon/x52d_command.c:460
msgid "Starting command processing thread"
msgstr ""
#: daemon/x52d_command.c:477
#: daemon/x52d_command.c:478
msgid "Shutting down command processing thread"
msgstr ""
@ -772,67 +772,67 @@ msgstr ""
msgid "Error processing override '%s.%s=%s'"
msgstr ""
#: daemon/x52d_device.c:36
#: daemon/x52d_device.c:37
msgid "Starting X52 device manager thread"
msgstr ""
#: daemon/x52d_device.c:43
#: daemon/x52d_device.c:44
#, c-format
msgid "Error %d connecting to device: %s"
msgstr ""
#: daemon/x52d_device.c:52
#: daemon/x52d_device.c:53
msgid "Device connected, writing configuration"
msgstr ""
#: daemon/x52d_device.c:75
#: daemon/x52d_device.c:76
msgid "Initializing libx52"
msgstr ""
#: daemon/x52d_device.c:79
#: daemon/x52d_device.c:80
#, c-format
msgid "Failure %d initializing libx52: %s"
msgstr ""
#: daemon/x52d_device.c:90
#: daemon/x52d_device.c:91
msgid "Shutting down X52 device manager thread"
msgstr ""
#: daemon/x52d_device.c:103
#: daemon/x52d_device.c:104
#, c-format
msgid "Error %d when updating X52 parameter: %s"
msgstr ""
#: daemon/x52d_device.c:179
#: daemon/x52d_device.c:180
#, c-format
msgid "Error %d when updating X52 device: %s"
msgstr ""
#: daemon/x52d_io.c:42
#: daemon/x52d_io.c:43
msgid "Starting X52 I/O thread"
msgstr ""
#: daemon/x52d_io.c:64
#: daemon/x52d_io.c:65
#, c-format
msgid "Error %d opening X52 I/O device: %s"
msgstr ""
#: daemon/x52d_io.c:75
#: daemon/x52d_io.c:76
#, c-format
msgid "Error %d reading from X52 I/O device: %s"
msgstr ""
#: daemon/x52d_io.c:102
#: daemon/x52d_io.c:103
#, c-format
msgid "Error %d initializing X52 I/O library: %s"
msgstr ""
#: daemon/x52d_io.c:108
#: daemon/x52d_io.c:109
#, c-format
msgid "Error %d initializing I/O driver thread: %s"
msgstr ""
#: daemon/x52d_io.c:115
#: daemon/x52d_io.c:116
msgid "Shutting down X52 I/O driver thread"
msgstr ""
@ -875,24 +875,24 @@ msgstr ""
msgid "Error writing mouse sync event"
msgstr ""
#: daemon/x52d_mouse_evdev.c:134
#: daemon/x52d_mouse_evdev.c:135
msgid "Starting X52 virtual mouse driver thread"
msgstr ""
#: daemon/x52d_mouse_evdev.c:157
#: daemon/x52d_mouse_evdev.c:158
#, c-format
msgid "Error %d initializing mouse thread: %s"
msgstr ""
#: daemon/x52d_mouse_evdev.c:164
#: daemon/x52d_mouse_evdev.c:165
msgid "Shutting down X52 virtual mouse driver thread"
msgstr ""
#: daemon/x52d_mouse_evdev.c:171
#: daemon/x52d_mouse_evdev.c:172
msgid "Virtual mouse not created. Ignoring thread state change"
msgstr ""
#: daemon/x52d_mouse_evdev.c:236
#: daemon/x52d_mouse_evdev.c:237
#, c-format
msgid "Error %d creating X52 virtual mouse: %s"
msgstr ""
@ -916,27 +916,27 @@ msgstr ""
msgid "Error setting up notification socket"
msgstr ""
#: daemon/x52d_notify.c:80 daemon/x52d_notify.c:90
#: daemon/x52d_notify.c:81 daemon/x52d_notify.c:91
#, c-format
msgid "Error %d reading from pipe: %s"
msgstr ""
#: daemon/x52d_notify.c:127
#: daemon/x52d_notify.c:128
#, c-format
msgid "Error %d writing notification pipe: %s"
msgstr ""
#: daemon/x52d_notify.c:172
#: daemon/x52d_notify.c:174
#, c-format
msgid "Error %d creating notification pipe: %s"
msgstr ""
#: daemon/x52d_notify.c:181
#: daemon/x52d_notify.c:183
#, c-format
msgid "Error %d initializing notify thread: %s"
msgstr ""
#: daemon/x52d_notify.c:187
#: daemon/x52d_notify.c:189
#, c-format
msgid "Error %d initializing notify listener: %s"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libx52 0.2.3\n"
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
"POT-Creation-Date: 2026-03-16 23:07-0700\n"
"POT-Creation-Date: 2026-03-19 00:09-0700\n"
"PO-Revision-Date: 2023-01-04 08:40-0800\n"
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
"Language-Team: Dummy Language for testing i18n\n"
@ -233,26 +233,26 @@ msgstr "I/O erroray"
msgid "Read timeout"
msgstr "Eadray imeouttay"
#: evtest/ev_test.c:109
#: evtest/ev_test.c:110
#, c-format
msgid "Device ID: vendor 0x%04x product 0x%04x version 0x%04x\n"
msgstr "Eviceday IDay: endorvay 0x%04x oductpray 0x%04x ersionvay 0x%04x\n"
#: evtest/ev_test.c:113
#: evtest/ev_test.c:114
#, c-format
msgid "Device name: \"%s %s\"\n"
msgstr "Eviceday amenay: \"%s %s\"\n"
#: evtest/ev_test.c:116
#: evtest/ev_test.c:117
#, c-format
msgid "Serial number: \"%s\"\n"
msgstr "Erialsay umbernay: \"%s\"\n"
#: evtest/ev_test.c:117
#: evtest/ev_test.c:118
msgid "Testing (interrupt to exit)\n"
msgstr "Estingtay (interruptay otay exitay)\n"
#: evtest/ev_test.c:157 evtest/ev_test.c:165
#: evtest/ev_test.c:158 evtest/ev_test.c:166
#, c-format
msgid "Event @ %ld.%06ld: %s, value %d\n"
msgstr "Eventay @ %ld.%06ld: %s, aluevay %d\n"
@ -536,17 +536,17 @@ msgstr "Estingtay aracterchay 0x%02x..."
msgid "OK"
msgstr "OKay"
#: daemon/x52d_main.c:64
#: daemon/x52d_main.c:67
#, c-format
msgid "Error %d setting log file: %s\n"
msgstr "Erroray %d ettingsay oglay ilefay: %s\n"
#: daemon/x52d_main.c:80
#: daemon/x52d_main.c:83
#, c-format
msgid "Error %d installing handler for signal %d: %s"
msgstr "Erroray %d installingay andlerhay orfay ignalsay %d: %s"
#: daemon/x52d_main.c:91
#: daemon/x52d_main.c:94
#, c-format
msgid ""
"Usage: %s [-f] [-v] [-q]\n"
@ -562,88 +562,88 @@ msgstr ""
"\t[-b otifynay-ocketsay-athpay]\n"
"\n"
#: daemon/x52d_main.c:124
#: daemon/x52d_main.c:129
#, c-format
msgid "Daemon is already running as PID %u"
msgstr "Aemonday isay alreadyay unningray asay IDPay %u"
#: daemon/x52d_main.c:266
#: daemon/x52d_main.c:271
#, c-format
msgid "Unable to parse configuration override '%s'\n"
msgstr "Unableay otay arsepay onfigurationcay overrideay '%s'\n"
#: daemon/x52d_main.c:298
#: daemon/x52d_main.c:303
#, c-format
msgid "Foreground = %s"
msgstr "Oregroundfay = %s"
#: daemon/x52d_main.c:298 daemon/x52d_main.c:299
#: daemon/x52d_main.c:303 daemon/x52d_main.c:304
msgid "true"
msgstr "uetray"
#: daemon/x52d_main.c:298 daemon/x52d_main.c:299
#: daemon/x52d_main.c:303 daemon/x52d_main.c:304
msgid "false"
msgstr "alsefay"
#: daemon/x52d_main.c:299
#: daemon/x52d_main.c:304
#, c-format
msgid "Quiet = %s"
msgstr "Uietqay = %s"
#: daemon/x52d_main.c:300
#: daemon/x52d_main.c:305
#, c-format
msgid "Verbosity = %d"
msgstr "Erbosityvay = %d"
#: daemon/x52d_main.c:301
#: daemon/x52d_main.c:306
#, c-format
msgid "Log file = %s"
msgstr "Oglay ilefay = %s"
#: daemon/x52d_main.c:302
#: daemon/x52d_main.c:307
#, c-format
msgid "Config file = %s"
msgstr "Onfigcay ilefay = %s"
#: daemon/x52d_main.c:303
#: daemon/x52d_main.c:308
#, c-format
msgid "PID file = %s"
msgstr "IDPay ilefay = %s"
#: daemon/x52d_main.c:304
#: daemon/x52d_main.c:309
#, c-format
msgid "Command socket = %s"
msgstr "Ommandcay ocketsay = %s"
#: daemon/x52d_main.c:305
#: daemon/x52d_main.c:310
#, c-format
msgid "Notify socket = %s"
msgstr "Otifynay ocketsay = %s"
#: daemon/x52d_main.c:316
#: daemon/x52d_main.c:321
#, c-format
msgid "Error %d blocking signals on child threads: %s"
msgstr "Erroray %d ockingblay ignalssay onay ildchay eadsthray: %s"
#: daemon/x52d_main.c:335
#: daemon/x52d_main.c:340
#, c-format
msgid "Error %d unblocking signals on child threads: %s"
msgstr "Erroray %d unblockingay ignalssay onay ildchay eadsthray: %s"
#: daemon/x52d_main.c:348
#: daemon/x52d_main.c:353
msgid "Reloading X52 configuration"
msgstr "Eloadingray X52 onfigurationcay"
#: daemon/x52d_main.c:355
#: daemon/x52d_main.c:360
msgid "Saving X52 configuration to disk"
msgstr "Avingsay X52 onfigurationcay otay iskday"
#: daemon/x52d_main.c:361
#: daemon/x52d_main.c:366
#, c-format
msgid "Received termination signal %s"
msgstr "Eceivedray erminationtay ignalsay %s"
#: daemon/x52d_main.c:378
#: daemon/x52d_main.c:383
msgid "Shutting down X52 daemon"
msgstr "Uttingshay ownday X52 aemonday"
@ -710,21 +710,21 @@ msgstr "Ettingsay %s ockclay ormatfay otay %s"
msgid "Setting date format to %s"
msgstr "Ettingsay ateday ormatfay otay %s"
#: daemon/x52d_clock.c:173
#: daemon/x52d_clock.c:174
msgid "Starting X52 clock manager thread"
msgstr "Artingstay X52 ockclay anagermay eadthray"
#: daemon/x52d_clock.c:184
#: daemon/x52d_clock.c:185
#, c-format
msgid "Error %d retrieving current time: %s"
msgstr "Erroray %d etrievingray urrentcay imetay: %s"
#: daemon/x52d_clock.c:205
#: daemon/x52d_clock.c:206
#, c-format
msgid "Error %d initializing clock thread: %s"
msgstr "Erroray %d initializingay ockclay eadthray: %s"
#: daemon/x52d_clock.c:212
#: daemon/x52d_clock.c:213
msgid "Shutting down X52 clock manager thread"
msgstr "Uttingshay ownday X52 ockclay anagermay eadthray"
@ -739,31 +739,31 @@ msgid "Short write to client %d; expected %d bytes, wrote %d bytes"
msgstr ""
"Ortshay itewray otay ientclay %d; expecteday %d ytesbay, otewray %d ytesbay"
#: daemon/x52d_command.c:414
#: daemon/x52d_command.c:415
#, c-format
msgid "Error %d during command loop: %s"
msgstr "Erroray %d uringday ommandcay ooplay: %s"
#: daemon/x52d_command.c:441
#: daemon/x52d_command.c:442
#, c-format
msgid "Error creating command socket: %s"
msgstr "Erroray eatingcray ommandcay ocketsay: %s"
#: daemon/x52d_command.c:449
#: daemon/x52d_command.c:450
#, c-format
msgid "Error marking command socket as nonblocking: %s"
msgstr "Erroray arkingmay ommandcay ocketsay asay onblockingnay: %s"
#: daemon/x52d_command.c:455
#: daemon/x52d_command.c:456
#, c-format
msgid "Error listening on command socket: %s"
msgstr "Erroray isteninglay onay ommandcay ocketsay: %s"
#: daemon/x52d_command.c:459
#: daemon/x52d_command.c:460
msgid "Starting command processing thread"
msgstr "Artingstay ommandcay ocessingpray eadthray"
#: daemon/x52d_command.c:477
#: daemon/x52d_command.c:478
msgid "Shutting down command processing thread"
msgstr "Uttingshay ownday ommandcay ocessingpray eadthray"
@ -825,67 +825,67 @@ msgstr "Onay aluevay oundfay inay overrideay ingstray '%s'"
msgid "Error processing override '%s.%s=%s'"
msgstr "Erroray ocessingpray overriday '%s.%s=%s'"
#: daemon/x52d_device.c:36
#: daemon/x52d_device.c:37
msgid "Starting X52 device manager thread"
msgstr "Artingstay X52 eviceday anagermay eadthray"
#: daemon/x52d_device.c:43
#: daemon/x52d_device.c:44
#, c-format
msgid "Error %d connecting to device: %s"
msgstr "Erroray %d onnectingcay otay eviceday: %s"
#: daemon/x52d_device.c:52
#: daemon/x52d_device.c:53
msgid "Device connected, writing configuration"
msgstr "Eviceday onnectedcay, itingwray onfigurationcay"
#: daemon/x52d_device.c:75
#: daemon/x52d_device.c:76
msgid "Initializing libx52"
msgstr "Initializingay libx52"
#: daemon/x52d_device.c:79
#: daemon/x52d_device.c:80
#, c-format
msgid "Failure %d initializing libx52: %s"
msgstr "Ailurefay %d initializeay libx52: %s"
#: daemon/x52d_device.c:90
#: daemon/x52d_device.c:91
msgid "Shutting down X52 device manager thread"
msgstr "Uttingshay ownday X52 eviceday anagermay eadthray"
#: daemon/x52d_device.c:103
#: daemon/x52d_device.c:104
#, c-format
msgid "Error %d when updating X52 parameter: %s"
msgstr "Erroray %d enwhay updatingay X52 arameterpay: %s"
#: daemon/x52d_device.c:179
#: daemon/x52d_device.c:180
#, c-format
msgid "Error %d when updating X52 device: %s"
msgstr "Erroray %d enwhay updatingay X52 eviceday: %s"
#: daemon/x52d_io.c:42
#: daemon/x52d_io.c:43
msgid "Starting X52 I/O thread"
msgstr "Artingstay X52 I/O eadthray"
#: daemon/x52d_io.c:64
#: daemon/x52d_io.c:65
#, c-format
msgid "Error %d opening X52 I/O device: %s"
msgstr "Erroray %d openingay X52 I/O eviceday: %s"
#: daemon/x52d_io.c:75
#: daemon/x52d_io.c:76
#, c-format
msgid "Error %d reading from X52 I/O device: %s"
msgstr "Erroray %d eadingray omfray X52 I/O eviceday: %s"
#: daemon/x52d_io.c:102
#: daemon/x52d_io.c:103
#, c-format
msgid "Error %d initializing X52 I/O library: %s"
msgstr "Erroray %d initializingay X52 ibrarylay: %s"
#: daemon/x52d_io.c:108
#: daemon/x52d_io.c:109
#, c-format
msgid "Error %d initializing I/O driver thread: %s"
msgstr "Erroray %d initializingay I/O iverdray eadthray: %s"
#: daemon/x52d_io.c:115
#: daemon/x52d_io.c:116
msgid "Shutting down X52 I/O driver thread"
msgstr "Uttingshay ownday X52 I/O iverdray eadthray"
@ -928,24 +928,24 @@ msgstr "Erroray itingwray ousemay axisay eventay (axisay %d, aluevay %d)"
msgid "Error writing mouse sync event"
msgstr "Erroray itingwray ousemay yncsay eventay"
#: daemon/x52d_mouse_evdev.c:134
#: daemon/x52d_mouse_evdev.c:135
msgid "Starting X52 virtual mouse driver thread"
msgstr "Artingstay X52 irtualvay ousemay iverdray eadthray"
#: daemon/x52d_mouse_evdev.c:157
#: daemon/x52d_mouse_evdev.c:158
#, c-format
msgid "Error %d initializing mouse thread: %s"
msgstr "Erroray %d initializingay ousemay eadthray: %s"
#: daemon/x52d_mouse_evdev.c:164
#: daemon/x52d_mouse_evdev.c:165
msgid "Shutting down X52 virtual mouse driver thread"
msgstr "Uttingshay ownday X52 irtualvay ousemay iverdray eadthray"
#: daemon/x52d_mouse_evdev.c:171
#: daemon/x52d_mouse_evdev.c:172
msgid "Virtual mouse not created. Ignoring thread state change"
msgstr "Irtualvay ousemay otnay eatedcray. Ignoringa eadthray atestay angechay"
#: daemon/x52d_mouse_evdev.c:236
#: daemon/x52d_mouse_evdev.c:237
#, c-format
msgid "Error %d creating X52 virtual mouse: %s"
msgstr "Erroray %d eatingcray X52 irtualvay ousemay: %s"
@ -969,27 +969,27 @@ msgstr "Erroray isteninglay onay otificationnay ocketsay: %s"
msgid "Error setting up notification socket"
msgstr "Erroray ettingsay upay otificationnay ocketsay: %s"
#: daemon/x52d_notify.c:80 daemon/x52d_notify.c:90
#: daemon/x52d_notify.c:81 daemon/x52d_notify.c:91
#, c-format
msgid "Error %d reading from pipe: %s"
msgstr "Erroray eadingray omfray ipepay %d: %s"
#: daemon/x52d_notify.c:127
#: daemon/x52d_notify.c:128
#, c-format
msgid "Error %d writing notification pipe: %s"
msgstr "Erroray %d itingwray otificationnay ipepay: %s"
#: daemon/x52d_notify.c:172
#: daemon/x52d_notify.c:174
#, c-format
msgid "Error %d creating notification pipe: %s"
msgstr "Erroray %d eatingcray otificationnay ipepay: %s"
#: daemon/x52d_notify.c:181
#: daemon/x52d_notify.c:183
#, c-format
msgid "Error %d initializing notify thread: %s"
msgstr "Erroray %d initializingay otifynay eadthray: %s"
#: daemon/x52d_notify.c:187
#: daemon/x52d_notify.c:189
#, c-format
msgid "Error %d initializing notify listener: %s"
msgstr "Erroray %d initializingay otifynay istenerlay: %s"

View File

@ -41,7 +41,7 @@ static void print_time_difference(const char *type, struct timespec *ts)
type, tp_usec, tp_nsec, ret.tv_sec, ret.tv_nsec);
}
int main(int argc, char **argv)
int main(void)
{
struct timespec ts_wall[2];
struct timespec ts_cpu[2];

View File

@ -348,6 +348,10 @@ void pinelog_log_message(int module, int level, const char *file, int line, cons
#else
fprintf(output_stream, "%s:%d ", file, line);
#endif
#else
// Suppress unused parameter warnings
(void)file;
(void)line;
#endif
/* Set the module name if it is not the root */

View File

@ -36,6 +36,7 @@ static size_t expected_len;
time_t time(time_t *p)
{
(void)p;
// Override the time function from libc
return 1636671600;
}
@ -196,7 +197,7 @@ static void tap_bailout(const char *msg)
exit(1);
}
int main(int argc, char **argv)
int main(void)
{
int fifo_fd[2];
int flags;