From 7f4e9d5ed94ae3d89fa2548194ef0bf190368080 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 15 Apr 2003 13:52:33 +0000 Subject: [PATCH] * Deal with the new flex 2.5.31 as follows: - Add main and yywrap functions, though they were not needed before. - Call yyunput instead of unput macro, as the macro uses yytext_ptr, which flex undefes before the bottom set of functions are defined. Closes: #189040 * Various other fixes to build without warnings. --- cockney.l | 14 ++++++++++++-- debian/TODO | 1 + debian/changelog | 11 +++++++++++ debian/control | 2 +- debian/copyright | 4 ++-- filters.6 | 6 +++--- jethro.l | 6 ++++-- jive.l | 13 ++++++++++++- ken.l | 5 +++++ ky00te.dir/ky00te.yacc | 2 +- makesample.sh | 2 +- newspeak.l | 1 - nyc.l | 12 +++++++++++- 13 files changed, 64 insertions(+), 15 deletions(-) diff --git a/cockney.l b/cockney.l index e6c0bda..823af7e 100644 --- a/cockney.l +++ b/cockney.l @@ -94,12 +94,22 @@ eos() if (yytext[yyleng-1] == '.') dintI(); else - unput(yytext[yyleng-1]); + yyunput(yytext[yyleng-1], yytext); } plastc() { - unput(yytext[yyleng-1]); + yyunput(yytext[yyleng-1], yytext); +} + +main() +{ + yylex(); +} + +int yywrap() +{ + return 1; } caseify(c) diff --git a/debian/TODO b/debian/TODO index a1a7bfc..ad4e968 100644 --- a/debian/TODO +++ b/debian/TODO @@ -1,3 +1,4 @@ * continue to make the chef filter more similar to the old one * write and collect more filters * does anyone have an asci-art cow font? +* rms filter, though vrms already does a good job.. diff --git a/debian/changelog b/debian/changelog index dfdd0bf..8079bbc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +filters (2.32) unstable; urgency=low + + * Deal with the new flex 2.5.31 as follows: + - Add main and yywrap functions, though they were not needed before. + - Call yyunput instead of unput macro, as the macro uses yytext_ptr, + which flex undefes before the bottom set of functions are defined. + Closes: #189040 + * Various other fixes to build without warnings. + + -- Joey Hess Mon, 14 Apr 2003 23:39:26 -0400 + filters (2.31) unstable; urgency=low * censor: corrected spelling of pyvgbevf, Closes: #172976 diff --git a/debian/control b/debian/control index 65116c5..6455122 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: games Priority: optional Build-Depends: debhelper (>= 4), flex, bison | byacc | btyacc, dpkg-dev (>= 1.9.0) Maintainer: Joey Hess -Standards-Version: 3.5.8.0 +Standards-Version: 3.5.9.0 Package: filters Architecture: any diff --git a/debian/copyright b/debian/copyright index cd0bfa4..f5269a5 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -This is a Debian prepackaged version of the filters package. +This is the Debian filters package. This package was put together and debianized by Joey Hess , using sources from all over. @@ -95,6 +95,6 @@ has the following license statement: # just for reference, you may do whatever you like with this file. -Everything else is copyright 1999-2002 by Joey Hess, under the terms of GPL. +Everything else is copyright 1999-2003 by Joey Hess, under the terms of GPL. The full text of the GNU GPL can be found in /usr/share/common-licenses/GPL on Debian systems. diff --git a/filters.6 b/filters.6 index 279ec0d..2308046 100644 --- a/filters.6 +++ b/filters.6 @@ -8,10 +8,10 @@ ken, b1ff, censor, chef, cockney, eleet, fudd, jethro, jibberish, jive, kraut, k eleet | wall # b1ff works well too - b1ff | bitchx | censor + b1ff | ircII | censor .SH "DESCRIPTION" All of these programs are filters to do all sorts of strange things to text. -No racial or societal slurs are intended. For amusement only. +No personal, racial, societal slurs are intended. For amusement only. .P All the filters read input from stdin, change it, and write the filtered text to stdout. @@ -63,6 +63,6 @@ Joey Hess . Daniel V Klein wrote the cockney, jive, and nyc filters. jibberish is by Raul Miller , jethro is by Duane Paulson , rasterman is by Zachary Beane, ken is by -Stephen K Mulrine , newspeak is authored by Jamie Zawinski +Stephen K Mulrine , newspeak is by Jamie Zawinski , studly is by Nick Phillips , and kraut is by John Sparks. diff --git a/jethro.l b/jethro.l index 1ea0f79..89ed150 100644 --- a/jethro.l +++ b/jethro.l @@ -206,7 +206,6 @@ char WhAt[]="@(#)Duane Paulson's hillbilly text filter. (jethro)\n@(#)$Header: j {SW}[Aa]t{BW}all{EW} *(yytext+1)=(char)'A'; SESUB("A tall"); {SW}[Aa]m{EW} | -{SW}[Aa]re{EW} SESUB("Is"); {SW}[Ww]as{EW} | {SW}[Ww]ere{EW} SESUB("Wuz"); {SW}[Ww]asn't{EW} SESUB("Wasunt"); @@ -231,7 +230,6 @@ ing SUB("in"); {SW}[Tt]oo{EW} SESUB("Besides"); {SW}[Tt]o{EW} SESUB("Tuh"); {SW}[Aa][n]?{EW} SESUB("Ah"); -{SW}[Aa]re{EW} | {SW}[Oo]ur{EW} | {SW}[Oo]r{EW} SESUB("Ore"); {SW}[Oo]f{EW} SESUB("Uv"); @@ -271,3 +269,7 @@ main() yylex(); } +int yywrap() +{ + return 1; +} diff --git a/jive.l b/jive.l index dcb9924..750b3cd 100644 --- a/jive.l +++ b/jive.l @@ -7,6 +7,7 @@ * * Reproduction permitted so long as this notice is retained. */ + %} %e 1700 %p 4000 @@ -196,7 +197,7 @@ cally printf("c'l"); %% plastc() { - unput(yytext[yyleng-1]); + yyunput(yytext[yyleng-1], yytext); } caseify(c) @@ -242,6 +243,16 @@ expletive() } } +main() +{ + yylex(); +} + +int yywrap() +{ + return 1; +} + /* * Bugs: * diff --git a/ken.l b/ken.l index 784db92..6c6788c 100644 --- a/ken.l +++ b/ken.l @@ -292,3 +292,8 @@ main() srand(getpid()); yylex(); } + +int yywrap() +{ + return 1; +} diff --git a/ky00te.dir/ky00te.yacc b/ky00te.dir/ky00te.yacc index ac49c06..4254394 100644 --- a/ky00te.dir/ky00te.yacc +++ b/ky00te.dir/ky00te.yacc @@ -119,7 +119,7 @@ t: CUTE { printf("ky00te!"); } extern char mylval; -void yyerror(char *s) { +int yyerror(char *s) { printf("%s\n",s); } diff --git a/makesample.sh b/makesample.sh index ce38c2e..dc1f045 100644 --- a/makesample.sh +++ b/makesample.sh @@ -2,6 +2,6 @@ chmod +x $1 echo $1 >>SAMPLES echo "-------------" >>SAMPLES -printf "Here's how this filter sounds, in everyday use.\nThis line is another sample of this filter's output." | ./$1 >>SAMPLES +printf "Here's how this filter sounds, in everyday use.\nNow is the time for all good men to come to the aid of their country." | ./$1 >>SAMPLES echo "" >>SAMPLES echo "" >>SAMPLES diff --git a/newspeak.l b/newspeak.l index 51333ab..20524e5 100644 --- a/newspeak.l +++ b/newspeak.l @@ -13,7 +13,6 @@ * for any purpose. It is provided "as is" without express or * implied warranty. * - * Permissiom granted for noncommercial use and redistribution. * To compile: * * flex newspeak.l diff --git a/nyc.l b/nyc.l index 8505c16..e6546b2 100644 --- a/nyc.l +++ b/nyc.l @@ -68,7 +68,7 @@ negro printf("spade"); %% plastc() { - unput(yytext[yyleng-1]); + yyunput(yytext[yyleng-1], yytext); } caseify(c) @@ -95,3 +95,13 @@ expletive() } } } + +main() +{ + yylex(); +} + +int yywrap() +{ + return 1; +} -- 2.30.2