Also close bug
[filters.git] / nyc.l
diff --git a/nyc.l b/nyc.l
index 8505c1652ab79b3e21793130e5aad149db369104..ddc5dbeaa5142e9434d357aaf90e72347a4ab022 100644 (file)
--- a/nyc.l
+++ b/nyc.l
 BW [ \t]
 SP [ \t]
 EW [ \t.,;!\?$]
+
+%{
+    void plastc(void);
+    char caseify(char);
+    void expletive(void);
+%}
+
 %%
 ".so ".*$                      printf("%s", yytext);
 [ao]ther                       printf("%cdder", yytext[0]=='a'?'a':'u');
@@ -66,12 +73,13 @@ negro                               printf("spade");
 !                              printf("!  Okay?");
 [a-z]"."               {       printf("%s", yytext);expletive();}
 %%
-plastc()
+
+void plastc()
 {
-       unput(yytext[yyleng-1]);
+    yyunput(yytext[yyleng-1], yytext);
 }
 
-caseify(c)
+char caseify(c)
 char c;
 {
        if (yytext[0] <= 'Z')
@@ -83,7 +91,7 @@ char c;
 short  count = 0;
 short  which = 0;
 
-expletive()
+void expletive()
 {
        if (count++ % 4 == 0) {
                switch (which++ % 5) {
@@ -95,3 +103,8 @@ expletive()
                        }
                }
 }
+
+int yywrap()
+{
+       return 1;
+}
This page took 0.010722 seconds and 4 git commands to generate.