retiring gets(3)

Badri Lokanathan badri at valhalla.ee.rochester.edu
Thu Nov 24 02:27:09 AEST 1988


In article <8959 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:
> In article <471 at gonzo.UUCP> daveb at gonzo.UUCP (Dave Brower) writes:
> >Moral:  There is _never_ a one shot test program.
> 
> That is simply untrue.  I've written scads of them over the years,
> probably an average of one per week.

I hate to add to a discussion that is going nowhere, but I must say
I agree with Doug. As part of my research I design and implement many
algorithms, most of which are modules for a bigger package. Almost all
of them have a

#ifdef DEBUG_MAIN
main() {
  .
  .
}
#endif DEBUG_MAIN

built into them for stand-alone debugging. Here, gets, puts, scanf are the
easiest way of I/O and I use them all the time. It does not make any
sense to worry about safe gets, coz' this part of the code is never going to
be used by anybody for purposes other than testing. Quick and easy is the way
to go.
-- 
"Don't blame me for wanting more         {) badri at ee.rochester.edu
 The facts are too hard to ignore       //\\ {ames,cmcl2,columbia,cornell,
 I'm scared to death of poverty        ///\\\ garp,harvard,ll-xn,rutgers}!
 I only want what's best for me."-UB40   /\    rochester!ur-valhalla!badri



More information about the Comp.lang.c mailing list