build: Rename source files to remove prefixes

This change makes it simpler to add new sources in the future, they are
already grouped by functionality, so the prefix does nothing.
pull/66/head
nirenjan 2026-04-03 23:02:43 -07:00
parent 9c1eaaa4b2
commit 836206d93f
29 changed files with 144 additions and 144 deletions

2
.gitignore vendored
View File

@ -10,7 +10,7 @@ x52test*
x52evtest*
libx52/test_*
libx52test*
libx52util/util_char_map.c
libx52util/char_map.c
udev/*.rules
x52d*
!daemon/x52d*.*

View File

@ -15,7 +15,7 @@
#include <stdlib.h>
#include <errno.h>
#include "libusbx52.h"
#include "x52_commands.h"
#include "commands.h"
libusb_context *global_context;

View File

@ -14,8 +14,8 @@
#include <string.h>
#include <libx52/libx52.h>
#include "x52_commands.h"
#include "x52_common.h"
#include "commands.h"
#include "common.h"
/* Translate a libusb error to a libx52 error */
int _x52_translate_libusb_error(enum libusb_error errcode)

View File

@ -15,8 +15,8 @@
#include "usb-ids.h"
#include <libx52/libx52.h>
#include "x52_commands.h"
#include "x52_common.h"
#include "commands.h"
#include "common.h"
#include "gettext.h"
/* Check if the USB device is supported by this library */

View File

@ -15,8 +15,8 @@
#include <string.h>
#include <libx52/libx52.h>
#include "x52_commands.h"
#include "x52_common.h"
#include "commands.h"
#include "common.h"
#if !HAVE_STRUCT_TM_TM_GMTOFF
/* Slow method to compute GMT offset */

View File

