diff --git a/1990/cmills/cmills.c b/1990/cmills/cmills.c index d27a29b54..333938915 100644 --- a/1990/cmills/cmills.c +++ b/1990/cmills/cmills.c @@ -4,16 +4,17 @@ #define W(w)if((w)<22)v= -v;else v-=10;else #define F for(r=d;r1;){if(r-d>N*3/4){B(8));F++r)*r=c[(r-d)%13];F)w= *(g=d+rand()%N),*g= -*r,*r++=w;r=d;}for(;;){B(3),y);if(!fgets(l,M,stdin)||(w=atoi(l))<1)exit(0);if(w&1||w>M||w>y)B(1),yM||w>y)B(1),y=w/2&&u(5)&&(y+=(3*(h(0,1[q])==10)-1)*w/2);if(x==-21)goto _;if(v==-21){y+=w/2;goto diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index b85eb7fe5..4e6bf7d2f 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -380,7 +380,9 @@ To prevent alarming warnings at linking or runtime Cody made the entry use `fgets()` rather than `gets()`. He notes that another option would have been to redirect `stderr` to `/dev/null` but he did not think of that at the time. -For the original code see the [1992 archive](/archive/archive-1990.tar.bz2). +Cody later improved upon the `gets()`/`fgets()` fix to make it more like the +original where the code can refer to `gets()` in the way it originally did. This +was done through a macro to redefine `gets`. BTW: Cody asks the following question: if the compiler compiles, the linker links and the user executes does that make the compiler the jury, the linker the