mirror of https://github.com/nirenjan/libx52.git
Prior to this change, there was a lot of duplicated code within the dump routines, which would call out to a common `print_section` routine that had global state. This causes problems from a multi-threaded perspective in that multiple calls to `x52d_config_save_file` were not MT-safe. In addition, the dump logic was written such that it could only be used in the config dump. It is desired that we add functionality to return the formatted config value as a string in a different part of the code as well. This change brings in the shared state into a stack variable, and changes the dump functions to return a const char *, thereby allowing for greater reuse, as well as getting rid of the shared state. However, there is still a little bit of shared state in the `int_dumper` routine. This can be ignored for now, but we should possibly figure out how to get rid of the shared state altogether. |
||
---|---|---|
.. | ||
Makefile.am | ||
daemon.dox | ||
x52d.conf | ||
x52d.service.in | ||
x52d_clock.c | ||
x52d_clock.h | ||
x52d_config.c | ||
x52d_config.def | ||
x52d_config.h | ||
x52d_config_dump.c | ||
x52d_config_parser.c | ||
x52d_const.h | ||
x52d_device.c | ||
x52d_device.h | ||
x52d_io.c | ||
x52d_io.h | ||
x52d_led.c | ||
x52d_main.c | ||
x52d_mouse.c | ||
x52d_mouse.h | ||
x52d_mouse_evdev.c |