single character input

Chris Torek chris at mimsy.UUCP
Fri May 27 01:08:12 AEST 1988


In article <3443 at drivax.UUCP> braun at 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 at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list