diff --git a/1987/1987.tar.bz2 b/1987/1987.tar.bz2
index 37cd2ae20..9150522e6 100644
Binary files a/1987/1987.tar.bz2 and b/1987/1987.tar.bz2 differ
diff --git a/1987/Makefile b/1987/Makefile
index 5948a73e0..8884f6634 100644
--- a/1987/Makefile
+++ b/1987/Makefile
@@ -1,9 +1,45 @@
#!/usr/bin/env make
#
-# 1987 makefile
+# 1987 Makefile
+
+################################################################################
#
-# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
-# is licensed under:
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
#
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
#
@@ -15,43 +51,78 @@
################
#
SHELL= /bin/bash
-CP= cp
-CPP= cpp
-GUNZIP= gunzip
-LD= ld
MAKE= make
-RM= rm
-SED= sed
-TAR= tar
-TRUE= true
-
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
-
-# ANSI compiler
-#
-# Set CC to the name of your ANSI compiler.
-#
-CC= cc
###############
# IOCCC winners
###############
#
-WINNERS= heckbert wall westley hines korn biggar lievaart
+WINNERS= biggar heckbert hines korn lievaart wall westley
+
+YEAR= 1987
###################
# build all entries
###################
#
all:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
@for i in ${WINNERS} ; do \
- echo "(cd $$i && $(MAKE) OPSYS=${OPSYS} $@)"; \
- (cd $$i && $(MAKE) "OPSYS=${OPSYS}" $@); \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+.PHONY: all alt data everything clean clobber install \
+ love haste waste maker easter_egg sandwich \
+ supernova deep_magic magic charon pluto
+
+# alternative executable
+#
+alt:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+# data files
+#
+data:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+# both all and alt
+#
+everything:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
###############
@@ -59,19 +130,189 @@ all:
###############
#
clean:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
@for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
clobber:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
@for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
install:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
@for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+indent.c:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+haste:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+waste:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+maker:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+easter_egg:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+sandwich:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+
+# The IOCCC resident astronomer states
+#
+supernova:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+deep_magic:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+magic:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+charon:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
+
+pluto:
+ @echo '=-=-= ${YEAR} begin make $@ =-=-='
+ @echo
+ @for i in ${WINNERS} ; do \
+ echo "=-= start ${YEAR}/$$i =-="; \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ echo "=-= end ${YEAR}/$$i =-="; \
+ echo; \
+ done
+ @echo '=-=-= ${YEAR} complete make $@ =-=-='
diff --git a/1987/biggar/Makefile b/1987/biggar/Makefile
index ada5c3cd3..46f5683cb 100644
--- a/1987/biggar/Makefile
+++ b/1987/biggar/Makefile
@@ -1,32 +1,593 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - biggar
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= biggar
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-biggar: biggar.c
- cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" \
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+#CWARN= -Wall -Wextra ${CSILENCE}
+CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-extra-semi
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= biggar
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o
+DATA=
+TARGET= ${PROG}
+#
+ALT_OBJ=
+ALT_TARGET=
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ ${CC} ${CFLAGS} -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" \
-DP="main(){X}" -DR="read(0,&c,1)" -DT="c!=015" \
- -DW="while(C)I" -DX="char c;W" $? -o $@
+ -DW="while(C)I" -DX="char c;W" $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/biggar/hint.html b/1987/biggar/hint.html
deleted file mode 100644
index cdcb5e963..000000000
--- a/1987/biggar/hint.html
+++ /dev/null
@@ -1,44 +0,0 @@
-Best Abuse of the Rules
-
-Mark Biggar
-UNiSYS - System Development Group, Santa Monica
-2525 Colorado AV MD 91-01
-Santa Monica, CA
-90406
-
-Judges' comments:
-
-To build:
-
-cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" -DP="main(){X}"\
--DR="read(0,&c,1)" -DT="c!=015" -DW="while(C)I" -DX="char c;W" markb.c
-
-
-Passes BSD and UTS lint. At least one version of lint is thrown into
-an infinite loop by this entry.
-
-Try:
-
-... | markb | od -c (remember to compile as indicated above)
-
-
-By changing the compile line you can make this program do anything you
-want. This is a very efficient way to transfer source, though it
-increases the size of Makefiles.
-
-With only slight variations, this program can be set to many uses.
-Consider how easy it would be to release Un*x source in this form;
-so what if the make files grow a little! :-)
-
-One vendor’s lint got hung in an infinite loop over this entry!
-
-FYI: We will let Mark get away with this truly sick entry this time, but
-for the future on we have placed a limit on the size of a compile line.
-
-Also see our comment in Larry Wall’s entry regarding Mark’s contribution.
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/biggar/hint.text b/1987/biggar/hint.txt
similarity index 97%
rename from 1987/biggar/hint.text
rename to 1987/biggar/hint.txt
index 91cf8b559..ebfb95c17 100644
--- a/1987/biggar/hint.text
+++ b/1987/biggar/hint.txt
@@ -6,6 +6,10 @@ UNiSYS - System Development Group, Santa Monica
Santa Monica, CA
90406
+## To build:
+
+ make all
+
## Judges' comments:
### To build:
diff --git a/1987/biggar/index.html b/1987/biggar/index.html
new file mode 100644
index 000000000..95b3db012
--- /dev/null
+++ b/1987/biggar/index.html
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Best Abuse of the Rules
+Mark Biggar
+UNiSYS - System Development Group, Santa Monica
+2525 Colorado AV MD 91-01
+Santa Monica, CA
+90406
+To build:
+ make all
+
+To build:
+cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" -DP="main(){X}"\
+-DR="read(0,&c,1)" -DT="c!=015" -DW="while(C)I" -DX="char c;W" markb.c
+Passes BSD and UTS lint. At least one version of lint is thrown into
+an infinite loop by this entry.
+Try:
+... | markb | od -c (remember to compile as indicated above)
+By changing the compile line you can make this program do anything
+you want. This is a very efficient way to transfer source, though it
+increases the size of Makefiles.
+With only slight variations, this program can be set to many uses.
+Consider how easy it would be to release Un*x source in this form; so
+what if the make files grow a little! :-)
+One vendor’s lint got hung in an infinite loop over this entry!
+
+FYI: We will let Mark get away with this truly sick entry this time,
+but for the future on we have placed a limit on the size of a compile
+line.
+
+Also see our comment in Larry Wall’s entry regarding Mark’s
+contribution.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/biggar/orig.Makefile b/1987/biggar/orig.Makefile
new file mode 100644
index 000000000..ada5c3cd3
--- /dev/null
+++ b/1987/biggar/orig.Makefile
@@ -0,0 +1,32 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= biggar
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+biggar: biggar.c
+ cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" \
+ -DP="main(){X}" -DR="read(0,&c,1)" -DT="c!=015" \
+ -DW="while(C)I" -DX="char c;W" $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/1987/heckbert/Makefile b/1987/heckbert/Makefile
index 286328f3b..20caa3474 100644
--- a/1987/heckbert/Makefile
+++ b/1987/heckbert/Makefile
@@ -1,30 +1,596 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - heckbert
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= heckbert
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-heckbert: heckbert.c
- cc ${OPSYS} $? -o $@
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+CWARN= -Wall -Wextra ${CSILENCE}
+#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-empty-body -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \
+ -Wno-int-to-pointer-cast -Wno-logical-op-parentheses
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= heckbert
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o
+DATA=
+TARGET= ${PROG}
+#
+ALT_OBJ= ${PROG}.orig.o
+ALT_TARGET= ${PROG}.orig
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+${PROG}.orig: ${PROG}.orig.c
+ @echo "NOTE: The original source may not compile using modern compilers."
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/heckbert/heckbert.c b/1987/heckbert/heckbert.c
index ccdb7e0b7..858f5d8c7 100644
--- a/1987/heckbert/heckbert.c
+++ b/1987/heckbert/heckbert.c
@@ -1,9 +1,8 @@
#include
#include
-#define _ define
-#_ A putchar
-#_ B return
-#_ C index
+#define A putchar
+#define B return
+#define C index
char*r,c[300001],*d=">=<=!===||&&->++-->><<",*i,*l,*j,*m,*k,*n,*h,*y;e,u=1,v,w,
f=1,p,s,x;main(a,b)char**b;{p=a>1?atoi(b[1]):79;r=c+read(0,j=l=i=c,300000);v=g(
j,&m);for(k=m;v!=2;j=k,m=n,v=w,k=m){w=g(k,&n);if(v==1&&m-j==1&&*j==35)e&&A(10),
diff --git a/1987/heckbert/heckbert.orig.c b/1987/heckbert/heckbert.orig.c
new file mode 100644
index 000000000..ccdb7e0b7
--- /dev/null
+++ b/1987/heckbert/heckbert.orig.c
@@ -0,0 +1,18 @@
+#include
+#include
+#define _ define
+#_ A putchar
+#_ B return
+#_ C index
+char*r,c[300001],*d=">=<=!===||&&->++-->><<",*i,*l,*j,*m,*k,*n,*h,*y;e,u=1,v,w,
+f=1,p,s,x;main(a,b)char**b;{p=a>1?atoi(b[1]):79;r=c+read(0,j=l=i=c,300000);v=g(
+j,&m);for(k=m;v!=2;j=k,m=n,v=w,k=m){w=g(k,&n);if(v==1&&m-j==1&&*j==35)e&&A(10),
+e=f=0;if(!f&&v==3&&(char*)C(j,10)2&&(u||w)&&(f||u)&&
+(l-i>1||*i!=61||n-k>1||!C("-*&",*k)))continue;else if(v==3)if(f&&e+1+n-k>p&&e)A
+(10),e=0;else A(32),e++;else{if(f&&e+m-j>p&&e)A(10),e=0;e+=m-j;k=j;while(k=r)B*m=j,2;s=isdigit(*j)||
+*j==46&&isdigit(j[1]);for(h=j;hj)B*m=h,0;x=1;for(h=j;hj)h--,x=3;if(*j==34||*j==39)for(h=j+1;hBest Obfuscator of Programs
-
-Paul Heckbert
-Pixar
-
-Judges' comments:
-
-Try:
-
-ph 40 < ph.c > foo.c; cc foo.c -o ph
-ph 20 < a_C_prog.c > bar.c; cc bar.c
-
-
-The judges used this program to fold up very long lines which the
-BSD fold(1) was unable to process. This program has been added
-to the contest tool chest.
-
-On System V systems, compile with: -Dindex=strchr
-To compile on a 16 bit machine, change 300000’s to 30000.
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/heckbert/hint.text b/1987/heckbert/hint.txt
similarity index 83%
rename from 1987/heckbert/hint.text
rename to 1987/heckbert/hint.txt
index 445b201e4..8042262f9 100644
--- a/1987/heckbert/hint.text
+++ b/1987/heckbert/hint.txt
@@ -3,6 +3,12 @@
Paul Heckbert
Pixar
+## To build:
+
+ make all
+
+NOTE: The original entry may be built with "make alt".
+
## Judges' comments:
@@ -17,6 +23,8 @@ to the contest tool chest.
On System V systems, compile with: `-Dindex=strchr`
To compile on a 16 bit machine, change 300000's to 30000.
+NOTE: This entry requires a non-standard K&R C compiler to compile.
+
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
All Rights Reserved. Permission for personal, educational or non-profit use is
granted provided this this copyright and notice are included in its entirety
diff --git a/1987/heckbert/index.html b/1987/heckbert/index.html
new file mode 100644
index 000000000..8431179e1
--- /dev/null
+++ b/1987/heckbert/index.html
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Best Obfuscator of Programs
+Paul Heckbert
+Pixar
+To build:
+ make all
+NOTE: The original entry may be built with “make alt”.
+
+Try:
+ph 40 < ph.c > foo.c; cc foo.c -o ph
+ph 20 < a_C_prog.c > bar.c; cc bar.c
+The judges used this program to fold up very long lines which the BSD
+fold(1) was unable to process. This program has been added to the
+contest tool chest.
+On System V systems, compile with: -Dindex=strchr To
+compile on a 16 bit machine, change 300000’s to 30000.
+NOTE: This entry requires a non-standard K&R C compiler to
+compile.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/heckbert/orig.Makefile b/1987/heckbert/orig.Makefile
new file mode 100644
index 000000000..286328f3b
--- /dev/null
+++ b/1987/heckbert/orig.Makefile
@@ -0,0 +1,30 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= heckbert
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+heckbert: heckbert.c
+ cc ${OPSYS} $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/1987/hines/Makefile b/1987/hines/Makefile
index 11abeda39..03b0bcb4c 100644
--- a/1987/hines/Makefile
+++ b/1987/hines/Makefile
@@ -1,30 +1,595 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - hines
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= hines
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-hines: hines.c
- cc $? -o $@
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+#CWARN= -Wall -Wextra ${CSILENCE}
+CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-error -Wno-implicit-function-declaration
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= hines
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o
+DATA=
+TARGET= ${PROG}
+#
+ALT_OBJ= ${PROG}.orig.o
+ALT_TARGET= ${PROG}.orig
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+${PROG}.orig: ${PROG}.orig.c
+ @echo "NOTE: The original source may not compile using modern compilers."
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/hines/hines.c b/1987/hines/hines.c
index 9b6beea39..8e4d2c0bf 100644
--- a/1987/hines/hines.c
+++ b/1987/hines/hines.c
@@ -1,12 +1,12 @@
#include
-#include
+#include
main(togo,toog)
int togo;
char *toog[];
{char *ogto, tgoo[80];FILE *ogot; int oogt=0, ootg, otog=79,
ottg=1;if ( togo== ottg) goto gogo; goto goog; ggot:
if ( fgets( tgoo, otog, ogot)) goto gtgo; goto gott;
-gtot: exit(); ogtg: ++oogt; goto ogoo; togg: if ( ootg > 0)
+gtot: exit(0); ogtg: ++oogt; goto ogoo; togg: if ( ootg > 0)
goto oggt; goto ggot; ogog: if ( !ogot) goto gogo;
goto ggto; gtto: printf( "%d goto \'s\n", oogt); goto
gtot; oggt: if ( !memcmp( ogto, "goto", 4)) goto otgg;
diff --git a/1987/hines/hines.orig.c b/1987/hines/hines.orig.c
new file mode 100644
index 000000000..9b6beea39
--- /dev/null
+++ b/1987/hines/hines.orig.c
@@ -0,0 +1,19 @@
+#include
+#include
+main(togo,toog)
+int togo;
+char *toog[];
+{char *ogto, tgoo[80];FILE *ogot; int oogt=0, ootg, otog=79,
+ottg=1;if ( togo== ottg) goto gogo; goto goog; ggot:
+if ( fgets( tgoo, otog, ogot)) goto gtgo; goto gott;
+gtot: exit(); ogtg: ++oogt; goto ogoo; togg: if ( ootg > 0)
+goto oggt; goto ggot; ogog: if ( !ogot) goto gogo;
+goto ggto; gtto: printf( "%d goto \'s\n", oogt); goto
+gtot; oggt: if ( !memcmp( ogto, "goto", 4)) goto otgg;
+goto gooo; gogo: exit( ottg); tggo: ootg= strlen(tgoo);
+goto tgog; oogo: --ootg; goto togg; gooo: ++ogto; goto
+oogo; gott: fclose( ogot); goto gtto; otgg: ogto= ogto +3;
+goto ogtg; tgog: ootg-=4;goto togg; gtgo: ogto= tgoo;
+goto tggo; ogoo: ootg-=3;goto gooo; goog: ogot= fopen(
+toog[ ottg], "r"); goto ogog; ggto: ogto= tgoo; goto
+ggot;}
diff --git a/1987/hines/hint.html b/1987/hines/hint.html
deleted file mode 100644
index 25adc4180..000000000
--- a/1987/hines/hint.html
+++ /dev/null
@@ -1,29 +0,0 @@
-Worst Style
-
-Spencer Hines
-OnLine Computer Systems
-4200 Farragut Street
-Hyattsville, MD
-20781
-USA
-
-Judges' comments:
-
-Try:
-
-hines hines.c
-
-
-This program was designed to maximize the bother function for
-structured programmers. This program takes goto statements to their
-logical conclusion. The layout and choice of names are classic.
-
-We consider this to be a beautiful counter-example for Frank Rubin’s
-letter to ACM form titled: “GOTO Considered Harmful” Considered Harmful.
-See the Communications of the ACM, March 1987, Page 195-196.
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/hines/hint.text b/1987/hines/hint.txt
similarity index 85%
rename from 1987/hines/hint.text
rename to 1987/hines/hint.txt
index 640c73a24..87362df8e 100644
--- a/1987/hines/hint.text
+++ b/1987/hines/hint.txt
@@ -7,6 +7,12 @@ Hyattsville, MD
20781
USA
+## To build:
+
+ make all
+
+NOTE: The original entry may be built with "make alt".
+
## Judges' comments:
### Try:
@@ -21,6 +27,8 @@ We consider this to be a beautiful counter-example for Frank Rubin's
letter to ACM form titled: *"GOTO Considered Harmful" Considered Harmful*.
See the Communications of the ACM, March 1987, Page 195-196.
+NOTE: To compile with modern compilers, you make need to: make alt.
+
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
All Rights Reserved. Permission for personal, educational or non-profit use is
granted provided this this copyright and notice are included in its entirety
diff --git a/1987/hines/index.html b/1987/hines/index.html
new file mode 100644
index 000000000..01027ade5
--- /dev/null
+++ b/1987/hines/index.html
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Worst Style
+Spencer Hines
+OnLine Computer Systems
+4200 Farragut Street
+Hyattsville, MD
+20781
+USA
+To build:
+ make all
+NOTE: The original entry may be built with “make alt”.
+
+Try:
+hines hines.c
+This program was designed to maximize the bother function for
+structured programmers. This program takes goto statements to their
+logical conclusion. The layout and choice of names are classic.
+We consider this to be a beautiful counter-example for Frank Rubin’s
+letter to ACM form titled: “GOTO Considered Harmful” Considered
+Harmful. See the Communications of the ACM, March 1987, Page
+195-196.
+NOTE: To compile with modern compilers, you make need to: make
+alt.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/hines/orig.Makefile b/1987/hines/orig.Makefile
new file mode 100644
index 000000000..11abeda39
--- /dev/null
+++ b/1987/hines/orig.Makefile
@@ -0,0 +1,30 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= hines
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+hines: hines.c
+ cc $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/1987/index.html b/1987/index.html
new file mode 100644
index 000000000..ca39da7f4
--- /dev/null
+++ b/1987/index.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+ README
+
+
+
+
+1987 marked the “The Fourth International Obfuscated C Code
+Contest”
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+The rules for 1987 suggested even more categories than in 1986. Hints
+for what to do and not to do were also given in the rules. For example,
+a simple excessive abuse of /lib/cpp was discouraged unless the abuse
+was unusual. The mailboxes for the contest were moved from nsc to
+amdahl. The practice of posting a preliminary set of rules for the next
+year was started this year.
+Rules and results were posted to comp.lang.c, comp.unix.wizards with
+an announcement in news.announce.important. Micro/Systems Journal
+published the 1987 winners. Mark Horton included a version of the 1987
+winners in an appendix of his C book. The first announcement of winners
+at the Summer 87 Usenix was helped by a small fly that danced all over
+the foils.
+
+
diff --git a/1987/korn/Makefile b/1987/korn/Makefile
index 30c4e2b00..7ff3b05d0 100644
--- a/1987/korn/Makefile
+++ b/1987/korn/Makefile
@@ -1,30 +1,592 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - korn
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= korn
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-korn: korn.c
- cc $? -o $@
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+#CWARN= -Wall -Wextra ${CSILENCE}
+CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Dunix=1 \
+ -Wno-string-plus-int
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= korn
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o
+DATA=
+TARGET= ${PROG}
+#
+ALT_OBJ=
+ALT_TARGET=
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/korn/hint.html b/1987/korn/hint.html
deleted file mode 100644
index 8d87b6b6b..000000000
--- a/1987/korn/hint.html
+++ /dev/null
@@ -1,56 +0,0 @@
-Best One Liner
-
-David Korn
-AT&T Bell Labs
-MH 3C-526B, AT&T Bell Labs
-Murray Hill, NJ
-07974
-USA
-
-Judges' comments:
-
-The Judges believe that this is the best one line entry ever received.
-Compile on a UN*X system, or at least using a C implementation that
-fakes it. Very few people are able to determine what this program
-does by visual inspection. I suggest that you stop reading this
-section right now and see if you are one of the few people who can.
-
-Several points are important to understand in this program:
-
-1) What is the symbol ‘unix’ and what is its value in the program?
- Clearly ‘unix’ is not a function, and since ‘unix’ is not declared
- to be a data type (such as int, char, struct foo, enum, …)
- what must ‘unix’ be?
-
-2) What is the value of the symbol “have”? (hint: the value is
- NOT 4 characters, or ‘h’, or a string) Consider the fact that:
-
- char *x;
-
-
- defines a pointer to a character (i.e. an address), and that
- the ‘=’ assigns things is compatible types. Since:
-
- x = "have";
-
-
- is legal C, what type of value is “have”?
-
-3) Note that the following expressions yield the same value:
-
- x[3] *(x+3) *(3+x)
-
-
- since addition is communitive. What can be said about the value:
-
- 3[x]
-
-
-David Korn’s /bin/ksh provides us with a greatly improved version of
-the /bin/sh. The source for v7’s /bin/sh greatly inspired this contest.
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/korn/hint.text b/1987/korn/hint.txt
similarity index 98%
rename from 1987/korn/hint.text
rename to 1987/korn/hint.txt
index 1f748e0e5..f934bd868 100644
--- a/1987/korn/hint.text
+++ b/1987/korn/hint.txt
@@ -7,6 +7,10 @@ Murray Hill, NJ
07974
USA
+## To build:
+
+ make all
+
## Judges' comments:
The Judges believe that this is the best one line entry ever received.
diff --git a/1987/korn/index.html b/1987/korn/index.html
new file mode 100644
index 000000000..2940032e2
--- /dev/null
+++ b/1987/korn/index.html
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Best One Liner
+David Korn
+AT&T Bell Labs
+MH 3C-526B, AT&T Bell Labs
+Murray Hill, NJ
+07974
+USA
+To build:
+ make all
+
+The Judges believe that this is the best one line entry ever
+received. Compile on a UN*X system, or at least using a C implementation
+that fakes it. Very few people are able to determine what this program
+does by visual inspection. I suggest that you stop reading this section
+right now and see if you are one of the few people who can.
+Several points are important to understand in this program:
+
+What is the symbol ‘unix’ and what is its value in the program?
+Clearly ‘unix’ is not a function, and since ‘unix’ is not declared to be
+a data type (such as int, char, struct foo, enum, …) what must ‘unix’
+be?
+What is the value of the symbol “have”? (hint: the value is NOT 4
+characters, or ‘h’, or a string) Consider the fact that:
+ char *x;
+
+defines a pointer to a character (i.e. an address), and that the ‘=’
+assigns things is compatible types. Since:
+ x = "have";
+is legal C, what type of value is “have”?
+
+Note that the following expressions yield the same value:
+ x[3] *(x+3) *(3+x)
+since addition is communitive. What can be said about the value:
+ 3[x]
+
+David Korn’s /bin/ksh provides us with a greatly improved version of
+the /bin/sh. The source for v7’s /bin/sh greatly inspired this
+contest.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/korn/orig.Makefile b/1987/korn/orig.Makefile
new file mode 100644
index 000000000..30c4e2b00
--- /dev/null
+++ b/1987/korn/orig.Makefile
@@ -0,0 +1,30 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= korn
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+korn: korn.c
+ cc $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/1987/lievaart/Makefile b/1987/lievaart/Makefile
index 06208e66b..24921ca33 100644
--- a/1987/lievaart/Makefile
+++ b/1987/lievaart/Makefile
@@ -1,33 +1,602 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - lievaart
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= lievaart lievaart2
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-lievaart: lievaart.c
- cc $? -o $@
-# not an official entry
-lievaart2: lievaart2.c
- cc $? -o $@
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+CWARN= -Wall -Wextra ${CSILENCE}
+#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= lievaart
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o ${PROG}2.o
+DATA=
+TARGET= ${PROG} ${PROG}2
+#
+ALT_OBJ= ${PROG}.orig.o ${PROG}2.orig.o
+ALT_TARGET= ${PROG}.orig ${PROG}2.orig
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+${PROG}2: ${PROG}2.c
+ ${CC} ${CFLAGS} -Wno-format $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+${PROG}.orig: ${PROG}.orig.c
+ @echo "NOTE: The original source may not compile using modern compilers."
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+${PROG}2.orig: ${PROG}2.orig.c
+ @echo "NOTE: The original source may not compile using modern compilers."
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/lievaart/hint.html b/1987/lievaart/hint.html
deleted file mode 100644
index 855a0f5de..000000000
--- a/1987/lievaart/hint.html
+++ /dev/null
@@ -1,36 +0,0 @@
-Grand Prize
-
-Roemer B. Lievaart
-VU Informatica
-Churchilllaan 173-IV
-Amsterdam, The Netherlands
-
-Judges' remarks:
-
-We believe that you too will be amazed at just how much power Mr. Lievaart
-packed into 1024 bytes!
-
-This Plays the game of reversi (Othello)! Compile and run. It then
-asks for a playing level. Enter 0-10 (easy-hard). It then asks for
-your move. A move is a number within 11-88, or a 99 to pass. Illegal
-moves (except for an illegal pass) are rejected. Then the computer
-does its move (or a 0 to pass), until the board is full.
-
-It plays rather well, for such a small program! Lievaart had to leave out the
-board printing routine, so you’ll have to take a real game board to
-play it. … Also due to space-limitations (the rules for 1987 had a
-limit of 1024 byes), Lievaart took out the passing-handler, which
-makes its ending-game rather poor. But further it knows all the
-rules, uses alpha-beta pruning, and it plays f.i. on mobility(!).
-Most important: it can play a pretty good game of Reversi!
-
-The Author was kind enough to supply the fully functional version of the
-program. The file lievaart2.c contains what the program would have
-been without the size restriction. This version has the full end game
-logic and displays the board after each move!
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/lievaart/hint.text b/1987/lievaart/hint.txt
similarity index 91%
rename from 1987/lievaart/hint.text
rename to 1987/lievaart/hint.txt
index 753f85a42..4fdb929ff 100644
--- a/1987/lievaart/hint.text
+++ b/1987/lievaart/hint.txt
@@ -5,6 +5,11 @@ VU Informatica
Churchilllaan 173-IV
Amsterdam, The Netherlands
+## To build:
+
+ make all
+
+NOTE: The original entry may be built with "make alt".
## Judges' remarks:
@@ -30,6 +35,8 @@ program. The file lievaart2.c contains what the program would have
been without the size restriction. This version has the full end game
logic and displays the board after each move!
+NOTE: This entry requires a non-standard K&R C compiler to compile.
+
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
All Rights Reserved. Permission for personal, educational or non-profit use is
granted provided this this copyright and notice are included in its entirety
diff --git a/1987/lievaart/index.html b/1987/lievaart/index.html
new file mode 100644
index 000000000..9476a239c
--- /dev/null
+++ b/1987/lievaart/index.html
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Grand Prize
+Roemer B. Lievaart
+VU Informatica
+Churchilllaan 173-IV
+Amsterdam, The Netherlands
+To build:
+ make all
+NOTE: The original entry may be built with “make alt”.
+
+We believe that you too will be amazed at just how much power
+Mr. Lievaart packed into 1024 bytes!
+This Plays the game of reversi (Othello)! Compile and run. It then
+asks for a playing level. Enter 0-10 (easy-hard). It then asks for your
+move. A move is a number within 11-88, or a 99 to pass. Illegal moves
+(except for an illegal pass) are rejected. Then the computer does its
+move (or a 0 to pass), until the board is full.
+It plays rather well, for such a small program! Lievaart had to leave
+out the board printing routine, so you’ll have to take a real game board
+to play it. … Also due to space-limitations (the rules for 1987 had a
+limit of 1024 byes), Lievaart took out the passing-handler, which makes
+its ending-game rather poor. But further it knows all the rules, uses
+alpha-beta pruning, and it plays f.i. on mobility(!). Most important: it
+can play a pretty good game of Reversi!
+The Author was kind enough to supply the fully functional version of
+the program. The file lievaart2.c contains what the program would have
+been without the size restriction. This version has the full end game
+logic and displays the board after each move!
+NOTE: This entry requires a non-standard K&R C compiler to
+compile.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/lievaart/lievaart.c b/1987/lievaart/lievaart.c
index 0a2473823..90df1a3fa 100644
--- a/1987/lievaart/lievaart.c
+++ b/1987/lievaart/lievaart.c
@@ -1,12 +1,11 @@
-#define D define
-#D Y return
-#D R for
-#D e while
-#D I printf
-#D l int
-#D C y=v+111;H(x,v)*y++= *x
-#D H(a,b)R(a=b+11;au){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50
diff --git a/1987/lievaart/lievaart.orig.c b/1987/lievaart/lievaart.orig.c
new file mode 100644
index 000000000..0a2473823
--- /dev/null
+++ b/1987/lievaart/lievaart.orig.c
@@ -0,0 +1,20 @@
+#define D define
+#D Y return
+#D R for
+#D e while
+#D I printf
+#D l int
+#D C y=v+111;H(x,v)*y++= *x
+#D H(a,b)R(a=b+11;au){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50
+:t==q?50:0;return w;}H(z,0){if(GZ(v,z,f,100)){c++;w= -S(d+1,n,q,-b,-bw);if(w>bw
+){zb=z;bw=w;if(w>=b||w>=8003)Y w;}}}if(!c){bz=0;C;Y-S(d+1,n,q,-b,-bw);}bz=zb;Y
+d>=u-1?bw+(c<<3):bw;}main(){R(;t<1100;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88
+||(m+1)%10<2?3:0;V[44]=V[55]=1;V[45]=V[54]=2;I("Level:");s(u);e(lv>0){do{I("Yo\
+u:");s(m);}e(!GZ(V,m,2,0)&&m!=99);if(m!=99)lv--;if(lv<15&&u<10)u+=2;I("Wait\n")
+;I("Value:%d\n",S(0,V,1,-9000,9000));I("move: %d\n",(lv-=GZ(V,bz,1,0),bz));}}GZ
+(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,h,*k=v+z;if(*k==0)R(i=7;i>=0;i--){j=k+(h=r[i]);e(
+*j==q)j+=h;if(*j==f&&j-h!=k){if(!g){g=1;C;}e(j!=k)*((j-=h)+o)=f;}}Y g;}
diff --git a/1987/lievaart/lievaart2.c b/1987/lievaart/lievaart2.c
index 086799bca..cb05bfc59 100644
--- a/1987/lievaart/lievaart2.c
+++ b/1987/lievaart/lievaart2.c
@@ -1,15 +1,14 @@
-#define D define
-#D Y return
-#D R for
-#D e while
-#D I printf
-#D l int
-#D W if
-#D C y=v+111;H(x,v)*y++= *x
-#D H(a,b)R(a=b+11;au){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50:
+t==q?50:0;Y w;}H(z,0){W(E(v,z,f,100)){c++;w= -S(d+1,n,q,0,-b,-j);W(w>j){g=bz=z;
+j=w;W(w>=b||w>=8003)Y w;}}}W(!c){g=0;W(_){H(x,v)c+= *x==f?1:*x==3-f?-1:0;Y c>0?
+8000+c:c-8000;}C;j= -S(d+1,n,q,1,-b,-j);}bz=g;Y d>=u-1?j+(c<<3):j;}main(){R(;t<
+1600;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88||(m+1)%10<2?3:0;I("Level:");V[44]
+=V[55]=1;V[45]=V[54]=2;s(u);e(lv>0){Z do{I("You:");s(m);}e(!E(V,m,2,0)&&m!=99);
+W(m!=99)lv--;W(lv<15&&u<10)u+=2;U("Wait\n");I("Value:%d\n",S(0,V,1,0,-9000,9000
+));I("move: %d\n",(lv-=E(V,bz,1,0),bz));}}E(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,w,*k=v
++z;W(*k==0)R(i=7;i>=0;i--){j=k+(w=r[i]);e(*j==q)j+=w;W(*j==f&&j-w!=k){W(!g){g=1
+;C;}e(j!=k)*((j-=w)+o)=f;}}Y g;}
diff --git a/1987/lievaart/orig.Makefile b/1987/lievaart/orig.Makefile
new file mode 100644
index 000000000..06208e66b
--- /dev/null
+++ b/1987/lievaart/orig.Makefile
@@ -0,0 +1,33 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= lievaart lievaart2
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+lievaart: lievaart.c
+ cc $? -o $@
+# not an official entry
+lievaart2: lievaart2.c
+ cc $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/1987/orig.Makefile b/1987/orig.Makefile
new file mode 100644
index 000000000..5948a73e0
--- /dev/null
+++ b/1987/orig.Makefile
@@ -0,0 +1,77 @@
+#!/usr/bin/env make
+#
+# 1987 makefile
+#
+# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
+# is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
+
+
+################
+# tool locations
+################
+#
+SHELL= /bin/bash
+CP= cp
+CPP= cpp
+GUNZIP= gunzip
+LD= ld
+MAKE= make
+RM= rm
+SED= sed
+TAR= tar
+TRUE= true
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+CC= cc
+
+
+###############
+# IOCCC winners
+###############
+#
+WINNERS= heckbert wall westley hines korn biggar lievaart
+
+###################
+# build all entries
+###################
+#
+all:
+ @for i in ${WINNERS} ; do \
+ echo "(cd $$i && $(MAKE) OPSYS=${OPSYS} $@)"; \
+ (cd $$i && $(MAKE) "OPSYS=${OPSYS}" $@); \
+ done
+
+
+###############
+# utility rules
+###############
+#
+clean:
+ @for i in ${WINNERS} ; do \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ done
+
+clobber:
+ @for i in ${WINNERS} ; do \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ done
+
+install:
+ @for i in ${WINNERS} ; do \
+ echo "(cd $$i && $(MAKE) $@)"; \
+ (cd $$i && $(MAKE) $@); \
+ done
diff --git a/1987/rules.html b/1987/rules.html
new file mode 100644
index 000000000..cb0642912
--- /dev/null
+++ b/1987/rules.html
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+ rules
+
+
+
+
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+WARNING: The rules and mailing address for the contest change from
+year to year. Be sure that you consult the current set of rules before
+submitting entries. ——————————————————————————
+Subject: 4th International Obfuscated C Code Contest Rules
+Newsgroups: comp.lang.c,comp.unix.wizards Keywords:
+rules,1987,obfuscate,contest
+GOALS OF THE CONTEST:
+* To write the most Obscure/Obfuscated C program under the rules below.
+* To show what should NOT be done in C programs.
+* To provide a safe forum for poor C code. :-)
+RULES: 1) The source must be 1024 characters long or less. NO
+EXCEPTIONS!
+2) To help us process your entries, we ask that you submit entries
+ in the following format: (please include the --- lines)
+—start of header items— name: org: email address: postal address:
+environment: remarks: —start of entry— X <place obfuscated source of
+1024 characters or less here> X
+ X
+<leading X’s do not count toward the source character count> X
+ X
+<newlines count as 1 character> X <assume a standard 8
+character tab stop> —end of entry—
+3) Regarding the header items:
+
+ * All header items except 'remark' are optional. If you do not
+ wish to answer an item, indicate so by the string: ***NONE***
+ Any text outside of the above format will be kept confidential.
+
+ * You can remain anonymous. If the name item is: ***ANONYMOUS***
+ all items except the 'remarks' item will not be relased.
+
+ * Indicate the name of your Company or School in the 'org' item.
+
+ * The 'email address' item asks for a network path from a major
+ site (such as amdahl) to your mailbox.
+
+ * If you give a 'postal address', please include your Country.
+
+ * Give the machine and operating system (i.e., Un*x version) on
+ which your program ran.
+
+ * The 'remarks' item is not optional. Please indicate:
+ - how to execute or compile if something special is required
+ - type of input or argument needed, if applicable
+ - what this program does
+ - any other remarks you wish to make
+
+ * If you need more than one line on a header item, place
+ tab or space characters at the beginning of each additional line.
+
+4) The entry should be written in a common C. (K&R + common extensions)
+
+5) The program must be of original work. All programs must be
+ in the public domain. All copyrighted programs will be rejected.
+
+6) Entries must be received before 30-May-87 0:00 GMT.
+ Email your entries to:
+
+ ...!amdahl!obfuscate
+
+ Amdahl talks to hplabs, decwrl, pyramid, seismo and cbosgd.
+ We will attempt to Email a confirmation of receipt of contest
+ entries, however since Email is not reliable you may not receive it.
+ People are encouraged to submit entries via Email, however
+ one may mail entries the following postal address:
+
+ Landon Curt Noll
+ Amdahl Corp.
+ 1250 E. Arques Ave. M/S 316
+ P.O. Box 3470
+ Sunnyvale, CA
+ 94088-3470
+ U.S.A.
+
+ Write the words: "International Obfuscated C Code Contest" near the
+ bottom left corner of the envelope.
+
+8) Contest entries sent in by post should indicate where TAB characters
+ are to be placed, otherwise space characters will be assumed. Each
+ line will be assumed to contain a newline character. The leading
+ 'X' will serve to indicate where each source line starts.
+
+9) Each person may submit up to 5 entries. Multiple entries must
+ be sent in separate Email letters or postal envelopes.
+
+10) People are encouraged to examine winners of the previous
+ contests. A copy of these entries was posted to mod.sources
+ on or about 12-Mar-87. Contact the mod.sources moderator
+ if you missed that article. Keep in mind that rules change from
+ year to year, so some winning entries may not be valid
+ entries this year. Also what was unique and novel one
+ year can get 'old' the next year.
+ANNOUNCEMENT OF WINNERS:
+* First announcement will be at the Summer 87 Usenix BOF.
+
+* An announcement will be posted to mod.announce near
+ mid June 1987 stating to which newsgroup the winners
+ have been posted.
+
+* An article containing the winning entries will be published
+ in a future issue of the "Micro/Systems Journal".
+
+* Winners receive international fame and flames! :-)
+JUDGING: Awards will be given to the best entry in a number of
+categories. The actual category list will vary depending on the types of
+entries we receive. At the moment, we are considering using the
+following:
+ * The best small one line program
+ * The most obscure algorithm
+ * The worst abuse of the C preprocessor (note warnings below)
+ * The strangest source layout
+ * The most useful obfuscated program
+ * <anything else so strange that it deserves an award>
+
+Extra points will be given for programs which:
+
+ * pass lint without complaint
+ * do something quasi-interesting
+ * are portable
+ * are unique in their obfuscation style
+ * are concise
+
+Points will be taken away for programs that:
+
+ * are very hardware or Un*x version specific
+ * dump core or have compiler warnings
+ (we won't take points away if you warn us in the remark item)
+ * fail to compile
+ * obfuscate only by overuse of #defines
+ (you should do this ONLY if your use is unusual)
+ * are similar to previous winners
+ * are similar to previous losers :-)
+
+The Judging will be done by Landon Noll and Larry Bassel.
+Comments & questions (not entries) about the contest can be Emailed to:
+
+ ...!amdahl!judges
+chongo //
+Larry Bassel
+
+
diff --git a/1987/wall/Makefile b/1987/wall/Makefile
index 6b28cdcb5..2c78a16fb 100644
--- a/1987/wall/Makefile
+++ b/1987/wall/Makefile
@@ -1,30 +1,593 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - wall
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= wall
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-wall: wall.c
- cc $? -o $@
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+CWARN= -Wall -Wextra ${CSILENCE}
+#CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \
+ -Wno-incompatible-library-redeclaration -Wno-return-type -Wno-string-plus-int \
+ -Wno-unknown-escape-sequence
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= wall
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o
+DATA=
+TARGET= ${PROG}
+#
+ALT_OBJ=
+ALT_TARGET=
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/wall/hint.html b/1987/wall/hint.html
deleted file mode 100644
index 62a3cdc69..000000000
--- a/1987/wall/hint.html
+++ /dev/null
@@ -1,35 +0,0 @@
-Most Useful Obfuscation
-
-Larry Wall
-Unisys - System Development Group Santa Monica
-9132 Kester Ave
-Panorama City, CA 91402 USA
-
-Judges' comments:
-
-Try:
-
-lwall | bc | lwall
-input: x*x
-input: c^2
-
-
-Also try:
-
-lwall | bc and lwall | cat
-
-
-What we found amazing was how the flow of control was transferred
-between subroutines. Careful inspection will show that the array of
-pointers to functions named ‘vi’ refers to functions which seem to not
-be directly called. Even so, these pointers to functions are being
-used as an argument to signal. Can you determine why this is being
-done and how it is being exploited?
-
-Some compilers complained about this file, so we changed: ‘=++I’ to ‘= ++I’.
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/wall/hint.text b/1987/wall/hint.txt
similarity index 97%
rename from 1987/wall/hint.text
rename to 1987/wall/hint.txt
index 63903a1c1..fe7af6870 100644
--- a/1987/wall/hint.text
+++ b/1987/wall/hint.txt
@@ -5,6 +5,10 @@ Unisys - System Development Group Santa Monica
9132 Kester Ave
Panorama City, CA 91402 USA
+## To build:
+
+ make all
+
## Judges' comments:
### Try:
diff --git a/1987/wall/index.html b/1987/wall/index.html
new file mode 100644
index 000000000..b241f7cfb
--- /dev/null
+++ b/1987/wall/index.html
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Most Useful Obfuscation
+Larry Wall
+Unisys - System Development Group Santa Monica
+9132 Kester Ave
+Panorama City, CA 91402 USA
+To build:
+ make all
+
+Try:
+lwall | bc | lwall
+input: x*x
+input: c^2
+Also try:
+lwall | bc and lwall | cat
+What we found amazing was how the flow of control was transferred
+between subroutines. Careful inspection will show that the array of
+pointers to functions named ‘vi’ refers to functions which seem to not
+be directly called. Even so, these pointers to functions are being used
+as an argument to signal. Can you determine why this is being done and
+how it is being exploited?
+Some compilers complained about this file, so we changed: ‘=++I’ to
+‘= ++I’.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/wall/orig.Makefile b/1987/wall/orig.Makefile
new file mode 100644
index 000000000..6b28cdcb5
--- /dev/null
+++ b/1987/wall/orig.Makefile
@@ -0,0 +1,30 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= wall
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+wall: wall.c
+ cc $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/1987/westley/Makefile b/1987/westley/Makefile
index 6681478ee..76529a70b 100644
--- a/1987/westley/Makefile
+++ b/1987/westley/Makefile
@@ -1,30 +1,592 @@
-# %W% %G% %U%
+#!/usr/bin/env make
#
-# 1987 makefile
+# IOCCC 1987 winning entry - westley
+
+################################################################################
#
-# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
-# All Rights Reserved. Permission for personal, educational or non-profit
-# use is granted provided this this copyright and notice are included in its
-# entirety and remains unaltered. All other uses must receive prior permission
-# from Landon Curt Noll and Larry Bassel.
+# An Historical Makefile NOTE:
+#
+# The orig.Makefile, if it exits, is the original Makefile before this IOCCC
+# year directory was reworked so that entries are in separate directories.
+# This also applies to any orig.ansi.mk and orig.common.mk files.
+#
+# Several Makefiles were modified / formed in 2022, and as such it may have
+# elements that are not historically compatible with way entries were built.
+# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
+#
+# Regarding individual entries:
+#
+# IOCCC winning entry code may not work on your system. Even with standards,
+# conditions and build environments change, especially when it comes to more
+# extreme code such you might find in an IOCCC winner. Moreover, what was
+# allowed and liked in one IOCCC contest may no longer be liked/allowed in
+# later IOCCC years.
+#
+# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
+#
+# GitHub pull requests are welcome:
+#
+# If you have a patch that might make running an entry work in modern Unix-like
+# environments, please create a GitHub pull request for the IOCCC judgess to
+# consider.
+#
+# Suggestions and corrections regarding Makefiles, winning author information,
+# fixing typos in remarks, and code patches are welcome via opening a GitHub
+# issue or better yet, by creating a GitHub pull request for the IOCCC judges
+# to consider. To form a GitHub issue or GitHub pull, please visit:
+#
+# https://github.com/ioccc-src/winner
+#
+################################################################################
+
+# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
+#
+# Creative Commons Attribution-ShareAlike 3.0 Unported License.
+#
+# See: http://creativecommons.org/licenses/by-sa/3.0/
-SHELL= /bin/sh
-WINNERS= westley
+#############################
+# shell used by this Makefile
+#############################
+#
+SHELL= /bin/bash
-# for System V style systems
-OPSYS= -Dindex=strchr
-# for BSD style systems
-#OPSYS=
+#######################
+# common tool locations
+#######################
+#
+A2P= a2p
+AR= ar
+ASA= asa
+AT= at
+ATQ= atq
+ATRM= atrm
+AWK= awk
+BANNER= banner
+BASE64= base64
+BASENAME= basename
+BATCH= batch
+BC= bc
+BINHEX= binhex
+BISON= bison
+BUNZIP2= bunzip2
+BZCAT= bzcat
+BZCMP= bzcmp
+BZDIFF= bzdiff
+BZEGREP= bzegrep
+BZFGREP= bzfgrep
+BZGREP= bzgrep
+BZIP2= bzip2
+BZLESS= bzless
+BZMORE= bzmore
+C2PH= c2ph
+C89= c89
+C99= c99
+CAL= cal
+CALC= calc
+CAT= cat
+CD= cd
+CHFLAGS= chflags
+CHGRP= chgrp
+CHMOD= chmod
+CKSUM= cksum
+CLANG= clang
+CLANG_PLUSPLUS= clang++
+CLEAR= clear
+CMP= cmp
+COL= col
+COLLDEF= colldef
+COLRM= colrm
+COLUMN= column
+COMPRESS= compress
+CP= cp
+CPIO= cpio
+CPP= cpp
+CRC32= crc32
+CSH= csh
+CSPLIT= csplit
+CURL= curl
+CUT= cut
+C_PLUSPLUS= c++
+C_PLUSPLUS_FILT= c++filt
+DATE= date
+DC= dc
+DD= dd
+DF= df
+DIFF3= diff3
+DIFF= diff
+DIG= dig
+DIRNAME= dirname
+ED= ed
+EGREP= egrep
+ENV= env
+EQN= eqn
+ETAGS= etags
+EXPECT= expect
+EXPR= expr
+FALSE= false
+FGREP= fgrep
+FILE= file
+FIND2PERL= find2perl
+FIND= find
+FLEX= flex
+FLEX_PLUSPLUS= flex++
+FMT= fmt
+FOLD= fold
+FS_USAGE= fs_usage
+FUNZIP= funzip
+FUSER= fuser
+GCC= gcc
+GDIFFMK= gdiffmk
+GENCAT= gencat
+GENSTRINGS= genstrings
+GETOPT= getopt
+GETOPTS= getopts
+GNUMAKE= gnumake
+GREP= grep
+GROFF= groff
+GROFFER= groffer
+GROG= grog
+GROPS= grops
+GROTTY= grotty
+GUNZIP= gunzip
+GVIM= gvim
+GZCAT= gzcat
+GZEXE= gzexe
+GZIP_PROG= gzip
+G_PLUSPLUS= g++
+H2PH= h2ph
+H2XS= h2xs
+HASH= hash
+HEAD= head
+HOSTNAME_PROG= hostname
+ICONV= iconv
+ID= id
+INDENT= indent
+INFO= info
+JOT= jot
+KILL= kill
+KSH= ksh
+LAST= last
+LD= ld
+LESSECHO= lessecho
+LEX= len
+LINK= link
+LN= ln
+LS= ls
+M4= m4
+MAKE= make
+MAN= man
+MKDIR= mkdir
+MKFIFo= mkfifo
+MKTEMP= mktemp
+MV= mv
+NANO= nano
+NASM= nasm
+NEQN= neqn
+NICE= nice
+NL= nl
+NM= nm
+NOHUP= nohup
+NROFF= nroff
+NSLOOKUP= nslookup
+OD= od
+OPENSSL= openssl
+PASTE= paste
+PATCH= patch
+PATHCHK= pathchk
+PAX= pax
+PERL= perl
+PICO= pico
+PR= pr
+PRINTENV= printenv
+PS= ps
+PTAR= ptar
+PTARDIFF= ptardiff
+PTARGREP= ptargrep
+PWD= pwd
+PYDOC= pydoc
+PYTHON= python
+PYTHONW= pythonw
+READLINK= readlink
+RENICE= renice
+RESET= reset
+REV= rev
+RI= ri
+RM= rm
+RMDIR= rmdir
+RSYNC= rsync
+RUBY= ruby
+RVIM= rvim
+SAY= say
+SCP= scp
+SCREEN= screen
+SCRIPT= script
+SDIFF= sdiff
+SED= sed
+SEQ= seq
+SFTP= sftp
+SH= sh
+SHA1= sha1
+SHA= sha
+SHAR= shar
+SHASUM5_18= shasum5.18
+SHASUM= shasum
+SIZE= size
+SLEEP= sleep
+SORT= sort
+SSH= ssh
+STAT= stat
+STRIP= strip
+STTY= stty
+SUM= sum
+SYNC= sync
+TABS= tabs
+TAIL= tail
+TAR= tar
+TEE= tee
+TEST= test
+TFTP= tftp
+TIDY= tidy
+TIME= time
+TOP= top
+TOUCH= touch
+TPUT= tout
+TPUT= tput
+TR= tr
+TROFF= troff
+TRUE= true
+TSET= tset
+TSORT= tsort
+UL= ul
+UNAME= uname
+UNCOMPRESS= uncompress
+UNEXPAND= unexpand
+UNIFDEF= unifdef
+UNIFDEFALL= unifdefall
+UNIQ= uniq
+UNITS= units
+UNLINK= unlink
+UNZIP= unzip
+UNZIPSFX= unzipsfx
+UPTIME= uptime
+UUDECODE= uudecode
+UUENCODE= uuencode
+UUIDGEN= uuidgen
+VI= vi
+VIEW= view
+VIM= vim
+VIMDIFF= vimdiff
+W= w
+WAIT4PATH= wait4path
+WAIT= wait
+WC= wc
+WGET= wget
+WHAT= what
+WHATIS= whatis
+WHICH= which
+WHO= who
+WHOAMI= whoami
+WHOIS= whois
+WRTIE= write
+XAR= xar
+XARGS= xargs
+XATTR= xattr
+XXD= xxd
+YACC= yacc
+YES= yes
+ZCAT= zcat
+ZCMP= zcmp
+ZDIFF= zdiff
+ZEGREP= zegrep
+ZFGREP= zfgrep
+ZFORCE= zforce
+ZGREP= zgrep
+ZIP= zip
+ZIPCLOAK= zipcloak
+ZIPGREp= zipgrep
+ZIPINFo= zipinfo
+ZIPNOTE= zipnote
+ZIPSPLIT= zipsplit
+ZLESS= zless
+ZMORE= zmore
+ZNEW= znew
+ZPRINT= zprint
+ZSH= zsh
-all: ${WINNERS}
+# Set X11_LIBDIR to the directory where the X11 library resides
+#
+#X11_LIBDIR= /usr/X11R6/lib
+#X11_LIBDIR= /usr/X11/lib
+X11_LIBDIR= /opt/X11/lib
-westley: westley.c
- cc $? -o $@
+# Set X11_INCLUDEDIR to the directory where the X11 include files reside
+#
+#X11_INCDIR= /usr/X11R6/include
+#X11_INCDIR= /usr/X11/include
+X11_INCDIR= /opt/X11/include
+
+# Compiler warnings
+#
+#CWARN=
+#CWARN= -Wall
+#CWARN= -Wall -Wextra
+#CWARN= -Wall -Wextra ${CSILENCE}
+CWARN= -Wall -Wextra -pedantic ${CSILENCE}
+#CWARN= -Wall -Wextra -Weverything
+#CWARN= -Wall -Wextra -Weverything -pedantic
+#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE}
+
+# Silence warnings that ${CWARN} would normally complain about
+#
+CSILENCE= -Wno-for-loop-analysis -Wno-unused-value
+#CSILENCE= -Wno-implicit-int
+
+# compiler standard
+#
+#CSTD=
+#CSTD= -ansi
+CSTD= -std=gnu89
+
+# compiler bit architecture
+#
+# Some entries require 32-bitness:
+# ARCH= -m32
+#
+# Some entries require 64-bitness:
+# ARCH= -m64
+#
+# By default we assume nothing:
+#
+ARCH=
+
+# defines that are needed to compile
+#
+CDEFINE=
+#CDEFINE= -DIOCCC=26
+
+# include files that are needed to compile
+#
+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
+
+# optimization
+#
+# Most compiles will safely use -O2. Some can use only -O1 or -O.
+# A few compilers have broken optimizers or this entry make break
+# under those buggy optimizers and thus you may not want anything.
+# Reasonable compilers will allow for -O3.
+#
+#OPT=
+#OPT= -O
+#OPT= -O1
+#OPT= -O2
+OPT= -O3
+
+# default flags for ANSI C compilation
+#
+CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
+
+# Libraries needed to build
+#
+LIBS=
+#LIBS= -lm
+#LIBS= -L ${X11_LIBDIR} -lX11
+#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
+
+# ANSI compiler
+#
+# Set CC to the name of your ANSI compiler.
+#
+# Some entries seem to need gcc. If you have gcc, set
+# both CC and MAY_NEED_GCC to gcc.
+#
+# If you do not have gcc, set CC to the name of your ANSI compiler, and
+# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
+# to disable such programs.
+#
+CC= cc
+#CC=clang
+MAY_NEED_GCC= gcc
+
+
+##############################
+# Special flags for this entry
+##############################
+#
+ENTRY= westley
+PROG= ${ENTRY}
+#
+OBJ= ${PROG}.o
+DATA=
+TARGET= ${PROG}
+#
+ALT_OBJ=
+ALT_TARGET=
+
+
+#################
+# build the entry
+#################
+#
+all: ${DATA} ${TARGET}
+ @${TRUE}
+
+.PHONY: alt data everything clean clobber nuke dist_clean \
+ install build love haste waste make easter_egg \
+ supernova deep_magic magic charon pluto
+
+${PROG}: ${PROG}.c
+ @echo "NOTE: This entry requires a non-standard K&R C compiler to compile."
+ ${CC} ${CFLAGS} $< -o $@ ${LIBS}
+
+# alternative executable
+#
+alt: ${DATA} ${ALT_TARGET}
+ @${TRUE}
+
+# data files
+#
+data: ${DATA}
+ @${TRUE}
+
+
+###############
+# utility rules
+###############
+#
+everything: all alt
clean:
- rm -f core
+ ${RM} -f ${OBJ} ${ALT_OBJ}
+ @-if [ -f indent.c ]; then \
+ ${ECHO} ${RM} -f indent.c; \
+ ${RM} -f indent.c; \
+ fi
+
clobber: clean
- rm -f ${WINNERS}
-install: all
- @echo are you kidding'??'
+ ${RM} -f ${TARGET} ${ALT_TARGET}
+ @-if [ -e sandwich ]; then \
+ ${RM} -f sandwich; \
+ echo 'ate sandwich'; \
+ fi
+
+nuke: clobber
+ @${TRUE}
+
+dist_clean: nuke
+ @${TRUE}
+
+install:
+ @echo "Dr. Spock says that is not logical!"
+ @${TRUE}
+
+# you may be able to misunderstand the source by reading indent.c
+#
+indent.c: ${PROG}.c
+ @if which "${GINDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${GINDENT} < $< > $@"; \
+ ${GINDENT} < $< > $@; \
+ elif which "${INDENT}" >/dev/null 2>&1; then \
+ ${ECHO} ${RM} -f $@; \
+ ${RM} -f $@; \
+ ${ECHO} "${INDENT} < $< > $@"; \
+ ${INDENT} < $< > $@; \
+ else \
+ ${ECHO} "no intent tool found, ident $< yourself, sorry"; \
+ ${ECHO} "exit 1"; \
+ exit 1; \
+ fi
+
+
+##################
+# 133t hacker rulz
+##################
+#
+love:
+ @echo 'not war?'
+ @${TRUE}
+
+haste:
+ $(MAKE) waste
+ @${TRUE}
+
+waste:
+ @echo 'haste'
+ @${TRUE}
+
+make:
+ @echo 'Participate in a maker faire'
+ @${TRUE}
+
+easter_egg:
+ @echo you expected to often misunderstand this $${RANDOM} magic
+ @echo chongo '' "/\\oo/\\"
+ @echo Eggy
+
+fabricate fashion form frame manufacture produce: make
+ @${TRUE}
+
+sandwich:
+ @if [ `id -u` -eq 0 ]; then \
+ echo 'Okay.'; \
+ echo $${RANDOM}`date +%s`$${RANDOM} > $@; \
+ else \
+ echo 'What? Make it yourself.'; \
+ exit 1; \
+ fi
+
+# Understand the history of the Homebrew Computer Club
+# as well as the West Coast Computer Faire and
+# you might be confused different. :-)
+#
+supernova: nuke
+ @-if [ -r .code_anal ]; then \
+ ${RM} -f .code_anal_v6; \
+ else \
+ echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
+ fi
+ @echo A $@ helps ${MAKE} the elements that help form planets
+ @${TRUE}
+
+deep_magic:
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ sleep 2; \
+ echo "Wrong! Do it again!"; \
+ fi
+ @${TRUE}
+
+magic: deep_magic
+ @-if [ -r .code_anal ]; then \
+ ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
+ else \
+ echo "If you don't eat yer meat, you can't have any pudding!"; \
+ echo "How can you have any pudding if you don't eat yer meat?!"; \
+ fi
+ @${TRUE}
+
+# The IOCCC resident astronomer states
+#
+charon: supernova
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore IAU, $@ is a planet
+
+pluto: supernova
+ ${MAKE} charon
+ @echo $@ is a dwarf planet
+ @echo dwarf is a type of planet
+ @echo therefore, $@ is a planet
+ @echo get used to having lots of planets because a $< can ${MAKE} a lot of them
diff --git a/1987/westley/hint.html b/1987/westley/hint.html
deleted file mode 100644
index 78b5d5d56..000000000
--- a/1987/westley/hint.html
+++ /dev/null
@@ -1,23 +0,0 @@
-Best Layout
-
-Brian Westley (aka Merlyn Leroy on usenet)
-Starfire Consulting
-1121 Hamline Ave. N. #17
-St. Paul, MN
-55108
-USA
-
-Judges' comments:
-
-Putchar must exist in the C library and not just as a macro.
-If it fails to compile, add the line: #include <stdio.h> at the
-top of the program.
-
-Line by line symmetry performed better than any C beautifier. Think
-of if it as a C ink blot. :-)
-
-Copyright © 1987, Landon Curt Noll & Larry Bassel.
-All Rights Reserved. Permission for personal, educational or non-profit use is
-granted provided this this copyright and notice are included in its entirety
-and remains unaltered. All other uses must receive prior permission in writing
-from both Landon Curt Noll and Larry Bassel.
diff --git a/1987/westley/hint.text b/1987/westley/hint.txt
similarity index 81%
rename from 1987/westley/hint.text
rename to 1987/westley/hint.txt
index 501780b4e..cafb1709b 100644
--- a/1987/westley/hint.text
+++ b/1987/westley/hint.txt
@@ -7,6 +7,12 @@ St. Paul, MN
55108
USA
+## To build:
+
+ make all
+
+NOTE: This entry requires a non-standard K&R C compiler to compile.
+
## Judges' comments:
Putchar must exist in the C library and not just as a macro.
@@ -16,6 +22,8 @@ top of the program.
Line by line symmetry performed better than any C beautifier. Think
of if it as a C ink blot. :-)
+NOTE: This entry requires a non-standard K&R C compiler to compile.
+
Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
All Rights Reserved. Permission for personal, educational or non-profit use is
granted provided this this copyright and notice are included in its entirety
diff --git a/1987/westley/index.html b/1987/westley/index.html
new file mode 100644
index 000000000..298fbf0cb
--- /dev/null
+++ b/1987/westley/index.html
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+ hint
+
+
+
+
+Best Layout
+Brian Westley (aka Merlyn Leroy on usenet)
+Starfire Consulting
+1121 Hamline Ave. N. #17
+St. Paul, MN
+55108
+USA
+To build:
+ make all
+NOTE: This entry requires a non-standard K&R C compiler to
+compile.
+
+Putchar must exist in the C library and not just as a macro. If it
+fails to compile, add the line: #include <stdio.h> at
+the top of the program.
+Line by line symmetry performed better than any C beautifier. Think
+of if it as a C ink blot. :-)
+NOTE: This entry requires a non-standard K&R C compiler to
+compile.
+Copyright (c) 1987, Landon Curt Noll & Larry Bassel. All Rights
+Reserved. Permission for personal, educational or non-profit use is
+granted provided this this copyright and notice are included in its
+entirety and remains unaltered. All other uses must receive prior
+permission in writing from both Landon Curt Noll and Larry Bassel.
+
+
diff --git a/1987/westley/orig.Makefile b/1987/westley/orig.Makefile
new file mode 100644
index 000000000..6681478ee
--- /dev/null
+++ b/1987/westley/orig.Makefile
@@ -0,0 +1,30 @@
+# %W% %G% %U%
+#
+# 1987 makefile
+#
+# Copyright (c) 1987, Landon Curt Noll & Larry Bassel.
+# All Rights Reserved. Permission for personal, educational or non-profit
+# use is granted provided this this copyright and notice are included in its
+# entirety and remains unaltered. All other uses must receive prior permission
+# from Landon Curt Noll and Larry Bassel.
+
+
+SHELL= /bin/sh
+WINNERS= westley
+
+# for System V style systems
+OPSYS= -Dindex=strchr
+# for BSD style systems
+#OPSYS=
+
+all: ${WINNERS}
+
+westley: westley.c
+ cc $? -o $@
+
+clean:
+ rm -f core
+clobber: clean
+ rm -f ${WINNERS}
+install: all
+ @echo are you kidding'??'
diff --git a/years-spoiler.html b/years-spoiler.html
index f5c436e75..41fbafd48 100644
--- a/years-spoiler.html
+++ b/years-spoiler.html
@@ -3464,74 +3464,86 @@ that works for both traditional K&R and ANSI C preprocessors.
4th International Obfuscated C Code Contest (1987)
biggar - program: "P;" defined on command line
heckbert - obfuscated fold program
hines - counts goto's, all ids anagrams of 'goto', all flow w goto
korn - one-liner that prints a message on a Un*x system
lievaart - very good othello player
wall - roman numeral -> decimal and vice versa conversion
westley - individually palindromic lines prints a palindrome
3rd International Obfuscated C Code Contest (1986)
diff --git a/years.html b/years.html
index f05a81de6..a49218cf9 100644
--- a/years.html
+++ b/years.html
@@ -3447,74 +3447,87 @@ a summary description of all of the winners.
4th International Obfuscated C Code Contest (1987)
biggar
heckbert
hines
korn
lievaart
wall
westley
3rd International Obfuscated C Code Contest (1986)