Rename errno to errno_code

This commit is contained in:
Nick Chambers 2022-07-03 00:44:46 -05:00
parent 8c8fc79c03
commit 10e400303f
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
struct gargoyle_err {
gargoyle_err_type code;
int errno;
int errno_code;
char func[GARGOYLE_MAX_FUNC_SZ];
char errno_func[GARGOYLE_MAX_FUNC_SZ];
char msg[GARGOYLE_MAX_ERR_SZ];

View File

@ -6,8 +6,8 @@
void gargoyle_emit_err(struct gargoyle_err *err) {
fprintf(stderr, "%s(%u): ", err->func, err->code);
if(err->errno) {
fprintf(stderr, "%s(%d): ", err->errno_func, err->errno);
if(err->errno_code) {
fprintf(stderr, "%s(%d): ", err->errno_func, err->errno_code);
}
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, ...) {
err->code = code;
err->errno = errno_code;
err->errno_code = errno_code;
if(func) {