Add 2000/dhyang/try.sh, make void main int main
The try.sh script is as usual: replaces what the judges recommended one try. It was suggested to me a while back that when I encounter a void main that I change it to int to be more portable so I have done that. README.md file typo/format checked. This should complete the review of 2000/dhyang.
This commit is contained in:
1 parent
c0a2eedb56
commit
1fc8a46cca
4 files changed
+62
-18
No files matched your search
+4
-17
@@ -15,20 +15,7 @@ make
|
||||
### Try:
|
||||
|
||||
```sh
|
||||
make saitou
|
||||
./saitou > aku.c
|
||||
cat aku.c
|
||||
|
||||
make soku
|
||||
./soku > soku.c
|
||||
cat soku.c
|
||||
|
||||
make zan
|
||||
./zan > zan.c
|
||||
cat zan.c
|
||||
|
||||
make aku
|
||||
./aku | diff - aku.c
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -53,9 +40,9 @@ them with cool layout!
|
||||
For your enjoyment:
|
||||
|
||||
1. Compile [dhyang.c](dhyang.c).
|
||||
2. Run `./dhyang` and pipe output to another .c file
|
||||
3. Compile that file
|
||||
4. Repeat steps 2 and 3 until eventually the output cycles
|
||||
2. Run `./dhyang` and pipe output to another `.c` file.
|
||||
3. Compile that file.
|
||||
4. Repeat steps 2 and 3 until eventually the output cycles.
|
||||
|
||||
To interpret the output: the [dhyang.c](dhyang.c.c) is an image of Saitou
|
||||
Hajime, which eventually generates three sources files that are images of "aku
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
x^(p?6:0):(p = 34 X X X )
|
||||
;}s(){for(x= n (); ( x^ ( p
|
||||
?6:0))==32;x= n () ) ;return x ; }
|
||||
void/**/main X () { r = p
|
||||
int/**/main X () { r = p
|
||||
=0;w=sprintf (X X X X X X o
|
||||
,"char*d="); for ( f=1;f < * d
|
||||
+143;)if(33-( b=d [ f++ X ] )
|
||||
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2000/dhyang
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
|
||||
echo "$ make saitou >/dev/null" 1>&2
|
||||
make saitou >/dev/null
|
||||
|
||||
echo "$ ./saitou > aku.c" 1>&2
|
||||
./saitou > aku.c
|
||||
|
||||
echo "$ cat aku.c"
|
||||
cat aku.c
|
||||
|
||||
echo "$ make soku >/dev/null" 1>&2
|
||||
make soku >/dev/null
|
||||
|
||||
echo "$ ./soku > soku.c" 1>&2
|
||||
./soku > soku.c
|
||||
|
||||
echo "$ cat soku.c" 1>&2
|
||||
cat soku.c
|
||||
|
||||
echo "$ make zan >/dev/null" 1>&2
|
||||
make zan >/dev/null
|
||||
|
||||
echo "$ ./zan > zan.c" 1>&2
|
||||
./zan > zan.c
|
||||
|
||||
echo "$ cat zan.c" 1>&2
|
||||
cat zan.c
|
||||
|
||||
echo "$ make aku >/dev/null" 1>&2
|
||||
make aku >/dev/null
|
||||
|
||||
echo "$ ./aku | diff - aku.c" 1>&2
|
||||
./aku | diff - aku.c
|
||||
Reference in new issue
Block a user