Also close bug
[filters.git] / nyc.l
diff --git a/nyc.l b/nyc.l
index b00f2b078288d1acaccc727f47b9c1818a271590..ddc5dbeaa5142e9434d357aaf90e72347a4ab022 100644 (file)
--- a/nyc.l
+++ b/nyc.l
 BW [ \t]
 SP [ \t]
 EW [ \t.,;!\?$]
-%%
+
 %{
-       void plastc() {
-               yyunput(yytext[yyleng-1], yytext);
-       }
+    void plastc(void);
+    char caseify(char);
+    void expletive(void);
 %}
+
+%%
 ".so ".*$                      printf("%s", yytext);
 [ao]ther                       printf("%cdder", yytext[0]=='a'?'a':'u');
 [Nn]othing                     printf("%cuttin'", yytext[0]);
@@ -72,7 +74,12 @@ negro                                printf("spade");
 [a-z]"."               {       printf("%s", yytext);expletive();}
 %%
 
-caseify(c)
+void plastc()
+{
+    yyunput(yytext[yyleng-1], yytext);
+}
+
+char caseify(c)
 char c;
 {
        if (yytext[0] <= 'Z')
@@ -84,7 +91,7 @@ char c;
 short  count = 0;
 short  which = 0;
 
-expletive()
+void expletive()
 {
        if (count++ % 4 == 0) {
                switch (which++ % 5) {
@@ -97,11 +104,6 @@ expletive()
                }
 }
 
-main()
-{
-       yylex();
-}
-
 int yywrap()
 {
        return 1;
This page took 0.010808 seconds and 4 git commands to generate.