Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2004 05:40:10 -0800 (PST)
From:      Marc Silver <marcs@draenor.org>
To:        freebsd-doc@FreeBSD.org
Subject:   Re: docs/53454: wrong sample code in manpage of wcwidth(3)
Message-ID:  <200402031340.i13DeAQG048107@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/53454; it has been noted by GNATS.

From: Marc Silver <marcs@draenor.org>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402031340.i13DeAQG048107>