@ -1,12 +1,12 @@
libx52_version = '2.4.2'
libx52_files = files(
'x52_control.c',
'x52_core.c',
'x52_date_time.c',
'x52_mfd_led.c',
'x52_strerror.c',
'x52_stringify.c',
'control.c',
'core.c',
'date_time.c',
'mfd_led.c',
'strerror.c',
'stringify.c',
)
lib_libx52 = library('x52', libx52_files,
@ -25,8 +25,8 @@ pkgconfig.generate(lib_libx52,
# Unit tests for libx52
libx52_string_test = executable('libx52-string-test',
'test_strings.c',
'x52_stringify.c',
'x52_strerror.c',
'stringify.c',
'strerror.c',
build_by_default: false,
dependencies: [dep_cmocka, dep_intl],
link_with: [lib_libx52],

View File

@ -13,7 +13,7 @@
#include <errno.h>
#include <string.h>
#include "x52_common.h"
#include "common.h"
int libx52_set_text(libx52_device *x52, uint8_t line, const char *text, uint8_t length)
{

View File

@ -18,7 +18,7 @@ _TEST_FILE_HEADER = """/*
#include <stdio.h>
#include <stdlib.h>
#include "x52_common.h"
#include "common.h"
static int group_setup(void **state)
{

View File

@ -7,7 +7,7 @@
*/
#include <string.h>
#include "io_common.h"
#include "common.h"
#include "usb-ids.h"
static const int32_t axis_min[] = {

View File

@ -9,7 +9,7 @@
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "io_common.h"
#include "common.h"
#include "usb-ids.h"
#include "gettext.h"

View File

@ -10,7 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include "io_common.h"
#include "common.h"
static char * _save_string(wchar_t *wcs)
{

View File

@ -1,11 +1,11 @@
libx52io_version = '1.1.0'
libx52io_files = files(
'io_core.c',
'io_axis.c',
'io_parser.c',
'io_strings.c',
'io_device.c',
'core.c',
'axis.c',
'parser.c',
'strings.c',
'device.c',
)
lib_libx52io = library('x52io', libx52io_files,

View File

@ -7,7 +7,7 @@
*/
#include <stdint.h>
#include "io_common.h"
#include "common.h"
#include "usb-ids.h"
static void map_hat(uint8_t hat, libx52io_report *report)

View File

@ -11,7 +11,7 @@
#include <setjmp.h>
#include <cmocka.h>
#include "io_common.h"
#include "common.h"
#include "usb-ids.h"
static int group_setup(void **state)

View File

@ -12,7 +12,7 @@
#include <cmocka.h>
#include <string.h>
#include "io_common.h"
#include "common.h"
#include "usb-ids.h"
static int group_setup(void **state)

View File

@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#ifndef X52_CHAR_MAP_H
#define X52_CHAR_MAP_H
#ifndef CHAR_MAP_H
#define CHAR_MAP_H
#include <stddef.h>
#include <stdint.h>
@ -15,4 +15,4 @@
extern const uint16_t *root_table[256];
extern const uint8_t *sequence_table[];
#endif /* !defined X52_CHAR_MAP_H */
#endif /* !defined CHAR_MAP_H */

View File

@ -15,7 +15,7 @@
#include <errno.h>
#include <libx52/libx52util.h>
#include "x52_char_map.h"
#include "char_map.h"
/**
* @brief Converts a UTF8 stream to a uint32_t

View File

@ -7,9 +7,9 @@ util_char_map = custom_target('util-char-map',
depend_files: ['x52_char_map_gen.py', 'x52_char_map.cfg'],
command: [python, gen_script, '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
input: 'x52_char_map.cfg',
output: ['util_char_map.c', 'x52_char_map.bin'])
output: ['char_map.c', 'char_map.bin'])
lib_libx52util = library('x52util', util_char_map, 'x52_char_map_lookup.c',
lib_libx52util = library('x52util', util_char_map, 'char_map_lookup.c',
install: true,
version: libx52util_version,
c_args: sym_hidden_cargs,
@ -25,7 +25,7 @@ pkgconfig.generate(lib_libx52util,
libx52util_bmp_test = executable(
'libx52util-bmp-test',
'x52_char_map_test.c',
'char_map_test.c',
build_by_default: false,
include_directories: [includes, lib_libx52util.private_dir_include()],
link_with: [lib_libx52util]

View File

@ -1,7 +1,7 @@
#!/bin/sh
TEST_RUNNER="./libx52util-bmp-test"
TEST_BIN="./libx52util/x52_char_map.bin"
TEST_BIN="./libx52util/char_map.bin"
if [ -e "${TEST_RUNNER}" ] && [ -e "${TEST_BIN}" ];
then

View File

@ -1,8 +1,8 @@
# List of source files which contain translatable strings.
libx52/x52_strerror.c
libx52/x52_stringify.c
libx52/strerror.c
libx52/stringify.c
libx52io/io_strings.c
libx52io/strings.c
vkm/vkm_common.c

View File

@ -17,219 +17,219 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: libx52/x52_strerror.c:23 libx52io/io_strings.c:196 vkm/vkm_common.c:25
#: libx52/strerror.c:23 libx52io/strings.c:196 vkm/vkm_common.c:25
msgid "Success"
msgstr ""
#: libx52/x52_strerror.c:24 libx52io/io_strings.c:197
#: libx52/strerror.c:24 libx52io/strings.c:197
msgid "Initialization failure"
msgstr ""
#: libx52/x52_strerror.c:25
#: libx52/strerror.c:25
msgid "Insufficient memory"
msgstr ""
#: libx52/x52_strerror.c:26 vkm/vkm_common.c:29
#: libx52/strerror.c:26 vkm/vkm_common.c:29
msgid "Invalid parameter"
msgstr ""
#: libx52/x52_strerror.c:27
#: libx52/strerror.c:27
msgid "Operation not supported"
msgstr ""
#: libx52/x52_strerror.c:28
#: libx52/strerror.c:28
msgid "Try again"
msgstr ""
#: libx52/x52_strerror.c:29
#: libx52/strerror.c:29
msgid "Input parameter out of range"
msgstr ""
#: libx52/x52_strerror.c:30
#: libx52/strerror.c:30
msgid "USB transaction failure"
msgstr ""
#: libx52/x52_strerror.c:31
#: libx52/strerror.c:31
msgid "USB input/output error"
msgstr ""
#: libx52/x52_strerror.c:32
#: libx52/strerror.c:32
msgid "Access denied"
msgstr ""
#: libx52/x52_strerror.c:33
#: libx52/strerror.c:33
msgid "No such device"
msgstr ""
#: libx52/x52_strerror.c:34
#: libx52/strerror.c:34
msgid "Entity not found"
msgstr ""
#: libx52/x52_strerror.c:35
#: libx52/strerror.c:35
msgid "Resource busy"
msgstr ""
#: libx52/x52_strerror.c:36
#: libx52/strerror.c:36
msgid "Operation timeout"
msgstr ""
#: libx52/x52_strerror.c:37
#: libx52/strerror.c:37
msgid "Overflow"
msgstr ""
#: libx52/x52_strerror.c:38
#: libx52/strerror.c:38
msgid "Pipe error"
msgstr ""
#: libx52/x52_strerror.c:39
#: libx52/strerror.c:39
msgid "System call interrupted"
msgstr ""
#: libx52/x52_strerror.c:66 libx52io/io_strings.c:220 vkm/vkm_common.c:52
#: libx52/strerror.c:66 libx52io/strings.c:220 vkm/vkm_common.c:52
#, c-format
msgid "Unknown error %d"
msgstr ""
#: libx52/x52_stringify.c:29
#: libx52/stringify.c:29
#, c-format
msgid "Unknown clock ID %d"
msgstr ""
#: libx52/x52_stringify.c:30
#: libx52/stringify.c:30
msgid "primary"
msgstr ""
#: libx52/x52_stringify.c:31
#: libx52/stringify.c:31
msgid "secondary"
msgstr ""
#: libx52/x52_stringify.c:32
#: libx52/stringify.c:32
msgid "tertiary"
msgstr ""
#: libx52/x52_stringify.c:35
#: libx52/stringify.c:35
#, c-format
msgid "Unknown clock format %d"
msgstr ""
#: libx52/x52_stringify.c:36
#: libx52/stringify.c:36
msgid "12 hour"
msgstr ""
#: libx52/x52_stringify.c:37
#: libx52/stringify.c:37
msgid "24 hour"
msgstr ""
#: libx52/x52_stringify.c:40
#: libx52/stringify.c:40
#, c-format
msgid "Unknown date format %d"
msgstr ""
#: libx52/x52_stringify.c:41
#: libx52/stringify.c:41
msgid "DD-MM-YY"
msgstr ""
#: libx52/x52_stringify.c:42
#: libx52/stringify.c:42
msgid "MM-DD-YY"
msgstr ""
#: libx52/x52_stringify.c:43
#: libx52/stringify.c:43
msgid "YY-MM-DD"
msgstr ""
#: libx52/x52_stringify.c:46
#: libx52/stringify.c:46
#, c-format
msgid "Unknown LED state %d"
msgstr ""
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: libx52/stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
msgid "off"
msgstr ""
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: libx52/stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
msgid "on"
msgstr ""
#: libx52/x52_stringify.c:49
#: libx52/stringify.c:49
msgid "red"
msgstr ""
#: libx52/x52_stringify.c:50
#: libx52/stringify.c:50
msgid "amber"
msgstr ""
#: libx52/x52_stringify.c:51
#: libx52/stringify.c:51
msgid "green"
msgstr ""
#: libx52/x52_stringify.c:60
#: libx52/stringify.c:60
msgid "Fire"
msgstr ""
#: libx52/x52_stringify.c:63
#: libx52/stringify.c:63
msgid "A"
msgstr ""
#: libx52/x52_stringify.c:66
#: libx52/stringify.c:66
msgid "B"
msgstr ""
#: libx52/x52_stringify.c:69
#: libx52/stringify.c:69
msgid "D"
msgstr ""
#: libx52/x52_stringify.c:72
#: libx52/stringify.c:72
msgid "E"
msgstr ""
#: libx52/x52_stringify.c:75
#: libx52/stringify.c:75
msgid "T1"
msgstr ""
#: libx52/x52_stringify.c:78
#: libx52/stringify.c:78
msgid "T2"
msgstr ""
#: libx52/x52_stringify.c:81
#: libx52/stringify.c:81
msgid "T3"
msgstr ""
#: libx52/x52_stringify.c:84
#: libx52/stringify.c:84
msgid "POV"
msgstr ""
#: libx52/x52_stringify.c:87
#: libx52/stringify.c:87
msgid "Clutch"
msgstr ""
#: libx52/x52_stringify.c:90
#: libx52/stringify.c:90
msgid "Throttle"
msgstr ""
#: libx52/x52_stringify.c:93
#: libx52/stringify.c:93
#, c-format
msgid "Unknown LED ID %d"
msgstr ""
#: libx52io/io_strings.c:198
#: libx52io/strings.c:198
msgid "No device"
msgstr ""
#: libx52io/io_strings.c:199
#: libx52io/strings.c:199
msgid "Invalid arguments"
msgstr ""
#: libx52io/io_strings.c:200
#: libx52io/strings.c:200
msgid "Connection failure"
msgstr ""
#: libx52io/io_strings.c:201
#: libx52io/strings.c:201
msgid "I/O error"
msgstr ""
#: libx52io/io_strings.c:202
#: libx52io/strings.c:202
msgid "Read timeout"
msgstr ""

View File

@ -17,219 +17,219 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"
#: libx52/x52_strerror.c:23 libx52io/io_strings.c:196 vkm/vkm_common.c:25
#: libx52/strerror.c:23 libx52io/strings.c:196 vkm/vkm_common.c:25
msgid "Success"
msgstr "Uccesssay"
#: libx52/x52_strerror.c:24 libx52io/io_strings.c:197
#: libx52/strerror.c:24 libx52io/strings.c:197
msgid "Initialization failure"
msgstr "Initializationay ailurefay"
#: libx52/x52_strerror.c:25
#: libx52/strerror.c:25
msgid "Insufficient memory"
msgstr "Insufficientay emorymay"
#: libx52/x52_strerror.c:26 vkm/vkm_common.c:29
#: libx52/strerror.c:26 vkm/vkm_common.c:29
msgid "Invalid parameter"
msgstr "Invaliday arameterpay"
#: libx52/x52_strerror.c:27
#: libx52/strerror.c:27
msgid "Operation not supported"
msgstr "Operationay otnay upportedsay"
#: libx52/x52_strerror.c:28
#: libx52/strerror.c:28
msgid "Try again"
msgstr "Ytray againay"
#: libx52/x52_strerror.c:29
#: libx52/strerror.c:29
msgid "Input parameter out of range"
msgstr "Inputay arameterpay outay ofay angeray"
#: libx52/x52_strerror.c:30
#: libx52/strerror.c:30
msgid "USB transaction failure"
msgstr "USBay ansactiontray ailurefay"
#: libx52/x52_strerror.c:31
#: libx52/strerror.c:31
msgid "USB input/output error"
msgstr "USBay inputay/outputay erroray"
#: libx52/x52_strerror.c:32
#: libx52/strerror.c:32
msgid "Access denied"
msgstr "Accessay eniedday"
#: libx52/x52_strerror.c:33
#: libx52/strerror.c:33
msgid "No such device"
msgstr "Onay uchsay eviceday"
#: libx52/x52_strerror.c:34
#: libx52/strerror.c:34
msgid "Entity not found"
msgstr "Entityay otnay oundfay"
#: libx52/x52_strerror.c:35
#: libx52/strerror.c:35
msgid "Resource busy"
msgstr "Esourceray usybay"
#: libx52/x52_strerror.c:36
#: libx52/strerror.c:36
msgid "Operation timeout"
msgstr "Operationay imeouttay"
#: libx52/x52_strerror.c:37
#: libx52/strerror.c:37
msgid "Overflow"
msgstr "Overfloway"
#: libx52/x52_strerror.c:38
#: libx52/strerror.c:38
msgid "Pipe error"
msgstr "Ipepay erroray"
#: libx52/x52_strerror.c:39
#: libx52/strerror.c:39
msgid "System call interrupted"
msgstr "Ystemsay allcay interrupteday"
#: libx52/x52_strerror.c:66 libx52io/io_strings.c:220 vkm/vkm_common.c:52
#: libx52/strerror.c:66 libx52io/strings.c:220 vkm/vkm_common.c:52
#, c-format
msgid "Unknown error %d"
msgstr "Unknownay erroray %d"
#: libx52/x52_stringify.c:29
#: libx52/stringify.c:29
#, c-format
msgid "Unknown clock ID %d"
msgstr "Unknownay ockclay IDay %d"
#: libx52/x52_stringify.c:30
#: libx52/stringify.c:30
msgid "primary"
msgstr "imarypray"
#: libx52/x52_stringify.c:31
#: libx52/stringify.c:31
msgid "secondary"
msgstr "econdarysay"
#: libx52/x52_stringify.c:32
#: libx52/stringify.c:32
msgid "tertiary"
msgstr "ertiarytay"
#: libx52/x52_stringify.c:35
#: libx52/stringify.c:35
#, c-format
msgid "Unknown clock format %d"
msgstr "Unknownay ockclay ormatfay %d"
#: libx52/x52_stringify.c:36
#: libx52/stringify.c:36
msgid "12 hour"
msgstr "12 ourhay"
#: libx52/x52_stringify.c:37
#: libx52/stringify.c:37
msgid "24 hour"
msgstr "24 ourhay"
#: libx52/x52_stringify.c:40
#: libx52/stringify.c:40
#, c-format
msgid "Unknown date format %d"
msgstr "Unknownay ateday ormatfay %d"
#: libx52/x52_stringify.c:41
#: libx52/stringify.c:41
msgid "DD-MM-YY"
msgstr "DDay-MMay-YYay"
#: libx52/x52_stringify.c:42
#: libx52/stringify.c:42
msgid "MM-DD-YY"
msgstr "MMay-DDay-YYay"
#: libx52/x52_stringify.c:43
#: libx52/stringify.c:43
msgid "YY-MM-DD"
msgstr "YYay-MMay-DDay"
#: libx52/x52_stringify.c:46
#: libx52/stringify.c:46
#, c-format
msgid "Unknown LED state %d"
msgstr "Unknownay EDLay atestay %d"
#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: libx52/stringify.c:47 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
msgid "off"
msgstr "offay"
#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: libx52/stringify.c:48 daemon/x52d_clock.c:29 daemon/x52d_mouse.c:55
#: daemon/x52d_mouse.c:95 daemon/x52d_mouse.c:107
msgid "on"
msgstr "onay"
#: libx52/x52_stringify.c:49
#: libx52/stringify.c:49
msgid "red"
msgstr "edray"
#: libx52/x52_stringify.c:50
#: libx52/stringify.c:50
msgid "amber"
msgstr "amberay"
#: libx52/x52_stringify.c:51
#: libx52/stringify.c:51
msgid "green"
msgstr "eengray"
#: libx52/x52_stringify.c:60
#: libx52/stringify.c:60
msgid "Fire"
msgstr "Irefay"
#: libx52/x52_stringify.c:63
#: libx52/stringify.c:63
msgid "A"
msgstr "Ay"
#: libx52/x52_stringify.c:66
#: libx52/stringify.c:66
msgid "B"
msgstr "Bay"
#: libx52/x52_stringify.c:69
#: libx52/stringify.c:69
msgid "D"
msgstr "Day"
#: libx52/x52_stringify.c:72
#: libx52/stringify.c:72
msgid "E"
msgstr "Eay"
#: libx52/x52_stringify.c:75
#: libx52/stringify.c:75
msgid "T1"
msgstr "Tay1"
#: libx52/x52_stringify.c:78
#: libx52/stringify.c:78
msgid "T2"
msgstr "Tay2"
#: libx52/x52_stringify.c:81
#: libx52/stringify.c:81
msgid "T3"
msgstr "Tay3"
#: libx52/x52_stringify.c:84
#: libx52/stringify.c:84
msgid "POV"
msgstr "OVPay"
#: libx52/x52_stringify.c:87
#: libx52/stringify.c:87
msgid "Clutch"
msgstr "Utchclay"
#: libx52/x52_stringify.c:90
#: libx52/stringify.c:90
msgid "Throttle"
msgstr "Ottlethray"
#: libx52/x52_stringify.c:93
#: libx52/stringify.c:93
#, c-format
msgid "Unknown LED ID %d"
msgstr "Unknownay EDLay IDay %d"
#: libx52io/io_strings.c:198
#: libx52io/strings.c:198
msgid "No device"
msgstr "Onay eviceday"
#: libx52io/io_strings.c:199
#: libx52io/strings.c:199
msgid "Invalid arguments"
msgstr "Invaliday argumentsay"
#: libx52io/io_strings.c:200
#: libx52io/strings.c:200
msgid "Connection failure"
msgstr "Onnectioncay ailurefay"
#: libx52io/io_strings.c:201
#: libx52io/strings.c:201
msgid "I/O error"
msgstr "I/O erroray"
#: libx52io/io_strings.c:202
#: libx52io/strings.c:202
msgid "Read timeout"
msgstr "Eadray imeouttay"