diff --git a/1985/1985.tar.bz2 b/1985/1985.tar.bz2 index 6c181285e..cd8fd8de6 100644 Binary files a/1985/1985.tar.bz2 and b/1985/1985.tar.bz2 differ diff --git a/1985/Makefile b/1985/Makefile index d6a342dcd..6a61b6d81 100644 --- a/1985/Makefile +++ b/1985/Makefile @@ -1,9 +1,45 @@ #!/usr/bin/env make # -# 1985 makefile +# 1985 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,21 +51,7 @@ ################ # SHELL= /bin/bash -CP= cp -CPP= cpp -GUNZIP= gunzip -LD= ld MAKE= make -RM= rm -SED= sed -TAR= tar -TRUE= true - -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -CC= cc ############### @@ -38,15 +60,69 @@ CC= cc # WINNERS= applin august lycklama shapiro sicherman +YEAR= 1985 + ################### # build all entries ################### # all: + @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 $@ =-=-=' + +.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 $@ =-=-=' ############### @@ -54,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/1985/applin/Makefile b/1985/applin/Makefile index f1f526851..9cd1b5a84 100644 --- a/1985/applin/Makefile +++ b/1985/applin/Makefile @@ -1,26 +1,591 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1985 makefile +# IOCCC 1985 winning entry - applin + +################################################################################ # -# Copyright (c) 1985, 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= applin +############################# +# shell used by this Makefile +############################# +# +SHELL= /bin/bash -all: ${WINNERS} +####################### +# 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 -applin: applin.c - cc $? -o $@ +# 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 + +# 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-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= applin +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 -clobber: clean - rm -f ${WINNERS} + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + ${ECHO} ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi -install: all - @echo are you kidding'??' +clobber: clean + ${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 "prog"; \ + 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 "prog"; \ + 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/1985/applin/hint.html b/1985/applin/hint.html deleted file mode 100644 index 02ab784d8..000000000 --- a/1985/applin/hint.html +++ /dev/null @@ -1,14 +0,0 @@ -

Best one liner

- -

Jack Applin [with help from Robert Heckendorn]

- -

Judges' comments:

- -

One liner programs are short but twisted. This “Hello, World” version -certainly takes its time saying hello.

- -

Copyright © 1985, 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/1985/applin/hint.text b/1985/applin/hint.txt similarity index 94% rename from 1985/applin/hint.text rename to 1985/applin/hint.txt index ba9d0b225..2caa53403 100644 --- a/1985/applin/hint.text +++ b/1985/applin/hint.txt @@ -2,6 +2,10 @@ Jack Applin [with help from Robert Heckendorn] +## To build: + + make all + ## Judges' comments: One liner programs are short but twisted. This "Hello, World" version diff --git a/1985/applin/index.html b/1985/applin/index.html new file mode 100644 index 000000000..bfeb60973 --- /dev/null +++ b/1985/applin/index.html @@ -0,0 +1,180 @@ + + + + + + + hint + + + + +

Best one liner

+

Jack Applin [with help from Robert Heckendorn]

+

To build:

+
    make all
+

Judges’ comments:

+

One liner programs are short but twisted. This “Hello, World” version +certainly takes its time saying hello.

+

Copyright (c) 1985, 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/1985/applin/orig.Makefile b/1985/applin/orig.Makefile new file mode 100644 index 000000000..f1f526851 --- /dev/null +++ b/1985/applin/orig.Makefile @@ -0,0 +1,26 @@ +# %W% %G% %U% +# +# 1985 makefile +# +# Copyright (c) 1985, 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= applin + +all: ${WINNERS} + +applin: applin.c + cc $? -o $@ + +clean: + rm -f core +clobber: clean + rm -f ${WINNERS} + +install: all + @echo are you kidding'??' diff --git a/1985/august/Makefile b/1985/august/Makefile index 281da421f..cf8293fbd 100644 --- a/1985/august/Makefile +++ b/1985/august/Makefile @@ -1,26 +1,592 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1985 makefile +# IOCCC 1985 winning entry - august + +################################################################################ # -# Copyright (c) 1985, 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= august +############################# +# shell used by this Makefile +############################# +# +SHELL= /bin/bash -all: ${WINNERS} +####################### +# 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 -august: august.c - cc $? -o $@ +# 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 + +# 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-main \ + -Wno-unused-parameter -Wno-unused-variable +#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= august +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 -clobber: clean - rm -f ${WINNERS} + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + ${ECHO} ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi -install: all - @echo are you kidding'??' +clobber: clean + ${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/1985/august/hint.html b/1985/august/hint.html deleted file mode 100644 index 3c3226380..000000000 --- a/1985/august/hint.html +++ /dev/null @@ -1,20 +0,0 @@ -

