Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: single character input Message-ID: <11679@mimsy.UUCP> Date: 26 May 88 15:08:12 GMT References: <3423@drivax.UUCP> <5455@bloom-beacon.MIT.EDU> <3443@drivax.UUCP> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 In article <3443@drivax.UUCP> braun@drivax.UUCP (Kral) writes: >gets() ... does the same thing. In either case, you don't get a return >from the function until after the newline has been read by the system. >This eliminates the need for me to have to write code to handle >backspaces .... It is worth pointing out that, under modern operating systems, that need does not exist. Indeed, you must take special action to get the backspaces, if you want to handle them yourself: Unless you are using a primitive system, backspace editing is not done within gets() itself; rather, it is done at a lower level (by the system). To forestall further questions here, disabling and enabling this editing is a function of the operating system, not the language, so there is no single answer to `how do I do it in C'. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris