}
#pragma mark Top-Level Statics
+static const errno_desc_t _zero = {
+ .ed_error = 0,
+ .ed_sysexit = 0,
+ .ed_flags = 0,
+ .ed_sym = "0",
+ .ed_str = "successful termination",
+};
+
static const errno_desc_t _negative_one = {
.ed_error = __ENEG_ONE,
.ed_sysexit = EXIT_FAILURE,
static const errno_desc_t *
_find_sysexit(int code)
{
+ if (code == 0) {
+ return &_zero;
+ }
+
if (code == EX_BADRECEIPT_NP) {
return &_badreceipt;
}
return _find_error(code)->ed_str;
}
+const char *
+strexit_np(int code)
+{
+ const errno_desc_t *de = _find_sysexit(code);
+ return de->ed_str;
+}
+
const char *
symerror_np(int code)
{
- const errno_desc_t *de = _find_error(code);;
+ const errno_desc_t *de = _find_error(code);
return de->ed_sym;
}