diff --git a/1984/anonymous/.gitignore b/1984/anonymous/.gitignore index ed6d4bce0..0e449506b 100644 --- a/1984/anonymous/.gitignore +++ b/1984/anonymous/.gitignore @@ -1 +1,2 @@ anonymous +anonymous.alt diff --git a/1984/anonymous/Makefile b/1984/anonymous/Makefile index eaa944037..dfea3a4a9 100644 --- a/1984/anonymous/Makefile +++ b/1984/anonymous/Makefile @@ -39,7 +39,8 @@ include ../../var.mk # Common C compiler warnings to silence # CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ - -Wno-return-type -Wno-string-plus-int -Wno-unsequenced + -Wno-return-type -Wno-string-plus-int -Wno-unsequenced \ + -Wno-deprecated-non-prototype -Wno-void-pointer-to-int-cast # Common C compiler warning flags # @@ -85,7 +86,8 @@ CC= cc ifeq ($(CC),clang) # CSILENCE+= -Wno-poison-system-directories -Wno-shadow -Wno-missing-prototypes \ - -Wno-strict-prototypes -Wno-missing-variable-declarations -Wno-pedantic + -Wno-strict-prototypes -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-void-pointer-to-int-cast # CWARN+= -Weverything # @@ -113,8 +115,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= -ALT_TARGET= +ALT_OBJ= ${PROG}.alt.o +ALT_TARGET= ${PROG}.alt ################# @@ -129,7 +131,6 @@ all: data ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c - @echo "NOTE: This entry most likely will not work under macOS." ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable @@ -137,6 +138,10 @@ ${PROG}: ${PROG}.c alt: data ${ALT_TARGET} @${TRUE} +${ALT_TARGET}: ${PROG}.alt.c + @echo "NOTE: This entry may not work on some systems." + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + # data files # data: ${DATA} diff --git a/1984/anonymous/README.md b/1984/anonymous/README.md index 020009c80..9b88a4a9f 100644 --- a/1984/anonymous/README.md +++ b/1984/anonymous/README.md @@ -1,6 +1,6 @@ # Dishonorable mention -Anonymous +Anonymous ## To build: @@ -21,6 +21,24 @@ it once did. Instead the second arg is a `void *`. In the `read()` function (which actually calls `write(2)`) the `i` (which is the `void *`) has to be cast to an `int`. This solves the problem. Thank you Cody for your assistance! +### Alternate code: + +The original version of this entry was added, by request, +in order to show the code that was turned into the [tattoo] +(https://web.archive.org/web/20070120220721/https://thomasscovell.com/tattoo.php). + +#### To build: + +```sh +make alt +``` + +#### To run: + +```sh +echo NOTE: This entry may not work on some systems. +./anonymous.alt +``` ## Judges' remarks: @@ -34,7 +52,7 @@ program. What reads like a read may be written like a write! In 2005 someone by the name of Thomas Scovell got a tattoo of this entry. See his [web page](https://web.archive.org/web/20070120220721/https://thomasscovell.com/tattoo.php) -for more information on the tattoo. This is what it looks like: +for more information on the tattoo. This is what it looks like: ![1984-anonymous-tattoo.jpg](1984-anonymous-tattoo.jpg) diff --git a/1984/anonymous/anonymous.alt.c b/1984/anonymous/anonymous.alt.c new file mode 100644 index 000000000..a8681d1e5 --- /dev/null +++ b/1984/anonymous/anonymous.alt.c @@ -0,0 +1,2 @@ +int i;main(){for(;i["]