From 33bb2581d399aeeb314b8194686d8fb97b37c73b Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 18 Sep 2022 19:28:00 -0700 Subject: [PATCH] Move 1988 applin into a subdirectory This is a test of how we can move an entry from a top level year into its own sub-directory under that year. --- 1988/applin.c | 202 +------------ 1988/applin.hint | 43 +-- 1988/applin/Makefile | 608 ++++++++++++++++++++++++++++++++++++++++ 1988/applin/applin.c | 193 +++++++++++++ 1988/applin/applin.hint | 42 +++ 1988/applin/zsmall.c | 160 +++++++++++ 1988/zsmall.c | 169 +---------- winners.html | 2 +- years-spoiler.html | 8 +- years.html | 8 +- 10 files changed, 1039 insertions(+), 396 deletions(-) create mode 100644 1988/applin/Makefile create mode 100644 1988/applin/applin.c create mode 100644 1988/applin/applin.hint create mode 100644 1988/applin/zsmall.c diff --git a/1988/applin.c b/1988/applin.c index f023cb96b..5472df672 100644 --- a/1988/applin.c +++ b/1988/applin.c @@ -1,193 +1,9 @@ -I a -U a -I b -U b -I c -U c -I d -U d -I e -U e -I f -U f -I g -U g -I h -U h -I i -U i -I j -U j -I k -U k -I l -U l -I m -U m -L -D m -E -L -D l -E -L -D k -E -L -D j -E -L -D i -E -L -D h -E -L -D g -E -L -D f -E -L -D e -E -L -D d -E -L -D c -E -L -D b -E -L -D a -E -I m -D n (1<<9) -L -D n 0 -E -I l -D o (1<<8) -L -D o 0 -E -I k -D p (1<<7) -L -D p 0 -E -I j -D q (1<<6) -L -D q 0 -E -I i -D r (1<<5) -L -D r 0 -E -I h -D s (1<<4) -L -D s 0 -E -I g -D t (1<<3) -L -D t 0 -E -I f -D u (1<<2) -L -D u 0 -E -I e -D v (1<<1) -L -D v 0 -E -D vv (n+o+p+q+r+s+t+u+v+1) -D ff (defined(d)*16+defined(c)*8+defined(b)*4+defined(a)*2+1) -F vv==1 -U vv -D vv 2 -E -F ff -main(){ -E -N z -M -M -M -M -M -M -M -M -M -M -M -M -M -M -M -E -I z -U z -L -I y -U y -L -I x -U x -L -I w -U w -} -E -E -E -E + + + +IOCCC Main + + +Your browser should have redirected you to /1988/applin/applin.c + + diff --git a/1988/applin.hint b/1988/applin.hint index f84a2a06f..f051312b8 100644 --- a/1988/applin.hint +++ b/1988/applin.hint @@ -1,34 +1,9 @@ -Best of show: - - Jack Applin - Hewlett-Packard - 3404 E. Harmony Rd - Ft. Collins, CO - 80525 - USA - -Compile and execute with no argument, if you can! - -This entry is by far the most unusual abuse of the C preprocessor that -we have received thus far. Nearly all of the real work is done in the -preprocessor! - -When we compiled applin.c on an Amdahl 5890-300E, we found that it -spent over 75 minutes in the System V C preprocessor! Besides showing -that the standard System V cpp is slow, it showed that it contained a -memory usage problem. The applin.c only uses 29 different preprocessor -symbols (besides and yet the preprocessor ran out of space! - -The GNU C preprocessor took less than 45 seconds to perform the 2nd pass -on the Amdahl 5890-300E. But due to the ANSI-ness of GNU cpp (v. 1-21), -it was not able to cleanly substitute a symbol that began with a '#'. -Clearly the GNU C preprocessor is faster. - -A smaller version of applin.c can be found in zsmall.c. Your machine -may have an easier time with this program. See the Makefile for details. - -Copyright (c) 1988, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + + + +IOCCC Main + + +Your browser should have redirected you to /1988/applin/applin.hint + + diff --git a/1988/applin/Makefile b/1988/applin/Makefile new file mode 100644 index 000000000..7272ea1ed --- /dev/null +++ b/1988/applin/Makefile @@ -0,0 +1,608 @@ +#!/usr/bin/env make +# +# IOCCC 1988 winning entry - applin + +################################################################################ +# +# 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 used by this Makefile +############################# +# +SHELL= /bin/bash + +####################### +# 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 + +# 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-expansion-to-defined -Wno-implicit-int +#CSILENCE= -Wno-implicit-int + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu89 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC=26 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= applin +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= zsmall.o +ALT_TARGET= zsmall + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +# Way back in 1988 .. +# +# This entry took 75 minutes to compile on a Amdahl 5980-300E +# (a 55658 Dhyrstone/sec/cpu machine) using the System V cpp. +# (The GNU cpp when defined as BIG_CPP took only 45 seconds) +# Your cpp may not be able to compile it due to a common bug +# that results in ${CPP} running out of space. The routine +# 'zsmall' is a smaller version of the applin.c entry. +# +${PROG}: ${PROG}.c + ${RM} -f large.c + ${CPP} '-DM=#include "large.c"' '-DR=#include' '-DF=#if' \ + '-DI=#ifdef' '-DL=#else' '-DE=#endif' '-DN=#ifndef' \ + '-DD=#define' '-DU=#undef' ${PROG}.c > large.c + ${CC} ${CFLAGS} large.c -o $@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# not an official entry +# +# The 'zsmall.c' program was obtained from 'applin.c' by reducing its recursion +# and running it thru the initial /lib/cpp. That is, 'zsmall.c' is a small +# version of the 'large.c' file as produced by the 'applin' make rule below. +zsmall: zsmall.c + ${CC} ${CFLAGS} zsmall.c -o $@ + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# +clean: + ${RM} -f ${OBJ} ${ALT_OBJ} + ${RM} -f large.o + @-if [ -f indent.c ]; then \ + ${ECHO} ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f large.c + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + +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} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @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: sandwich + @-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: supernova + @-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: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "get used to having lots of planets because a $< can ${MAKE} a lot of them" diff --git a/1988/applin/applin.c b/1988/applin/applin.c new file mode 100644 index 000000000..f023cb96b --- /dev/null +++ b/1988/applin/applin.c @@ -0,0 +1,193 @@ +I a +U a +I b +U b +I c +U c +I d +U d +I e +U e +I f +U f +I g +U g +I h +U h +I i +U i +I j +U j +I k +U k +I l +U l +I m +U m +L +D m +E +L +D l +E +L +D k +E +L +D j +E +L +D i +E +L +D h +E +L +D g +E +L +D f +E +L +D e +E +L +D d +E +L +D c +E +L +D b +E +L +D a +E +I m +D n (1<<9) +L +D n 0 +E +I l +D o (1<<8) +L +D o 0 +E +I k +D p (1<<7) +L +D p 0 +E +I j +D q (1<<6) +L +D q 0 +E +I i +D r (1<<5) +L +D r 0 +E +I h +D s (1<<4) +L +D s 0 +E +I g +D t (1<<3) +L +D t 0 +E +I f +D u (1<<2) +L +D u 0 +E +I e +D v (1<<1) +L +D v 0 +E +D vv (n+o+p+q+r+s+t+u+v+1) +D ff (defined(d)*16+defined(c)*8+defined(b)*4+defined(a)*2+1) +F vv==1 +U vv +D vv 2 +E +F ff +main(){ +E +N z +M +M +M +M +M +M +M +M +M +M +M +M +M +M +M +E +I z +U z +L +I y +U y +L +I x +U x +L +I w +U w +} +E +E +E +E diff --git a/1988/applin/applin.hint b/1988/applin/applin.hint new file mode 100644 index 000000000..ac93de6e2 --- /dev/null +++ b/1988/applin/applin.hint @@ -0,0 +1,42 @@ +Best of show: + + Jack Applin + Hewlett-Packard + 3404 E. Harmony Rd + Ft. Collins, CO + 80525 + USA + +## To build: + + make all + +### To run + + ./applin + +## Judges' comments + +This entry is by far the most unusual abuse of the C preprocessor that +we have received thus far. Nearly all of the real work is done in the +preprocessor! + +When we compiled applin.c on an Amdahl 5890-300E, we found that it +spent over 75 minutes in the System V C preprocessor! Besides showing +that the standard System V cpp is slow, it showed that it contained a +memory usage problem. The applin.c only uses 29 different preprocessor +symbols (besides and yet the preprocessor ran out of space! + +The GNU C preprocessor took less than 45 seconds to perform the 2nd pass +on the Amdahl 5890-300E. But due to the ANSI-ness of GNU cpp (v. 1-21), +it was not able to cleanly substitute a symbol that began with a '#'. +Clearly the GNU C preprocessor is faster. + +A smaller version of applin.c can be found in zsmall.c. Your machine +may have an easier time with this program. See the Makefile for details. + +Copyright (c) 1988, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1988/applin/zsmall.c b/1988/applin/zsmall.c new file mode 100644 index 000000000..5305cc1d5 --- /dev/null +++ b/1988/applin/zsmall.c @@ -0,0 +1,160 @@ +#ifdef a +#undef a +#ifdef b +#undef b +#ifdef c +#undef c +#ifdef e +#undef e +#ifdef f +#undef f +#ifdef g +#undef g +#ifdef h +#undef h +#ifdef i +#undef i +#ifdef j +#undef j +#ifdef k +#undef k +#else +#define k +#endif +#else +#define j +#endif +#else +#define i +#endif +#else +#define h +#endif +#else +#define g +#endif +#else +#define f +#endif +#else +#define e +#endif +#else +#define c +#endif +#else +#define b +#endif +#else +#define a +#endif +#ifdef k +#define p (1<<7) +#else +#define p 0 +#endif +#ifdef j +#define q (1<<6) +#else +#define q 0 +#endif +#ifdef i +#define r (1<<5) +#else +#define r 0 +#endif +#ifdef h +#define s (1<<4) +#else +#define s 0 +#endif +#ifdef g +#define t (1<<3) +#else +#define t 0 +#endif +#ifdef f +#define u (1<<2) +#else +#define u 0 +#endif +#ifdef e +#define v (1<<1) +#else +#define v 0 +#endif +#define vv (p+q+r+s+t+u+v+1) +#define ff \ + (defined(c)*8+defined(b)*4+defined(a)*2+1) +#if vv==1 +#undef vv +#define vv 2 +#endif +#if ff +main(){ +#endif +#ifndef z +#include "zsmall.c" +#include "zsmall.c" +#include "zsmall.c" +#include "zsmall.c" +#include "zsmall.c" +#include "zsmall.c" +#include "zsmall.c" +#include "zsmall.c" +#endif +#ifdef z +#undef z +#else +#ifdef y +#undef y +#else +#ifdef x +#undef x +#else +#ifdef w +#undef w +} +#endif +#endif +#endif +#endif diff --git a/1988/zsmall.c b/1988/zsmall.c index 5305cc1d5..35924707b 100644 --- a/1988/zsmall.c +++ b/1988/zsmall.c @@ -1,160 +1,9 @@ -#ifdef a -#undef a -#ifdef b -#undef b -#ifdef c -#undef c -#ifdef e -#undef e -#ifdef f -#undef f -#ifdef g -#undef g -#ifdef h -#undef h -#ifdef i -#undef i -#ifdef j -#undef j -#ifdef k -#undef k -#else -#define k -#endif -#else -#define j -#endif -#else -#define i -#endif -#else -#define h -#endif -#else -#define g -#endif -#else -#define f -#endif -#else -#define e -#endif -#else -#define c -#endif -#else -#define b -#endif -#else -#define a -#endif -#ifdef k -#define p (1<<7) -#else -#define p 0 -#endif -#ifdef j -#define q (1<<6) -#else -#define q 0 -#endif -#ifdef i -#define r (1<<5) -#else -#define r 0 -#endif -#ifdef h -#define s (1<<4) -#else -#define s 0 -#endif -#ifdef g -#define t (1<<3) -#else -#define t 0 -#endif -#ifdef f -#define u (1<<2) -#else -#define u 0 -#endif -#ifdef e -#define v (1<<1) -#else -#define v 0 -#endif -#define vv (p+q+r+s+t+u+v+1) -#define ff \ - (defined(c)*8+defined(b)*4+defined(a)*2+1) -#if vv==1 -#undef vv -#define vv 2 -#endif -#if ff -main(){ -#endif -#ifndef z -#include "zsmall.c" -#include "zsmall.c" -#include "zsmall.c" -#include "zsmall.c" -#include "zsmall.c" -#include "zsmall.c" -#include "zsmall.c" -#include "zsmall.c" -#endif -#ifdef z -#undef z -#else -#ifdef y -#undef y -#else -#ifdef x -#undef x -#else -#ifdef w -#undef w -} -#endif -#endif -#endif -#endif + + + +IOCCC Main + + +Your browser should have redirected you to /1988/applin/zsmall.c + + diff --git a/winners.html b/winners.html index 9843d71da..c3931c2fd 100644 --- a/winners.html +++ b/winners.html @@ -108,7 +108,7 @@ Contest

  • Jari Arkko -- http://www.arkko.com diff --git a/years-spoiler.html b/years-spoiler.html index 614a56629..512f97418 100644 --- a/years-spoiler.html +++ b/years-spoiler.html @@ -3403,10 +3403,10 @@ a window manager that does not obscure the root window.

    applin - massive #define stuff, includes itself; prints table of primes

    dale - prints command line, using lots of system calls

    diff --git a/years.html b/years.html index 0d21a8265..056a951b8 100644 --- a/years.html +++ b/years.html @@ -3380,10 +3380,10 @@ a summary description of all of the winners.

    applin

    dale