diff --git a/1985/lycklama/.gitignore b/1985/lycklama/.gitignore new file mode 100644 index 000000000..57b8242ed --- /dev/null +++ b/1985/lycklama/.gitignore @@ -0,0 +1 @@ +lycklama diff --git a/1985/lycklama/Makefile b/1985/lycklama/Makefile index 63d0db4c9..3e3464132 100644 --- a/1985/lycklama/Makefile +++ b/1985/lycklama/Makefile @@ -340,7 +340,7 @@ CWARN= -Wall -Wextra -pedantic ${CSILENCE} # Silence warnings that ${CWARN} would normally complain about # -CSILENCE= -Wno-implicit-int -Wno-unused-value +CSILENCE= -Wno-implicit-int -Wno-unused-value -Wno-parentheses #CSILENCE= -Wno-implicit-int # compiler standard @@ -368,7 +368,7 @@ CDEFINE= # include files that are needed to compile # -CINCLUDE= +CINCLUDE=-include unistd.h #CINCLUDE= -include stdlib.h #CINCLUDE= -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h @@ -442,7 +442,6 @@ all: ${DATA} ${TARGET} 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 diff --git a/1985/lycklama/README.md b/1985/lycklama/README.md index 4f393c02d..8c016d501 100644 --- a/1985/lycklama/README.md +++ b/1985/lycklama/README.md @@ -10,12 +10,15 @@ NOTE: This entry uses non-standard args to main() that do not work with modern c ## Judges' comments: -Run the program without any arguments. Type in some very long lines -and notice how it redisplays it. +Run the program, redirecting a file into it, and notice how it redisplays it. +For instance try: -The program itself looks like tty noise. Notice that even 'define' in #define can be defined. + ./lycklama < lycklama.c + +The program itself looks like tty noise. In the past 'define' in `#define` could +even be defined but to get this to work on modern systems we had to change the +`#o` lines to `#define`. -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 diff --git a/1985/lycklama/lycklama.c b/1985/lycklama/lycklama.c index d7a3776fd..3bb0f7462 100644 --- a/1985/lycklama/lycklama.c +++ b/1985/lycklama/lycklama.c @@ -1,16 +1,16 @@ #define o define -#o ___o write -#o ooo (unsigned) -#o o_o_ 1 -#o _o_ char -#o _oo goto -#o _oo_ read -#o o_o for -#o o_ main -#o o__ if -#o oo_ 0 -#o _o(_,__,___)(void)___o(_,__,ooo(___)) -#o __o (o_o_<<((o_o_<<(o_o_<