changed hcl_geterrnum() to HCL_ERRNUM().
All checks were successful
continuous-integration/drone/push Build is passing

reintroduced hcl_geterrnum() as a function
This commit is contained in:
2024-02-03 13:36:05 +09:00
parent d339338a40
commit 9aa1bde1a1
15 changed files with 125 additions and 113 deletions

View File

@ -179,6 +179,12 @@ static hcl_uch_t e_unknown_u[] = {'u','n','k','n','o','w','n',' ','e','r','r','o
# define e_unknown e_unknown_u
#endif
int hcl_errnum_is_synerr (hcl_errnum_t errnum)
{
return errnum == HCL_ESYNERR;
}
const hcl_ooch_t* hcl_errnum_to_errstr (hcl_errnum_t errnum)
{
return (errnum >= 0 && errnum < HCL_COUNTOF(errstr))? errstr[errnum]: e_unknown;
@ -268,6 +274,11 @@ const hcl_ooch_t* hcl_backuperrmsg (hcl_t* hcl)
return hcl->errmsg.tmpbuf.ooch;
}
hcl_errnum_t hcl_geterrnum (hcl_t* hcl)
{
return HCL_ERRNUM(hcl);
}
void hcl_seterrnum (hcl_t* hcl, hcl_errnum_t errnum)
{
if (hcl->shuterr) return;