Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site itm.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!fba!itm!danny From: danny@itm.UUCP (Danny) Newsgroups: net.unix-wizards Subject: Re: How 'p' works. Message-ID: <223@itm.UUCP> Date: Thu, 13-Dec-84 09:54:01 EST Article-I.D.: itm.223 Posted: Thu Dec 13 09:54:01 1984 Date-Received: Sat, 15-Dec-84 02:05:22 EST References: <6522@brl-tgr.ARPA> <154@twitch.UUCP> Reply-To: danny@itm.UUCP (Danny) Organization: In Touch - Atlanta, GA Lines: 30 @ Yeah, yeah, we all *know* that UN*X is so [insert adjective here] that no one in his right mind would *dare* use it right? :-) Nevertheless, let me point out that no matter how similar files/terminals appear, they *are* different, and sometimes, special allowances must be made. In my version of "more" (what? another more?) I specifically check for stdin being a terminal (isatty(3)), and, if so, it informs the user that it will not "more" a terminal. Another solution I have seen is instead of a error message and subsequent exit, it simply doesn't page, just copies straight through. Of course, in the latter case, it still waits (quite a while, I might add) for input from the terminal. The reason I chose the former approach was that I use "more" as an interactive tool, and as such, it does pretty well (it won't let me "more" a binary, either). But, as a substitute for "cat", well, 'nuff said. I suggest that the check for stdin == tty be added to "p" (let's hear it for multiple versions, huh?), and "p" will nevermore wait forever for input (22 lines of input at that!). Danny -- Daniel S. Cox ({gatech|akgua}!itm!danny)