Update & reformat 1985 in 1984 style

This commit is contained in:
Landon Curt Noll committed 2022-09-21 01:44:56 -07:00
1 parent 11b49b9be7
commit b7921d7f44
31 files changed
+4584 -250

No files matched your search

BIN
View File
Binary file not shown.
+263 -17
View File
@@ -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 $@ =-=-='
+582 -17
View File
@@ -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 '<was here>' "/\\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
-14
View File
@@ -1,14 +0,0 @@
<h1>Best one liner</h1>
<p>Jack Applin [with help from Robert Heckendorn]</p>
<h2>Judges' comments:</h2>
<p>One liner programs are short but twisted. This &ldquo;Hello, World&rdquo; version
certainly takes its time saying hello.</p>
<p>Copyright &copy; 1985, Landon Curt Noll &amp; 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.</p>
@@ -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
+180
View File
@@ -0,0 +1,180 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>hint</title>
<style>
html {
line-height: 1.5;
font-family: Georgia, serif;
font-size: 20px;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
h1 {
font-size: 1.8em;
}
}
@media print {
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
font-size: 85%;
margin: 0;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="best-one-liner">Best one liner</h1>
<p>Jack Applin [with help from Robert Heckendorn]</p>
<h2 id="to-build">To build:</h2>
<pre><code> make all</code></pre>
<h2 id="judges-comments">Judges’ comments:</h2>
<p>One liner programs are short but twisted. This “Hello, World” version
certainly takes its time saying hello.</p>
<p>Copyright (c) 1985, Landon Curt Noll &amp; 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.</p>
</body>
</html>
+26
View File
@@ -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'??'
+583 -17
View File
@@ -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 '<was here>' "/\\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
-20
View File
@@ -1,20 +0,0 @@
<h1>The most obscure program</h1>
<p>Lennart Augustsson
&lt;chalmers!augustss></p>
<h2>Judges' comments:</h2>
<p>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?</p>
<p>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.</p>
<p>Copyright &copy; 1985, Landon Curt Noll &amp; 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.</p>
@@ -3,6 +3,10 @@
Lennart Augustsson
<chalmers!augustss>
## To build:
make all
## Judges' comments:
An interesting use of a recursive call to main. Compile and execute
+184
View File
@@ -0,0 +1,184 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>hint</title>
<style>
html {
line-height: 1.5;
font-family: Georgia, serif;
font-size: 20px;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
h1 {
font-size: 1.8em;
}
}
@media print {
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
font-size: 85%;
margin: 0;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="the-most-obscure-program">The most obscure program</h1>
<p>Lennart Augustsson &lt;chalmers!augustss&gt;</p>
<h2 id="to-build">To build:</h2>
<pre><code> make all</code></pre>
<h2 id="judges-comments">Judges’ comments:</h2>
<p>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?</p>
<p>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.</p>
<p>Copyright (c) 1985, Landon Curt Noll &amp; 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.</p>
</body>
</html>
+26
View File
@@ -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'??'
+179
View File
@@ -0,0 +1,179 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>README</title>
<style>
html {
line-height: 1.5;
font-family: Georgia, serif;
font-size: 20px;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
h1 {
font-size: 1.8em;
}
}
@media print {
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
font-size: 85%;
margin: 0;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<p>185 marked the second year of the Obfuscated C Code Contest.</p>
<p>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.</p>
<p>Copyright (c) 1985, Landon Curt Noll &amp; 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.</p>
</body>
</html>
+583 -17
View File
@@ -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 '<was here>' "/\\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
-16
View File
@@ -1,16 +0,0 @@
<h1>The strangest appearing program</h1>
<p>Ed Lycklama</p>
<h2>Judges' comments:</h2>
<p>Run the program without any arguments. Type in some very long lines
and notice how it redisplays it.</p>
<p>The program itself looks like tty noise. Notice that even &lsquo;define&rsquo; in #define can be defined.</p>
<p>Copyright &copy; 1985, Landon Curt Noll &amp; 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.</p>
@@ -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
+187
View File
@@ -0,0 +1,187 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>hint</title>
<style>
html {
line-height: 1.5;
font-family: Georgia, serif;
font-size: 20px;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
h1 {
font-size: 1.8em;
}
}
@media print {
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
font-size: 85%;
margin: 0;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="the-strangest-appearing-program">The strangest appearing
program</h1>
<p>Ed Lycklama</p>
<h2 id="to-build">To build:</h2>
<pre><code> make all</code></pre>
<p>NOTE: This entry uses non-standard args to main() that do not work
with modern compilers.</p>
<h2 id="judges-comments">Judges’ comments:</h2>
<p>Run the program without any arguments. Type in some very long lines
and notice how it redisplays it.</p>
<p>The program itself looks like tty noise. Notice that even ‘define’ in
#define can be defined.</p>
<p>NOTE: This entry requires a non-standard K&amp;R C compiler to
compile.</p>
<p>Copyright (c) 1985, Landon Curt Noll &amp; 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.</p>
</body>
</html>
+26
View File
@@ -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'??'
+72
View File
@@ -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
+583 -17
View File
@@ -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 '<was here>' "/\\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
-20
View File
@@ -1,20 +0,0 @@
<h1>Grand prize for most well-rounded in confusion</h1>
<p>Carl Shapiro</p>
<h2>Judges' comments:</h2>
<p>As submitted, this program was 3 lines (2 of defines and 1 of code).
To make news &amp; mail happy we split the last line into 7. Join them
back without the newlines to get the original version.</p>
<p>This program was selected for the 1987 t-shirt collection.</p>
<p>We found this program is be simply a<strong>maze</strong>ing! Run this program without
arguments and notice the output.</p>
<p>Copyright &copy; 1985, Landon Curt Noll &amp; 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.</p>
@@ -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).
+185
View File
@@ -0,0 +1,185 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>hint</title>
<style>
html {
line-height: 1.5;
font-family: Georgia, serif;
font-size: 20px;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
h1 {
font-size: 1.8em;
}
}
@media print {
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
font-size: 85%;
margin: 0;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="grand-prize-for-most-well-rounded-in-confusion">Grand prize for
most well-rounded in confusion</h1>
<p>Carl Shapiro</p>
<h2 id="to-build">To build:</h2>
<pre><code> make all</code></pre>
<h2 id="judges-comments">Judges’ comments:</h2>
<p>As submitted, this program was 3 lines (2 of defines and 1 of code).
To make news &amp; mail happy we split the last line into 7. Join them
back without the newlines to get the original version.</p>
<p>This program was selected for the 1987 t-shirt collection.</p>
<p>We found this program is be simply a<strong>maze</strong>ing! Run
this program without arguments and notice the output.</p>
<p>Copyright (c) 1985, Landon Curt Noll &amp; 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.</p>
</body>
</html>
+26
View File
@@ -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'??'
+583 -17
View File
@@ -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 '<was here>' "/\\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
-30
View File
@@ -1,30 +0,0 @@
<h1>The worst abuse of the C preprocessor</h1>
<p>Col. G. L. Sicherman</p>
<h2>Judges' comments:</h2>
<p>This program abuses the C preprocessor so much that some /lib/cpp&rsquo;s fail to
strip out all of the comments on the first pass! If you were able to
understand Decot&rsquo;s entry in 1984, you will have a head start on this
one.</p>
<p>Be sure to run this program through lint! If your lint works
correctly, it should warn you that the argument &lsquo;Manual&rsquo; isn&rsquo;t used.
Like the program says, what&rsquo;s that mean?</p>
<p>Run the program without arguments and enter the letters &lsquo;a&rsquo; thru &rsquo;m'
on a line. Now enter the letters &lsquo;n&rsquo; thru &lsquo;z&rsquo;. But to borrow a quote
from Richard Stallman: If you think you understand what this code
does, then you don&rsquo;t, so read it again! Explain why:</p>
<pre><code>sicherman &lt; sicherman.c | sicherman | diff - sicherman.c
</code></pre>
<p>results in diff reporting a difference on some machines.</p>
<p>Copyright &copy; 1985, Landon Curt Noll &amp; 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.</p>
@@ -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
+198
View File
@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>hint</title>
<style>
html {
line-height: 1.5;
font-family: Georgia, serif;
font-size: 20px;
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
h1 {
font-size: 1.8em;
}
}
@media print {
body {
background-color: transparent;
color: black;
font-size: 12pt;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
font-size: 85%;
margin: 0;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="the-worst-abuse-of-the-c-preprocessor">The worst abuse of the C
preprocessor</h1>
<p>Col. G. L. Sicherman</p>
<h2 id="to-build">To build:</h2>
<pre><code> make all</code></pre>
<p>NOTE: This entry uses non-standard args to main() that do not work
with modern compilers.</p>
<p>NOTE: This entry uses non-standard args to main() that do not work
with modern compilers.</p>
<h2 id="judges-comments">Judges’ comments:</h2>
<p>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.</p>
<p>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?</p>
<p>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:</p>
<pre><code>sicherman &lt; sicherman.c | sicherman | diff - sicherman.c</code></pre>
<p>results in diff reporting a difference on some machines.</p>
<p>NOTE: This entry requires a non-standard K&amp;R C compiler to
compile.</p>
<p>Copyright (c) 1985, Landon Curt Noll &amp; 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.</p>
</body>
</html>
+26
View File
@@ -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'??'
+31 -24
View File
@@ -3625,55 +3625,62 @@ that works for both traditional K&amp;R and ANSI C preprocessors.
<HR>
<H2><A NAME="1985"></A>2nd International Obfuscated C Code Contest (1985)</H2>
<UL TYPE=square>
<LI><A HREF="1985/README">README</A>
<LI><A HREF="1985/Makefile">Makefile</A>
<LI><A HREF="1985/rules">rules</A>
<LI><A HREF="1985/1985.tar.bz2">1985.tar.bz2</A> - all of the data for 1985 (4.4 KiB)
<LI><A HREF="1985/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/Makefile">Makefile</A>
<LI><A HREF="1985/rules.html">rules.html</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/rules">rules</A> - <I>original rules</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/README">README</A> - <I>original README</I>
<LI><A HREF="1985/1985.tar.bz2">1985.tar.bz2</A> - <I>download all of 1985</I>
</UL>
<A NAME="1985_applin"></A>
<P><B>applin</B> - one-liner to print hello world, with execlp</P>
<UL TYPE=square>
<LI><A HREF="1985/applin/Makefile">Makefile</A>
<LI><A HREF="1985/applin/applin.c">applin.c</A>
<LI><A HREF="1985/applin/hint.html">hint.html</A>
<LI><A HREF="1985/applin/hint.text">hint.text</A>
<LI><A HREF="1985/applin/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/applin.c">applin.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/Makefile">Makefile</A>
<LI><A HREF="1985/applin/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_august"></A>
<P><B>august</B> - cpp obfuscated, compressed, main-recursive primes in binary</P>
<UL TYPE=square>
<LI><A HREF="1985/august/Makefile">Makefile</A>
<LI><A HREF="1985/august/august.c">august.c</A>
<LI><A HREF="1985/august/hint.html">hint.html</A>
<LI><A HREF="1985/august/hint.text">hint.text</A>
<LI><A HREF="1985/august/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/august.c">august.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/Makefile">Makefile</A>
<LI><A HREF="1985/august/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_lycklama"></A>
<P><B>lycklama</B> - heavily cpped with o_oo identifiers, scrolls text right</P>
<UL TYPE=square>
<LI><A HREF="1985/lycklama/Makefile">Makefile</A>
<LI><A HREF="1985/lycklama/lycklama.c">lycklama.c</A>
<LI><A HREF="1985/lycklama/hint.html">hint.html</A>
<LI><A HREF="1985/lycklama/hint.text">hint.text</A>
<LI><A HREF="1985/lycklama/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/lycklama.c">lycklama.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/Makefile">Makefile</A>
<LI><A HREF="1985/lycklama/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_shapiro"></A>
<P><B>shapiro</B> - two defines, one 7-liner, results in a maze</P>
<UL TYPE=square>
<LI><A HREF="1985/shapiro/Makefile">Makefile</A>
<LI><A HREF="1985/shapiro/shapiro.c">shapiro.c</A>
<LI><A HREF="1985/shapiro/hint.html">hint.html</A>
<LI><A HREF="1985/shapiro/hint.text">hint.text</A>
<LI><A HREF="1985/shapiro/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/shapiro.c">shapiro.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/Makefile">Makefile</A>
<LI><A HREF="1985/shapiro/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_sicherman"></A>
<P><B>sicherman</B> - rot13 with strange #defs that create comment headers etc.</P>
<UL TYPE=square>
<LI><A HREF="1985/sicherman/Makefile">Makefile</A>
<LI><A HREF="1985/sicherman/sicherman.c">sicherman.c</A>
<LI><A HREF="1985/sicherman/hint.html">hint.html</A>
<LI><A HREF="1985/sicherman/hint.text">hint.text</A>
<LI><A HREF="1985/sicherman/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.c">sicherman.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/Makefile">Makefile</A>
<LI><A HREF="1985/sicherman/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<HR>
<H2><A NAME="1984"></A>1st International Obfuscated C Code Contest (1984)</H2>
+31 -24
View File
@@ -3608,55 +3608,62 @@ a summary description of all of the winners. </P>
<HR>
<H2><A NAME="1985"></A>2nd International Obfuscated C Code Contest (1985)</H2>
<UL TYPE=square>
<LI><A HREF="1985/README">README</A>
<LI><A HREF="1985/Makefile">Makefile</A>
<LI><A HREF="1985/rules">rules</A>
<LI><A HREF="1985/1985.tar.bz2">1985.tar.bz2</A> - all of the data for 1985 (4.4 KiB)
<LI><A HREF="1985/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/Makefile">Makefile</A>
<LI><A HREF="1985/rules.html">rules.html</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/rules">rules</A> - <I>original rules</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/README">README</A> - <I>original README</I>
<LI><A HREF="1985/1985.tar.bz2">1985.tar.bz2</A> - <I>download all of 1985</I>
</UL>
<A NAME="1985_applin"></A>
<P><B>applin</B></P>
<UL TYPE=square>
<LI><A HREF="1985/applin/Makefile">Makefile</A>
<LI><A HREF="1985/applin/applin.c">applin.c</A>
<LI><A HREF="1985/applin/hint.html">hint.html</A>
<LI><A HREF="1985/applin/hint.text">hint.text</A>
<LI><A HREF="1985/applin/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/applin.c">applin.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/Makefile">Makefile</A>
<LI><A HREF="1985/applin/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/applin/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_august"></A>
<P><B>august</B></P>
<UL TYPE=square>
<LI><A HREF="1985/august/Makefile">Makefile</A>
<LI><A HREF="1985/august/august.c">august.c</A>
<LI><A HREF="1985/august/hint.html">hint.html</A>
<LI><A HREF="1985/august/hint.text">hint.text</A>
<LI><A HREF="1985/august/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/august.c">august.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/Makefile">Makefile</A>
<LI><A HREF="1985/august/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/august/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_lycklama"></A>
<P><B>lycklama</B></P>
<UL TYPE=square>
<LI><A HREF="1985/lycklama/Makefile">Makefile</A>
<LI><A HREF="1985/lycklama/lycklama.c">lycklama.c</A>
<LI><A HREF="1985/lycklama/hint.html">hint.html</A>
<LI><A HREF="1985/lycklama/hint.text">hint.text</A>
<LI><A HREF="1985/lycklama/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/lycklama.c">lycklama.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/Makefile">Makefile</A>
<LI><A HREF="1985/lycklama/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/lycklama/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_shapiro"></A>
<P><B>shapiro</B></P>
<UL TYPE=square>
<LI><A HREF="1985/shapiro/Makefile">Makefile</A>
<LI><A HREF="1985/shapiro/shapiro.c">shapiro.c</A>
<LI><A HREF="1985/shapiro/hint.html">hint.html</A>
<LI><A HREF="1985/shapiro/hint.text">hint.text</A>
<LI><A HREF="1985/shapiro/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/shapiro.c">shapiro.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/Makefile">Makefile</A>
<LI><A HREF="1985/shapiro/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/shapiro/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<A NAME="1985_sicherman"></A>
<P><B>sicherman</B></P>
<UL TYPE=square>
<LI><A HREF="1985/sicherman/Makefile">Makefile</A>
<LI><A HREF="1985/sicherman/sicherman.c">sicherman.c</A>
<LI><A HREF="1985/sicherman/hint.html">hint.html</A>
<LI><A HREF="1985/sicherman/hint.text">hint.text</A>
<LI><A HREF="1985/sicherman/index.html">index.html</A> - <B>README</B>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/sicherman.c">sicherman.c</A>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/Makefile">Makefile</A>
<LI><A HREF="1985/sicherman/hint.txt">hint.txt</A> - <I>original README</I>
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1985/sicherman/orig.Makefile">orig.Makefile</A> - <I>original Makefile</I>
</UL>
<HR>
<H2><A NAME="1984"></A>1st International Obfuscated C Code Contest (1984)</H2>