diff --git a/2001/coupard/Makefile b/2001/coupard/Makefile index fb4155958..b643be7e2 100644 --- a/2001/coupard/Makefile +++ b/2001/coupard/Makefile @@ -38,7 +38,7 @@ include ../../var.mk # Common C compiler warnings to silence # -CSILENCE= -Wno-empty-body -Wno-pointer-sign -Wno-return-type -Wno-deprecated-non-prototype +CSILENCE= -Wno-empty-body -Wno-pointer-sign -Wno-return-type -Wno-deprecated-non-prototype -Wno-implicit-int # Common C compiler warning flags # diff --git a/2001/coupard/coupard.c b/2001/coupard/coupard.c index 558e41be4..b5cf042b3 100644 --- a/2001/coupard/coupard.c +++ b/2001/coupard/coupard.c @@ -28,7 +28,7 @@ $",p[6789]; int o[]={145,1145,1745,2545,3045,4045,4345,5145,5745,6369},i=0,j=0,l=0; -void e(int n,int h){ +void e(n,h){ for(j=0;n>0;n-=!(p[j++]^9)); for(;!n&&j[p]^9;j++)write(1,p+p[j][o],o[p[j]+1]-p[j][o]); for(i=0;i` for `mmap()` and `munmap()`. - have `main()` call another function which is no longer a recursive function; @@ -1530,9 +1553,15 @@ Finally to see from start to finish: git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..4bc03de321612869aebf855850c6500df95cb6ef anonymous.c ``` +or to not use `git`: + +```sh +make diff_orig_prog +``` + Cody also added a [program](anonymous.bed.c) like [anonymous.ten.c](anonymous.ten.c) [Ten Green Bottles](https://en.wikipedia.org/wiki/Ten_Green_Bottles) but which -sings [Ten in the Bed](https://allnurseryrhymes.com/ten-in-the-bed/). +sings [Ten in the Bed](https://allnurseryrhymes.com/ten-in-the-bed/) instead. As well he added the [try.me.sh](2001/anonymous/try.me.sh) so that one can attempt to use the program as it was designed but if compiling as 32-bit fails @@ -1607,19 +1636,19 @@ void e(n,h){ ``` -One fix would be to disable that warning. Another one might be to change the C -standard. The one that was done, to make it more portable, was to just add 'int' -to the function parameters. +The easiest fix is to just disable the warning which is what was done. +Originally the code was changed to use `int` but to make it more like the +original this was undone. -Thanks go to Yusuke for providing a proper command line for macOS (to do with -sound; see his [/2013/endoh3/README.md](2013/endoh3/README.md) entry where he -also refers to sound devices in macOS). +Yusuke for providing a proper command line for macOS (to do with sound; see his +[/2013/endoh3/README.md](2013/endoh3/README.md) entry where he also refers to +sound devices in macOS). ## [2001/ctk](2001/ctk/ctk.c) ([README.md](2001/ctk/README.md])) The ANSI escape codes were no longer valid but Yusuke provided a patch to fix -the ANSI escape codes. This works with macOS as well. +the ANSI escape codes. Cody tested this for macOS and it works fine. ## [2001/dgbeards](2001/dgbeards/dgbeards.c) ([README.md](2001/dgbeards/README.md]))