The most obscure program

- -

Lennart Augustsson -<chalmers!augustss>

- -

Judges' comments:

- -

An interesting use of a recursive call to main. Compile and execute -without args. What is the initial value of b, and does it alter the -action of the program?

- -

If you let it, the program will continue to print a numerical sequence -(can you guess in what base it is printed?) until you run out of -memory or until they sell your computer, which ever comes first.

- -

Copyright © 1985, 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/1985/august/hint.text b/1985/august/hint.txt similarity index 96% rename from 1985/august/hint.text rename to 1985/august/hint.txt index e37f47223..dcb903bf7 100644 --- a/1985/august/hint.text +++ b/1985/august/hint.txt @@ -3,6 +3,10 @@ Lennart Augustsson +## To build: + + make all + ## Judges' comments: An interesting use of a recursive call to main. Compile and execute diff --git a/1985/august/index.html b/1985/august/index.html new file mode 100644 index 000000000..23f8e9eb2 --- /dev/null +++ b/1985/august/index.html @@ -0,0 +1,184 @@ + + + + + + + hint + + + + +

The most obscure program

+

Lennart Augustsson <chalmers!augustss>

+

To build:

+
    make all
+

Judges’ comments:

+

An interesting use of a recursive call to main. Compile and execute +without args. What is the initial value of b, and does it alter the +action of the program?

+

If you let it, the program will continue to print a numerical +sequence (can you guess in what base it is printed?) until you run out +of memory or until they sell your computer, which ever comes first.

+

Copyright (c) 1985, 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/1985/august/orig.Makefile b/1985/august/orig.Makefile new file mode 100644 index 000000000..281da421f --- /dev/null +++ b/1985/august/orig.Makefile @@ -0,0 +1,26 @@ +# %W% %G% %U% +# +# 1985 makefile +# +# Copyright (c) 1985, 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= august + +all: ${WINNERS} + +august: august.c + cc $? -o $@ + +clean: + rm -f core +clobber: clean + rm -f ${WINNERS} + +install: all + @echo are you kidding'??' diff --git a/1985/index.html b/1985/index.html new file mode 100644 index 000000000..d11af2d61 --- /dev/null +++ b/1985/index.html @@ -0,0 +1,179 @@ + + + + + + + README + + + + +

185 marked the second year of the Obfuscated C Code Contest.

+

Hints against machine dependent code were added to the rules to avoid +another 1984 style winner. Rules and results were posted to net.lang.c +and net.unix-wizards. Larry Bassel was invited to help in the judging. +Awards were given to 5 classes of programs since we were unable to +select only the best 4.

+

Copyright (c) 1985, 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/1985/lycklama/Makefile b/1985/lycklama/Makefile index c8449115a..8d9e9bf6d 100644 --- a/1985/lycklama/Makefile +++ b/1985/lycklama/Makefile @@ -1,26 +1,592 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1985 makefile +# IOCCC 1985 winning entry - lycklama + +################################################################################ # -# Copyright (c) 1985, 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= lycklama +############################# +# shell used by this Makefile +############################# +# +SHELL= /bin/bash -all: ${WINNERS} +####################### +# 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 -lycklama: lycklama.c - cc $? -o $@ +# 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 + +# 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-implicit-int -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= lycklama +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 uses non-standard args to main() that do not work with modern compilers." + ${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 -clobber: clean - rm -f ${WINNERS} + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + ${ECHO} ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi -install: all - @echo are you kidding'??' +clobber: clean + ${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/1985/lycklama/hint.html b/1985/lycklama/hint.html deleted file mode 100644 index a1f7b329d..000000000 --- a/1985/lycklama/hint.html +++ /dev/null @@ -1,16 +0,0 @@ -

