Rename 2013/endoh4/run.sh to try.sh + formatting

I believe that this completes the review of 2013.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-04 08:33:39 -08:00
1 parent f904825e14
commit dcc3fc8f59
3 files changed
+21 -6

No files matched your search

+2
View File
@@ -65,11 +65,13 @@ This simple spec involves many details.
(Note that this program does not use `math.h`.) (Note that this program does not use `math.h`.)
### Portability ### Portability
I think it conforms with both C89 and C99. I confirmed that it worked on gcc, I think it conforms with both C89 and C99. I confirmed that it worked on gcc,
clang, and tcc. It should not be warned with `-pedantic` and `-Wextra`. clang, and tcc. It should not be warned with `-pedantic` and `-Wextra`.
### Tips ### Tips
You may want to use `tput` to hide the terminal cursor. You may want to use `tput` to hide the terminal cursor.
+14 -1
View File
@@ -1,6 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2013/endoh4
#
make all || exit 1 # 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
# set it so that when program is terminated through various signals we re-enable # set it so that when program is terminated through various signals we re-enable
# the cursor # the cursor
+5 -5
View File
@@ -3589,11 +3589,11 @@ The entry can still be enjoyed if you do not have these tools, however.
## [2013/endoh4](2013/endoh4/endoh4.c) ([README.md](2013/endoh4/README.md)) ## [2013/endoh4](2013/endoh4/endoh4.c) ([README.md](2013/endoh4/README.md))
[Cody](#cody) added the [run.sh](2013/endoh4/run.sh) script which temporarily turns off [Cody](#cody) added the [try.sh](2013/endoh4/try.sh) script which temporarily
the cursor as suggested by the author, with the addition that if no file is turns off the cursor as suggested by the author, with the addition that if no
specified it will feed the source code [endoh4.c](2013/endoh4/endoh4.c) to the file is specified it will feed the source code [endoh4.c](2013/endoh4/endoh4.c)
program rather than the file specified. It does not try and detect if the file to the program rather than the file specified. It does not try and detect if the
exists or can be read as that will be handled by the shell/program. file exists or can be read as that will be handled by the shell/program.
## [2013/hou](2013/hou/hou.c) ([README.md](2013/hou/README.md)) ## [2013/hou](2013/hou/hou.c) ([README.md](2013/hou/README.md))