Path: utzoo!attcan!uunet!husc6!rutgers!att!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: Getchar w/wout echo Message-ID: <6361@chinet.UUCP> Date: 23 Aug 88 14:04:15 GMT References: <371@marob.MASA.COM> <225800052@uxe.cso.uiuc.edu> <65197@sun.uucp> Reply-To: les@chinet.UUCP (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 24 In article <65197@sun.uucp> alanf%smile@Sun.COM (Alan Fargusson) writes: >I have always thought that this was an omission in the stdio I/O library. >If turning echo on and off was defined as part of fread, fwrite, printf, ... >then there would be no problem. As it is now you kind of take your chances >with various version of UNIX, and non UNIX systems are hopeless (as far as >portability that is). Maybe... What if you want to run from a half-duplex terminal? There are good reasons for this, like using a satellite link where there may be a several-second delay in the echo. If stdio provided the echo, every application would need to know how to turn if off. Handling it in the OS/tty driver makes everything work automatically. Perhaps PC types don't consider the possibility of having the keyboard and CPU separated by many thousands of miles. >It is to late to get this into the ANSI-C standard I guess. It is questionable whether it belongs there. Perhaps there should be a standard library interface to the OS or an emulation if the OS doesn't provide the service. However, if an application routinely enables echo it will cause trouble in environments where the echo is provided elsewhere. Les Mikesell