From: Eric S. Raymond Date: Mon, 15 Nov 1993 18:12:48 +0000 (+0000) Subject: ANSI/POSIX conformance. X-Git-Tag: 2.0~12 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=ba2e48e4d52defb1f0365c6185d9228b907a316f;p=cstrings.git ANSI/POSIX conformance. --- diff --git a/cstrings.l b/cstrings.l index f40c388..e3bd1fc 100644 --- a/cstrings.l +++ b/cstrings.l @@ -4,9 +4,10 @@ * * by Eric S. Raymond , July 10 1990 * - * Note: this code will not run unaltered on Berkeley UNIXes that don't have - * a System V compatibility suite. If this bothers you, get a real UNIX. + * version 2.0, November 15 1993 -- strict ANSI/POSIX conformance. */ +#define _POSIX_SOURCE + #include #include #include @@ -29,7 +30,7 @@ static FILE *listfp; /* * The VIS class is intended to include all printables except the string quote. - * EBCDIC sites can eat flaming death, thank you. Have a nice day. + * EBCDIC sites can eat flaming death, thank you. Have a nice day. */ %} VIS [!#-~ ] @@ -174,7 +175,7 @@ char *str; * is an interesting question in design * philosophy... */ - return(minlength && (strlen(str) - 2 < minlength)); + return(minlength && ((int)strlen(str) - 2 < minlength)); } void cstrfilt(ifp, ofp)