summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-12-01 21:02:51 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-12-01 21:02:51 +0300
commitb449ce49d9e81c26e7aa2935144dd66bd1f36f08 (patch)
tree4a07392be509bf8ae5a5a861e10828a660f252b6
parenta14e65699b78396418816416c37af11e59503362 (diff)
downloadnasm-b449ce49d9e81c26e7aa2935144dd66bd1f36f08.tar.gz
stdscan: Use nasm_error helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--asm/stdscan.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/asm/stdscan.c b/asm/stdscan.c
index 30cba3e2..9194a925 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;
}