updated vector to video version, will probably break a lot
This commit is contained in:
parent
c1e60a6d2f
commit
93dc0fa053
12 changed files with 461 additions and 97 deletions
|
|
@ -17,19 +17,27 @@ extern "C" {
|
|||
|
||||
extern int32_t arc_errno;
|
||||
|
||||
#ifdef ARC_DEBUG
|
||||
#include <stdio.h>
|
||||
//this is handy to override for if they user is doing terminal output and wants to change where logs are sent
|
||||
extern FILE *arc_errno_log_file;
|
||||
|
||||
#ifndef ARC_DEBUG_LOG_STREAM_OVERRIDE
|
||||
//this functin will be called on start, handy to set the log file to stdout if it is not overrided
|
||||
void __attribute__ ((constructor)) ARC_Errno_SetDefaultStream(void);
|
||||
#endif // !ARC_DEBUG_LOG_STREAM_OVERRIDE
|
||||
#endif // !ARC_DEBUG
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#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_LOG_ERROR(STR) fprintf(arc_errno_log_file, "[ERROR %d] " STR "\n", arc_errno)
|
||||
#define ARC_DEBUG_LOG_ERROR_WITH_VARIABLES(STR, ...) fprintf(arc_errno_log_file, "[ERROR %d] " STR "\n", arc_errno, __VA_ARGS__)
|
||||
#else
|
||||
# define ARC_DEBUG_LOG(ERR, STR, ...)
|
||||
# define ARC_DEBUG_ERR(STR)
|
||||
#endif
|
||||
#define ARC_DEBUG_LOG_ERROR(STR)
|
||||
#define ARC_DEBUG_LOG_ERROR_WITH_VARIABLES(STR, ...)
|
||||
#endif // !ARC_DEBUG
|
||||
|
||||
#define ARC_ERR_CHECK(FUNC) FUNC; if(arc_errno){ ARC_DEBUG_LOG(arc_errno, "%s", #FUNC); return; }
|
||||
|
||||
#endif //ARC_STD_ERRNO_H_
|
||||
#endif // !ARC_STD_ERRNO_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue