huge redesign
This commit is contained in:
parent
46e26e41e5
commit
85d0bad350
4 changed files with 66 additions and 81 deletions
|
|
@ -10,16 +10,12 @@
|
|||
#define ARC_ERRNO_OVERFLOW -0x05
|
||||
#define ARC_ERRNO_INIT -0x06
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
static int32_t arc_errno = 0;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int32_t arc_errno;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -27,7 +23,7 @@ extern "C" {
|
|||
#ifdef ARC_DEBUG
|
||||
# include <stdio.h>
|
||||
# define ARC_DEBUG_LOG(ERR, STR, ...) printf("[ERROR %d] " STR "\n", ERR, __VA_ARGS__)
|
||||
# define ARC_DEBUG_ERR(STR) printf("[ERROR %d]" STR "\n", arc_errno)
|
||||
# define ARC_DEBUG_ERR(STR) printf("[ERROR %d] " STR "\n", arc_errno)
|
||||
#else
|
||||
# define ARC_DEBUG_LOG(ERR, STR, ...)
|
||||
# define ARC_DEBUG_ERR(STR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue