From: nasm-bot f. C. G. <gor...@gm...> - 2018-12-01 18:36:17
|
Commit-ID: b449ce49d9e81c26e7aa2935144dd66bd1f36f08 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=b449ce49d9e81c26e7aa2935144dd66bd1f36f08 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 1 Dec 2018 21:02:51 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 1 Dec 2018 21:02:51 +0300 stdscan: Use nasm_error helpers Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- asm/stdscan.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/asm/stdscan.c b/asm/stdscan.c index 30cba3e..9194a92 100644 --- a/asm/stdscan.c +++ b/asm/stdscan.c @@ -113,8 +113,7 @@ static int stdscan_handle_brace(struct tokenval *tv) { if (!(tv->t_flag & TFLAG_BRC_ANY)) { /* invalid token is put inside braces */ - nasm_error(ERR_NONFATAL, - "`%s' is not a valid decorator with braces", tv->t_charptr); + nasm_nonfatal("`%s' is not a valid decorator with braces", tv->t_charptr); tv->t_type = TOKEN_INVALID; } else if (tv->t_flag & TFLAG_BRC_OPT) { if (is_reg_class(OPMASKREG, tv->t_integer)) { @@ -167,10 +166,10 @@ int stdscan(void *private_data, struct tokenval *tv) * is it actually a register or instruction name, or what? */ token_type = nasm_token_hash(ourcopy, tv); - if (unlikely(tv->t_flag & TFLAG_WARN)) { - nasm_error(ERR_WARNING|ERR_PASS1|ERR_WARN_PTR, - "`%s' is not a NASM keyword", tv->t_charptr); - } + if (unlikely(tv->t_flag & TFLAG_WARN)) { + nasm_warnf(ERR_PASS1|ERR_WARN_PTR, "`%s' is not a NASM keyword", + tv->t_charptr); + } if (likely(!(tv->t_flag & TFLAG_BRC))) { /* most of the tokens fall into this case */ @@ -285,8 +284,7 @@ int stdscan(void *private_data, struct tokenval *tv) stdscan_bufptr = nasm_skip_spaces(stdscan_bufptr); /* if brace is not closed properly or token is too long */ if ((*stdscan_bufptr != '}') || (token_len > MAX_KEYWORD)) { - nasm_error(ERR_NONFATAL, - "invalid decorator token inside braces"); + nasm_nonfatal("invalid decorator token inside braces"); return tv->t_type = TOKEN_INVALID; } |