diff --git a/2018/endoh1/.gitignore b/2018/endoh1/.gitignore index ea1749132..15117a0a3 100644 --- a/2018/endoh1/.gitignore +++ b/2018/endoh1/.gitignore @@ -1 +1,5 @@ +golem.gif +invisible.gif +output.gif prog +smily.gif diff --git a/2018/endoh1/Makefile b/2018/endoh1/Makefile index 52c6b95ab..fb34f0aae 100644 --- a/2018/endoh1/Makefile +++ b/2018/endoh1/Makefile @@ -62,8 +62,8 @@ X11_INCDIR= /opt/X11/include # Common C compiler warnings to silence # -#CSILENCE= -CSILENCE= -Wno-overlength-strings +CSILENCE= +#CSILENCE= -Wno-implicit-int # Common C compiler warning flags # @@ -101,8 +101,8 @@ CINCLUDE= #CINCLUDE= -include stdlib.h #CINCLUDE= -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h -#CINCLUDE= -I ${X11_INCDIR} -#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +#CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11 +#CINCLUDE= `${SDL2_CONFIG} --cflags` # Optimization # @@ -126,7 +126,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} LIBS= #LIBS= -lm #LIBS= -L ${X11_LIBDIR} -lX11 -#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL +#LIBS= `${SDL2_CONFIG} --libs` # C compiler to use # @@ -161,11 +161,12 @@ endif # Special flags for this entry ############################## # -ENTRY= XXX +ENTRY= endoh1 PROG= prog # OBJ= ${PROG}.o -DATA= +CSRC= ${PROG}.o +DATA= golem.txt smily.txt invisible.txt TARGET= ${PROG} # ALT_OBJ= @@ -214,6 +215,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f output.gif golem.gif smily.gif invisible.gif @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ @@ -325,4 +327,3 @@ pluto: charon @echo "dwarf is a type of planet" @echo "therefore, $@ is a planet" @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" - diff --git a/2018/endoh1/README.md b/2018/endoh1/README.md index dd9ff487c..721b76a90 100644 --- a/2018/endoh1/README.md +++ b/2018/endoh1/README.md @@ -1,22 +1,28 @@ # Best tool to reveal holes -Yusuke Endoh -Twitter: @mametter + Yusuke Endoh + Twitter: @mametter -## To build: +# To build: - make all +```sh +make +``` -### To run +### To run: - ./prog < textfile > output.gif +```sh +./prog < textfile > output.gif +``` ### Try: - ./prog < golem.txt > golem.gif - ./prog < smily.txt > smily.gif +```sh +./prog < golem.txt > golem.gif +./prog < smily.txt > smily.gif +``` -### Selected Judges Remarks: +## Judges' comments: To get the best experience, use a GIF viewer that can handle animated gifs. On OS X you can use Safari using "open -a Safari smily.gif" @@ -31,28 +37,34 @@ Unfortunately this won't run on your PDP8, if you had one, as it needs at least 2MiB of memory to run in. ## Author's comments: + This program generates an animated GIF from a plain text. Run: - gcc -o prog prog.c - ./prog < invisible.txt > invisible.gif +```sh +cc -o prog prog.c +./prog < invisible.txt > invisible.gif +``` Open invisible.gif and then wait a minute. You will see a hidden message. Can you tell the difference between letters that leaves the mark and ones that does not? Other examples: - ./prog < golem.txt > golem.gif - ./prog < smily.txt > smily.gif +```sh +./prog < golem.txt > golem.gif +./prog < smily.txt > smily.gif +``` The program itself has a hidden message. - ./prog < prog.c > prog.gif +```sh +./prog < prog.c > prog.gif +``` + +## Copyright: --------------------------------------------------------------------------------- -