Reorganize some code to support building with clang. Closes: #758450 Thanks, Alexander.
authorJoey Hess <joey@kitenet.net>
Sun, 17 Aug 2014 19:47:12 +0000 (15:47 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 17 Aug 2014 19:47:12 +0000 (15:47 -0400)
cockney.l
debian/changelog
jive.l
nyc.l

index f6d0ad202958460041f56bb34a2264b86406019f..4cc1555dc2ff75c9096bba477586bd997258fc23 100644 (file)
--- 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();
 %}
 
 <junk>.                        {       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;
 {
index 1af25433e4bbd4108525bc8cc64e3baadd9845a2..eb4c118ad3b8f5ef0a870fb2f6448bd8c589757d 100644 (file)
@@ -1,3 +1,10 @@
+filters (2.50) UNRELEASED; urgency=medium
+
+  * Reorganize some code to support building with clang.
+    Closes: #758450 Thanks, Alexander.
+
+ -- Joey Hess <joeyh@debian.org>  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 1171975dae6e0b51212b0c14967318107639a102..f8a1386d11506e58ae030bd40ea34684754f406a 100644 (file)
--- a/jive.l
+++ b/jive.l
 %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 b00f2b078288d1acaccc727f47b9c1818a271590..509979e5298647d6f554fa4522407cf68528345d 100644 (file)
--- a/nyc.l
+++ b/nyc.l
 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;
This page took 0.013739 seconds and 4 git commands to generate.