From owner-svn-src-stable@FreeBSD.ORG Mon Apr 25 14:36:39 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DEAD106566B; Mon, 25 Apr 2011 14:36:39 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD7E8FC0C; Mon, 25 Apr 2011 14:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PEacXL080273; Mon, 25 Apr 2011 14:36:38 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEac3J080271; Mon, 25 Apr 2011 14:36:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251436.p3PEac3J080271@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 14:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221017 - stable/8/usr.bin/printf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 14:36:39 -0000 Author: jilles Date: Mon Apr 25 14:36:38 2011 New Revision: 221017 URL: http://svn.freebsd.org/changeset/base/221017 Log: MFC r212244: printf(1): Clarify that \OOO produces a byte, different %b escape sequences. Octal escape sequences are expanded to bytes, not characters, and multiple are required for a multibyte character. The valid escape sequences in %b strings are slightly different from the escape sequences in the format string. Modified: stable/8/usr.bin/printf/printf.1 Directory Properties: stable/8/usr.bin/printf/ (props changed) Modified: stable/8/usr.bin/printf/printf.1 ============================================================================== --- stable/8/usr.bin/printf/printf.1 Mon Apr 25 14:12:58 2011 (r221016) +++ stable/8/usr.bin/printf/printf.1 Mon Apr 25 14:36:38 2011 (r221017) @@ -35,7 +35,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 14, 2005 +.Dd September 5, 2010 .Dt PRINTF 1 .Os .Sh NAME @@ -109,12 +109,13 @@ Write a character. .It Cm \e\e Write a backslash character. .It Cm \e Ns Ar num -.It Cm \e0 Ns Ar num -Write an 8-bit character whose -.Tn ASCII +Write a byte whose value is the 1-, 2-, or 3-digit octal number .Ar num . +Multibyte characters can be constructed using multiple +.Cm \e Ns Ar num +sequences. .El .Pp Each format specification is introduced by the percent character @@ -289,6 +290,11 @@ As for .Cm s , but interpret character escapes in backslash notation in the string .Ar argument . +The permitted escape sequences are slightly different in that +octal escapes are +.Cm \e0 Ns Ar num +instead of +.Cm \e Ns Ar num . .It Cm \&% Print a `%'; no argument is used. .El