From af1028c4c7cfad5e5d62596c71a167cdc6f84b10 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 8 Apr 2023 03:23:45 -0700 Subject: [PATCH] Remove 1992/lush alt code Instead refer to the 1992 archive (tarball). --- 1992/lush/Makefile | 4 +- 1992/lush/README.md | 29 +++----- 1992/lush/lush.alt.c | 167 ------------------------------------------- 3 files changed, 13 insertions(+), 187 deletions(-) delete mode 100644 1992/lush/lush.alt.c diff --git a/1992/lush/Makefile b/1992/lush/Makefile index a4002d851..17210a790 100644 --- a/1992/lush/Makefile +++ b/1992/lush/Makefile @@ -112,8 +112,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= ${PROG}.alt.o -ALT_TARGET= ${PROG}.alt +ALT_OBJ= +ALT_TARGET= ################# diff --git a/1992/lush/README.md b/1992/lush/README.md index 8b93a22ff..cbd620e00 100644 --- a/1992/lush/README.md +++ b/1992/lush/README.md @@ -1,17 +1,21 @@ # Worst Abuse of the C Preprocessor: - Ed Luke - Mississippi State University - P.O. Box 6176 - Mississippi State, MS 39762, USA +Ed Luke +Mississippi State University +P.O. Box 6176 +Mississippi State, MS 39762, USA ## To build: - make all +```sh +make all +``` ## To run: - ./runme.sh +```sh +./runme.sh +``` [Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a patch which makes this @@ -23,18 +27,7 @@ instead of `gets()` and also added the `runme.sh` script to demonstrate it (using make was problematic). Cody notes that unfortunately this does not work with clang due to different compiler messages. Thank you Cody! -For the original entry see [lush.alt.c](lush.alt.c) described in the `Alternate -code` section below. - -### Alternate code: - -For the original source (fixed to work with gcc) which uses gets() try: - -```sh -make alt -``` - -Use `lush.alt` as you would `lush`. +For the original entry see the [archive tarball](/archive/archive-1992.tar.bz2). ## Judges' comments: diff --git a/1992/lush/lush.alt.c b/1992/lush/lush.alt.c deleted file mode 100644 index c788ea0f0..000000000 --- a/1992/lush/lush.alt.c +++ /dev/null @@ -1,167 +0,0 @@ -#define f 000: - char - *s,* - t,v; - char - _ [ - 999] - ,x [ - 999] - ,*p= - x ; - char - *av[ - ]= { - "W", - "H", - "o", - "l", - "N", - "e", - " ", - "r", - "d", - ".", - "m", - "s", - "g", - "!", - "*", - "\n" - } ; - int - n= 0 - ;int - __ = - 0,i= - 000; - main - () { -#define f 001: -#define F 042: -#define f 100: - _[i-- -#define f 126: -#define f 132: -#define f 103: -#define f 202: -#define f 666: -#define f 77:: -#define f 101: - ]=0 -#define f 232: -#define f 151: - ;if( -#define f 256: - !i){ - puts - ("I" - "BM" - " S" - "UX" - );;; - ;;;} - ;for - ( ; - gets - (_); - ) { - for( -#define f 301: - t=_, -#define f 700: -#define f 999: - s=t, -#define f 77 : -#define f 300: - s=t; -#define f s=t; -#define f 123: -#define f 127: - *t&& - !(!( - *t < - '0' - ||*t - >'9' - )&&! - ((t[ - 1] ^ - ':') - &&(t - [1]^ - '.') - )) ; - t++) -#define f 137: -#define f 133: - ;if( -#define f 111: -#define f 220: - v^*t - &&*t - ){v= - *t;; - n=n* - 2+(1 - &*t) - ;__= - (__+ - 1)&3 - ; __ - ||(( - n<15 - &&(* - p= * - av[n - ] ), -#define f 2+2: - p++) - ,n=0 - );}} -#define f ==4: - ;*p= - '\0' - ;;;; -#define f puts - puts - (x); - s=t; -#define f s=5; - s=t; -#define f s=5: - s=t; -#define f 445: -#define f 113: -#define f 900: - s=t; -#define f n22: -#define f n40: - s=t; -#define f nn6: - s=t; -#define f nn1: -#define f 0:-- - s=t; -#define f 19:- -#define f x2:x - s=t; -#define f x1:x - s=t; -#define f y2:x -#define f y7:y - s=t; -#define f 1::: - s=t; -#define f @3:@ -#define f 10:0 -#define f x+1: - s=t; -#define f 2::: -#define f 3::: -#define x 7::: -#define y 3::: -#define z 990: -#define Z 47:: - ;;;} -