Get 1984/lycklama to compile

To get it to compile we have to pass to the compiler -include unistd.h.

To get it to compile without warnings we had to add -Wno-parentheses to
the compiler invocation.

Updated the README to include an example invocation (using the program
source itself) as the old way no longer works (typing in long lines
directly).

Removed some comments that turn out to not be true (it does not need a
K&R compiler for instance).
This commit is contained in:
Cody Boone Ferguson committed 2023-02-10 08:46:47 -08:00
1 parent c7ab84305a
commit e8eaf9ebd9
4 files changed
+22 -19

No files matched your search

+1
View File
@@ -0,0 +1 @@
lycklama
+2 -3
View File
@@ -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
+7 -4
View File
@@ -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
+12 -12
View File
@@ -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_<<o_o_))+(o_o_<<o_o_)))+(o_o_<<(o_o_<<(o_o_<<o_o_)))
#define ___o write
#define ooo (unsigned)
#define o_o_ 1
#define _o_ char
#define _oo goto
#define _oo_ read
#define o_o for
#define o_ main
#define o__ if
#define oo_ 0
#define _o(_,__,___)(void)___o(_,__,ooo(___))
#define __o (o_o_<<((o_o_<<(o_o_<<o_o_))+(o_o_<<o_o_)))+(o_o_<<(o_o_<<(o_o_<<o_o_)))
o_(){_o_ _=oo_,__,___,____[__o];_oo ______;_____:___=__o-o_o_; _______:
_o(o_o_,____,__=(_-o_o_<___?_-o_o_:___));o_o(;__;_o(o_o_,"\b",o_o_),__--);
_o(o_o_," ",o_o_);o__(--___)_oo _______;_o(o_o_,"\n",o_o_);______:o__(_=_oo_(