against YASM_ERROR_GENERAL errors.
* errwarn.h (yasm_error_matches): Remove #defined function.
svn path=/trunk/yasm/; revision=1525
yasm_exrefstr = NULL;
}
+int
+yasm_error_matches(yasm_error_class eclass)
+{
+ if (yasm_eclass == YASM_ERROR_NONE)
+ return eclass == YASM_ERROR_NONE;
+ if (yasm_eclass == YASM_ERROR_GENERAL)
+ return eclass == YASM_ERROR_GENERAL;
+ return (yasm_eclass & eclass) == eclass;
+}
+
void
yasm_error_set_va(yasm_error_class eclass, const char *format, va_list va)
{
#ifndef YASM_DOXYGEN
extern yasm_error_class yasm_eclass;
#define yasm_error_occurred() yasm_eclass
-#define yasm_error_matches(eclass) (yasm_eclass != YASM_ERROR_NONE && \
- ((eclass) == YASM_ERROR_GENERAL || \
- (yasm_eclass & (eclass)) == (eclass)))
#endif
/** Set the error indicator (va_list version). Has no effect if the error