Substitute for gets()

Henry Spencer henry at utzoo.uucp
Fri Feb 10 13:57:48 AEST 1989


In article <3909 at cbnews.ATT.COM> lvc at cbnews.ATT.COM (Lawrence V. Cipriani) writes:
>>Printf() was an experiment that worked;
>The printf we have today is not the same as the original (pre K&R) printf,
>its first argument was a file descriptor.  I think the file descriptor was
>dropped from printf when fprintf and FILEs were invented.

Uh, can you cite references for that?  Printf certainly did not take a file
descriptor as of Fifth Edition Unix, aka V5, released around the end of
1974 -- I remember V5.  I remember the arrival of fprintf and FILEs, and
the arrival of K&R; there was no change to printf on either occasion.
Well, actually, printf did pick up features in its format string at times,
but it hasn't taken a descriptor argument since I've known it.  This lack
was considered really annoying by a lot of people, and most everybody was
happy to see stdio arrive with fprintf.  (There was an earlier "portable"
library that may have included such a thing -- I don't remember it too
clearly -- but it had other problems and wasn't really suitable for
general use.)
-- 
The Earth is our mother;       |     Henry Spencer at U of Toronto Zoology
our nine months are up.        | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list