diff --git a/2020/kurdyukov3/.gitignore b/2020/kurdyukov3/.gitignore index ea1749132..44815ac94 100644 --- a/2020/kurdyukov3/.gitignore +++ b/2020/kurdyukov3/.gitignore @@ -1 +1,3 @@ prog +prog.alt +prog.extra diff --git a/2020/kurdyukov3/Makefile b/2020/kurdyukov3/Makefile index b6684c684..7b54439f4 100644 --- a/2020/kurdyukov3/Makefile +++ b/2020/kurdyukov3/Makefile @@ -62,8 +62,8 @@ X11_INCDIR= /opt/X11/include # Common C compiler warnings to silence # -#CSILENCE= -CSILENCE= -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-unknown-warning-option +CSILENCE= +#CSILENCE= -Wno-implicit-int # Common C compiler warning flags # @@ -102,7 +102,7 @@ CINCLUDE= #CINCLUDE= -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h #CINCLUDE= -I ${X11_INCDIR} -#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +#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 # @@ -138,7 +138,8 @@ CC= cc # ifeq ($(CC),clang) # -CSILENCE+= -Wno-comma -Wno-conditional-uninitialized -Wno-poison-system-directories +CSILENCE+= -Wno-comma -Wno-conditional-uninitialized -Wno-poison-system-directories \ + -Wno-shorten-64-to-32 -Wno-sign-conversion # CWARN+= -Weverything # @@ -163,11 +164,11 @@ ENTRY= kurdyukov3 PROG= prog # OBJ= ${PROG}.o -DATA= +DATA= input.txt TARGET= ${PROG} # -ALT_OBJ= ${PROG}.alt.o -ALT_TARGET= ${PROG}.alt +ALT_OBJ= ${PROG}.alt.o ${PROG}.extra.o +ALT_TARGET= ${PROG}.alt ${PROG}.extra ################# @@ -184,14 +185,17 @@ all: data ${TARGET} ${PROG}: ${PROG}.c ${CC} ${CFLAGS} $< -o $@ ${LIBS} -${PROG}.alt: ${PROG}.alt.c - ${CC} ${CFLAGS} $< -o $@ ${LIBS} - # alternative executable # alt: data ${ALT_TARGET} @${TRUE} +${PROG}.alt: ${PROG}.alt.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +${PROG}.extra: ${PROG}.extra.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + # data files # data: ${DATA} @@ -326,3 +330,4 @@ 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/2020/kurdyukov3/README.md b/2020/kurdyukov3/README.md index 449b6794b..d32a5857d 100644 --- a/2020/kurdyukov3/README.md +++ b/2020/kurdyukov3/README.md @@ -1,32 +1,35 @@ # Bset slaml prragom +``` Ilya Kurdyukov Twitter: @ilyakurdyukov - - -The code for this entry can be found in prog.c - -## Judges' comments: +``` ## To build: - make all +```sh +make +``` -### To use: +### To run: - ./prog +```sh +./prog +``` ### Try: - # first input to try - echo first input to try | ./prog +```sh +# first input to try +echo first input to try | ./prog - # try reading this output - echo International Obfuscated C Code Contest | ./prog +# try reading this output +echo International Obfuscated C Code Contest | ./prog - # try reading this other output - ./prog < input.txt +# try reading this other output +./prog < input.txt +``` ### Alternate code @@ -34,7 +37,9 @@ There is an alternate version of this code in `prog.alt.c` where the main code i To compile this alternate version: - make alt +```sh +make alt +``` Use `prog.alt` as you would `prog` above. @@ -50,14 +55,16 @@ is it a pnuch crad)? Compile and try this: +```sh cat input.txt | ./prog +``` The program can work with letters that are not represented in English, as long as these letters are encoded in the higher part of the single-byte character set (use `iconv` to convert from UTF-8 and back). ------------------------------------------------------------------------------------------------------ +## Copyright: + (c) Copyright 1984-2020, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc]. [judges]: http://www.ioccc.org/judges.html [cc]: http://creativecommons.org/licenses/by-sa/3.0/ ------------------------------------------------------------------------------------------------------