`Extra' newline when using getchar() (was: C Quirk??)

ELIN Forsch.z. rcvie at tuvie
Thu Mar 24 20:09:10 AEST 1988


In article <976 at mcgill-vision.UUCP> mouse at mcgill-vision.UUCP (der Mouse) writes:
>> Since it sounds like you are wanting just one character at a time how
>> about considering putting the system in raw mode so that when you do
>> the getchar it comes right back at you.  Why wait an force the user
>> to hit a charrage return.
>
>Cbreak mode is probably better than raw mode.  Have you ever written a
>program that uses raw mode and then discovered a bug in the handling of
>the command that's supposed to get you out?  Great fun, isn't it?
>

Would all you ignorant UNIX-users out there please recognize that there exist
other operating systems as well that cannot be put into `raw mode',
`cbreak mode' or whatever! C is ***not*** expected to work solely under
UNIX! One of the best features (if not the best at all) of C is its
availability on so many machines with so many OS which offers the
possibility to have many many programs working on many many computers
with just copying some source text and recompilation (if you keep
track of the rules for portable programming :-) ). This is the (only)
reason why my company takes the risk of using such a dangerous HLL.
If you today buy a new system (new in the sence you did not have it yet,
but also in the sence it is devellopped newly) the only compiler and run-time
system you can (almost) be sure to be offered for it is C. But very
seldom UNIX. And thus very seldom UNIX terminal drivers. And thus very
seldom ... . Therefore I ask all you UNIX-folks out there, please be
careful with sentences like "put the system in cbreak mode" or 
"if you do not like C or if it is not appropriate just use any other
programming language" etc. Some people really would like to do so but
there is no chance. (And there is a comp.unix newsgroup as well.)


		Dietmar Weickert,
			ALCATEL-ELIN Research Center, Vienna, Austria.



More information about the Comp.lang.c mailing list