Files
obitools3/src/obierrno.h

37 lines
871 B
C
Raw Normal View History

/*
* obierrno.h
*
* Created on: 23 mai 2015
* Author: coissac
*/
#ifndef OBIERRNO_H_
#define OBIERRNO_H_
/**
* @brief The declaration of the external variable `obi_errno`.
*
* `obi_errno` is an equivalent of `errno` for the system level error
* but for for error generated by the C layer of the OBITools framework.
*
* @todo We have to look for defining this variable as thread specific.
*/
extern int obi_errno;
/**
* @brief set the global `obi_errno` variable with
* the specified `err` code
*
* This function is defined as a macro to reduce the risk
* to increase the problem generating the error by calling
* a new function.
*
* @param err the error code as an integer value
*
* @since May 2015
* @author Eric Coissac (eric.coissac@metabarcoding.org)
*/
#define obi_set_errno(err) (obi_errno = (err))
#endif /* OBIERRNO_H_ */