Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: retiring gets(3) Message-ID: <675@quintus.UUCP> Date: 14 Nov 88 09:49:03 GMT References: <1988Nov8.054845.23998@utstat.uucp> <7963@bloom-beacon.MIT.EDU> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 20 In article <7963@bloom-beacon.MIT.EDU> scs@adam.pika.mit.edu (Steve Summit) writes: >In article <1988Nov8.054845.23998@utstat.uucp> geoff@utstat.uucp (Geoff Collyer) writes: >>...gets is a bug waiting to happen and should be stamped out. > >Getting rid of gets is an excellent idea. I'm all for backwards >compatibility and not breaking existing code, but it's got to be >conscientiously written existing code, and to my way of thinking >no reasonable program should ever have been using gets. >(Apologies and condolences to those of you who do, and to the >original implementor.) When I am writing a program for my own use to process my own data sets which I _know_ have reasonable lines, why the d---l shouldn't I use gets()? If I am writing a program for _other_ people to use, I have an obligation to try to make it reasonably robust, but a lot of my C programs are there for a day (I find it easier to write C than awk, better debugging tools to start with... -- would a lint for awk be called lawk?). I have just posted a "safe gets" to comp.sources.misc.