From 41130f53d943548e3d833c2cd37c0873b9f9512e Mon Sep 17 00:00:00 2001 From: rin Date: Wed, 6 Dec 2017 12:30:27 +0000 Subject: [PATCH] Teach fmtcheck(3) about the ' (thousands separator) flag. Taken from FreeBSD: https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev143905 --- lib/libc/gen/fmtcheck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/fmtcheck.c b/lib/libc/gen/fmtcheck.c index 37af2ee8749b..c49440b91ad3 100644 --- a/lib/libc/gen/fmtcheck.c +++ b/lib/libc/gen/fmtcheck.c @@ -1,4 +1,4 @@ -/* $NetBSD: fmtcheck.c,v 1.12 2017/12/06 12:28:53 rin Exp $ */ +/* $NetBSD: fmtcheck.c,v 1.13 2017/12/06 12:30:27 rin Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fmtcheck.c,v 1.12 2017/12/06 12:28:53 rin Exp $"); +__RCSID("$NetBSD: fmtcheck.c,v 1.13 2017/12/06 12:30:27 rin Exp $"); #endif #include "namespace.h" @@ -242,7 +242,7 @@ get_next_format(const char **pf, EFT eft) } /* Eat any of the flags */ - while (*f && (strchr("#0- +", *f))) + while (*f && (strchr("#'0- +", *f))) f++; if (*f == '*') {