diff --git a/2000/anderson/anderson.c b/2000/anderson/anderson.c index 2e2af5632..422b4e358 100644 --- a/2000/anderson/anderson.c +++ b/2000/anderson/anderson.c @@ -1,5 +1,5 @@ #include - +#define gets(K) fgets((K)[1],1000,stdin) char *T="IeJKLMaYQCE]jbZRskc[SldU^V\\X\\|/_<[<:90!\"$434-./2>]s", K[3][1000],*F,x,A,*M[2],*J,r[4],*g,N,Y,*Q,W,*k,q,D;X(){r [r @@ -25,15 +25,12 @@ j((r[2]=0,R( )) ),r[1]-=q) && O(g-=-q) ;} C(){( J= -fgets (K -[1],1000,stdin))&&C((B(g=K[2]),*r=!(!*r&&(*g++=0)),(*r)[r]=g --K[2 -],g= -K[2] -,r[1 -]&&O -())) - ;;} +gets (&K +[1]))&&C((B(g=K[2]),*r=!(!*r&&(*g++=0)),(*r)[r]=g-K[2],g=K[2 +],r[ +1]&& +O()) +);;} main (){C ((l( diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 932410ceb..2d7a1d97d 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -856,6 +856,8 @@ Cody changed this entry to use `fgets()` instead of `gets()` to make it safer and to prevent annoying warnings from showing up at compiling, linking and/or runtime, the latter interspersed with the output of the program. +Cody later improved the fix to use `gets()` by redefining `gets()` so that the +code looks like before. ## [2000/briddlebane](2000/briddlebane/briddlebane.c) ([README.md](2000/briddlebane/README.md]))