From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 13 Apr 2005 16:20:42 +0300 From: Einar Karttunen To: Plan9 ML <9fans@cse.psu.edu> Message-ID: <20050413132042.GA13385@melkki.cs.Helsinki.FI> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [9fans] Common code - isatty Topicbox-Message-UUID: 375b9bbc-ead0-11e9-9d60-3106f5b1d025 Hello While reading source code I noticed several different isatty implementations. They are slightly different and I would be interested in 1) which is the correct implementation and 2) whether a patch to fix the others would be welcome and whether a common location in a library or cut-paste is preferred. The locations include at least: ape/lib/ap/isatty.c - check whether fd2path ends in "/dev/cons" cmd/ip/telnet.c - dirstat -> "cons" cmd/rc/plan9.c - dirstat -> "ptty" or same dev,type,qid as "/dev/cons" cmd/ssh/ssh.c - fd2path ends in "/dev/cons" cmd/upas/common/libsys.c - dirstat -> "cons" libstdio/setvbuf.c - dirstat -> same dev,type and qid as "/dev/cons" - Einar Karttunen