From nobody Fri Jul 17 01:40:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4h1XfQ6sWrz6mDMj for ; Fri, 17 Jul 2026 01:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h1XfQ2clPz3J4V for ; Fri, 17 Jul 2026 01:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784252414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KGvz13kdCpgGNlKK665em4RbcAMa1UE4PWXtADcRqJo=; b=ukNtAk21VogOBxkV5c+kyBCEA2FnsMMDaMjj+SXGyRjoTIKtpgr/5h2X//DhfDTOA1r3mS opvjGZeooIiioO2Ag8xyZ4RZP1OwOa2mkU2H07T38bwb2MNPmyC4L6NDW79uN5/ATzY1DM F1REu4bE5kMyz7+bYzLby3mXCqSwlKN7N9dAqr4c5NNWeCYlmMJqmjJwtFovc6rrKjYnIf hhfKuRCQvwz/JTaPV8309B4dqtoK5LNeLCPUpp40V01gPFsG//ibuPC1vdaf7ZbXwd3XYd +4T1tnU6E3dGQ+4pPoTErlmf0BE0W3hCjqxaG580UwtbggHZFL3TcdphuNnwwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784252414; a=rsa-sha256; cv=none; b=bCtOgYmjR/hSwYcQq9h9QN3ztWBNLpmB6rsBTYSISR2LhTYzZPLci6EYJO6W2bXyXqp2XB fGGfg1CAPo4VM4/u/z5UDyqqpSyLKlL/n4p7V7zrnAfFf2xIEZ7o9sdhiFe2B1GiMnzO7X hkPol+5ZyzmspRUKTx14iOBK7weVm9kxFmCnTd7pRgrZYfyYSKWs9Ofiy2RD63SC1z1sEh 77UMB8dVGL8xA9ayJDiM6pPUxR15uFHc0Y/QZX0pjEwcDAFsftlbMQwgjglHQWtXtwoklc s0Oek6FnJXf26Umd0JjzSOjO+Ut+ICBFQknUxYvSyVvnQWHGhUSOcJ7zOt0a+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784252414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KGvz13kdCpgGNlKK665em4RbcAMa1UE4PWXtADcRqJo=; b=goLPvweW9CoMrXLMCLKxQ1nL5FX/MbC/JTdHDy/g06Ni07uKYWr1ycF6mTt622hpfQkDEp OSih95HAYBAvo9QtzlhnmVWPoN4UbLAIiayEa51qKNnIOqdtoMygxVw0Ril0zplovFTbqE bLpMDwMrHRdAvisOi3NhhltfKUoEW45rxZTXvlT1xrpCo2siwmCgZDtXciqY/17Sb16cNl UlL12ZBBBanjLaJLIYpzetdyZOvq+G3++NMji7gD9YorJqndpQSXAZE8AqxWMGRER3Mg5B bi0SciwMjbx6H2XCn+FySlgyghqRKVoK6+V6cZpSCZfesE15f4ZJjFXztw3Kng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h1XfQ19fHzB0q for ; Fri, 17 Jul 2026 01:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e18c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 17 Jul 2026 01:40:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 77a201b1705d - main - ministat: parse comma used as decimal delimiter List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77a201b1705dbd97ea9ebe5b25b1d4ddac8a7d38 Auto-Submitted: auto-generated Date: Fri, 17 Jul 2026 01:40:14 +0000 Message-Id: <6a5987fe.3e18c.5660ceff@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=77a201b1705dbd97ea9ebe5b25b1d4ddac8a7d38 commit 77a201b1705dbd97ea9ebe5b25b1d4ddac8a7d38 Author: Gleb Smirnoff AuthorDate: 2026-07-17 00:49:55 +0000 Commit: Gleb Smirnoff CommitDate: 2026-07-17 01:40:03 +0000 ministat: parse comma used as decimal delimiter This allows to use output of '/usr/bin/time -ao foo' as direct input to ministat(1). While here make diagnostic message more verbose. --- usr.bin/ministat/ministat.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 7d3232370121..bb2b7e32ea0b 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; + char buf[BUFSIZ], *p, *t, *comma; struct dataset *s; double d; int line; @@ -507,10 +507,12 @@ 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 on line %d in %s", line, n); + errx(2, "Invalid data \"%s\" on line %d in %s", + t, line, n); if (*buf != '\0') AddPoint(s, d); }