From d0d057390017a4f9f5bd3ae5740089b0e25948c0 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Sun, 22 Jan 2017 18:18:47 +0100 Subject: scanner: Rename warn to lwarn. This avoids a naming conflict in NetBSD's libc. --- src/parse.y | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/parse.y') diff --git a/src/parse.y b/src/parse.y index 8aed868..5a07320 100644 --- a/src/parse.y +++ b/src/parse.y @@ -80,7 +80,7 @@ int previous_continued_action; /* whether the previous rule's action was '|' */ do{ \ char fw3_msg[MAXLINE];\ snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\ - warn( fw3_msg );\ + lwarn( fw3_msg );\ }while(0) /* Expand a POSIX character class expression. */ @@ -305,7 +305,7 @@ flexrule : '^' rule scon_stk[++scon_stk_ptr] = i; if ( scon_stk_ptr == 0 ) - warn( + lwarn( "all start conditions already have <> rules" ); else @@ -400,7 +400,7 @@ rule : re2 re * erroneously. */ if ( ! varlength || headcnt != 0 ) - warn( + lwarn( "trailing context made variable due to preceding '|' action" ); /* Mark as variable. */ @@ -455,7 +455,7 @@ rule : re2 re /* See the comment in the rule for "re2 re" * above. */ - warn( + lwarn( "trailing context made variable due to preceding '|' action" ); varlength = true; @@ -915,13 +915,13 @@ ccl_expr: | CCE_NEG_XDIGIT { CCL_NEG_EXPR(isxdigit); } | CCE_NEG_LOWER { if ( sf_case_ins() ) - warn(_("[:^lower:] is ambiguous in case insensitive scanner")); + lwarn(_("[:^lower:] is ambiguous in case insensitive scanner")); else CCL_NEG_EXPR(islower); } | CCE_NEG_UPPER { if ( sf_case_ins() ) - warn(_("[:^upper:] ambiguous in case insensitive scanner")); + lwarn(_("[:^upper:] ambiguous in case insensitive scanner")); else CCL_NEG_EXPR(isupper); } @@ -1018,13 +1018,13 @@ void format_warn( const char *msg, const char arg[] ) char warn_msg[MAXLINE]; snprintf( warn_msg, sizeof(warn_msg), msg, arg ); - warn( warn_msg ); + lwarn( warn_msg ); } -/* warn - report a warning, unless -w was given */ +/* lwarn - report a warning, unless -w was given */ -void warn( const char *str ) +void lwarn( const char *str ) { line_warning( str, linenum ); } -- cgit v1.2.3