The strangest appearing program

- -

Ed Lycklama

- -

Judges' comments:

- -

Run the program without any arguments. Type in some very long lines -and notice how it redisplays it.

- -

The program itself looks like tty noise. Notice that even ‘define’ in #define can be defined.

- -

Copyright © 1985, 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/1985/lycklama/hint.text b/1985/lycklama/hint.txt similarity index 75% rename from 1985/lycklama/hint.text rename to 1985/lycklama/hint.txt index 459cdd09d..4f393c02d 100644 --- a/1985/lycklama/hint.text +++ b/1985/lycklama/hint.txt @@ -2,6 +2,12 @@ Ed Lycklama +## To build: + + make all + +NOTE: This entry uses non-standard args to main() that do not work with modern compilers. + ## Judges' comments: Run the program without any arguments. Type in some very long lines @@ -9,6 +15,8 @@ and notice how it redisplays it. The program itself looks like tty noise. Notice that even 'define' in #define can be defined. +NOTE: This entry requires a non-standard K&R C compiler to compile. + Copyright (c) 1985, 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/1985/lycklama/index.html b/1985/lycklama/index.html new file mode 100644 index 000000000..84c8d00eb --- /dev/null +++ b/1985/lycklama/index.html @@ -0,0 +1,187 @@ + + + + + + + hint + + + + +

The strangest appearing +program

+

Ed Lycklama

+

To build:

+
    make all
+

NOTE: This entry uses non-standard args to main() that do not work +with modern compilers.

+

Judges’ comments:

+

Run the program without any arguments. Type in some very long lines +and notice how it redisplays it.

+

The program itself looks like tty noise. Notice that even ‘define’ in +#define can be defined.

+

NOTE: This entry requires a non-standard K&R C compiler to +compile.

+

Copyright (c) 1985, 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/1985/lycklama/orig.Makefile b/1985/lycklama/orig.Makefile new file mode 100644 index 000000000..c8449115a --- /dev/null +++ b/1985/lycklama/orig.Makefile @@ -0,0 +1,26 @@ +# %W% %G% %U% +# +# 1985 makefile +# +# Copyright (c) 1985, 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= lycklama + +all: ${WINNERS} + +lycklama: lycklama.c + cc $? -o $@ + +clean: + rm -f core +clobber: clean + rm -f ${WINNERS} + +install: all + @echo are you kidding'??' diff --git a/1985/orig.Makefile b/1985/orig.Makefile new file mode 100644 index 000000000..d6a342dcd --- /dev/null +++ b/1985/orig.Makefile @@ -0,0 +1,72 @@ +#!/usr/bin/env make +# +# 1985 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 + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +CC= cc + + +############### +# IOCCC winners +############### +# +WINNERS= applin august lycklama shapiro sicherman + +################### +# build all entries +################### +# +all: + @for i in ${WINNERS} ; do \ + echo "(cd $$i && $(MAKE) $@)"; \ + (cd $$i && $(MAKE) $@); \ + 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/1985/shapiro/Makefile b/1985/shapiro/Makefile index ce7ede796..628ec8de1 100644 --- a/1985/shapiro/Makefile +++ b/1985/shapiro/Makefile @@ -1,26 +1,592 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1985 makefile +# IOCCC 1985 winning entry - shapiro + +################################################################################ # -# Copyright (c) 1985, 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= shapiro +############################# +# shell used by this Makefile +############################# +# +SHELL= /bin/bash -all: ${WINNERS} +####################### +# 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 -shaprio: shaprio.c - cc $? -o $@ +# 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 + +# 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 \ + -Wno-parentheses -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= shapiro +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 -clobber: clean - rm -f ${WINNERS} + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + ${ECHO} ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi -install: all - @echo are you kidding'??' +clobber: clean + ${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/1985/shapiro/hint.html b/1985/shapiro/hint.html deleted file mode 100644 index ecd26c1f2..000000000 --- a/1985/shapiro/hint.html +++ /dev/null @@ -1,20 +0,0 @@ -

