/*
* newspeak.l, version 1.1.
* Lex filter to transform plain English into NewSpeak.
- * Copyright (c) 1991 Jamie Zawinski <jwz@lucid.com>.
- * Permission granted for noncommercial use and redistribution.
+ * Copyright (c) 1991 Jamie Zawinski <jwz@jwz.org>.
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that the above copyright notice appear in
+ * all copies and that both that copyright notice and this
+ * permission notice appear in supporting documentation. No
+ * representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or
+ * implied warranty.
*
* To compile:
*
#define Y2 yytext[2]
#define Y3 yytext[3]
#define C caseify
-#define C1 caseify1
#define CAP(string) capstring(0, (string),0)
#define WCAP(string) capstring(Y0,(string),1)
if (14 == fcounter++) printf("(fnord) ");
}
-[.,!?]\"([^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y0,yytext+1);
+[.,!?]\"([^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y0,yytext+2);
\"([.,!?][^\n\".!]+[.!])?\n/[\n\t ] printf("%c Hail Big Brother!\"%s",Y1,yytext+2);
-. printf(yytext);
+. printf("%s", yytext);
\n printf("\n");
%{
caseify(c)
char c;
-{ _caseify(c,0); }
-
-caseify1(c)
- char c;
-{ _caseify(c,1); }
+{
+ return _caseify(c,0);
+}