From: jhallen@world.std.com (Joseph H Allen) Subject: Re: Gets() Considered Harmful (was: gets() messed up ?) Date: Sun, 7 Feb 1993 22:19:32 GMT
In article <ig25.728764248@fg70> ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig) writes:
>rob@cad4.lbl.gov (Robert J. McNamara) writes:
>
>>Hey folks....I've been having some trouble with a few sources: when compiling
>>I get a message:
>
>>/usr/tmp/cca010381.o: the `gets' function is unreliable and should not be used.
>
>>So what the heck does that mean? I'm using gcc 2.3.3 and libc 4.2 if it makes
>>a difference...
>
>Using gets() is a Bad Idea(tm).
>etc.
Some versions of gets() (Umax I believe), have a built-in 1K limit. I wish
they would would just do that in the GNU library and eliminate the stupid
warning.
--
/* jhallen@world.std.com (192.74.137.5) */ /* Joseph H. Allen */
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}