From 4414df1b48a76e4944e7d87ecea540b8f4e59a4b Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 12 Apr 2017 14:53:27 +0000 Subject: [PATCH] isblank() is ANSI C since C99, no need to provide a replacement. OK deraadt@ --- usr.bin/lex/parse.y | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/usr.bin/lex/parse.y b/usr.bin/lex/parse.y index 090f0d4fb19..26a9809a661 100644 --- a/usr.bin/lex/parse.y +++ b/usr.bin/lex/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.9 2015/11/19 19:43:40 tedu Exp $ */ +/* $OpenBSD: parse.y,v 1.10 2017/04/12 14:53:27 millert Exp $ */ /* parse.y - parser for flex input */ @@ -103,9 +103,6 @@ int previous_continued_action; /* whether the previous rule's action was '|' */ 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); } -- 2.20.1