Subject: Re: Substitution of gets
To: Takuji Matsugaki <GBH01467@nifty.com>
From: Allen Briggs <briggs@wasabisystems.com>
List: port-mac68k
Date: 06/10/2002 21:41:14
On Tue, Jun 11, 2002 at 10:28:20AM +0900, Takuji Matsugaki wrote:
> This question may not fit for this mailing list.

For NetBSD, you could try tech-userlevel@netbsd.org, but I do not know a
good general-purpose programming list.

> What function or macro should I use as the substitive function of gets.

fgets() is what one usually uses instead.  The primary problem with
gets() is that it is subject to buffer overflows.  It is possible to
write safe code with fgets().

-allen

-- 
 Allen Briggs                     briggs@wasabisystems.com
 http://www.wasabisystems.com/    Quality NetBSD CDs, Sales, Support, Service
NetBSD development for Alpha, ARM, M68K, MIPS, PowerPC, SuperH, XScale, etc...