/**
* This bit indicates whether a number is considered a system error code.
* If yes, the system errno is just the result of clearing this bit from
/**
* This bit indicates whether a number is considered a system error code.
* If yes, the system errno is just the result of clearing this bit from
/** Set the system error bit for the given number. */
#define ERRNO_TO_ERROR(num) ((num) | (1 << SYSTEM_ERROR_BIT))
/** Set the system error bit for the given number. */
#define ERRNO_TO_ERROR(num) ((num) | (1 << SYSTEM_ERROR_BIT))
#define ALL_ERRORS \
_ERROR(SUCCESS, "success") \
_ERROR(SYNTAX, "syntax error") \
#define ALL_ERRORS \
_ERROR(SUCCESS, "success") \
_ERROR(SYNTAX, "syntax error") \
_ERROR(EMPTY, "file empty") \
_ERROR(MMAP, "mmap error") \
_ERROR(OSL, "osl error") \
_ERROR(EMPTY, "file empty") \
_ERROR(MMAP, "mmap error") \
_ERROR(OSL, "osl error") \
_ERROR(OUTPUT, "error writing output") \
_ERROR(MALFORMED_FORMAT, "malformed format string") \
_ERROR(BAD_ALIGN_SPEC, "bad alignment specifier") \
_ERROR(OUTPUT, "error writing output") \
_ERROR(MALFORMED_FORMAT, "malformed format string") \
_ERROR(BAD_ALIGN_SPEC, "bad alignment specifier") \
_ERROR(UNIT, "no unit allowed here") \
_ERROR(BAD_UNIT, "invalid unit specifier") \
_ERROR(BAD_ATOM, "invalid atom") \
_ERROR(UNIT, "no unit allowed here") \
_ERROR(BAD_UNIT, "invalid unit specifier") \
_ERROR(BAD_ATOM, "invalid atom") \
+ _ERROR(BAD_OUTPUT_ARG, "invalid name for output") \
+ _ERROR(REGEX, "regular expression error") \
+ _ERROR(MKDIR, "could not create directory")
#define _ERROR(err, msg) msg,
#define DEFINE_ERRLIST char *adu_errlist[] = {ALL_ERRORS}
#define _ERROR(err, msg) msg,
#define DEFINE_ERRLIST char *adu_errlist[] = {ALL_ERRORS}
* This should be used for all calls to osl functions that return an osl error
* code. It changes the return value to \p -E_OSL appropriately so that it can
* be used for printing the correct error message.
*
* \return \a ret if \a ret >= 0, \p -E_OSL otherwise.
*/
* This should be used for all calls to osl functions that return an osl error
* code. It changes the return value to \p -E_OSL appropriately so that it can
* be used for printing the correct error message.
*
* \return \a ret if \a ret >= 0, \p -E_OSL otherwise.
*/