From 626304242f3f627de4aa08acea10ccd879660661 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 24 Mar 2023 04:30:38 -0700 Subject: [PATCH] Fix 2006/sloane for clang The problem was that the second arg was not of type char ** but an implicit int and broken record though I am clang forces the types to be correct without any option to disable this. As it happens though the second arg is not even used so I removed it as clang does allow this for some reason. This helps with keeping the original format as close as possible. This triggers a different warning but that's okay. I also added a warning to the README.md about how it is a lot of change in text very quickly as this could cause some problems for some people. --- 2006/sloane/README.md | 16 ++++++++++++++-- 2006/sloane/sloane.c | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/2006/sloane/README.md b/2006/sloane/README.md index 2806296b8..23dd68939 100644 --- a/2006/sloane/README.md +++ b/2006/sloane/README.md @@ -11,13 +11,25 @@ make ``` -### To run: +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this entry to +work with clang which is stricter on the type of args to main(). Curiously +although clang requires the types of args to be strictly correct it allows for +only one arg which he made it as the second arg was not used and this allows for +a closer match to the original format of the entry. Thank you Cody for your +assistance! + + +## To run: ```sh ./slone ``` -### Try: +WARNING: if you are easily overstimulated with fast movement or have +photosensitivity please be careful running this entry! + + +## Try: ```sh echo "Do or do not. There is no try." diff --git a/2006/sloane/sloane.c b/2006/sloane/sloane.c index b2f405699..cb8dae6c2 100644 --- a/2006/sloane/sloane.c +++ b/2006/sloane/sloane.c @@ -13,7 +13,7 @@ KXw{Y" "RsFwsFwsFw{zaqyaz|FmMpyaoyI\\]cuUw{J" "~|_."[c(6,"b" "cd\\a[g","^`" "_e" "]fh")+8], p( "#$%" "&'()*+,-.1"[ c(11 ,"_ac[]\\YZi" "jkm", "`bd^efghXWlV" )+13 - ]-34,a);}main (k,Z){ float z[1920] ,A=0 + ]-34,a);}main (k ){ float z[1920] ,A=0 ,B=0 ,i,j; puts("" "\x1b" "[2J");for(;; ) { float e=sin(A ), n= sin(B),g=cos( A),m =cos(B);for(k =0;k< 1840;k++)y=-k