printf, data presentation

Scott Wilson swilson%thetone at Sun.COM
Wed Jan 11 05:36:57 AEST 1989


In article <310 at twwells.uucp> bill at twwells.UUCP (T. William Wells) writes:
>In article <225800106 at uxe.cso.uiuc.edu> mcdonald at uxe.cso.uiuc.edu writes:
>: The important point is that some such function should be a
>: STANDARD C (ANSI C) function, not an operating system dependent
>: kludge. It is obviously too late to get it done right this time
>: around, but next time .... PLEASE!
>
>And to repeat what has been said by many: IT CAN'T BE DONE!
>
>A C compiler can't provide this function if the OS doesn't have the
>facility.

This argument is very similar to one I started some time ago related
to echo/no echo on input, etc.  The point of standard libraries is
to smooth over OS dependencies to provide a uniform interface.  If
inkey() cannot be provided for on some systems, aren't there other
operations mandated by the Standard that are just as hard to provide?
For example, what about the legal modes passed to fopen()?  Aren't
there some systems where you simply can't open a file for simultaneous
reading and writing?  Or open for writing at the end of a file?  What
about fseek(), couldn't that be potentially very inefficient to
implement on some brain-damaged systems?  I don't know the answers to
these questions.  I guess what I'm wondering is:  are there operations
already part of the Standard that are there for historical reasons
(i.e., it has always existed for most implementations) that would be
rejected if it was recommended as a new feature because it was "too
operating system dependent?"


--
Scott Wilson		arpa: swilson at sun.com
Sun Microsystems	uucp: ...!sun!swilson
Mt. View, CA



More information about the Comp.lang.c mailing list