diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2026-07-20 18:38:33 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2026-07-20 18:40:28 +0000 |
| commit | aa588213d8f54803fc0b6b09d34f20fb30e57896 (patch) | |
| tree | 89cd69d7888562196068e0dc0a404d7c378d8cab | |
| parent | 5b7d6a128bef464e7fd331d172e4cf25a5d122c3 (diff) | |
ministat: revert "parse comma used as decimal delimiter"
This partially reverts commit 77a201b1705dbd97ea9ebe5b25b1d4ddac8a7d38.
Requested by: des, fuz
| -rw-r--r-- | usr.bin/ministat/ministat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index bb2b7e32ea0b..bc2f49fb8536 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -483,7 +483,7 @@ dbl_cmp(const void *a, const void *b) static struct dataset * ReadSet(FILE *f, const char *n, int column, const char *delim) { - char buf[BUFSIZ], *p, *t, *comma; + char buf[BUFSIZ], *p, *t; struct dataset *s; double d; int line; @@ -507,8 +507,7 @@ ReadSet(FILE *f, const char *n, int column, const char *delim) } if (t == NULL || *t == '#') continue; - if ((comma = strchr(t, ',')) != NULL) - *comma = '.'; + d = strtod(t, &p); if (p != NULL && *p != '\0') errx(2, "Invalid data \"%s\" on line %d in %s", |
