Bug fix 2012/vik/try.sh

The additional commands I added cannot come first because the program
(as the bugs.md states and now more clearly) will likely crash (and does
in all the systems I tested) if the file does not exist. This did not
show itself the first time because the files already existed but running
make clobber before the script would remove the image files and thus a
crash (or actually two) would occur the first time the script was run
(second time it would be fine as the files it uses then exist).
This commit is contained in:
Cody Boone Ferguson committed 2024-01-26 11:09:51 -08:00
1 parent 6f4167373f
commit 479601899b
3 files changed
+19 -22

No files matched your search

+12 -12
View File
@@ -15,18 +15,6 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
read -r -n 1 -p "Press any key to embed chocolate in chocolate-in-ioccc.png: "
echo 1>&2
echo "$ ./vik e chocolate-in-ioccc.png \"Mmm... chocolate.\" > mmm-chocolate.png" 1>&2
./vik e chocolate-in-ioccc.png "Mmm... chocolate." > mmm-chocolate.png
echo 1>&2
read -r -n 1 -p "Press any key to extract chocolate from mmm-chocolate.png: "
echo 1>&2
echo "$ ./vik d mmm-chocolate.png" 1>&2
./vik d mmm-chocolate.png
echo 1>&2
read -r -n 1 -p "Press any key to embed chocolate.png in ioccc.png: "
echo 1>&2
echo "$ ./vik e ioccc.png chocolate.png > chocolate-in-ioccc.png" 1>&2
@@ -39,6 +27,18 @@ echo "$ ./vik e chocolate.png ioccc.png > ioccc-in-chocolate.png"
./vik e chocolate.png ioccc.png > ioccc-in-chocolate.png
echo 1>&2
read -r -n 1 -p "Press any key to embed chocolate in chocolate-in-ioccc.png: "
echo 1>&2
echo "$ ./vik e chocolate-in-ioccc.png \"Mmm... chocolate.\" > mmm-chocolate.png" 1>&2
./vik e chocolate-in-ioccc.png "Mmm... chocolate." > mmm-chocolate.png
echo 1>&2
read -r -n 1 -p "Press any key to extract chocolate from mmm-chocolate.png: "
echo 1>&2
echo "$ ./vik d mmm-chocolate.png" 1>&2
./vik d mmm-chocolate.png
echo 1>&2
read -r -n 1 -p "Press any key to embed a brainfuck program as a text file and decode it: "
echo 1>&2
echo "$ ./vik e ioccc.png .+[.+] > encodedimg.png" 1>&2
+3 -3
View File
@@ -3019,12 +3019,12 @@ will likely dump core.
### Information: [2012/vik/README.md](2012/vik/README.md)
The author stated that the program will crash if no argument is passed to the
program or if invalid arguments or images of mismatching sizes or unsupported
pixel formats though we note that your computer might also [halt and catch
program or if invalid arguments (e.g. file does not exist) or images of
mismatching sizes or unsupported pixel formats though we note that your computer
might also [halt and catch
fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)) :-)
# 2013
## 2013 cable2
+4 -7
View File
@@ -3838,14 +3838,11 @@ Cody also added the [try.sh](/2012/omoikane/try.sh) and
## <a name="2012_vik"></a>[2012/vik](/2012/vik/vik.c) ([README.md](/2012/vik/README.md]))
[Cody](#cody) added the [try.sh](/2012/vik/try.sh) script.
Based on the author's description it should be able to get this entry to work
for Windows. With his instructions Cody added the alternate version that does
this for the few who might use Windows.
We're not sure whether we want to thank Cody or not for this :-) and he's not
sure if he wants to be thanked either :-) but we appreciate it nonetheless.
Cody also added the [try.sh](/2012/vik/try.sh) script.
for Windows. With his instructions Cody also added the alternate version that
does this for the few who might use Windows.
## <a name="2012_zeitak"></a>[2012/zeitak](/2012/zeitak/zeitak.c) ([README.md](/2012/zeitak/README.md]))