Grand prize for most well-rounded in confusion

- -

Carl Shapiro

- -

Judges' comments:

- -

As submitted, this program was 3 lines (2 of defines and 1 of code). -To make news & mail happy we split the last line into 7. Join them -back without the newlines to get the original version.

- -

This program was selected for the 1987 t-shirt collection.

- -

We found this program is be simply amazeing! Run this program without -arguments and notice the output.

- -

Copyright © 1985, 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/1985/shapiro/hint.text b/1985/shapiro/hint.txt similarity index 96% rename from 1985/shapiro/hint.text rename to 1985/shapiro/hint.txt index 27e7fa750..eeaeafb2a 100644 --- a/1985/shapiro/hint.text +++ b/1985/shapiro/hint.txt @@ -2,6 +2,10 @@ Carl Shapiro +## To build: + + make all + ## Judges' comments: As submitted, this program was 3 lines (2 of defines and 1 of code). diff --git a/1985/shapiro/index.html b/1985/shapiro/index.html new file mode 100644 index 000000000..98243b829 --- /dev/null +++ b/1985/shapiro/index.html @@ -0,0 +1,185 @@ + + + + + + + hint + + + + +

Grand prize for +most well-rounded in confusion

+

Carl Shapiro

+

To build:

+
    make all
+

Judges’ comments:

+

As submitted, this program was 3 lines (2 of defines and 1 of code). +To make news & mail happy we split the last line into 7. Join them +back without the newlines to get the original version.

+

This program was selected for the 1987 t-shirt collection.

+

We found this program is be simply amazeing! Run +this program without arguments and notice the output.

+

Copyright (c) 1985, 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/1985/shapiro/orig.Makefile b/1985/shapiro/orig.Makefile new file mode 100644 index 000000000..ce7ede796 --- /dev/null +++ b/1985/shapiro/orig.Makefile @@ -0,0 +1,26 @@ +# %W% %G% %U% +# +# 1985 makefile +# +# Copyright (c) 1985, 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= shapiro + +all: ${WINNERS} + +shaprio: shaprio.c + cc $? -o $@ + +clean: + rm -f core +clobber: clean + rm -f ${WINNERS} + +install: all + @echo are you kidding'??' diff --git a/1985/sicherman/Makefile b/1985/sicherman/Makefile index a4a4eab16..4d481d579 100644 --- a/1985/sicherman/Makefile +++ b/1985/sicherman/Makefile @@ -1,26 +1,592 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1985 makefile +# IOCCC 1985 winning entry - sicherman + +################################################################################ # -# Copyright (c) 1985, 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= sicherman +############################# +# shell used by this Makefile +############################# +# +SHELL= /bin/bash -all: ${WINNERS} +####################### +# 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 -scherman: sicherman.c - cc $? -o $@ +# 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 + +# 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-comment +#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= sicherman +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 -clobber: clean - rm -f ${WINNERS} + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + ${ECHO} ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi -install: all - @echo are you kidding'??' +clobber: clean + ${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/1985/sicherman/hint.html b/1985/sicherman/hint.html deleted file mode 100644 index b385116a8..000000000 --- a/1985/sicherman/hint.html +++ /dev/null @@ -1,30 +0,0 @@ -

The worst abuse of the C preprocessor

- -

Col. G. L. Sicherman

- -

Judges' comments:

- -

This program abuses the C preprocessor so much that some /lib/cpp’s fail to -strip out all of the comments on the first pass! If you were able to -understand Decot’s entry in 1984, you will have a head start on this -one.

- -

Be sure to run this program through lint! If your lint works -correctly, it should warn you that the argument ‘Manual’ isn’t used. -Like the program says, what’s that mean?

- -

