Fix 1998/fanf for Linux
The C pre-processing stages of the build failed in Linux so instead of having those steps fanf.c became what was the code that was compiled. Now it works with both macOS and Linux. This fix required changes to fanf.c and also the Makefile. I also removed the address from the README.md file as well.
This commit is contained in:
1 parent
e0d4b98655
commit
5daa925803
4 files changed
+85
-91
No files matched your search
+3
-7
@@ -38,7 +38,7 @@ include ../../var.mk
|
|||||||
|
|
||||||
# Common C compiler warnings to silence
|
# Common C compiler warnings to silence
|
||||||
#
|
#
|
||||||
CSILENCE= -Wno-pointer-bool-conversion -Wno-unused-parameter -Wno-main
|
CSILENCE= -Wno-pointer-bool-conversion -Wno-unused-parameter -Wno-main -Wno-implicit-function-declaration
|
||||||
|
|
||||||
# Common C compiler warning flags
|
# Common C compiler warning flags
|
||||||
#
|
#
|
||||||
@@ -129,12 +129,8 @@ all: data ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
${RM} -f ${PROG}tmp1.c
|
@echo This might take a while to complete.
|
||||||
${CC} ${CFLAGS} -E $< > ${PROG}tmp1.c
|
${CC} ${CFLAGS} ${PROG}.c ${LIBS} -o $@
|
||||||
${RM} -f ${PROG}tmp2.c
|
|
||||||
${CC} ${CFLAGS} -E ${PROG}tmp1.c > ${PROG}tmp2.c
|
|
||||||
@echo This next compile may take a whie to complete
|
|
||||||
${CC} ${CFLAGS} ${PROG}tmp2.c ${LIBS} -o $@
|
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
# Most Obfuscated Translator
|
# Most Obfuscated Translator
|
||||||
|
|
||||||
Tony Finch
|
Tony Finch
|
||||||
Demon Internet
|
|
||||||
322 Regent's Park Road
|
|
||||||
Finchley
|
|
||||||
London N3 2QQ
|
|
||||||
United Kingdom
|
United Kingdom
|
||||||
<https://dotat.at>
|
<https://dotat.at>
|
||||||
|
|
||||||
|
|||||||
+76
-80
@@ -1,43 +1,39 @@
|
|||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#define l #define
|
|
||||||
#define p(p) l p b ( m p u X )
|
|
||||||
|
|
||||||
l i int
|
#define i int
|
||||||
l n struct n
|
#define n struct n
|
||||||
l x ){ return (
|
#define x ){ return (
|
||||||
l A ->
|
#define A ->
|
||||||
l N n*
|
#define N n*
|
||||||
|
|
||||||
n { i c ; N L ; N R ; N U ; N ( * F ) ( N ) ; } ;
|
n { i c ; N L ; N R ; N U ; N ( * F ) ( N ) ; } ;
|
||||||
|
|
||||||
l F A F
|
#define F A F
|
||||||
l U A U
|
#define U A U
|
||||||
l R A R
|
#define R A R
|
||||||
l L A L
|
#define L A L
|
||||||
l m q = malloc(sizeof * q ) Z F =
|
#define m q = malloc(sizeof * q ) Z F =
|
||||||
l e z F ( p ) ) ; }
|
#define e z F ( p ) ) ; }
|
||||||
l f e N
|
#define f e N
|
||||||
l g z L Q s f
|
#define g z L Q s f
|
||||||
l h ( N p x
|
#define h ( N p x
|
||||||
l H h p L U Q
|
#define H h p L U Q
|
||||||
l s R z R = q
|
#define s R z R = q
|
||||||
l t ) ? p : (
|
#define t ) ? p : (
|
||||||
l z , p
|
#define z , p
|
||||||
l Z , q
|
#define Z , q
|
||||||
l Q = p
|
#define Q = p
|
||||||
l w ! p U t p U L Q z Q U ,
|
#define w ! p U t p U L Q z Q U ,
|
||||||
l D W p R U = 0 z R Q R F ( p R ) z R F != E t
|
#define D W p R U = 0 z R Q R F ( p R ) z R F != E t
|
||||||
l W h w
|
#define W h w
|
||||||
l X z = q , 0
|
#define X z = q , 0
|
||||||
l V w p F = v z L Q
|
#define V w p F = v z L Q
|
||||||
l O m o Z L Q
|
#define O m o Z L Q
|
||||||
l M m E Z A c =
|
#define M m E Z A c =
|
||||||
l r Z R Q
|
#define r Z R Q
|
||||||
l u Z U Q
|
#define u Z U Q
|
||||||
l a ) ) ) ? 0 : j ( !
|
#define a ) ) ) ? 0 : j ( !
|
||||||
l k ( i c x
|
#define k ( i c x
|
||||||
l y 0 ) ; } i
|
#define y 0 ) ; } i
|
||||||
|
|
||||||
N q ; N
|
N q ; N
|
||||||
o H z Q L f
|
o H z Q L f
|
||||||
@@ -45,9 +41,9 @@ v H U z Q L f
|
|||||||
K W V L R f
|
K W V L R f
|
||||||
J W V R f
|
J W V R f
|
||||||
I h V R f
|
I h V R f
|
||||||
#if 0
|
|
||||||
Y W q Q g
|
|
||||||
#endif
|
|
||||||
S W w w O L L R r s , O L R r R R g
|
S W w w O L L R r s , O L R r R R g
|
||||||
E D p F Q L A c - p R A c ? J : K f
|
E D p F Q L A c - p R A c ? J : K f
|
||||||
P D w putchar ( p L R A c ) , m I g
|
P D w putchar ( p L R A c ) , m I g
|
||||||
@@ -56,64 +52,64 @@ p ;
|
|||||||
|
|
||||||
i j k c ? O U r u U U X : y b k y d k y
|
i j k c ? O U r u U U X : y b k y d k y
|
||||||
|
|
||||||
l d(d) ( ( d a b
|
#define d(d) ( ( d a b
|
||||||
l b(b) ( ( b a d
|
#define b(b) ( ( b a d
|
||||||
l E(E) b ( M E u X )
|
#define E(E) b ( M E u X )
|
||||||
|
|
||||||
main k i ) ! (
|
main k i ) ! (
|
||||||
|
|
||||||
p (I)
|
#define I b ( m I u X )
|
||||||
p (J)
|
#define J b ( m J u X )
|
||||||
p (K)
|
#define K b ( m K u X )
|
||||||
#if 0
|
|
||||||
p (Y)
|
|
||||||
#endif
|
|
||||||
p (P)
|
|
||||||
p (G)
|
|
||||||
|
|
||||||
p (S)
|
|
||||||
l B b (S (K S) K)
|
|
||||||
l SS b (B (B S) B)
|
|
||||||
l C b (SS B S (K K))
|
|
||||||
l CC b (B (B C) B)
|
|
||||||
l BB b (CC B (B B B) B)
|
|
||||||
|
|
||||||
l Y b (S (C B (S I I)) (C B (S I I)))
|
|
||||||
|
|
||||||
l CI b (C I)
|
#define P b ( m P u X )
|
||||||
|
#define G b ( m G u X )
|
||||||
|
|
||||||
l ef E(EOF)
|
#define S b ( m S u X )
|
||||||
l sp E(' ')
|
#define B b (S (K S) K)
|
||||||
l ob E('(')
|
#define SS b (B (B S) B)
|
||||||
l cb E(')')
|
#define C b (SS B S (K K))
|
||||||
l lm E('\\')
|
#define CC b (B (B C) B)
|
||||||
l nl E('\n')
|
#define BB b (CC B (B B B) B)
|
||||||
l ht E('\t')
|
|
||||||
l qs E('S')
|
|
||||||
l qk E('K')
|
|
||||||
l qi E('I')
|
|
||||||
|
|
||||||
l pair b (BB (B (B K)) C CI)
|
#define Y b (S (C B (S I I)) (C B (S I I)))
|
||||||
l atom b (B K CI)
|
|
||||||
|
|
||||||
l bind b (CC B B C)
|
#define CI b (C I)
|
||||||
|
|
||||||
l ore b (SS (CI K))
|
#define ef E((-1))
|
||||||
l gns b (Y (B (bind G) (CC S (C (ore sp (ore nl ht))) CI)))
|
#define sp E(' ')
|
||||||
|
#define ob E('(')
|
||||||
|
#define cb E(')')
|
||||||
|
#define lm E('\\')
|
||||||
|
#define nl E('\n')
|
||||||
|
#define ht E('\t')
|
||||||
|
#define qs E('S')
|
||||||
|
#define qk E('K')
|
||||||
|
#define qi E('I')
|
||||||
|
|
||||||
l pr b (Y (CC C (BB CI (B (BB (bind (P ob)) K)) (SS C (CC C (BB BB bind) K) (C (CC bind) (K (P cb))))) P))
|
#define pair b (BB (B (B K)) C CI)
|
||||||
|
#define atom b (B K CI)
|
||||||
|
|
||||||
l trans b (Y (B (bind gns) (S (BB S (C lm) lam) (C (BB S (C ob) brac) (S (C cb (CI (atom sp))) (S (C ef (CI (atom sp))) (B CI atom)))))))
|
#define bind b (CC B B C)
|
||||||
|
|
||||||
l brac b (S bind (B Y (C (BB B B bind) (S (BB S (BB S (S I)) (CC (BB (B K)) (BB K) pair)) (CC S (CC BB (BB C (C (CI sp)) CI)) pair)))))
|
#define ore b (SS (CI K))
|
||||||
|
#define gns b (Y (B (bind G) (CC S (C (ore sp (ore nl ht))) CI)))
|
||||||
|
|
||||||
l lam b (B (bind gns) (C (CC BB bind (B CI)) abs))
|
#define pr b (Y (CC C (BB CI (B (BB (bind (P ob)) K)) (SS C (CC C (BB BB bind) K) (C (CC bind) (K (P cb))))) P))
|
||||||
|
|
||||||
l abs b (Y (C (BB S (BB C CI) (SS S (BB C (BB B opt)) I)) (CC S (C C (atom qi)) (B (pair (atom qk)) atom))))
|
#define trans b (Y (B (bind gns) (S (BB S (C lm) lam) (C (BB S (C ob) brac) (S (C cb (CI (atom sp))) (S (C ef (CI (atom sp))) (B CI atom)))))))
|
||||||
|
|
||||||
l make b (B pair (pair (atom qs)))
|
#define brac b (S bind (B Y (C (BB B B bind) (S (BB S (BB S (S I)) (CC (BB (B K)) (BB K) pair)) (CC S (CC BB (BB C (C (CI sp)) CI)) pair)))))
|
||||||
|
|
||||||
l opt b (S (S I (S (BB (CC B) CI (BB K K make)) (S (BB C (BB C (C (CI qk))) (SS (SS S) (S (BB (BB (S I)) S (BB (BB (CC B) CI) (BB K K) make)) (B (CC B (BB (CC C) (BB (C (CI qk)) (pair (atom qk))) pair)) make)) (B (C (BB B C (C (CI qi)))) make))) make))) (B K make))
|
#define lam b (B (bind gns) (C (CC BB bind (B CI)) abs))
|
||||||
|
|
||||||
|
#define abs b (Y (C (BB S (BB C CI) (SS S (BB C (BB B opt)) I)) (CC S (C C (atom qi)) (B (pair (atom qk)) atom))))
|
||||||
|
|
||||||
|
#define make b (B pair (pair (atom qs)))
|
||||||
|
|
||||||
|
#define opt b (S (S I (S (BB (CC B) CI (BB K K make)) (S (BB C (BB C (C (CI qk))) (SS (SS S) (S (BB (BB (S I)) S (BB (BB (CC B) CI) (BB K K) make)) (B (CC B (BB (CC C) (BB (C (CI qk)) (pair (atom qk))) pair)) make)) (B (C (BB B C (C (CI qi)))) make))) make))) (B K make))
|
||||||
|
|
||||||
(bind (bind trans pr) (P nl) I)
|
(bind (bind trans pr) (P nl) I)
|
||||||
|
|
||||||
|
|||||||
@@ -708,6 +708,12 @@ README.md file.
|
|||||||
Cody added a call to `endwin()` to restore terminal sanity (echo etc.) when
|
Cody added a call to `endwin()` to restore terminal sanity (echo etc.) when
|
||||||
exiting the program.
|
exiting the program.
|
||||||
|
|
||||||
|
## [1998/fanf](1998/fanf/fanf.c) ([README.md](1998/fanf/README.md))
|
||||||
|
|
||||||
|
Cody fixed this for Linux. The problem was the intermediate steps to get to the
|
||||||
|
final code that is compiled. The entry itself is what was essentially what used
|
||||||
|
to be compiled. Now it works with both Linux and macOS (and BSD?).
|
||||||
|
|
||||||
|
|
||||||
## [1998/schnitzi](1998/schnitzi/schnitzi.c) ([README.md](1998/schnitzi/README.md]))
|
## [1998/schnitzi](1998/schnitzi/schnitzi.c) ([README.md](1998/schnitzi/README.md]))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user