isblank() is part of C99, no reason not to use it. - todd
Index: usr.bin/lex/parse.y =================================================================== RCS file: /cvs/src/usr.bin/lex/parse.y,v retrieving revision 1.9 diff -u -p -u -r1.9 parse.y --- usr.bin/lex/parse.y 19 Nov 2015 19:43:40 -0000 1.9 +++ usr.bin/lex/parse.y 12 Apr 2017 14:17:22 -0000 @@ -103,9 +103,6 @@ int previous_continued_action; /* whethe ccladd( currccl, c ); \ }while(0) -/* While POSIX defines isblank(), it's not ANSI C. */ -#define IS_BLANK(c) ((c) == ' ' || (c) == '\t') - /* On some over-ambitious machines, such as DEC Alpha's, the default * token type is "long" instead of "int"; this leads to problems with * declaring yylval in flexdef.h. But so far, all the yacc's I've seen @@ -884,7 +881,7 @@ ccl : ccl CHAR '-' CHAR ccl_expr: CCE_ALNUM { CCL_EXPR(isalnum); } | CCE_ALPHA { CCL_EXPR(isalpha); } - | CCE_BLANK { CCL_EXPR(IS_BLANK); } + | CCE_BLANK { CCL_EXPR(isblank); } | CCE_CNTRL { CCL_EXPR(iscntrl); } | CCE_DIGIT { CCL_EXPR(isdigit); } | CCE_GRAPH { CCL_EXPR(isgraph); } @@ -905,7 +902,7 @@ ccl_expr: | CCE_NEG_ALNUM { CCL_NEG_EXPR(isalnum); } | CCE_NEG_ALPHA { CCL_NEG_EXPR(isalpha); } - | CCE_NEG_BLANK { CCL_NEG_EXPR(IS_BLANK); } + | CCE_NEG_BLANK { CCL_NEG_EXPR(isblank); } | CCE_NEG_CNTRL { CCL_NEG_EXPR(iscntrl); } | CCE_NEG_DIGIT { CCL_NEG_EXPR(isdigit); } | CCE_NEG_GRAPH { CCL_NEG_EXPR(isgraph); }