From owner-FreeBSD-users-jp@jp.FreeBSD.org Tue May 14 21:20:40 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g4ECKes06793;
	Tue, 14 May 2002 21:20:40 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from mail.musha.org (postfix@daemon.musha.org [218.44.187.2])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g4ECKdf06788
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Tue, 14 May 2002 21:20:39 +0900 (JST)
	(envelope-from knu@iDaemons.org)
Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32])
	by mail.musha.org (Postfix) with ESMTP id BC7154D801
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Tue, 14 May 2002 21:20:38 +0900 (JST)
Date: Tue, 14 May 2002 21:20:39 +0900
Message-ID: <864rha53ag.wl@archon.local.idaemons.org>
From: "Akinori MUSHA" <knu@iDaemons.org>
To: FreeBSD users <FreeBSD-users-jp@jp.FreeBSD.org>
In-Reply-To: <20020514200532.6B1F.YMATSU@netlinks.co.jp>
References: <20020514200532.6B1F.YMATSU@netlinks.co.jp>
User-Agent: Wanderlust/2.9.11 (Unchained Melody) SEMI/1.14.3 (Ushinoya) LIMIT/1.14.7 (Fujiidera) APEL/10.3 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd)
Organization: Associated I. Daemons
X-PGP-Public-Key: finger knu@FreeBSD.org
X-PGP-Fingerprint: 081D 099C 1705 861D 4B70  B04A 920B EFC7 9FD9 E1EE
MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=ISO-2022-JP
Reply-To: FreeBSD-users-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020417
X-Sequence: FreeBSD-users-jp 68474
Subject: [FreeBSD-users-jp 68474] Re: ps =?ISO-2022-JP?B?GyRCJTMbKEI=?=
 =?ISO-2022-JP?B?GyRCJV4lcyVJJE49UE5PJE41c0YwGyhC?= 
Errors-To: owner-FreeBSD-users-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-users-jp@jp.FreeBSD.org
X-Originator: knu@iDaemons.org

At Tue, 14 May 2002 20:15:03 +0900,
$B$^$D$b$H$f$?$+(B wrote:
> Turbo Linux $B$G$O!$I=<($O%+%C%H$5$l$F$$$k$1$I%Q%$%W$G$D$J$$$@$H$-$O(B
> $BA4ItEO$5$l$F$$$k$H$$$&$3$H$G$9!%(B

$B!!(Btop(1) $B$b$=$&$$$&;EMM$J$N$G!"$=$NJ}$,$$$$$+$bCN$l$^$;$s$M!#(B

$B!!$3$&$+$J!#(B

Index: ps.1
===================================================================
RCS file: /home/ncvs/src/bin/ps/ps.1,v
retrieving revision 1.44
diff -u -r1.44 ps.1
--- ps.1	9 May 2002 11:47:42 -0000	1.44
+++ ps.1	14 May 2002 12:14:13 -0000
@@ -173,7 +173,7 @@
 .It Fl w
 Use 132 columns to display information, instead of the default which
 is your window size.
-If the
+If standard output is not a terminal or the
 .Fl w
 option is specified more than once,
 .Nm
Index: ps.c
===================================================================
RCS file: /home/ncvs/src/bin/ps/ps.c,v
retrieving revision 1.50
diff -u -r1.50 ps.c
--- ps.c	7 Apr 2002 04:59:13 -0000	1.50
+++ ps.c	14 May 2002 12:11:54 -0000
@@ -128,11 +128,9 @@
 
 	(void) setlocale(LC_ALL, "");
 
-	if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
-	     ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
-	     ioctl(STDIN_FILENO,  TIOCGWINSZ, (char *)&ws) == -1) ||
-	     ws.ws_col == 0)
-		termwidth = 79;
+	if (ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 ||
+	    ws.ws_col == 0)
+		termwidth = UNLIMITED;
 	else
 		termwidth = ws.ws_col - 1;
 
@@ -262,7 +260,7 @@
 		case 'w':
 			if (wflag)
 				termwidth = UNLIMITED;
-			else if (termwidth < 131)
+			else if (termwidth != UNLIMITED && termwidth < 131)
 				termwidth = 131;
 			wflag++;
 			break;


-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Somewhere out of a memory.. of lighted streets on quiet nights.."
