PARA_ERROR(ADD_CALLBACK, "can not add callback"), \
PARA_ERROR(ADDRESS_LOOKUP, "can not resolve requested address"),\
PARA_ERROR(AFH_RECV_BAD_FILENAME, "no file name given"), \
PARA_ERROR(ADD_CALLBACK, "can not add callback"), \
PARA_ERROR(ADDRESS_LOOKUP, "can not resolve requested address"),\
PARA_ERROR(AFH_RECV_BAD_FILENAME, "no file name given"), \
PARA_ERROR(AFS_SHORT_READ, "short read from afs socket"), \
PARA_ERROR(AFS_SIGNAL, "afs caught deadly signal"), \
PARA_ERROR(AFS_SOCKET, "afs socket not writable"), \
PARA_ERROR(AFS_SHORT_READ, "short read from afs socket"), \
PARA_ERROR(AFS_SIGNAL, "afs caught deadly signal"), \
PARA_ERROR(AFS_SOCKET, "afs socket not writable"), \
PARA_ERROR(AUDIO_FORMAT, "audio format not recognized"), \
PARA_ERROR(AUTH_REQUEST, "did not receive auth request"), \
PARA_ERROR(BAD_AFSI, "invalid afs info"), \
PARA_ERROR(AUDIO_FORMAT, "audio format not recognized"), \
PARA_ERROR(AUTH_REQUEST, "did not receive auth request"), \
PARA_ERROR(BAD_AFSI, "invalid afs info"), \
PARA_ERROR(BAD_AUTH, "authentication failure"), \
PARA_ERROR(BAD_BAND, "invalid or unexpected band designator"), \
PARA_ERROR(BAD_CHANNEL_COUNT, "channel count not supported"), \
PARA_ERROR(BAD_CHANNEL, "invalid channel"), \
PARA_ERROR(BAD_AUTH, "authentication failure"), \
PARA_ERROR(BAD_BAND, "invalid or unexpected band designator"), \
PARA_ERROR(BAD_CHANNEL_COUNT, "channel count not supported"), \
PARA_ERROR(BAD_CHANNEL, "invalid channel"), \
PARA_ERROR(BAD_CONFIG, "syntax error in config file"), \
PARA_ERROR(BAD_CT, "invalid chunk table or bad FEC configuration"), \
PARA_ERROR(BAD_FEATURE, "invalid feature request"), \
PARA_ERROR(BAD_CONFIG, "syntax error in config file"), \
PARA_ERROR(BAD_CT, "invalid chunk table or bad FEC configuration"), \
PARA_ERROR(BAD_FEATURE, "invalid feature request"), \
PARA_ERROR(BAD_FILTER_OPTIONS, "invalid filter option given"), \
PARA_ERROR(BAD_LL, "invalid loglevel"), \
PARA_ERROR(BAD_PATH, "invalid path"), \
PARA_ERROR(BAD_FILTER_OPTIONS, "invalid filter option given"), \
PARA_ERROR(BAD_LL, "invalid loglevel"), \
PARA_ERROR(BAD_PATH, "invalid path"), \
PARA_ERROR(BAD_PRIVATE_KEY, "invalid private key"), \
PARA_ERROR(BAD_SAMPLE_FORMAT, "sample format not supported"), \
PARA_ERROR(BAD_SAMPLERATE, "sample rate not supported"), \
PARA_ERROR(BAD_PRIVATE_KEY, "invalid private key"), \
PARA_ERROR(BAD_SAMPLE_FORMAT, "sample format not supported"), \
PARA_ERROR(BAD_SAMPLERATE, "sample rate not supported"), \
PARA_ERROR(ID3_SETENCODING, "could not set id3 text encoding field"), \
PARA_ERROR(ID3_SETSTRING, "could not set id3 string field"), \
PARA_ERROR(INCOHERENT_BLOCK_LEN, "incoherent block length"), \
PARA_ERROR(ID3_SETENCODING, "could not set id3 text encoding field"), \
PARA_ERROR(ID3_SETSTRING, "could not set id3 string field"), \
PARA_ERROR(INCOHERENT_BLOCK_LEN, "incoherent block length"), \
PARA_ERROR(KEY_MARKER, "invalid/missing key header or footer"), \
PARA_ERROR(KEY_PERM, "unprotected private key"), \
PARA_ERROR(LIBSAMPLERATE, "secret rabbit code error"), \
PARA_ERROR(KEY_MARKER, "invalid/missing key header or footer"), \
PARA_ERROR(KEY_PERM, "unprotected private key"), \
PARA_ERROR(LIBSAMPLERATE, "secret rabbit code error"), \
PARA_ERROR(PERM, "permission denied"), \
PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
PARA_ERROR(PERM, "permission denied"), \
PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
PARA_ERROR(PREBUFFER_SUCCESS, "prebuffering complete"), \
PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
PARA_ERROR(PUBLIC_KEY, "can not read public key"), \
PARA_ERROR(PREBUFFER_SUCCESS, "prebuffering complete"), \
PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
PARA_ERROR(PUBLIC_KEY, "can not read public key"), \
/** Check whether the system error bit is set. */
#define IS_SYSTEM_ERROR(num) (!!((num) & (1 << SYSTEM_ERROR_BIT)))
/** Check whether the osl error bit is set. */
#define IS_OSL_ERROR(num) (!!((num) & (1 << OSL_ERROR_BIT)))
/** Check whether the system error bit is set. */
#define IS_SYSTEM_ERROR(num) (!!((num) & (1 << SYSTEM_ERROR_BIT)))
/** Check whether the osl error bit is set. */
#define IS_OSL_ERROR(num) (!!((num) & (1 << OSL_ERROR_BIT)))
/** Set the system error bit for the given number. */
#define ERRNO_TO_PARA_ERROR(num) ((num) | (1 << SYSTEM_ERROR_BIT))
/** Set the osl error bit for the given number. */
#define OSL_ERRNO_TO_PARA_ERROR(num) ((num) | (1 << OSL_ERROR_BIT))
/** Set the system error bit for the given number. */
#define ERRNO_TO_PARA_ERROR(num) ((num) | (1 << SYSTEM_ERROR_BIT))
/** Set the osl error bit for the given number. */
#define OSL_ERRNO_TO_PARA_ERROR(num) ((num) | (1 << OSL_ERROR_BIT))
if (IS_SYSTEM_ERROR(num))
return strerror(num & ~(1U << SYSTEM_ERROR_BIT));
return para_errlist[num];
if (IS_SYSTEM_ERROR(num))
return strerror(num & ~(1U << SYSTEM_ERROR_BIT));
return para_errlist[num];