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`.)
### Portability
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`.
### Tips
You may want to use `tput` to hide the terminal cursor.
+14 -1
View File
@@ -1,6 +1,19 @@
#!/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
# the cursor