Get 1994/ldb to compile
This required some -includes at the compiler line as well as use of the comma operator as srand() returns void but it was used in || expression.
This commit is contained in:
1 parent
420ebd9d0f
commit
00e5b58539
3 files changed
+31
-9
No files matched your search
+7
-1
@@ -97,7 +97,7 @@ CDEFINE=
|
|||||||
|
|
||||||
# Include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
CINCLUDE=
|
CINCLUDE= -include stdio.h -include stdlib.h -include time.h
|
||||||
#CINCLUDE= -include stdlib.h
|
#CINCLUDE= -include stdlib.h
|
||||||
#CINCLUDE= -include stdio.h
|
#CINCLUDE= -include stdio.h
|
||||||
#CINCLUDE= -include stdlib.h -include stdio.h
|
#CINCLUDE= -include stdlib.h -include stdio.h
|
||||||
@@ -169,6 +169,11 @@ TARGET= ${PROG}
|
|||||||
ALT_OBJ=
|
ALT_OBJ=
|
||||||
ALT_TARGET=
|
ALT_TARGET=
|
||||||
|
|
||||||
|
# FORCE use of -trigraphs
|
||||||
|
#
|
||||||
|
CFLAGS+= -trigraphs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# build the entry
|
# build the entry
|
||||||
@@ -182,6 +187,7 @@ all: data ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
|
@echo "NOTE: this entry uses gets() so you might get a warning compiling and/or running this."
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
+23
-7
@@ -10,24 +10,40 @@
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
### To run
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so it would
|
||||||
|
compile and work with modern compilers. Thank you Cody for your assistance!
|
||||||
|
|
||||||
|
NOTE: this entry uses `gets()` so you will likely get a warning on compilation
|
||||||
|
and/or execution of the program.
|
||||||
|
|
||||||
|
|
||||||
|
## To run:
|
||||||
|
|
||||||
./ldb < file
|
./ldb < file
|
||||||
|
|
||||||
Try:
|
some_command | ./ldb
|
||||||
|
|
||||||
|
NOTE: input lines must be under 232 characters long.
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
./ldb < /etc/passwd
|
./ldb < /etc/passwd
|
||||||
|
|
||||||
|
printf "The International Obfuscated C Code Contest\n
|
||||||
|
Best One-liner\n
|
||||||
|
by Laurion Burchall" | ./ldb
|
||||||
|
|
||||||
## Judges' comments
|
## Judges' comments
|
||||||
|
|
||||||
Tri-graphs are natural obfuscators. Most C-beautifiers become
|
Trigraphs are natural obfuscators. Most C-beautifiers become
|
||||||
C-uglifiers because they don't handle them correctly.
|
C-uglifiers because they don't handle them correctly.
|
||||||
|
|
||||||
Can you figure out how it prints a given random line from stdin?
|
Can you figure out how it prints a given random line from stdin?
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments
|
||||||
|
|
||||||
All input lines must be under 232 characters long. The compiling
|
All input lines must be under 232 characters long. The compiling
|
||||||
platform should be ASCII based.
|
platform should be ASCII based.
|
||||||
|
|
||||||
Copyright (c) 1994, Landon Curt Noll & Larry Bassel.
|
Copyright (c) 1994, Landon Curt Noll & Larry Bassel.
|
||||||
All Rights Reserved. Permission for personal, educational or non-profit use is
|
All Rights Reserved. Permission for personal, educational or non-profit use is
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
int _,O,__??('}'??);main(){while(O?gets((rand()%O++?':':_)+__)||puts(&__??(_??))&_:srand(time((O+++_)))||O);}
|
int _,O,__??('}'??);main(){while(O?gets((rand()%O++?':':_)+__)||puts(&__??(_??))&_:(srand(time((O+++_))),0)||O);}
|
||||||
Reference in new issue
Block a user