fix .gitignore, Makefile and README.md for 2018/anderson

This commit is contained in:
Landon Curt Noll committed 2023-03-24 21:57:54 -07:00
1 parent 3c29fb76dd
commit 52576e3d69
3 files changed
+43 -32

No files matched your search

+1
View File
@@ -1 +1,2 @@
prog
prog.alt
+10 -10
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env make
#
# IOCCC 2018 winning entry - bellard
# IOCCC 2018 winning entry - anderson
################################################################################
#
@@ -63,7 +63,7 @@ X11_INCDIR= /opt/X11/include
# Common C compiler warnings to silence
#
#CSILENCE=
CSILENCE= -Wno-c99-extensions -Wno-gcc-compat -Wno-vla-extension
CSILENCE= -Wno-unsequenced
# 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
#
@@ -160,10 +160,11 @@ endif
# Special flags for this entry
##############################
#
ENTRY= bellard
ENTRY= anderson
PROG= prog
#
OBJ= ${PROG}.o
CSRC= ${PROG}.o
DATA=
TARGET= ${PROG}
#
@@ -185,14 +186,14 @@ 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}
# data files
#
data: ${DATA}
@@ -327,4 +328,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"
+32 -22
View File
@@ -1,50 +1,61 @@
# Most able to divine code gaps
Derek Anderson
Derek Anderson
`
# To build:
## To build:
```sh
make
```
make all
### To run:
### To run
./prog < textfile
```sh
./prog < textfile
```
### Try:
./prog < prog.c
./prog < prog.alt.c
./prog < README.md
```sh
./prog < prog.c
./prog < prog.alt.c
./prog < README.md
```
### Alternate code
### Alternate code:
An alternate version of this entry, prog.alt.c, is provided.
Compare `prog.c` and `prog.alt.c` and find out why we had to modify the entry, and what confused the author
(see the author's remarks). No, it was not the shape of the Roman V that we, or the compiler, didn't like.
An alternate version of this entry, `prog.alt.c`, is provided.
### Alternate code
Compare `prog.c` and `prog.alt.c` and find out why we had to modify
the entry, and what confused the author (see the author's remarks).
No, it was not the shape of the Roman V that we, or the compiler,
didn't like.
To compile this alternate version:
make alt
```sh
make alt
```
Use `prog.alt` as you would `prog` above.
### Selected Judges Remarks:
## Judges' comments:
With this entry, you won't need to turn your monitor [upside down](http://en.wikipedia.org/wiki/River_%28typography%29)!
## Author's comments:
## Compiling the program
### Compiling the program
gcc -Wall -Wextra -Wpedantic -O3 -std=c11 prog.c -o prog
```sh
cc -Wall -Wextra -Wpedantic -O3 -std=c11 prog.c -o prog
```
Also works with a standard of c99, but c90/c89 will not compile due to
for loop initial declarations, along with additional warnings about
variable length arrays and lack of a return statement.
## Additional info
### Additional info
This small program, when given text on stdin, will produce a pattern of
squiggly lines. This pattern is deterministic, and it shouldn't be too
@@ -75,11 +86,10 @@ variable assignment, such as `j=k`. There is some filler fluff, such as
added for the purpose of making certain things line up right, and only
secondarily to obfuscate.
--------------------------------------------------------------------------------
<!--
## Copyright:
(c) Copyright 1984-2018, [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/
-->