From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 07:30:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC4E875F; Fri, 23 Jan 2015 07:30:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A743999A; Fri, 23 Jan 2015 07:30:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N7UxYG008494; Fri, 23 Jan 2015 07:30:59 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N7Uwta008490; Fri, 23 Jan 2015 07:30:58 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201501230730.t0N7Uwta008490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Fri, 23 Jan 2015 07:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277560 - in head: lib/libstand share/man/man9 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 07:31:00 -0000 Author: danfe (ports committer) Date: Fri Jan 23 07:30:57 2015 New Revision: 277560 URL: https://svnweb.freebsd.org/changeset/base/277560 Log: Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' in bitfield argument is wrong, as it will be treated as bit 10, causing any code printing >=10 bits with bit 10 on as having a trailing comma. Newline (intended one) should be part of the format string (already present in the examples). Also fix grammar and kill EOL whitespace in comment while here. PR: 195005 Approved by: bdrewery Modified: head/lib/libstand/libstand.3 head/lib/libstand/printf.c head/share/man/man9/printf.9 head/sys/kern/subr_prf.c Modified: head/lib/libstand/libstand.3 ============================================================================== --- head/lib/libstand/libstand.3 Fri Jan 23 06:01:34 2015 (r277559) +++ head/lib/libstand/libstand.3 Fri Jan 23 07:30:57 2015 (r277560) @@ -288,7 +288,7 @@ Thus printf( .Qq reg=%b\en , 3, -.Qq \e10\e2BITTWO\e1BITONE\en +.Qq \e10\e2BITTWO\e1BITONE ); .Ed .Pp Modified: head/lib/libstand/printf.c ============================================================================== --- head/lib/libstand/printf.c Fri Jan 23 06:01:34 2015 (r277559) +++ head/lib/libstand/printf.c Fri Jan 23 07:30:57 2015 (r277560) @@ -187,7 +187,7 @@ ksprintn(char *nbuf, uintmax_t num, int * the next characters (up to a control character, i.e. a character <= 32), * give the name of the register. Thus: * - * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n"); + * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE"); * * would produce output: * @@ -500,7 +500,7 @@ number: while (percent < fmt) PCHAR(*percent++); /* - * Since we ignore an formatting argument it is no + * Since we ignore a formatting argument it is no * longer safe to obey the remaining formatting * arguments as the arguments will no longer match * the format specs. Modified: head/share/man/man9/printf.9 ============================================================================== --- head/share/man/man9/printf.9 Fri Jan 23 06:01:34 2015 (r277559) +++ head/share/man/man9/printf.9 Fri Jan 23 07:30:57 2015 (r277560) @@ -151,7 +151,7 @@ void printf_test(void) { - printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE\en"); + printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE"); printf("out: %4D\en", "AAAA", ":"); } .Ed Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Fri Jan 23 06:01:34 2015 (r277559) +++ head/sys/kern/subr_prf.c Fri Jan 23 07:30:57 2015 (r277560) @@ -598,7 +598,7 @@ ksprintn(char *nbuf, uintmax_t num, int * the next characters (up to a control character, i.e. a character <= 32), * give the name of the register. Thus: * - * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n"); + * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE"); * * would produce output: * @@ -911,7 +911,7 @@ number: while (percent < fmt) PCHAR(*percent++); /* - * Since we ignore a formatting argument it is no + * Since we ignore a formatting argument it is no * longer safe to obey the remaining formatting * arguments as the arguments will no longer match * the format specs.