summaryrefslogtreecommitdiff
path: root/src/lex.l
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2020-06-21 09:18:27 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2020-06-21 09:18:27 -0400
commit8a43400ccf2b23f60d1101ea4d348058e7ad3c36 (patch)
treed7b70419bbf8a50948531979dfb86aaedda2ce08 /src/lex.l
parentfc19a82a10dc797605d6cb5d9028685644c6db3d (diff)
add/use new function parseWarning, which honors -v/-q options
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/lex.l')
-rw-r--r--src/lex.l10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lex.l b/src/lex.l
index 320d206..e8453bb 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -106,9 +106,8 @@ number [0-9]+
[a-zA-Z\.]+ { int token = parse_keyword ((char *)yytext,
&yylval.num);
if (token == ERRORTOKEN) {
- twmrc_error_prefix();
- fprintf (stderr,
- "ignoring unknown keyword: %s\n",
+ parseWarning (
+ "ignoring unknown keyword: %s",
yytext);
ParseError = 1;
} else
@@ -125,9 +124,8 @@ number [0-9]+
\#[^\n]*\n {;}
[\r\n\t ] {;}
. {
- twmrc_error_prefix();
- fprintf (stderr,
- "ignoring character \"%s\"\n",
+ parseWarning (
+ "ignoring character \"%s\"",
yytext);
ParseError = 1;
}