🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5255

Re: ANSI C and standard libraries

#5255
From: Doug Gwyn
Date: Sat, 30 Jul 1988 04:35
23 lines
1895 bytes
In article <62114@sun.uucp> swilson%thetone@Sun.COM (Scott Wilson) writes:
>So the question is this:  what does ANSI C say about the behavior of
>library routines?  Can I expect it to be defined that when using
>getchar the user will see what he/she types?  And have a chance to
>correct mistakes (which you also can't do with LSC)?  I realize that
>with some implementations, such as UNIX, the behavior of the terminal
>driver is set independently of the C environment so getchar cannot
>guarantee echoing and error correction.  However, does ANSI C need
>to state that under default terminal settings getchar will echo?
>What about specifying that character erase or line erase facilties
>are available?

None of the input functions is specified as performing any output
operation (except that input from an interactive device, whatever
that means, will first cause buffered STDIO output for that device
to be fflushed).  It is not within the scope of the ANSI C Standard
to specify such details of the operating system as you are asking
about.  In fact it really isn't considered the C library's job to
perform echoing of terminal input, but if you have a mickey-mouse
operating system then a quality implementation will have to
compensate for its deficiencies.  I would have expected yours to
have provided ways to switch into and out of "input canonicalization"
mode in its terminal input support.  Even Apple II Aztec C does that.
Technical Details
Message-ID: <8271@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!cmcl2!brl-adm!brl-smoke!gwyn
References: <62114@sun.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!cmcl2!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.std.c
Subject: Re: ANSI C and standard libraries
Message-ID: <8271@brl-smoke.ARPA>
Date: 30 Jul 88 04:35:28 GMT
References: <62114@sun.uucp>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 23