]> vcs.slashdirt.org Git - sw/tic2json.git/commitdiff

vcs.slashdirt.org Git - sw/tic2json.git/commitdiff

git git / sw / tic2json.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44143aa)
tic2json: ensure dot decimal separator in JSON output
2024年9月26日 14:51:45 +0000 (16:51 +0200)
2024年9月26日 14:51:50 +0000 (16:51 +0200)

diff --git a/src/tic2json.c b/src/tic2json.c
index 7fa35943816fd09e8e28b4e461b37efc5bdc69c0..de932b1592ce8826a4f9ed407da8bdd6d6da7118 100644 (file)
--- a/src/tic2json.c
+++ b/src/tic2json.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <locale.h>
#ifndef BAREBUILD
#include <unistd.h> // getopt
#include <err.h>
@@ -431,6 +432,8 @@ int main(int argc, char **argv)
const char *fconfig = NULL;
int ch;
+ setlocale(LC_NUMERIC, "C"); // ensure floats have decimal dot.
+
ticinit();
while ((ch = getopt(argc, argv, "12Pde:hi:lnprs:uVz")) != -1) {
tic2json TIC parser/converter
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /