From: Joey Hess Date: Sun, 17 Aug 2014 19:47:12 +0000 (-0400) Subject: Reorganize some code to support building with clang. Closes: #758450 Thanks, Alexander. X-Git-Tag: debian/2.50~3 X-Git-Url: http://git.ieval.ro/?p=filters.git;a=commitdiff_plain;h=ff7b46743fdcbc5ce956e98f68bbd16dc5ed6e3b Reorganize some code to support building with clang. Closes: #758450 Thanks, Alexander. --- diff --git a/cockney.l b/cockney.l index f6d0ad2..4cc1555 100644 --- a/cockney.l +++ b/cockney.l @@ -15,19 +15,13 @@ EW [ \t.,;!\?$] %Start junk +%option noyywrap + %% %{ - void eos() { - if (yytext[yyleng-1] == '.') - dintI(); - else - unput(yytext[yyleng-1]); - } - - void plastc() { - unput(yytext[yyleng-1]); - } +void eos(); +void plastc(); %} . { srandom(time(0L)); unput(yytext[0]); BEGIN 0; } @@ -103,6 +97,19 @@ ime{EW} { printf("oime"); eos(); } %% +void eos() +{ + if (yytext[yyleng-1] == '.') + dintI(); + else + unput(yytext[yyleng-1]); +} + +void plastc() +{ + unput(yytext[yyleng-1]); +} + caseify(c) char c; { diff --git a/debian/changelog b/debian/changelog index 1af2543..eb4c118 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +filters (2.50) UNRELEASED; urgency=medium + + * Reorganize some code to support building with clang. + Closes: #758450 Thanks, Alexander. + + -- Joey Hess Sun, 17 Aug 2014 15:46:17 -0400 + filters (2.49) unstable; urgency=low * scottish: Fix typo. Closes: #688905 diff --git a/jive.l b/jive.l index 1171975..f8a1386 100644 --- a/jive.l +++ b/jive.l @@ -17,13 +17,13 @@ %o 1500 BW [ \t\(] EW [ \t.,;!\?$\)] +%option noyywrap %% + %{ - void plastc() - { - unput(yytext[yyleng-1]); - } + void plastc(); %} + @[Bb]egin(.*) | ".so ".*$ printf("%s", yytext); {BW}send printf("%ct'row",yytext[0]); @@ -202,6 +202,11 @@ meta printf("meta-fuckin'"); cally printf("c'l"); %% +void plastc() +{ + unput(yytext[yyleng-1]); +} + caseify(c) char c; { diff --git a/nyc.l b/nyc.l index b00f2b0..509979e 100644 --- a/nyc.l +++ b/nyc.l @@ -11,11 +11,10 @@ BW [ \t] SP [ \t] EW [ \t.,;!\?$] + %% %{ - void plastc() { - yyunput(yytext[yyleng-1], yytext); - } + void plastc(); %} ".so ".*$ printf("%s", yytext); [ao]ther printf("%cdder", yytext[0]=='a'?'a':'u'); @@ -72,6 +71,11 @@ negro printf("spade"); [a-z]"." { printf("%s", yytext);expletive();} %% +void plastc() +{ + yyunput(yytext[yyleng-1], yytext); +} + caseify(c) char c; { @@ -97,11 +101,6 @@ expletive() } } -main() -{ - yylex(); -} - int yywrap() { return 1;