From 027a076285666ab63987cfeef204543963684359 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 18 Jul 2015 11:26:13 +0300 Subject: [PATCH] Don't give special treatement to kraut and scramble --- Makefile | 13 +---- debian/copyright | 2 +- kraut.dir/destructions | 36 ------------ kraut.dir/kraut.c | 25 --------- kraut.dir/kraut.l | 81 --------------------------- kraut.l | 75 +++++++++++++++++++++++++ ky00te.dir/makefile | 2 +- scramble.dir/scramble.c => scramble.c | 0 scramble.dir/Makefile | 5 -- 9 files changed, 80 insertions(+), 159 deletions(-) delete mode 100644 kraut.dir/destructions delete mode 100644 kraut.dir/kraut.c delete mode 100644 kraut.dir/kraut.l create mode 100644 kraut.l rename scramble.dir/scramble.c => scramble.c (100%) delete mode 100644 scramble.dir/Makefile diff --git a/Makefile b/Makefile index a30c64e..a59b5ab 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ LEX = flex BUILD = jethro kraut cockney jive nyc ken ky00te newspeak nethackify scramble OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd \ censor spammer uniencode pirate kenny scottish fanboy LOLCAT -CFLAGS = -O2 -lfl +CFLAGS = -O2 export CFLAGS INSTALL_PROGRAM = install @@ -34,16 +34,14 @@ samples: $(BUILD) $(OTHER) clean: $(RM) -f core *.o *~ $(BUILD) SAMPLES cd ky00te.dir && make clean - rm -f kraut.dir/lex.yy.c cd nethackify.dir && make clean - cd scramble.dir && make clean .SUFFIXES: .l .l: $(RM) $*.c $(LEX) -t $< > $*.c - $(CC) -o $@ $*.c $(CFLAGS) + $(CC) -o $@ $*.c $(CFLAGS) -lfl $(RM) $*.c .SUFFIXES: .dir @@ -54,12 +52,7 @@ clean: ky00te: cd ky00te.dir && make -kraut: - cd kraut.dir && lex kraut.l - cd kraut.dir && $(CC) kraut.c lex.yy.c -o ../kraut - nethackify: cd nethackify.dir && make -scramble: - cd scramble.dir && make +scramble: scramble.c diff --git a/debian/copyright b/debian/copyright index 900ee9e..bdb27fa 100644 --- a/debian/copyright +++ b/debian/copyright @@ -12,7 +12,7 @@ Copyright: 1993 Duane Paulson License: other ** Public domain. Use at your own risk. Y'all come back now, heah? -Files: kraut.dir/* +Files: kraut.l Copyright: 1989 John Sparks License: other /* This is in the public domain. Do with it as you will. *\ diff --git a/kraut.dir/destructions b/kraut.dir/destructions deleted file mode 100644 index 4390437..0000000 --- a/kraut.dir/destructions +++ /dev/null @@ -1,36 +0,0 @@ - Kraut - +++++++++++++++++ -Compiling Kraut: - -You should have the files: kraut.c and kraut.l and lex.yy.c - - -kraut.l must be run thru the unix 'lex' utility to produce the file lex.yy.c -Then compile kraut.c and lex.yy.c to produce kraut - - $lex kraut.l - $cc kraut.c lex.yy.c -o kraut - (You may get a list of warnings from the compiler. Ignore them.) - -Note: lex.yy.c is included in this package. You only need to use lex if you -wish to make changes to kraut. - -Using Kraut: - - Kraut uses standard input and output. - -examples: - -To translate a file called 'note' and output kraut to a file called 'knote': - - $ cat note | kraut > knote - -To translate a file called 'note' and just print it to the screen: - - $ cat note | kraut - -To have kraut wait to translate what you type at the keyboard and return it in -kraut on your screen: - - $ kraut - diff --git a/kraut.dir/kraut.c b/kraut.dir/kraut.c deleted file mode 100644 index e09ba5f..0000000 --- a/kraut.dir/kraut.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -/* Kraut v0.9 */ -/* by */ -/* John Sparks */ -/* 5-5-1989 */ - -/* This is in the public domain. Do with it as you will. */ - -const char *yylex(void); - -int main() -{ - char *line; - - while((line = (char *) yylex())) { - printf("%s", line); - } - - return 0; -} - -int yywrap () -{ - return (1); -} diff --git a/kraut.dir/kraut.l b/kraut.dir/kraut.l deleted file mode 100644 index e46acde..0000000 --- a/kraut.dir/kraut.l +++ /dev/null @@ -1,81 +0,0 @@ -%e 2000 -%p 5000 -%n 1000 -%k 500 -%a 4000 -%o 2000 -BW [ ] -EW [ .,;!?] - -%{ -#define YY_DECL const char *yylex(void) - char buf[128]; - -%} - -%% -ing return("ingkt"); -" the " return(" ze "); -"The " return("Ze "); -" with " return(" mitt "); -"With " return("Mitt "); -wr return("w-r-r"); -Wr return("W-r-r"); -R return("R-r-r"); -"Yes " return("Jawohl "); -" r" return(" r-r-r"); -"Yes." return("Jawohl."); -"Yes!" return("Jawohl!"); -"YES!" return("JAWOHL!"); -" yes " return(" ja "); -" yes." return(" ja."); -" yes!" return(" yes!"); -"No " return("Nein "); -"No!" return("Nein!"); -"No?" return("Nein?"); -" no " return(" nein "); -" no." return(" nein."); -" no!" return(" nein!"); -" no?" return(" nein?"); -[Mm]"r." return("Herr"); -[Mm]"rs." return("Frau"); -Miss return("Fraulein"); -" of " return(" uff "); -"Of " return("Uff "); -my return("mein"); -My return("Mein"); -" and " return(" undt "); -"And " return("Undt "); -"One " return("Ein "); -" one" return(" ein"); -"Is " return("Ist "); -" is " return(" ist "); -"ow " return("ow "); -"w " return("w "); -sh return("sch"); -Sh return("Sch"); -ch return("ch"); -Ch return("Ch"); -" c" return(" k"); -" C" return(" K"); - -v return("f"); -V return("F"); -" w" return(" v"); -W return("V"); -th return("d"); -Th return("D"); -[Jj]ohn return("Johann"); -[Ww]illiam return("Wilhelm"); -[Bb]rad return("Wilhelm"); -[Gg]ary return("Gerhardt"); -[Jj]on return("Hansel"); - -[a-f]"!" {sprintf(buf,"%s Naturlich!",yytext);return(buf);} -[p-z]"!" {sprintf(buf,"%s Sieg Heil!",yytext);return(buf);} -. return(yytext); -\n return("\n"); - -%% - - diff --git a/kraut.l b/kraut.l new file mode 100644 index 0000000..bc522d4 --- /dev/null +++ b/kraut.l @@ -0,0 +1,75 @@ +%e 2000 +%p 5000 +%n 1000 +%k 500 +%a 4000 +%o 2000 +BW [ ] +EW [ .,;!?] + +%% +ing printf("ingkt"); +" the " printf(" ze "); +"The " printf("Ze "); +" with " printf(" mitt "); +"With " printf("Mitt "); +wr printf("w-r-r"); +Wr printf("W-r-r"); +R printf("R-r-r"); +"Yes " printf("Jawohl "); +" r" printf(" r-r-r"); +"Yes." printf("Jawohl."); +"Yes!" printf("Jawohl!"); +"YES!" printf("JAWOHL!"); +" yes " printf(" ja "); +" yes." printf(" ja."); +" yes!" printf(" yes!"); +"No " printf("Nein "); +"No!" printf("Nein!"); +"No?" printf("Nein?"); +" no " printf(" nein "); +" no." printf(" nein."); +" no!" printf(" nein!"); +" no?" printf(" nein?"); +[Mm]"r." printf("Herr"); +[Mm]"rs." printf("Frau"); +Miss printf("Fraulein"); +" of " printf(" uff "); +"Of " printf("Uff "); +my printf("mein"); +My printf("Mein"); +" and " printf(" undt "); +"And " printf("Undt "); +"One " printf("Ein "); +" one" printf(" ein"); +"Is " printf("Ist "); +" is " printf(" ist "); +"ow " printf("ow "); +"w " printf("w "); +sh printf("sch"); +Sh printf("Sch"); +ch printf("ch"); +Ch printf("Ch"); +" c" printf(" k"); +" C" printf(" K"); + +v printf("f"); +V printf("F"); +" w" printf(" v"); +W printf("V"); +th printf("d"); +Th printf("D"); +[Jj]ohn printf("Johann"); +[Ww]illiam printf("Wilhelm"); +[Bb]rad printf("Wilhelm"); +[Gg]ary printf("Gerhardt"); +[Jj]on printf("Hansel"); + +[a-f]"!" {printf("%s Naturlich!",yytext);} +[p-z]"!" {printf("%s Sieg Heil!",yytext);} +. printf("%s", yytext); +\n printf("\n"); + +%% + + diff --git a/ky00te.dir/makefile b/ky00te.dir/makefile index 47d1f64..715559e 100644 --- a/ky00te.dir/makefile +++ b/ky00te.dir/makefile @@ -5,7 +5,7 @@ clean: rm -f ../ky00te ../ky00te: y.tab.o lex.yy.o - $(CC) -o ../ky00te lex.yy.o y.tab.o $(CFLAGS) + $(CC) -o ../ky00te lex.yy.o y.tab.o $(CFLAGS) -lfl lex.yy.o: lex.yy.c y.tab.h $(CC) $(CFLAGS) -c lex.yy.c diff --git a/scramble.dir/scramble.c b/scramble.c similarity index 100% rename from scramble.dir/scramble.c rename to scramble.c diff --git a/scramble.dir/Makefile b/scramble.dir/Makefile deleted file mode 100644 index 4b4e7cd..0000000 --- a/scramble.dir/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -../scramble: scramble.c - $(CC) -o $@ $< -O2 -g - -clean: - rm -f ../scramble -- 2.39.2