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.
This commit is contained in:
Landon Curt Noll committed 2022-09-18 19:28:00 -07:00
1 parent 4930ad7e0c
commit 33bb2581d3
10 files changed
+1039 -396

No files matched your search

+9 -193
View File
@@ -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<vv
F ff!=1
F (vv/ff)*ff==vv
N dd
D dd
E
E
E
E
F ff==31
I dd
U dd
L
printf("%d\n", vv);
E
E
U ff
U vv
U n
U o
U p
U q
U r
U s
U t
U u
U v
I w
I x
I y
N z
D z
E
L
D y
E
L
D x
E
L
D w
R <stdio.h>
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>IOCCC Main</title>
<meta http-equiv="REFRESH" content="0;url=/1988/applin/applin.c"></HEAD>
<BODY>
Your browser should have redirected you to <A HREF="/1988/applin/applin.c">/1988/applin/applin.c</A>
</BODY>
</HTML>
+9 -34
View File
@@ -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 <stdio.h> 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.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>IOCCC Main</title>
<meta http-equiv="REFRESH" content="0;url=/1988/applin/applin.hint"></HEAD>
<BODY>
Your browser should have redirected you to <A HREF="/1988/applin/applin.hint">/1988/applin/applin.hint</A>
</BODY>
</HTML>
+608
View File
@@ -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 '<was here>' /\\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"
+193
View File
@@ -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<vv
F ff!=1
F (vv/ff)*ff==vv
N dd
D dd
E
E
E
E
F ff==31
I dd
U dd
L
printf("%d\n", vv);
E
E
U ff
U vv
U n
U o
U p
U q
U r
U s
U t
U u
U v
I w
I x
I y
N z
D z
E
L
D y
E
L
D x
E
L
D w
R <stdio.h>
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
+42
View File
@@ -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 <stdio.h> 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.
+160
View File
@@ -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<vv
#if ff!=1
#if (vv/ff)*ff==vv
#ifndef dd
#define dd
#endif
#endif
#endif
#endif
#if ff==15
#ifdef dd
#undef dd
#else
printf("%d\n", vv);
#endif
#endif
#undef ff
#undef vv
#undef p
#undef q
#undef r
#undef s
#undef t
#undef u
#undef v
#ifdef w
#ifdef x
#ifdef y
#ifndef z
#define z
#endif
#else
#define y
#endif
#else
#define x
#endif
#else
#define w
#include <stdio.h>
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
+9 -160
View File
@@ -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<vv
#if ff!=1
#if (vv/ff)*ff==vv
#ifndef dd
#define dd
#endif
#endif
#endif
#endif
#if ff==15
#ifdef dd
#undef dd
#else
printf("%d\n", vv);
#endif
#endif
#undef ff
#undef vv
#undef p
#undef q
#undef r
#undef s
#undef t
#undef u
#undef v
#ifdef w
#ifdef x
#ifdef y
#ifndef z
#define z
#endif
#else
#define y
#endif
#else
#define x
#endif
#else
#define w
#include <stdio.h>
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>IOCCC Main</title>
<meta http-equiv="REFRESH" content="0;url=/1988/applin/zsmall.c"></HEAD>
<BODY>
Your browser should have redirected you to <A HREF="/1988/applin/zsmall.c">/1988/applin/zsmall.c</A>
</BODY>
</HTML>
+1 -1
View File
@@ -108,7 +108,7 @@ Contest </I></FONT></CENTER><BR>
<UL>
<LI TYPE=square>Best one liner (<A HREF="years.html#1985_applin">1985/applin/applin.c</A>)
<LI TYPE=square>Most adaptable program (<A HREF="years.html#1986_applin">1986/applin/applin.c</A>)
<LI TYPE=square>Best of show (<A HREF="years.html#1988_applin">1988/applin.c</A>)
<LI TYPE=square>Best of show (<A HREF="years.html#1988_applin">1988/applin/applin.c</A>)
</UL><BR>
<LI TYPE=none><A NAME="Jari_Arkko"></A><B><a href="&#x6D;&#97;&#x69;&#108;&#116;&#x6F;&#x3A;&#x6A;&#x61;&#x72;&#105;&#x40;&#x61;&#114;k&#107;&#x6F;&#x2E;c&#111;&#x6D;">Jari Arkko</a></B> -- <A HREF="http://www.arkko.com">http://www.arkko.com</a>
+4 -4
View File
@@ -3403,10 +3403,10 @@ a window manager that does not obscure the root window.
<P><B>applin</B> - massive #define stuff, includes itself; prints table of primes</P>
<UL TYPE=square>
<LI><A HREF="1988/Makefile">Makefile</A>
<LI><A HREF="1988/applin.c">applin.c</A>
<LI><A HREF="1988/applin.hint">applin.hint</A>
<LI><A HREF="1988/zsmall.c">zsmall.c</A>
<LI><A HREF="1988/applin/Makefile">Makefile</A>
<LI><A HREF="1988/applin/applin.c">applin.c</A>
<LI><A HREF="1988/applin/applin.hint">applin.hint</A>
<LI><A HREF="1988/applin/zsmall.c">zsmall.c</A>
</UL>
<A NAME="1988_dale"></A>
<P><B>dale</B> - prints command line, using lots of system calls</P>
+4 -4
View File
@@ -3380,10 +3380,10 @@ a summary description of all of the winners. </P>
<P><B>applin</B></P>
<UL TYPE=square>
<LI><A HREF="1988/Makefile">Makefile</A>
<LI><A HREF="1988/applin.c">applin.c</A>
<LI><A HREF="1988/applin.hint">applin.hint</A>
<LI><A HREF="1988/zsmall.c">zsmall.c</A>
<LI><A HREF="1988/applin/Makefile">Makefile</A>
<LI><A HREF="1988/applin/applin.c">applin.c</A>
<LI><A HREF="1988/applin/applin.hint">applin.hint</A>
<LI><A HREF="1988/applin/zsmall.c">zsmall.c</A>
</UL>
<A NAME="1988_dale"></A>
<P><B>dale</B></P>