added hcl_seterrumsg() and hcl_seterrbfmt() in case the caller can't use variadic arguments
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
11
lib/err.c
11
lib/err.c
@ -242,6 +242,17 @@ void hcl_seterrnum (hcl_t* hcl, hcl_errnum_t errnum)
|
||||
hcl->errmsg.len = 0;
|
||||
}
|
||||
|
||||
void hcl_seterrbmsg (hcl_t* hcl, hcl_errnum_t errnum, const hcl_bch_t* errmsg)
|
||||
{
|
||||
hcl_seterrbfmt(hcl, errnum, "%hs", errmsg);
|
||||
}
|
||||
|
||||
|
||||
void hcl_seterrumsg (hcl_t* hcl, hcl_errnum_t errnum, const hcl_uch_t* errmsg)
|
||||
{
|
||||
hcl_seterrbfmt(hcl, errnum, "%ls", errmsg);
|
||||
}
|
||||
|
||||
|
||||
static int err_bcs (hcl_fmtout_t* fmtout, const hcl_bch_t* ptr, hcl_oow_t len)
|
||||
{
|
||||
|
Reference in New Issue
Block a user