Run the program without arguments and enter the letters ‘a’ thru ’m' -on a line. Now enter the letters ‘n’ thru ‘z’. But to borrow a quote -from Richard Stallman: If you think you understand what this code -does, then you don’t, so read it again! Explain why:

- -
sicherman < sicherman.c | sicherman | diff - sicherman.c
-
- -

results in diff reporting a difference on some machines.

- -

Copyright © 1985, 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/1985/sicherman/hint.text b/1985/sicherman/hint.txt similarity index 80% rename from 1985/sicherman/hint.text rename to 1985/sicherman/hint.txt index d468db5f1..63ce40ead 100644 --- a/1985/sicherman/hint.text +++ b/1985/sicherman/hint.txt @@ -2,6 +2,14 @@ Col. G. L. Sicherman +## To build: + + make all + +NOTE: This entry uses non-standard args to main() that do not work with modern compilers. + +NOTE: This entry uses non-standard args to main() that do not work with modern compilers. + ## Judges' comments: This program abuses the C preprocessor so much that some /lib/cpp's fail to @@ -22,6 +30,8 @@ does, then you don't, so read it again! Explain why: results in diff reporting a difference on some machines. +NOTE: This entry requires a non-standard K&R C compiler to compile. + Copyright (c) 1985, 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/1985/sicherman/index.html b/1985/sicherman/index.html new file mode 100644 index 000000000..86bf21c00 --- /dev/null +++ b/1985/sicherman/index.html @@ -0,0 +1,198 @@ + + + + + + + hint + + + + +

The worst abuse of the C +preprocessor

+

Col. G. L. Sicherman

+

To build:

+
    make all
+

NOTE: This entry uses non-standard args to main() that do not work +with modern compilers.

+

NOTE: This entry uses non-standard args to main() that do not work +with modern compilers.

+

Judges’ comments:

+

This program abuses the C preprocessor so much that some /lib/cpp’s +fail to strip out all of the comments on the first pass! If you were +able to understand Decot’s entry in 1984, you will have a head start on +this one.

+

Be sure to run this program through lint! If your lint works +correctly, it should warn you that the argument ‘Manual’ isn’t used. +Like the program says, what’s that mean?

+

Run the program without arguments and enter the letters ‘a’ thru ‘m’ +on a line. Now enter the letters ‘n’ thru ‘z’. But to borrow a quote +from Richard Stallman: If you think you understand what this code does, +then you don’t, so read it again! Explain why:

+
sicherman < sicherman.c | sicherman | diff - sicherman.c
+

results in diff reporting a difference on some machines.

+

NOTE: This entry requires a non-standard K&R C compiler to +compile.

+

Copyright (c) 1985, 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/1985/sicherman/orig.Makefile b/1985/sicherman/orig.Makefile new file mode 100644 index 000000000..a4a4eab16 --- /dev/null +++ b/1985/sicherman/orig.Makefile @@ -0,0 +1,26 @@ +# %W% %G% %U% +# +# 1985 makefile +# +# Copyright (c) 1985, 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= sicherman + +all: ${WINNERS} + +scherman: sicherman.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 80016ed17..4628c7020 100644 --- a/years-spoiler.html +++ b/years-spoiler.html @@ -3625,55 +3625,62 @@ that works for both traditional K&R and ANSI C preprocessors.

2nd International Obfuscated C Code Contest (1985)

applin - one-liner to print hello world, with execlp

august - cpp obfuscated, compressed, main-recursive primes in binary

lycklama - heavily cpped with o_oo identifiers, scrolls text right

shapiro - two defines, one 7-liner, results in a maze

sicherman - rot13 with strange #defs that create comment headers etc.


1st International Obfuscated C Code Contest (1984)

diff --git a/years.html b/years.html index 48a9eff5b..bd8a9b7d1 100644 --- a/years.html +++ b/years.html @@ -3608,55 +3608,62 @@ a summary description of all of the winners.


2nd International Obfuscated C Code Contest (1985)

applin

august

lycklama

shapiro

sicherman


1st International Obfuscated C Code Contest (1984)