Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Substitute for gets() Message-ID: <1989Feb10.035748.26448@utzoo.uucp> Organization: U of Toronto Zoology References: <721@hscfvax.harvard.edu> <1989Feb8.223554.27192@utzoo.uucp> <3909@cbnews.ATT.COM> Date: Fri, 10 Feb 89 03:57:48 GMT In article <3909@cbnews.ATT.COM> lvc@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@zoo.toronto.edu