Article View: comp.std.c
Article #3685Re: gets() and getchar
From: James Kanze US/ESC 60/3/141 #407...
Date: Wed, 09 Aug 1995 08:33
Date: Wed, 09 Aug 1995 08:33
24 lines
1452 bytes
1452 bytes
In article <409hdq$ib2@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au
(Richard A. O'Keefe) writes:
|> Jens Andreasen <jens-and@dsv.su.se> writes:
|> >Well, getchar() seems to be a bit on the implementation defined side and
|> >gets() can be considered playing russian roulette :-|
|> Which is why my shell script for compiling C has
|> -Dgets=DONT_USE_GETS
|> in it, amongst other things. Forget who suggested that on the net, but it
|> was a good idea.
An excellent idea. But wouldn't it be better if it gave the error
message at compile time (with a line number so you could find and
correct it easily)? Say:
-Dgets='DONT_USE_GETS!'
(The quotes are for Unix.)
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
-- Beratung in industrieller Datenverarbeitung
Technical Details
Message-ID:
<KANZE.95Aug9103309@slsvhdt.lts.sel.alcatel.de>Path:
arc1-ca.pugleaf.net!xlink.net!slsv6bt!newsReferences:
<Pine.ULT.3.91.950807194041.19202A-100000@mars> <409hdq$ib2@goanna.cs.rmit.edu.au>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) Subject: Re: gets() and getchar In-Reply-To: ok@goanna.cs.rmit.edu.au's message of 9 Aug 1995 15:34:50 +1000 Message-ID: <KANZE.95Aug9103309@slsvhdt.lts.sel.alcatel.de> Sender: news@lts.sel.alcatel.de Organization: SEL References: <Pine.ULT.3.91.950807194041.19202A-100000@mars> <409hdq$ib2@goanna.cs.rmit.edu.au> Date: 09 Aug 1995 08:33:07 GMT