#include "ykyh.h"
#include <stddef.h>
Go to the source code of this file.
◆ ERR
#define ERR |
( |
| name, |
|
|
| desc ) |
Value:
Definition at line 21 of file error.c.
21#define ERR(name, desc) \
22 { name, #name, desc }
◆ ykyh_strerror()
const char * ykyh_strerror |
( |
ykyh_rc | err | ) |
|
Definition at line 40 of file error.c.
40 {
41 static const char *
unknown =
"Unknown ykyh error";
43
44 if (-err < 0 || -err >= (int) (sizeof(errors) / sizeof(errors[0]))) {
46 }
47
51 }
52
54}
◆ ykyh_strerror_name()
const char * ykyh_strerror_name |
( |
ykyh_rc | err | ) |
|
Definition at line 56 of file error.c.
56 {
57 if (-err < 0 || -err >= (int) (sizeof(errors) / sizeof(errors[0]))) {
58 return NULL;
59 }
60
61 return errors[-err].
name;
62}