From owner-freebsd-doc@FreeBSD.ORG Tue Feb 3 05:40:14 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AE4E16A4CE for ; Tue, 3 Feb 2004 05:40:14 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0799B43D1F for ; Tue, 3 Feb 2004 05:40:11 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i13DeAFR048109 for ; Tue, 3 Feb 2004 05:40:10 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i13DeAQG048107; Tue, 3 Feb 2004 05:40:10 -0800 (PST) (envelope-from gnats) Date: Tue, 3 Feb 2004 05:40:10 -0800 (PST) Message-Id: <200402031340.i13DeAQG048107@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Marc Silver Subject: Re: docs/53454: wrong sample code in manpage of wcwidth(3) X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Marc Silver List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 13:40:14 -0000 The following reply was made to PR docs/53454; it has been noted by GNATS. From: Marc Silver To: freebsd-gnats-submit@FreeBSD.org, kcwu@kcwu.homeip.net Cc: Subject: Re: docs/53454: wrong sample code in manpage of wcwidth(3) Date: Tue, 3 Feb 2004 13:34:28 +0000 --Q0rSlbzrZN6k9QnT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I've tested the aforementioned patch, and it correctly outputs information now. Perhaps someone could commit it? Diff attached. Cheers, Marc -- Success is never final. Failure is never fatal. It is courage that counts. -- Winston Churchill --Q0rSlbzrZN6k9QnT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="wcwidth.3-patch" --- wcwidth.3-orig Tue Feb 3 15:28:07 2004 +++ wcwidth.3 Tue Feb 3 15:28:31 2004 @@ -67,9 +67,9 @@ while ((ch = getwchar()) != WEOF) { if ((w = wcwidth(ch)) > 0) column += w; - if (column >= 20) { + if (column > 20) { putwchar(L'\en'); - column = 0; + column = w; } putwchar(ch); if (ch == L'\en') --Q0rSlbzrZN6k9QnT--