Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrlnk!ncrcce!mercer From: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Newsgroups: comp.lang.c Subject: Re: Getchar w/wout echo Summary: Don't confuse language functions with os functions Message-ID: <731@ncrcce.StPaul.NCR.COM> Date: 29 Aug 88 21:44:42 GMT References: <371@marob.MASA.COM> <65071@sun.uucp> <624@proxftl.UUCP> Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Organization: NCR Comten, Inc. Lines: 30 Another one of those fine confused wish list discussions. Unfortunately, like the other discussions of this type, it is fatally flawed. The problem is, evreyone seems to be confusing language functionality with os functionality. Terminal echo is a function provided by the operating system (in this case, UNIX(tm)). Whether or not echoing is going on is invisible to getchar(), and read. The tty device driver is controlling this operation, and only an ioctl can change its behaviour. In many cases, the echoing function is not even taking place on the same processor. In the NCR TOWER(tm) series, the echoing is being done on the HPSIO (a separate 68010 based processor) and is thereby not burdening the CPU. In Amdahl hosts running UTS in a network, the echoing may be done by and Amdahl 4705(tm) channel attached to the host. Ioctl calls will generate commnds to the front end processor to change its character reading behaviour. In fact, in many cases, the echo may already have occurred before the echoing can be turned off. Before you go mucking with the language, I suggest you learn a bit more about your hardware, your operating system, and how they interrelate. Then I suggest you do what I did when I wrote a menuing system - read everything available about the tty device drivers, stty, and termio, experiment like crazy, then write your own raw character input routines. No flame intended. Dan Mercer - NCR COMTEN