Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen Teach fmtcheck(3) about the ' (thousands separa...



details:   https://anonhg.NetBSD.org/src/rev/6e995d301935
branches:  trunk
changeset: 357975:6e995d301935
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Dec 06 12:30:27 2017 +0000

description:
Teach fmtcheck(3) about the ' (thousands separator) flag. Taken from FreeBSD:
https://svnweb.freebsd.org/base/head/lib/libc/gen/fmtcheck.c#rev143905

diffstat:

 lib/libc/gen/fmtcheck.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 724f451a2ecb -r 6e995d301935 lib/libc/gen/fmtcheck.c
--- a/lib/libc/gen/fmtcheck.c   Wed Dec 06 12:28:53 2017 +0000
+++ b/lib/libc/gen/fmtcheck.c   Wed Dec 06 12:30:27 2017 +0000
@@ -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 <sys/cdefs.h>
 #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 @@
        }
 
        /* Eat any of the flags */
-       while (*f && (strchr("#0- +", *f)))
+       while (*f && (strchr("#'0- +", *f)))
                f++;
 
        if (*f == '*') {



Home | Main Index | Thread Index | Old Index