From 7c47ed381ba0c3f5f1d9ab690fc367fefdd4e923 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 17:57:32 -0800 Subject: [PATCH] fix 1989/fubar/fubar.sh, remove fubar.orig.c --- 1989/fubar/fubar.orig.c | 18 ------------------ 1989/fubar/fubar.sh | 4 ++-- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 1989/fubar/fubar.orig.c mode change 100644 => 100755 1989/fubar/fubar.sh diff --git a/1989/fubar/fubar.orig.c b/1989/fubar/fubar.orig.c deleted file mode 100644 index d566c64ca..000000000 --- a/1989/fubar/fubar.orig.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#define QQ 1 -#define TT 1 -#define cc main(c,v) int c; char **v;{char tt[12],qq[7]; int q=0,o=1,l=1,m=1;struct {int c;} f; -#define incest qq[6]='\0';tt[11]='\0';if(QQ==atoi(v[1])+1){(void)fprintf(stderr,"%s factorial = %d\n",v[1], TT);exit(1);}o=c+f -#define x ;while(EOF!=(o=getchar())){if(l && q=='Q' && o=='Q'){l=0;(void)getchar();(void)fread(qq,6,1,stdin);(void)printf("Q %6d",atoi(qq)+1);}else -if(m && q=='T' && o=='T'){m=0;(void)fread(tt,11,1,stdin);(void)printf("T %9d\n",atoi(tt)*QQ);}else {q=o;(void)putchar(o);}}exit(0);} -cc incest.c -o x -#define zxc ;{/* -cat incest.c | x $1 >! x1 -if ($status != 0) then -exit -endif -mv x1 incest.c -chmod +x incest.c -exec incest.c $1 -exit -*/ diff --git a/1989/fubar/fubar.sh b/1989/fubar/fubar.sh old mode 100644 new mode 100755 index 52e1136e3..248fd09aa --- a/1989/fubar/fubar.sh +++ b/1989/fubar/fubar.sh @@ -1,4 +1,4 @@ -: +#!/usr/bin/env sh # to run fubar in the 'proper' way # parse args @@ -15,5 +15,5 @@ r fubar.c w ouroboros.c EOF chmod +x ouroboros.c -ouroboros.c $1 +./ouroboros.c $1 rm -f ouroboros.c x1 x