🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3813

Re: gets() and getchar

#3813
From: Fergus Henderson
Date: Fri, 18 Aug 1995 03:52
25 lines
1496 bytes
kanze@gabi-soft.fr (J. Kanze) writes:

>Zefram (A.Main@dcs.warwick.ac.uk) wrote:
>|>  <halasz@caip.rutgers.edu> wrote:
>
>Actually, he didn't, I did.
>
>|> >- 	-Dgets='DONT_USE_GETS!'
>
>|> That's a disgusting hack.  It might well make the compiler unusable if
>|> an included header includes a prototype for gets(), even if it's not
>|> actually called.
>
>Agreed.  I didn't think about all of the consequences.  (I never use
>gets myself, and I don't need this sort of hack to avoid it.)

Mind you, the slightly less disgusting hack -Dgets=DONT_USE_GETS seems
to avoid the bad consequences, and will still give you an error message
at link time.

-- 
Fergus Henderson              | Designing grand concepts is fun;
fjh@cs.mu.oz.au               | finding nitty little bugs is just work.
http://www.cs.mu.oz.au/~fjh   | -- Brooks, in "The Mythical Man-Month".
PGP key fingerprint: 00 D7 A2 27 65 09 B6 AC  8B 3E 0F 01 E7 5D C4 3F
Technical Details
Message-ID: <9523013.25326@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!munta.cs.mu.OZ.AU!fjh
References: <Pine.ULT.3.91.950807194041.19202A-100000@mars> <KANZE.95Aug9103309@slsvhdt.lts.sel.alcatel.de> <40bqih$bft@caip.rutgers.edu> <1995Aug11.002333.20047@dcs.warwick.ac.uk> <40fqgd$2ej@gabi.gabi-soft.fr>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!munta.cs.mu.OZ.AU!fjh
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: gets() and getchar
Message-ID: <9523013.25326@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Organization: Computer Science, University of Melbourne, Australia
References: <Pine.ULT.3.91.950807194041.19202A-100000@mars> <KANZE.95Aug9103309@slsvhdt.lts.sel.alcatel.de> <40bqih$bft@caip.rutgers.edu> <1995Aug11.002333.20047@dcs.warwick.ac.uk> <40fqgd$2ej@gabi.gabi-soft.fr>
Date: Fri, 18 Aug 1995 03:52:52 GMT