fix .gitignore, Makefile and README.md for 2012/konno

Rename alt source file.
This commit is contained in:
Landon Curt Noll committed 2023-03-23 23:01:52 -07:00
1 parent 470a192219
commit 7d30702cbc
4 files changed
+33 -19

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
konno konno
konno_deobfuscate konno.alt
+8 -9
View File
@@ -104,8 +104,8 @@ CINCLUDE=
#CINCLUDE= -include stdlib.h #CINCLUDE= -include stdlib.h
#CINCLUDE= -include stdio.h #CINCLUDE= -include stdio.h
#CINCLUDE= -include stdlib.h -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h
#CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 #CINCLUDE= `${SDL2_CONFIG} --cflags`
# Optimization # Optimization
# #
@@ -129,7 +129,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
LIBS= LIBS=
#LIBS= -lm #LIBS= -lm
#LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${X11_LIBDIR} -lX11
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL2 #LIBS= `${SDL2_CONFIG} --libs`
# C compiler to use # C compiler to use
# #
@@ -170,8 +170,8 @@ OBJ= ${PROG}.o
DATA= DATA=
TARGET= ${PROG} TARGET= ${PROG}
# #
ALT_OBJ= ${PROG}_deobfuscate.o ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}_deobfuscate ALT_TARGET= ${PROG}.alt
################# #################
@@ -188,14 +188,14 @@ all: data ${TARGET}
${PROG}: ${PROG}.c ${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS} ${CC} ${CFLAGS} $< -o $@ ${LIBS}
${PROG}_deobfuscate: ${PROG}_deobfuscate.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable # alternative executable
# #
alt: data ${ALT_TARGET} alt: data ${ALT_TARGET}
@${TRUE} @${TRUE}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# data files # data files
# #
data: ${DATA} data: ${DATA}
@@ -330,4 +330,3 @@ pluto: charon
@echo "dwarf is a type of planet" @echo "dwarf is a type of planet"
@echo "therefore, $@ is a planet" @echo "therefore, $@ is a planet"
@echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them"
+24 -9
View File
@@ -4,30 +4,40 @@ Taketo Konno
Tokyo, Japan Tokyo, Japan
<inaniwa3@gmail.com> <inaniwa3@gmail.com>
## To build: # To build:
make all ```sh
make
```
### To run: ### To run:
```sh
./konno N ./konno N
# where N is 0 to 255 ```
NOTE: N is an integer from 0 to 255.
### Try: ### Try:
```sh
./konno 30 ./konno 30
```
### Alternate code ### Alternate code
An alternate version of this entry, konno_deobfuscate.c, is provided. This alternate code is an unobfuscated version of the winning code. An alternate version of this entry, `konno_alt.c`, is provided.
This alternate code is an unobfuscated version of the winning code.
To compile this alternate version: To compile this alternate version:
```sh
make alt make alt
```
Use `konno_deobfuscate` as you would `konno` above. Use `konno.alt` as you would `konno` above.
### Selected Judges Remarks: ## Judges' comments:
This entry is a good one-liner to analyze completely. This entry is a good one-liner to analyze completely.
@@ -42,11 +52,13 @@ This program outputs [elementary cellular automaton](http://mathworld.wolfram.co
Try: Try:
```sh
./konno 30 ./konno 30
./konno 90 ./konno 90
./konno 102 ./konno 102
./konno 109 ./konno 109
./konno 165 ./konno 165
```
There are 256 (from 0 to 255) possible rules. There are 256 (from 0 to 255) possible rules.
@@ -54,11 +66,15 @@ There are 256 (from 0 to 255) possible rules.
This program uses bit operations. I think This program uses bit operations. I think
```c
7&O<<!o>>!o+29 7&O<<!o>>!o+29
```
is an intersting operation. This isn't equal to is an intersting operation. This isn't equal to
```c
7&O>>29 7&O>>29
```
operation. What is the operation doing? operation. What is the operation doing?
@@ -66,11 +82,10 @@ operation. What is the operation doing?
This program assumes that the size of int is 4. This program assumes that the size of int is 4.
-------------------------------------------------------------------------------- ## Copyright:
<!--
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved (c) Copyright 1984-2015, [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]. This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html [judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/ [cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->
File renamed without changes.