picom/src
Yuxuan Shui 465a968ddd
Parse number locale-independently
Previously we were using glibc's strtod function to parse floating point
numbers. The problem is, strtod is locale dependent. Meaning 7,7 might
be parsed as two numbers (7 and 7) in one locale, and parsed as one
number (7 point 7) in another locale. This is undesirable.

We need to set the locale to a value we know to make number parsing
consistently. We could use setlocale(), but that is not thread-safe. We
can also use uselocale(), which is thread-safe, but doesn't cover strtod
(Yeah, some of the locale-aware functions only acknowledge the global
locale, not the thread local one).

So in frustration, I just wrote a simple floating point number parser
myself. This parser obviously doesn't cover all cases strtod covers, but
is good enough for our needs.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-02 01:28:15 +00:00
..
backend Remove a redundant glEnd in glx_dim_dst 2019-01-29 22:27:05 +00:00
c2.c Fix small misspellings 2019-01-28 10:58:14 +01:00
c2.h Clean up options/config file parsing 2018-12-21 17:21:52 +00:00
common.h Move some macros around 2019-01-27 23:57:43 +00:00
compiler.h Add compiler dependent macros for thread_local 2018-12-20 00:46:38 +00:00
compton.c Move some macros around 2019-01-27 23:57:43 +00:00
compton.h Even more includes 2019-01-20 22:09:22 +00:00
compton.modulemap Even more includes 2019-01-20 22:09:22 +00:00
config.c Parse number locale-independently 2019-02-02 01:28:15 +00:00
config.h Even more includes 2019-01-20 22:09:22 +00:00
config_libconfig.c Improve config file search order 2019-01-30 00:27:14 +00:00
dbus.c Even more includes 2019-01-20 22:09:22 +00:00
dbus.h Remove a couple of unwanted options 2018-12-20 23:44:38 +00:00
diagnostic.c Even more includes 2019-01-20 22:09:22 +00:00
diagnostic.h Add --diagnostics option 2018-11-03 22:37:18 +00:00
kernel.c Improve the header includes, cont'd 2019-01-20 17:10:06 +00:00
kernel.h Speed up shadow generation for small windows 2019-01-01 11:35:59 +00:00
log.c Reuse some code from the new gl backend 2019-01-27 18:16:28 +00:00
log.h Remove printf_* macros 2018-12-20 17:36:23 +00:00
meson.build Refactor the XSync fence code 2018-12-30 07:06:47 +00:00
opengl.c Fix memory leak in glx_init_blur 2019-01-31 22:47:04 +00:00
opengl.h Reuse some code from the new gl backend 2019-01-27 18:16:28 +00:00
options.c Exit with exit code 1 when argument parsing failed 2019-01-30 22:19:05 +00:00
options.h Make --logpath work again 2018-12-21 22:59:21 +00:00
region.h Even more includes 2019-01-20 22:09:22 +00:00
render.c Fix small misspellings 2019-01-28 10:58:14 +01:00
render.h Make buffer age not glx specific 2019-01-26 15:07:09 +00:00
string_utils.c Parse number locale-independently 2019-02-02 01:28:15 +00:00
string_utils.h Parse number locale-independently 2019-02-02 01:28:15 +00:00
types.h Fix signedness of x properties 2018-11-01 11:12:46 +00:00
utils.c Even more includes 2019-01-20 22:09:22 +00:00
utils.h Improve the header includes, cont'd 2019-01-20 17:10:06 +00:00
vsync.c Even more includes 2019-01-20 22:09:22 +00:00
vsync.h Move rendering related functions out of compton.c 2018-12-16 00:50:46 +00:00
win.c Even more includes 2019-01-20 22:09:22 +00:00
win.h Even more includes 2019-01-20 22:09:22 +00:00
x.c Even more includes 2019-01-20 22:09:22 +00:00
x.h Improve the include situation 2019-01-18 23:30:44 +00:00
xrescheck.c Convert printf_errf/dbgf in several files 2018-12-20 16:54:51 +00:00
xrescheck.h Sort out license problems 2018-10-03 22:14:51 +01:00