mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
error: replace nasm_verror() indirection with preproc callback
Since pp_error_list_macros() was introduced, the only need for pp_verror() is to suppress error messages in certain contexts. Replace this function with a preprocessor callback, preproc->pp_suppress_error(), so we can drop the nasm_verror() function pointer entirely. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
@@ -72,17 +72,9 @@ fatal_func printf_func(2, 3) nasm_panicf(errflags flags, const char *fmt, ...);
|
||||
fatal_func nasm_panic_from_macro(const char *file, int line);
|
||||
#define panic() nasm_panic_from_macro(__FILE__, __LINE__);
|
||||
|
||||
typedef void (*vefunc) (errflags severity, const char *fmt, va_list ap);
|
||||
extern vefunc nasm_verror;
|
||||
void nasm_verror(errflags severity, const char *fmt, va_list ap);
|
||||
fatal_func nasm_verror_critical(errflags severity, const char *fmt, va_list ap);
|
||||
|
||||
static inline vefunc nasm_set_verror(vefunc ve)
|
||||
{
|
||||
vefunc old_verror = nasm_verror;
|
||||
nasm_verror = ve;
|
||||
return old_verror;
|
||||
}
|
||||
|
||||
/*
|
||||
* These are the error severity codes which get passed as the first
|
||||
* argument to an efunc.
|
||||
|
Reference in New Issue
Block a user