Merge pull request #2044 from xexyl/endoh22012-try

Typo fix (comment) in 2012/endoh2/try.sh
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2024-01-24 15:33:39 -08:00
commit ce067a5d85
5 files changed
+16 -16

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2000/tomx
# try.sh - demonstrate IOCCC winner 2012/endoh2
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2000/tomx
# try.sh - demonstrate IOCCC winner 2012/grothe
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
+4 -4
View File
@@ -51,8 +51,8 @@ DFLT[2]="-DHEAD=COLOR_RED" # Head foreground: red (HEAD)
DFLT[3]="-DHB=COLOR_BLACK" # Head background: black (HB)
DFLT[4]="-DBODY=COLOR_GREEN" # Body foreground: green (BODY)
DFLT[5]="-DBS=COLOR_BLACK" # Body background: black (BS)
DFLT[6]="-DBG=COLOR_WHITE" # Bug foreground: white (BG)
DFLT[7]="-DBB=COLOR_BLACK" # Bug background: black (BB)
DFLT[6]="-DBG=COLOR_WHITE" # Bug foreground: white (BG)
DFLT[7]="-DBB=COLOR_BLACK" # Bug background: black (BB)
COLOURS[0]="-DWALL=COLOR_"
COLOURS[1]="-DWB=COLOR_"
COLOURS[2]="-DHEAD=COLOR_"
@@ -86,9 +86,9 @@ function configure_colours()
show_colours "${i}"
x="${?}"
if [[ "${x}" != 255 ]]; then
COLOURS[$j]="${COLOURS[$j]}${COLOUR[$x]}"
COLOURS[j]="${COLOURS[$j]}${COLOUR[$x]}"
else
COLOURS[$j]=${DFLT[$j]}
COLOURS[j]=${DFLT[$j]}
fi
j=$j+1
done
+8 -8
View File
@@ -78,26 +78,26 @@ function configure_colours()
for i in "WALL" "WALL (BACKGROUND)" "HEAD" "HEAD (BACKGROUND)" "BODY" "BODY (BACKGROUND)" "BUG" "BUG (BACKGROUND)"; do
show_colours "${i}"
x="${?}"
if [ "${x}" != 255 ]; then
COLOURS[$j]="${COLOURS[$j]}${COLOUR[$x]}"
if [[ "${x}" != 255 ]]; then
COLOURS[j]="${COLOURS[$j]}${COLOUR[$x]}"
else
COLOURS[$j]=${DFLT[$j]}
COLOURS[j]=${DFLT[$j]}
fi
j=$j+1
done
echo cc -o prog.alt prog.alt.c -D'f(a,b)'='((a)<(b)?(a):(b))' ${COLOURS[0]} ${COLOURS[1]} \
${COLOURS[2]} ${COLOURS[3]} ${COLOURS[4]} ${COLOURS[5]} ${COLOURS[6]} ${COLOURS[7]} -lncurses
echo cc -o prog.alt prog.alt.c -D'f(a,b)'='((a)<(b)?(a):(b))' "${COLOURS[0]}" "${COLOURS[1]}" \
"${COLOURS[2]}" "${COLOURS[3]}" "${COLOURS[4]}" "${COLOURS[5]}" "${COLOURS[6]}" "${COLOURS[7]}" -lncurses
cc -o prog.alt prog.alt.c -D'f(a,b)'='((a)<(b)?(a):(b))' ${COLOURS[0]} ${COLOURS[1]} \
${COLOURS[2]} ${COLOURS[3]} ${COLOURS[4]} ${COLOURS[5]} ${COLOURS[6]} ${COLOURS[7]} -lncurses || exit 1
cc -o prog.alt prog.alt.c -D'f(a,b)'='((a)<(b)?(a):(b))' "${COLOURS[0]}" "${COLOURS[1]}" \
"${COLOURS[2]}" "${COLOURS[3]}" "${COLOURS[4]}" "${COLOURS[5]}" "${COLOURS[6]}" "${COLOURS[7]}" -lncurses || exit 1
}
make
./termcaps
T="${?}"
if [ "${T}" -ne 0 ]; then
if [[ "${T}" -ne 0 ]]; then
read -rp "Terminal issues detected; do you wish to continue anyway (Y/N) ? " ans
[[ "${ans}" != "y" ]] && [[ "${ans}" != "Y" ]] && exit 1
fi
+2 -2
View File
@@ -29,7 +29,7 @@
- [3.3 - Why do some IOCCC winners fail to compile under macOS?](#faq3_3)
- [3.4 - Why does clang or gcc fail to compile an IOCCC winner?](#faq3_4)
- [3.5 - What is this cb tool that is mentioned in the IOCCC?](#faq3_5)
- [3.6 - An IOCCC winner missed by my terminal application, how do I fix this?](#faq3_6)
- [3.6 - An IOCCC winner messed up my terminal application, how do I fix this?](#faq3_6)
- [3.7 - How do I run an IOCCC winner that requires X11?](#faq3_7)
- [3.8 - How do I compile an IOCCC winner that requires SDL1 or SDL2?](#faq3_8)
- [3.9 - How do I compile an IOCCC winner that requires (n)curses?](#faq3_9)
@@ -876,7 +876,7 @@ judging the IOCCC. A Unix man page for `cb`
[still exists](https://www.ibm.com/docs/en/aix/7.3?topic=c-cb-command).
### <a name="faq3_6"></a>FAQ 3.6: An IOCCC winner missed by my terminal application, how do I fix this?
### <a name="faq3_6"></a>FAQ 3.6: An IOCCC winner messed up my terminal application, how do I fix this?
The simplest way to do this is to type `reset`. If echo was disabled you can get
usually away with `stty echo`. Sometimes you can also get away with `stty sane`.