Rename errno to errno_code
This commit is contained in:
parent
8c8fc79c03
commit
10e400303f
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
struct gargoyle_err {
|
struct gargoyle_err {
|
||||||
gargoyle_err_type code;
|
gargoyle_err_type code;
|
||||||
int errno;
|
int errno_code;
|
||||||
char func[GARGOYLE_MAX_FUNC_SZ];
|
char func[GARGOYLE_MAX_FUNC_SZ];
|
||||||
char errno_func[GARGOYLE_MAX_FUNC_SZ];
|
char errno_func[GARGOYLE_MAX_FUNC_SZ];
|
||||||
char msg[GARGOYLE_MAX_ERR_SZ];
|
char msg[GARGOYLE_MAX_ERR_SZ];
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
void gargoyle_emit_err(struct gargoyle_err *err) {
|
void gargoyle_emit_err(struct gargoyle_err *err) {
|
||||||
fprintf(stderr, "%s(%u): ", err->func, err->code);
|
fprintf(stderr, "%s(%u): ", err->func, err->code);
|
||||||
|
|
||||||
if(err->errno) {
|
if(err->errno_code) {
|
||||||
fprintf(stderr, "%s(%d): ", err->errno_func, err->errno);
|
fprintf(stderr, "%s(%d): ", err->errno_func, err->errno_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "%s\n", err->msg);
|
fprintf(stderr, "%s\n", err->msg);
|
||||||
|
@ -15,7 +15,7 @@ void gargoyle_emit_err(struct gargoyle_err *err) {
|
||||||
|
|
||||||
void gargoyle_fill_err(struct gargoyle_err *err, gargoyle_err_type code, int errno_code, const char *func, const char *errno_func, const char *fmt, ...) {
|
void gargoyle_fill_err(struct gargoyle_err *err, gargoyle_err_type code, int errno_code, const char *func, const char *errno_func, const char *fmt, ...) {
|
||||||
err->code = code;
|
err->code = code;
|
||||||
err->errno = errno_code;
|
err->errno_code = errno_code;
|
||||||
|
|
||||||
|
|
||||||
if(func) {
|
if(func) {
|
||||||
|
|
Loading…
Reference in New Issue